From owner-svn-src-projects@freebsd.org Mon Mar 2 17:34:48 2020 Return-Path: Delivered-To: svn-src-projects@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E1970254EFB for ; Mon, 2 Mar 2020 17:34:48 +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 48WS2J2ybxz428Q; Mon, 2 Mar 2020 17:34:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-7.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 520B52D8C3; Mon, 2 Mar 2020 17:34:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r358053 - projects/nfs-over-tls/sys/fs/nfsclient To: Rick Macklem , Rick Macklem , "src-committers@freebsd.org" , "svn-src-projects@freebsd.org" References: <202002172110.01HLAXZY003012@repo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Mon, 2 Mar 2020 09:34:45 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 17:34:49 -0000 On 2/28/20 8:57 PM, Rick Macklem wrote: > John Baldwin wrote: >> On 2/17/20 1:10 PM, Rick Macklem wrote: >>> Author: rmacklem >>> Date: Mon Feb 17 21:10:32 2020 >>> New Revision: 358053 >>> URL: https://svnweb.freebsd.org/changeset/base/358053 >>> >>> Log: >>> Update nfs_clrpcops.c to handle ext_pgs mbufs, including the additional >>> argument to nfscl_reqstart() to tell it if it should build ext_pgs mbufs. >>> >>> This completes most of the conversion to support of ext_pgs mbufs, but >>> there are still a couple of areas to fix. >>> 1 - The code that the MDS uses to do a proxy to a DS for a pNFS server. >>> 2 - The krpc code on the receive side. (The NFS code now handles the >>> ext_pgs mbufs, but they are being created by copying the regular mbuf >>> list when the NFS code gets it from the krpc.) The krpc still needs >>> to be fixed so it can handle a list of ext_pgs mbufs handed to it >>> by soreceive(). >> >> Note that the current KTLS RX support I've worked on is a bit different in that >> it doesn't use ext_pgs mbufs. Instead the socket buffer contains a list of >> records (OpenSSL uses recvmsg()) where there is a control mbuf with the TLS >> header followed by a chain of normal mbufs with the data. As such, you will >> only have to construct ext_pgs mbufs for the send side. Receive will still >> be getting regular mbufs. For receive you probably want to check the TLS >> record type and do something (not sure?) with any non-application-data records, >> but otherwise just treat the payload of application-data records the same as >> you do for the non-TLS case. > Ok. I've already done the receive side code changes to handle ext_pgs mbufs > in the krpc/nfs code, so if it becomes easier/more efficient to put the receive > data in ext_pgs mbufs, that can be handled. (Someday there may be net > interfaces that perform better using ext_pgs mbufs?) > > Any non-data records that need to be handled by OpenSSL in userspace can > be passed up/handled by the daemons, similar to SSL_connect()/SSL_accept(). > > Thanks for the info John, rick Ok. After sending this, I do think it is likely that for NICs able to do TLS RX without TOE, TLS records may indeed arrive as ext_pgs mbufs, but by the time you would get them out of the socket buffer the TLS headers and trailers would be stripped and they would just be unmapped mbufs holding the TLS record payload. The TLS header would still be in a control message in the socket buffer. I started testing my KTLS RX software branch Friday btw (panicked right away of course, but it's hopefully not too far away). For now I'm only focused on TLS 1.0-1.2, but will get to 1.3 eventually. I suspect for 1.3 that early data will still be handled in userland and just as for KTLS TX, KTLS RX will only be used with the second set of keys. -- John Baldwin From owner-svn-src-projects@freebsd.org Mon Mar 2 22:40:15 2020 Return-Path: Delivered-To: svn-src-projects@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E7AE125C9FC for ; Mon, 2 Mar 2020 22:40:15 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660067.outbound.protection.outlook.com [40.107.66.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WZpl4fVlz4NjH; Mon, 2 Mar 2020 22:40:15 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SBqoM6/NJdciGpuHxcLqd29IHOwwxXSLdPYcjvj9iUP7PM2tjyfwK/lx1yjDyyPXGxGcxp62Z6eQCkL5m7MmgaR446EYEIWjcYkRP95FHl/8hyJRfomuRyJy+KZp5sZsUEBlpdzTNZZTRUkBgQrzPbMN5TSwVGmd470vLiEGuX5iklr23HsDIQEpIkmKeZyE8/1qZ/vH9bP9/HoRumXYgd9y21DZHJuu0V771Zv08os3BQfff6Z6z6Bj9fRBruA63qUhJu3O3KOGbnWbW7qefAFfZ/76E3AFSTwKCTjsbMXVqUuLEiUQG1HbBEqgZBRSIEhTaAcfH599rGfr7qBzVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BWukORKliU/ZKcCxK1C19vVTpqo7VZCx4Q7mTwVTSO0=; b=nWxSBZYMg5dHNDwiJha2UQoJTUvKKlpBLj8s0XBBRvMa114jqh3mP+Zy+oZBAz1G9RWTiiLNWrgDM+UnF+DzcwVGJB1+kPpFc7rqdUZ8pde6PYyqhhfxNdMPosBS9mjJyOJrk6+FoDATkHB4TF+f5KYYL9w/BCtU3nkOgnAKmW4asm93n3WmmX3P2nig5WqjGGuciBKpbHrfkqa47CysuRiaxgmKwW/8zWsG4mP4h6RfGUMIk/drfdjaLU7gxMNYuKjN6HoPw6Kjr9LWmAETwrNoGEDN5w9uNbge3Aq1g7VduH57VvTDEAvSvH/SPkZheUGr1eml/ZnwACKzmkbCXQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=uoguelph.ca; dmarc=pass action=none header.from=uoguelph.ca; dkim=pass header.d=uoguelph.ca; arc=none Received: from YTBPR01MB3374.CANPRD01.PROD.OUTLOOK.COM (10.255.46.82) by YTBPR01MB4029.CANPRD01.PROD.OUTLOOK.COM (10.255.12.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.15; Mon, 2 Mar 2020 22:40:13 +0000 Received: from YTBPR01MB3374.CANPRD01.PROD.OUTLOOK.COM ([fe80::a50d:6237:4074:f9c4]) by YTBPR01MB3374.CANPRD01.PROD.OUTLOOK.COM ([fe80::a50d:6237:4074:f9c4%6]) with mapi id 15.20.2772.019; Mon, 2 Mar 2020 22:40:13 +0000 From: Rick Macklem To: John Baldwin , Rick Macklem , "src-committers@freebsd.org" , "svn-src-projects@freebsd.org" Subject: Re: svn commit: r358053 - projects/nfs-over-tls/sys/fs/nfsclient Thread-Topic: svn commit: r358053 - projects/nfs-over-tls/sys/fs/nfsclient Thread-Index: AQHV7dDxwBYPOhnzy0GhC4ymRJHhbqgxm+kugAP6L4CAAFK4dg== Date: Mon, 2 Mar 2020 22:40:13 +0000 Message-ID: References: <202002172110.01HLAXZY003012@repo.freebsd.org> , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ff3bc689-6817-4b7f-5329-08d7befaac46 x-ms-traffictypediagnostic: YTBPR01MB4029: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 033054F29A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(396003)(39860400002)(136003)(376002)(366004)(189003)(199004)(7696005)(86362001)(478600001)(450100002)(6506007)(71200400001)(53546011)(5660300002)(966005)(2906002)(316002)(786003)(66446008)(66556008)(64756008)(66476007)(110136005)(66946007)(186003)(8676002)(26005)(81156014)(33656002)(52536014)(9686003)(55016002)(8936002)(81166006)(76116006)(91956017); DIR:OUT; SFP:1101; SCL:1; SRVR:YTBPR01MB4029; H:YTBPR01MB3374.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: H+tEk1E9zPyet1C11C37g6/M9oyDwFWc+9lOG3k3e73+gDYh/A6RUpaqQROXLeHETaWTobtDJP7CvPxGd8BkU5DJECo45gxuxVi8AsLXxBq+tYlo4n1hQwtGlqFcoJeAZipJDc4SJUS1jlnlJQ6DIIZmlTBJ+D31p+BW1uzHVAEXgaHEpY8QP6F7r01DBBFAtAxKmcCbUhwrVqPwblHAdo2ZpPywgdJP11Z+opkBQZacjmJxfaq0ipxYH4ykuZS9usV0pnQ8xGpNnTgaU/WgE2r06KR08EbQCqPiDWQZAjPDyG6htxXAMGUo686yPAag9EESj+4BnkTkPADylHRcSpe/x1LWV5kwWlxQHc12SqNUvDjNGU0quhv20+xSN0z3LDm2IQeNC4MZx7X/IY0WOtz0rFetEw30IUO+2TizTWF+M0CErrflhC66M5V4hCuyuyaE7zGLGF49L4jUuH0QGUS5FPoaTfEZpG1PJhwnnuyztzFy0HtEa2OFN3CiTk8C98fjHPwVuaUtDsCEovFb1A== x-ms-exchange-antispam-messagedata: +VX3v/BcNVwkBt6+CfEHaMFD42Oyx4omXOhAqGn3mbObKqjCzreGyXKzqJu3dDIQGkTnj1xNaZG3nldOqhQs34F7zCb29Xuof5RJntP1eQOaJM/xxpFx6eVvx7AzRKvhz1gvj4/Lr6k1qKO0FvPlBw== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: ff3bc689-6817-4b7f-5329-08d7befaac46 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Mar 2020 22:40:13.6376 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: RUN4FekEdQob0lMjARRnK1OfFqC97BBWOOTKZPRwDG49IoV2tw7712kkDUZz7rt+gnepftxvtuJ+GttdefhroQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTBPR01MB4029 X-Rspamd-Queue-Id: 48WZpl4fVlz4NjH X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.89 / 15.00]; NEURAL_HAM_MEDIUM(-0.89)[-0.889,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 22:40:16 -0000 John Baldwin wrote:=0A= >On 2/28/20 8:57 PM, Rick Macklem wrote:=0A= >> John Baldwin wrote:=0A= >>> On 2/17/20 1:10 PM, Rick Macklem wrote:=0A= >>>> Author: rmacklem=0A= >>>> Date: Mon Feb 17 21:10:32 2020=0A= >>>> New Revision: 358053=0A= >>>> URL: https://svnweb.freebsd.org/changeset/base/358053=0A= >>>>=0A= >>>> Log:=0A= >>>> Update nfs_clrpcops.c to handle ext_pgs mbufs, including the additio= nal=0A= >>>> argument to nfscl_reqstart() to tell it if it should build ext_pgs m= bufs.=0A= >>>>=0A= >>>> This completes most of the conversion to support of ext_pgs mbufs, b= ut=0A= >>>> there are still a couple of areas to fix.=0A= >>>> 1 - The code that the MDS uses to do a proxy to a DS for a pNFS serv= er.=0A= >>>> 2 - The krpc code on the receive side. (The NFS code now handles the= =0A= >>>> ext_pgs mbufs, but they are being created by copying the regular= mbuf=0A= >>>> list when the NFS code gets it from the krpc.) The krpc still ne= eds=0A= >>>> to be fixed so it can handle a list of ext_pgs mbufs handed to i= t=0A= >>>> by soreceive().=0A= >>>=0A= >>> Note that the current KTLS RX support I've worked on is a bit different= in that=0A= >>> it doesn't use ext_pgs mbufs. Instead the socket buffer contains a lis= t of=0A= >>> records (OpenSSL uses recvmsg()) where there is a control mbuf with the= TLS=0A= >>> header followed by a chain of normal mbufs with the data. As such, you= will=0A= >>> only have to construct ext_pgs mbufs for the send side. Receive will s= till=0A= >>> be getting regular mbufs. For receive you probably want to check the T= LS=0A= >>> record type and do something (not sure?) with any non-application-data = records,=0A= >>> but otherwise just treat the payload of application-data records the sa= me as=0A= >>> you do for the non-TLS case.=0A= >> Ok. I've already done the receive side code changes to handle ext_pgs mb= ufs=0A= >> in the krpc/nfs code, so if it becomes easier/more efficient to put the = receive=0A= >> data in ext_pgs mbufs, that can be handled. (Someday there may be net=0A= >> interfaces that perform better using ext_pgs mbufs?)=0A= >>=0A= >> Any non-data records that need to be handled by OpenSSL in userspace can= =0A= >> be passed up/handled by the daemons, similar to SSL_connect()/SSL_accept= ().=0A= >>=0A= >> Thanks for the info John, rick=0A= >=0A= >Ok. After sending this, I do think it is likely that for NICs able to do = TLS=0A= >RX without TOE, TLS records may indeed arrive as ext_pgs mbufs, but by the= time=0A= >you would get them out of the socket buffer the TLS headers and trailers w= ould=0A= >be stripped and they would just be unmapped mbufs holding the TLS record p= ayload.=0A= >The TLS header would still be in a control message in the socket buffer.= =0A= Should be fine for the code I've written, so long as the pages are anonymou= s.=0A= (If not, the code will need to know a way to allocate a page.)=0A= For example, I have a function similar to m_split(), but it doesn't try to = duplicate=0A= a hdr mbuf and handles anonymous ext_pgs mbufs. When the split is in the=0A= middle of a page, it allocates a new mbuf with a new page for the first par= tial=0A= page and moves the rest of the pages to it.=0A= (Actually, all of the functions like m_split() could be generalized to hand= le=0A= ext_pgs mbufs if there was an "allocate page" function for them and if mbu= fs=0A= with an m_len =3D=3D 0 were allowed in the chain.)=0A= =0A= >I started testing my KTLS RX software branch Friday btw (panicked right aw= ay=0A= >of course, but it's hopefully not too far away). For now I'm only focused= on=0A= >TLS 1.0-1.2, but will get to 1.3 eventually. I suspect for 1.3 that early= data=0A= >will still be handled in userland and just as for KTLS TX, KTLS RX will on= ly=0A= >be used with the second set of keys.=0A= John, I didn't think you ever wrote code that crashed;-)=0A= Sounds good. Let me know when you have patch(es) to test.=0A= =0A= Have fun with it, rick=0A= =0A= --=0A= John Baldwin=0A= From owner-svn-src-projects@freebsd.org Tue Mar 3 00:02:25 2020 Return-Path: Delivered-To: svn-src-projects@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 976D025EC2D for ; Tue, 3 Mar 2020 00:02:25 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660049.outbound.protection.outlook.com [40.107.66.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WcdY3Glzz3xq5; Tue, 3 Mar 2020 00:02:24 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iTyDnYgANXQg0bGt5UJPNi+Z5e/KgnOVJNYDJq6ZyQtFGpLmD2sCxre7mGJwv+rktJqubpN7HXOw4VOBw7QixAJeDWDWFka9FyK6XbqkLdldjCVmA9W591sZD8C0LpemCC8fKbt23lzzo+VygQqaGFUv0PbHtBmrMgwnnobxl1hnKRzjtP0idVqg5N+K9rgt9y7kE3XT+eiaZd5YCLM1+7QaEbo7o8PgB88mTfjtH9/pQY5bZmx+F3XaS+6iruGE8vhsI0b3x9MUnkpcAkV/Ebs0tVCXnNTrJR5P1/WTnwfHQ3/m6IlrSN4E2lDeJOAQbUmBqsrRtO2CEzoxojhX0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=T04TfJAgXbotl53WG2ZnSF27//5rrQEVHyywtYyN/4Q=; b=SGJaLqWdGVSUVjhoaPmEyyn2EIphUkgVIueMq1jvSn4lFf6P5ajfc5tB1TDT0c4vx6kvBY0ZtEK9KSILvyeRXQPppFZp2KIKDRe5LMdcimRt3rySboAFthKSig7PSxx9T05pb2omL7+bJntEVV/J/wArMQsAGNwsUH+Ri9cwSQrbGjQ6Hx9v8eAITFskv5rcbV3K0YECQT0WHL0SchE/tg91Wj+XTwtteolLmkO9/9Qf5ym3WRZZk2FACQ9ijeHyJstxr55DR+pzuDa74c1EbdgyFp/6uKTyJwl17YLK9QqLtbCFTfoSjQVTar8FtwivaRYEnxNREMD8Qc4ixYibkg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=uoguelph.ca; dmarc=pass action=none header.from=uoguelph.ca; dkim=pass header.d=uoguelph.ca; arc=none Received: from YTBPR01MB3374.CANPRD01.PROD.OUTLOOK.COM (10.255.46.82) by YTBPR01MB2368.CANPRD01.PROD.OUTLOOK.COM (10.255.12.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.15; Tue, 3 Mar 2020 00:02:23 +0000 Received: from YTBPR01MB3374.CANPRD01.PROD.OUTLOOK.COM ([fe80::a50d:6237:4074:f9c4]) by YTBPR01MB3374.CANPRD01.PROD.OUTLOOK.COM ([fe80::a50d:6237:4074:f9c4%6]) with mapi id 15.20.2772.019; Tue, 3 Mar 2020 00:02:23 +0000 From: Rick Macklem To: John Baldwin , Rick Macklem , "src-committers@freebsd.org" , "svn-src-projects@freebsd.org" Subject: Re: svn commit: r358053 - projects/nfs-over-tls/sys/fs/nfsclient Thread-Topic: svn commit: r358053 - projects/nfs-over-tls/sys/fs/nfsclient Thread-Index: AQHV7dDxwBYPOhnzy0GhC4ymRJHhbqgxm+kugAP6L4CAAGpuFg== Date: Tue, 3 Mar 2020 00:02:23 +0000 Message-ID: References: <202002172110.01HLAXZY003012@repo.freebsd.org> , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ac2970fe-c3ef-48c2-0bfe-08d7bf0626b7 x-ms-traffictypediagnostic: YTBPR01MB2368: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 03319F6FEF x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(366004)(376002)(396003)(39860400002)(136003)(199004)(189003)(8676002)(186003)(66946007)(110136005)(66476007)(81156014)(786003)(316002)(4744005)(66446008)(64756008)(66556008)(81166006)(8936002)(2906002)(76116006)(9686003)(33656002)(55016002)(52536014)(450100002)(71200400001)(6506007)(7696005)(86362001)(478600001)(5660300002); DIR:OUT; SFP:1101; SCL:1; SRVR:YTBPR01MB2368; H:YTBPR01MB3374.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Tj6sRSfIIbDKW6KY0/qFMDVJ7aWM+oCJPwOYwQE1At93Kp9vpld287L5F2UWleqnmuS3aXgvYRrTj3rXVm34M1qZoQ07UyWizOkpciLmYPWmnLHbzQH67WExrCVi9YKKpS7ceCaQl+IP3b2SR0en65F7Vxa7/Npuyh2Y7qPuk8+lS55Qz4RcHmIc6vHJOyoJo/a6CsnEfDkhIDDQIU6iQa8HuNir/mWsBUp5Sc5pOWR/85xq6tlLgaQqma/5vvs4KDNKjqsV/Ph2Npb2/xgy4xnqBE5pvJG5iwz8CazKlP6pLb6Z5IsV3Hvgx5Jk1izYfqX9rz2PXM/tQq2esa0dCVKxoMVKGosf/Qb1R35i9e9XfmvBtzX9qYlSW/9iMNShTtH43H17smBL6sfeaFJybfU9x4oStLsomT2ailCpbJ5n/BDWVuQ73thicrDobpE1 x-ms-exchange-antispam-messagedata: NapwY1QNRPOEWJtk2v0IC0tM4JS/4tN+VMjmVX0tKsAHZsRY7MpRqAX46zoYm+HMn6dRuvC/GT4zTxMZ0Pkwsy64aoNwGR4AkwUTWuE9JyzyUg9h+GnMtaOmOWWuV9AEKuj4hYcZ4ZyMV466XwcvNIO9VJg29XQmBkG4VQ/0BRXhrJ2JmH9HeNyNtqzYNZ/4GBV12LwdMEubx5ACDV/i7g== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: ac2970fe-c3ef-48c2-0bfe-08d7bf0626b7 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Mar 2020 00:02:23.5364 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Bvm7F/voEIKK+uq9/r+DtgRv/6z3R1Y7xOfEEflStJeUvX1oiZDpXsyIiCOysqFgoUG3L6tdRcSnjunygSOGXg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTBPR01MB2368 X-Rspamd-Queue-Id: 48WcdY3Glzz3xq5 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.89 / 15.00]; NEURAL_HAM_MEDIUM(-0.89)[-0.889,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 00:02:25 -0000 John Baldwin wrote:=0A= [stuff snipped]=0A= >I started testing my KTLS RX software branch Friday btw (panicked right aw= ay=0A= >of course, but it's hopefully not too far away). For now I'm only focused= on=0A= >TLS 1.0-1.2, but will get to 1.3 eventually. I suspect for 1.3 that early= data=0A= >will still be handled in userland and just as for KTLS TX, KTLS RX will on= ly=0A= >be used with the second set of keys.=0A= Just fyi, when I switch the client side daemon to use TLS1.2 instead of=0A= TLS1.3, those two records (238 bytes each) that showed up in the socket=0A= receive queue do not show up. (ie. They are TLS1.3 specific, so we won't=0A= need to worry about them for now.)=0A= =0A= Have fun with it, rick=0A= =0A= --=0A= John Baldwin=0A= From owner-svn-src-projects@freebsd.org Thu Mar 5 17:58:05 2020 Return-Path: Delivered-To: svn-src-projects@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 993BF26F7BA for ; Thu, 5 Mar 2020 17:58: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 48YJPn2vSqz47GL; Thu, 5 Mar 2020 17:58: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 202D0B05F; Thu, 5 Mar 2020 17:58:05 +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 025Hw5jD072335; Thu, 5 Mar 2020 17:58:05 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025HtbZL072241; Thu, 5 Mar 2020 17:55:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003051755.025HtbZL072241@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 5 Mar 2020 17:55:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r358678 - in projects/clang1000-import: . contrib/dtc contrib/elftoolchain/readelf contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/... X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in projects/clang1000-import: . contrib/dtc contrib/elftoolchain/readelf contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/l... X-SVN-Commit-Revision: 358678 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 17:58:05 -0000 Author: dim Date: Thu Mar 5 17:55:36 2020 New Revision: 358678 URL: https://svnweb.freebsd.org/changeset/base/358678 Log: Merge ^/head r358466 through r358677. Added: projects/clang1000-import/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu - copied unchanged from r358676, head/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu projects/clang1000-import/contrib/ntp/include/ntp_calgps.h - copied unchanged from r358676, head/contrib/ntp/include/ntp_calgps.h projects/clang1000-import/contrib/ntp/include/ntp_psl.h - copied unchanged from r358676, head/contrib/ntp/include/ntp_psl.h projects/clang1000-import/contrib/ntp/include/timexsup.h - copied unchanged from r358676, head/contrib/ntp/include/timexsup.h projects/clang1000-import/contrib/ntp/libntp/ntp_calgps.c - copied unchanged from r358676, head/contrib/ntp/libntp/ntp_calgps.c projects/clang1000-import/contrib/ntp/libntp/timespecops.c - copied unchanged from r358676, head/contrib/ntp/libntp/timespecops.c projects/clang1000-import/contrib/ntp/libntp/timexsup.c - copied unchanged from r358676, head/contrib/ntp/libntp/timexsup.c projects/clang1000-import/contrib/ntp/ntpd/psl0.conf - copied unchanged from r358676, head/contrib/ntp/ntpd/psl0.conf projects/clang1000-import/contrib/ntp/ntpd/psl1.conf - copied unchanged from r358676, head/contrib/ntp/ntpd/psl1.conf projects/clang1000-import/contrib/ntp/ntpd/psl2.conf - copied unchanged from r358676, head/contrib/ntp/ntpd/psl2.conf projects/clang1000-import/usr.bin/elfctl/ - copied from r358676, head/usr.bin/elfctl/ projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_dflag_a_eb.out - copied unchanged from r358676, head/usr.bin/hexdump/tests/d_hexdump_dflag_a_eb.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_dflag_a_el.out - copied unchanged from r358676, head/usr.bin/hexdump/tests/d_hexdump_dflag_a_el.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_dflag_b_eb.out - copied unchanged from r358676, head/usr.bin/hexdump/tests/d_hexdump_dflag_b_eb.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_dflag_b_el.out - copied unchanged from r358676, head/usr.bin/hexdump/tests/d_hexdump_dflag_b_el.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_dflag_c_eb.out - copied unchanged from r358676, head/usr.bin/hexdump/tests/d_hexdump_dflag_c_eb.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_dflag_c_el.out - copied unchanged from r358676, head/usr.bin/hexdump/tests/d_hexdump_dflag_c_el.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_oflag_a_eb.out - copied unchanged from r358676, head/usr.bin/hexdump/tests/d_hexdump_oflag_a_eb.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_oflag_a_el.out - copied unchanged from r358676, head/usr.bin/hexdump/tests/d_hexdump_oflag_a_el.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_oflag_b_eb.out - copied unchanged from r358676, head/usr.bin/hexdump/tests/d_hexdump_oflag_b_eb.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_oflag_b_el.out - copied unchanged from r358676, head/usr.bin/hexdump/tests/d_hexdump_oflag_b_el.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_oflag_c_eb.out - copied unchanged from r358676, head/usr.bin/hexdump/tests/d_hexdump_oflag_c_eb.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_oflag_c_el.out - copied unchanged from r358676, head/usr.bin/hexdump/tests/d_hexdump_oflag_c_el.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_xflag_a_eb.out - copied unchanged from r358676, head/usr.bin/hexdump/tests/d_hexdump_xflag_a_eb.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_xflag_a_el.out - copied unchanged from r358676, head/usr.bin/hexdump/tests/d_hexdump_xflag_a_el.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_xflag_b_eb.out - copied unchanged from r358676, head/usr.bin/hexdump/tests/d_hexdump_xflag_b_eb.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_xflag_b_el.out - copied unchanged from r358676, head/usr.bin/hexdump/tests/d_hexdump_xflag_b_el.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_xflag_c_eb.out - copied unchanged from r358676, head/usr.bin/hexdump/tests/d_hexdump_xflag_c_eb.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_xflag_c_el.out - copied unchanged from r358676, head/usr.bin/hexdump/tests/d_hexdump_xflag_c_el.out Deleted: projects/clang1000-import/contrib/dtc/ projects/clang1000-import/contrib/libstdc++/ projects/clang1000-import/gnu/usr.bin/dtc/ projects/clang1000-import/share/man/man4/bktr.4 projects/clang1000-import/sys/dev/bktr/CHANGELOG.TXT projects/clang1000-import/sys/dev/bktr/bktr_audio.c projects/clang1000-import/sys/dev/bktr/bktr_audio.h projects/clang1000-import/sys/dev/bktr/bktr_card.c projects/clang1000-import/sys/dev/bktr/bktr_card.h projects/clang1000-import/sys/dev/bktr/bktr_core.c projects/clang1000-import/sys/dev/bktr/bktr_core.h projects/clang1000-import/sys/dev/bktr/bktr_i2c.c projects/clang1000-import/sys/dev/bktr/bktr_i2c.h projects/clang1000-import/sys/dev/bktr/bktr_mem.c projects/clang1000-import/sys/dev/bktr/bktr_mem.h projects/clang1000-import/sys/dev/bktr/bktr_os.c projects/clang1000-import/sys/dev/bktr/bktr_os.h projects/clang1000-import/sys/dev/bktr/bktr_reg.h projects/clang1000-import/sys/dev/bktr/bktr_tuner.c projects/clang1000-import/sys/dev/bktr/bktr_tuner.h projects/clang1000-import/sys/dev/bktr/ioctl_bt848.h projects/clang1000-import/sys/dev/bktr/ioctl_meteor.h projects/clang1000-import/sys/dev/bktr/msp34xx.c projects/clang1000-import/sys/i386/include/ioctl_bt848.h projects/clang1000-import/sys/i386/include/ioctl_meteor.h projects/clang1000-import/sys/modules/bktr/Makefile projects/clang1000-import/sys/modules/bktr/Makefile.inc projects/clang1000-import/sys/modules/bktr/bktr/Makefile projects/clang1000-import/sys/modules/bktr/bktr_mem/Makefile projects/clang1000-import/tools/build/options/WITHOUT_GPL_DTC projects/clang1000-import/tools/build/options/WITH_GPL_DTC projects/clang1000-import/tools/tools/controlelf/ projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_dflag_a.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_dflag_b.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_dflag_c.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_oflag_a.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_oflag_b.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_oflag_c.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_xflag_a.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_xflag_b.out projects/clang1000-import/usr.bin/hexdump/tests/d_hexdump_xflag_c.out Modified: projects/clang1000-import/Makefile.inc1 projects/clang1000-import/ObsoleteFiles.inc projects/clang1000-import/UPDATING projects/clang1000-import/contrib/elftoolchain/readelf/readelf.c projects/clang1000-import/contrib/libarchive/cpio/cpio.c projects/clang1000-import/contrib/libarchive/cpio/cpio.h projects/clang1000-import/contrib/libarchive/cpio/test/test_format_newc.c projects/clang1000-import/contrib/libarchive/libarchive/archive_read.c projects/clang1000-import/contrib/libarchive/libarchive/archive_read_open_filename.c projects/clang1000-import/contrib/libarchive/libarchive/archive_read_support_format_xar.c projects/clang1000-import/contrib/libarchive/libarchive/archive_util.c projects/clang1000-import/contrib/libarchive/libarchive/archive_write_disk_posix.c projects/clang1000-import/contrib/libarchive/libarchive/archive_write_set_format_xar.c projects/clang1000-import/contrib/libarchive/libarchive/cpio.5 projects/clang1000-import/contrib/libarchive/libarchive/test/test_read_format_zip.c projects/clang1000-import/contrib/ntp/COPYRIGHT projects/clang1000-import/contrib/ntp/ChangeLog projects/clang1000-import/contrib/ntp/CommitLog projects/clang1000-import/contrib/ntp/NEWS projects/clang1000-import/contrib/ntp/config.h.in projects/clang1000-import/contrib/ntp/configure projects/clang1000-import/contrib/ntp/configure.ac projects/clang1000-import/contrib/ntp/html/accopt.html projects/clang1000-import/contrib/ntp/html/clockopt.html projects/clang1000-import/contrib/ntp/html/confopt.html projects/clang1000-import/contrib/ntp/html/copyright.html projects/clang1000-import/contrib/ntp/html/discipline.html projects/clang1000-import/contrib/ntp/html/drivers/driver20.html projects/clang1000-import/contrib/ntp/html/drivers/driver29.html projects/clang1000-import/contrib/ntp/html/miscopt.html projects/clang1000-import/contrib/ntp/include/Makefile.am projects/clang1000-import/contrib/ntp/include/Makefile.in projects/clang1000-import/contrib/ntp/include/ntp.h projects/clang1000-import/contrib/ntp/include/ntp_calendar.h projects/clang1000-import/contrib/ntp/include/ntp_config.h projects/clang1000-import/contrib/ntp/include/ntp_control.h projects/clang1000-import/contrib/ntp/include/ntp_fp.h projects/clang1000-import/contrib/ntp/include/ntp_io.h projects/clang1000-import/contrib/ntp/include/ntp_refclock.h projects/clang1000-import/contrib/ntp/include/ntp_request.h projects/clang1000-import/contrib/ntp/include/ntp_stdlib.h projects/clang1000-import/contrib/ntp/include/ntp_syslog.h projects/clang1000-import/contrib/ntp/include/ntpd.h projects/clang1000-import/contrib/ntp/include/timespecops.h projects/clang1000-import/contrib/ntp/libntp/Makefile.am projects/clang1000-import/contrib/ntp/libntp/Makefile.in projects/clang1000-import/contrib/ntp/libntp/decodenetnum.c projects/clang1000-import/contrib/ntp/libntp/dofptoa.c projects/clang1000-import/contrib/ntp/libntp/dolfptoa.c projects/clang1000-import/contrib/ntp/libntp/mstolfp.c projects/clang1000-import/contrib/ntp/libntp/msyslog.c projects/clang1000-import/contrib/ntp/libntp/ntp_calendar.c projects/clang1000-import/contrib/ntp/libntp/recvbuff.c projects/clang1000-import/contrib/ntp/libntp/statestr.c projects/clang1000-import/contrib/ntp/libntp/systime.c projects/clang1000-import/contrib/ntp/libparse/Makefile.am projects/clang1000-import/contrib/ntp/libparse/Makefile.in projects/clang1000-import/contrib/ntp/libparse/clk_rawdcf.c projects/clang1000-import/contrib/ntp/ntpd/Makefile.am projects/clang1000-import/contrib/ntp/ntpd/Makefile.in projects/clang1000-import/contrib/ntp/ntpd/cmd_args.c projects/clang1000-import/contrib/ntp/ntpd/complete.conf.in projects/clang1000-import/contrib/ntp/ntpd/invoke-ntp.conf.texi projects/clang1000-import/contrib/ntp/ntpd/invoke-ntp.keys.texi projects/clang1000-import/contrib/ntp/ntpd/invoke-ntpd.texi projects/clang1000-import/contrib/ntp/ntpd/keyword-gen-utd projects/clang1000-import/contrib/ntp/ntpd/keyword-gen.c projects/clang1000-import/contrib/ntp/ntpd/ntp.conf.5man projects/clang1000-import/contrib/ntp/ntpd/ntp.conf.5mdoc projects/clang1000-import/contrib/ntp/ntpd/ntp.conf.def projects/clang1000-import/contrib/ntp/ntpd/ntp.conf.html projects/clang1000-import/contrib/ntp/ntpd/ntp.conf.man.in projects/clang1000-import/contrib/ntp/ntpd/ntp.conf.mdoc.in projects/clang1000-import/contrib/ntp/ntpd/ntp.keys.5man projects/clang1000-import/contrib/ntp/ntpd/ntp.keys.5mdoc projects/clang1000-import/contrib/ntp/ntpd/ntp.keys.html projects/clang1000-import/contrib/ntp/ntpd/ntp.keys.man.in projects/clang1000-import/contrib/ntp/ntpd/ntp.keys.mdoc.in projects/clang1000-import/contrib/ntp/ntpd/ntp_config.c projects/clang1000-import/contrib/ntp/ntpd/ntp_control.c projects/clang1000-import/contrib/ntp/ntpd/ntp_io.c projects/clang1000-import/contrib/ntp/ntpd/ntp_keyword.h projects/clang1000-import/contrib/ntp/ntpd/ntp_leapsec.c projects/clang1000-import/contrib/ntp/ntpd/ntp_leapsec.h projects/clang1000-import/contrib/ntp/ntpd/ntp_loopfilter.c projects/clang1000-import/contrib/ntp/ntpd/ntp_parser.c projects/clang1000-import/contrib/ntp/ntpd/ntp_parser.h projects/clang1000-import/contrib/ntp/ntpd/ntp_peer.c projects/clang1000-import/contrib/ntp/ntpd/ntp_proto.c projects/clang1000-import/contrib/ntp/ntpd/ntp_refclock.c projects/clang1000-import/contrib/ntp/ntpd/ntp_request.c projects/clang1000-import/contrib/ntp/ntpd/ntp_restrict.c projects/clang1000-import/contrib/ntp/ntpd/ntp_scanner.c projects/clang1000-import/contrib/ntp/ntpd/ntp_util.c projects/clang1000-import/contrib/ntp/ntpd/ntpd-opts.c projects/clang1000-import/contrib/ntp/ntpd/ntpd-opts.h projects/clang1000-import/contrib/ntp/ntpd/ntpd.1ntpdman projects/clang1000-import/contrib/ntp/ntpd/ntpd.1ntpdmdoc projects/clang1000-import/contrib/ntp/ntpd/ntpd.c projects/clang1000-import/contrib/ntp/ntpd/ntpd.html projects/clang1000-import/contrib/ntp/ntpd/ntpd.man.in projects/clang1000-import/contrib/ntp/ntpd/ntpd.mdoc.in projects/clang1000-import/contrib/ntp/ntpd/refclock_gpsdjson.c projects/clang1000-import/contrib/ntp/ntpd/refclock_jupiter.c projects/clang1000-import/contrib/ntp/ntpd/refclock_nmea.c projects/clang1000-import/contrib/ntp/ntpd/refclock_oncore.c projects/clang1000-import/contrib/ntp/ntpd/refclock_palisade.c projects/clang1000-import/contrib/ntp/ntpd/refclock_palisade.h projects/clang1000-import/contrib/ntp/ntpd/refclock_parse.c projects/clang1000-import/contrib/ntp/ntpd/refclock_zyfer.c projects/clang1000-import/contrib/ntp/ntpdate/ntpdate.c projects/clang1000-import/contrib/ntp/ntpdc/invoke-ntpdc.texi projects/clang1000-import/contrib/ntp/ntpdc/layout.std projects/clang1000-import/contrib/ntp/ntpdc/ntpdc-opts.c projects/clang1000-import/contrib/ntp/ntpdc/ntpdc-opts.h projects/clang1000-import/contrib/ntp/ntpdc/ntpdc.1ntpdcman projects/clang1000-import/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc projects/clang1000-import/contrib/ntp/ntpdc/ntpdc.c projects/clang1000-import/contrib/ntp/ntpdc/ntpdc.html projects/clang1000-import/contrib/ntp/ntpdc/ntpdc.man.in projects/clang1000-import/contrib/ntp/ntpdc/ntpdc.mdoc.in projects/clang1000-import/contrib/ntp/ntpdc/ntpdc_ops.c projects/clang1000-import/contrib/ntp/ntpq/Makefile.am projects/clang1000-import/contrib/ntp/ntpq/Makefile.in projects/clang1000-import/contrib/ntp/ntpq/invoke-ntpq.texi projects/clang1000-import/contrib/ntp/ntpq/ntpq-opts.c projects/clang1000-import/contrib/ntp/ntpq/ntpq-opts.h projects/clang1000-import/contrib/ntp/ntpq/ntpq-subs.c projects/clang1000-import/contrib/ntp/ntpq/ntpq.1ntpqman projects/clang1000-import/contrib/ntp/ntpq/ntpq.1ntpqmdoc projects/clang1000-import/contrib/ntp/ntpq/ntpq.c projects/clang1000-import/contrib/ntp/ntpq/ntpq.h projects/clang1000-import/contrib/ntp/ntpq/ntpq.html projects/clang1000-import/contrib/ntp/ntpq/ntpq.man.in projects/clang1000-import/contrib/ntp/ntpq/ntpq.mdoc.in projects/clang1000-import/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi projects/clang1000-import/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c projects/clang1000-import/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h projects/clang1000-import/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman projects/clang1000-import/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc projects/clang1000-import/contrib/ntp/ntpsnmpd/ntpsnmpd.html projects/clang1000-import/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in projects/clang1000-import/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in projects/clang1000-import/contrib/ntp/packageinfo.sh projects/clang1000-import/contrib/ntp/parseutil/dcfd.c projects/clang1000-import/contrib/ntp/scripts/build/mkver.in projects/clang1000-import/contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts projects/clang1000-import/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman projects/clang1000-import/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc projects/clang1000-import/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html projects/clang1000-import/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in projects/clang1000-import/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in projects/clang1000-import/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi projects/clang1000-import/contrib/ntp/scripts/invoke-plot_summary.texi projects/clang1000-import/contrib/ntp/scripts/invoke-summary.texi projects/clang1000-import/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi projects/clang1000-import/contrib/ntp/scripts/ntp-wait/ntp-wait-opts projects/clang1000-import/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman projects/clang1000-import/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc projects/clang1000-import/contrib/ntp/scripts/ntp-wait/ntp-wait.html projects/clang1000-import/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in projects/clang1000-import/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in projects/clang1000-import/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi projects/clang1000-import/contrib/ntp/scripts/ntpsweep/ntpsweep-opts projects/clang1000-import/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman projects/clang1000-import/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc projects/clang1000-import/contrib/ntp/scripts/ntpsweep/ntpsweep.html projects/clang1000-import/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in projects/clang1000-import/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in projects/clang1000-import/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi projects/clang1000-import/contrib/ntp/scripts/ntptrace/ntptrace-opts projects/clang1000-import/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman projects/clang1000-import/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc projects/clang1000-import/contrib/ntp/scripts/ntptrace/ntptrace.html projects/clang1000-import/contrib/ntp/scripts/ntptrace/ntptrace.man.in projects/clang1000-import/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in projects/clang1000-import/contrib/ntp/scripts/plot_summary-opts projects/clang1000-import/contrib/ntp/scripts/plot_summary.1plot_summaryman projects/clang1000-import/contrib/ntp/scripts/plot_summary.1plot_summarymdoc projects/clang1000-import/contrib/ntp/scripts/plot_summary.html projects/clang1000-import/contrib/ntp/scripts/plot_summary.man.in projects/clang1000-import/contrib/ntp/scripts/plot_summary.mdoc.in projects/clang1000-import/contrib/ntp/scripts/summary-opts projects/clang1000-import/contrib/ntp/scripts/summary.1summaryman projects/clang1000-import/contrib/ntp/scripts/summary.1summarymdoc projects/clang1000-import/contrib/ntp/scripts/summary.html projects/clang1000-import/contrib/ntp/scripts/summary.man.in projects/clang1000-import/contrib/ntp/scripts/summary.mdoc.in projects/clang1000-import/contrib/ntp/scripts/update-leap/invoke-update-leap.texi projects/clang1000-import/contrib/ntp/scripts/update-leap/update-leap-opts projects/clang1000-import/contrib/ntp/scripts/update-leap/update-leap.1update-leapman projects/clang1000-import/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc projects/clang1000-import/contrib/ntp/scripts/update-leap/update-leap.html projects/clang1000-import/contrib/ntp/scripts/update-leap/update-leap.man.in projects/clang1000-import/contrib/ntp/scripts/update-leap/update-leap.mdoc.in projects/clang1000-import/contrib/ntp/sntp/COPYRIGHT projects/clang1000-import/contrib/ntp/sntp/configure projects/clang1000-import/contrib/ntp/sntp/configure.ac projects/clang1000-import/contrib/ntp/sntp/crypto.c projects/clang1000-import/contrib/ntp/sntp/include/copyright.def projects/clang1000-import/contrib/ntp/sntp/include/version.def projects/clang1000-import/contrib/ntp/sntp/include/version.texi projects/clang1000-import/contrib/ntp/sntp/invoke-sntp.texi projects/clang1000-import/contrib/ntp/sntp/libevent/build-aux/ar-lib projects/clang1000-import/contrib/ntp/sntp/libevent/build-aux/compile projects/clang1000-import/contrib/ntp/sntp/libevent/build-aux/config.guess projects/clang1000-import/contrib/ntp/sntp/libevent/build-aux/config.sub projects/clang1000-import/contrib/ntp/sntp/libevent/build-aux/depcomp projects/clang1000-import/contrib/ntp/sntp/libevent/build-aux/install-sh projects/clang1000-import/contrib/ntp/sntp/libevent/build-aux/missing projects/clang1000-import/contrib/ntp/sntp/libevent/build-aux/test-driver projects/clang1000-import/contrib/ntp/sntp/libevent/build-aux/ylwrap projects/clang1000-import/contrib/ntp/sntp/libevent/test/regress.gen.c projects/clang1000-import/contrib/ntp/sntp/libevent/test/regress.gen.h projects/clang1000-import/contrib/ntp/sntp/libopts/m4/libopts.m4 projects/clang1000-import/contrib/ntp/sntp/m4/ntp_problemtests.m4 projects/clang1000-import/contrib/ntp/sntp/m4/version.m4 projects/clang1000-import/contrib/ntp/sntp/main.c projects/clang1000-import/contrib/ntp/sntp/networking.c projects/clang1000-import/contrib/ntp/sntp/scm-rev projects/clang1000-import/contrib/ntp/sntp/sntp-opts.c projects/clang1000-import/contrib/ntp/sntp/sntp-opts.h projects/clang1000-import/contrib/ntp/sntp/sntp.1sntpman projects/clang1000-import/contrib/ntp/sntp/sntp.1sntpmdoc projects/clang1000-import/contrib/ntp/sntp/sntp.html projects/clang1000-import/contrib/ntp/sntp/sntp.man.in projects/clang1000-import/contrib/ntp/sntp/sntp.mdoc.in projects/clang1000-import/contrib/ntp/sntp/tests/run-crypto.c projects/clang1000-import/contrib/ntp/sntp/tests/run-keyFile.c projects/clang1000-import/contrib/ntp/sntp/tests/run-kodDatabase.c projects/clang1000-import/contrib/ntp/sntp/tests/run-kodFile.c projects/clang1000-import/contrib/ntp/sntp/tests/run-networking.c projects/clang1000-import/contrib/ntp/sntp/tests/run-packetHandling.c projects/clang1000-import/contrib/ntp/sntp/tests/run-packetProcessing.c projects/clang1000-import/contrib/ntp/sntp/tests/run-t-log.c projects/clang1000-import/contrib/ntp/sntp/tests/run-utilities.c projects/clang1000-import/contrib/ntp/sntp/tests/testconf.yml projects/clang1000-import/contrib/ntp/sntp/version.c projects/clang1000-import/contrib/ntp/util/invoke-ntp-keygen.texi projects/clang1000-import/contrib/ntp/util/ntp-keygen-opts.c projects/clang1000-import/contrib/ntp/util/ntp-keygen-opts.h projects/clang1000-import/contrib/ntp/util/ntp-keygen.1ntp-keygenman projects/clang1000-import/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc projects/clang1000-import/contrib/ntp/util/ntp-keygen.html projects/clang1000-import/contrib/ntp/util/ntp-keygen.man.in projects/clang1000-import/contrib/ntp/util/ntp-keygen.mdoc.in projects/clang1000-import/contrib/ntp/util/ntptime.c projects/clang1000-import/etc/mtree/BSD.include.dist projects/clang1000-import/gnu/usr.bin/Makefile projects/clang1000-import/include/Makefile projects/clang1000-import/lib/libarchive/tests/Makefile projects/clang1000-import/lib/libc/gen/ftw.3 projects/clang1000-import/lib/libc/powerpc64/string/bcopy_resolver.c projects/clang1000-import/lib/libc/sys/_umtx_op.2 projects/clang1000-import/lib/libc/sys/thr_self.2 projects/clang1000-import/lib/libprocstat/libprocstat.c projects/clang1000-import/libexec/tftpd/tests/functional.c projects/clang1000-import/libexec/tftpd/tftp-file.c projects/clang1000-import/libexec/tftpd/tftp-file.h projects/clang1000-import/libexec/tftpd/tftp-options.c projects/clang1000-import/libexec/tftpd/tftp-options.h projects/clang1000-import/libexec/tftpd/tftp-transfer.c projects/clang1000-import/libexec/tftpd/tftp-utils.c projects/clang1000-import/libexec/tftpd/tftp-utils.h projects/clang1000-import/libexec/tftpd/tftpd.8 projects/clang1000-import/release/packages/generate-ucl.sh projects/clang1000-import/sbin/dumpon/dumpon.c projects/clang1000-import/sbin/mount_nfs/mount_nfs.c projects/clang1000-import/share/man/man4/Makefile projects/clang1000-import/share/man/man4/ismt.4 projects/clang1000-import/share/man/man4/man4.i386/ctau.4 projects/clang1000-import/share/man/man4/man4.i386/cx.4 projects/clang1000-import/share/man/man4/ng_car.4 projects/clang1000-import/share/man/man5/src.conf.5 projects/clang1000-import/share/mk/src.opts.mk projects/clang1000-import/stand/i386/Makefile.inc projects/clang1000-import/stand/i386/boot.ldscript projects/clang1000-import/stand/i386/boot2/Makefile projects/clang1000-import/stand/i386/gptboot/Makefile projects/clang1000-import/stand/i386/gptzfsboot/Makefile projects/clang1000-import/stand/i386/isoboot/Makefile projects/clang1000-import/stand/i386/loader/Makefile projects/clang1000-import/stand/i386/zfsboot/Makefile projects/clang1000-import/sys/arm64/arm64/genassym.c projects/clang1000-import/sys/arm64/arm64/identcpu.c projects/clang1000-import/sys/arm64/arm64/locore.S projects/clang1000-import/sys/arm64/arm64/machdep.c projects/clang1000-import/sys/arm64/include/armreg.h projects/clang1000-import/sys/arm64/include/cpu.h projects/clang1000-import/sys/arm64/include/cpufunc.h projects/clang1000-import/sys/arm64/include/machdep.h projects/clang1000-import/sys/cam/cam_xpt.c projects/clang1000-import/sys/cam/ctl/ctl_ha.c projects/clang1000-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c projects/clang1000-import/sys/compat/linprocfs/linprocfs.c projects/clang1000-import/sys/compat/linux/linux_mib.c projects/clang1000-import/sys/compat/linux/linux_mib.h projects/clang1000-import/sys/compat/linux/linux_misc.c projects/clang1000-import/sys/compat/linux/linux_misc.h projects/clang1000-import/sys/compat/linux/linux_mmap.c projects/clang1000-import/sys/compat/linuxkpi/common/src/linux_compat.c projects/clang1000-import/sys/conf/NOTES projects/clang1000-import/sys/conf/files projects/clang1000-import/sys/conf/options projects/clang1000-import/sys/contrib/ipfilter/netinet/ip_compat.h projects/clang1000-import/sys/contrib/ipfilter/netinet/ip_fil.h projects/clang1000-import/sys/contrib/ipfilter/netinet/ip_nat.c projects/clang1000-import/sys/contrib/ipfilter/netinet/ip_proxy.c projects/clang1000-import/sys/contrib/ipfilter/netinet/ip_state.c projects/clang1000-import/sys/contrib/ipfilter/netinet/ip_sync.c projects/clang1000-import/sys/dev/aacraid/aacraid.c projects/clang1000-import/sys/dev/aacraid/aacraid_cam.c projects/clang1000-import/sys/dev/acpica/acpi_button.c projects/clang1000-import/sys/dev/acpica/acpi_lid.c projects/clang1000-import/sys/dev/al_eth/al_eth.c projects/clang1000-import/sys/dev/ale/if_ale.c projects/clang1000-import/sys/dev/arcmsr/arcmsr.c projects/clang1000-import/sys/dev/arcmsr/arcmsr.h projects/clang1000-import/sys/dev/bce/if_bce.c projects/clang1000-import/sys/dev/bce/if_bcereg.h projects/clang1000-import/sys/dev/bnxt/if_bnxt.c projects/clang1000-import/sys/dev/bxe/bxe.c projects/clang1000-import/sys/dev/bxe/bxe.h projects/clang1000-import/sys/dev/cpufreq/cpufreq_dt.c projects/clang1000-import/sys/dev/ctau/if_ct.c projects/clang1000-import/sys/dev/cx/if_cx.c projects/clang1000-import/sys/dev/cxgb/cxgb_osdep.h projects/clang1000-import/sys/dev/cxgb/cxgb_sge.c projects/clang1000-import/sys/dev/isci/isci.h projects/clang1000-import/sys/dev/isci/isci_controller.c projects/clang1000-import/sys/dev/isci/isci_io_request.c projects/clang1000-import/sys/dev/iscsi_initiator/isc_cam.c projects/clang1000-import/sys/dev/iscsi_initiator/isc_sm.c projects/clang1000-import/sys/dev/iscsi_initiator/isc_soc.c projects/clang1000-import/sys/dev/iscsi_initiator/isc_subr.c projects/clang1000-import/sys/dev/iscsi_initiator/iscsi_subr.c projects/clang1000-import/sys/dev/iscsi_initiator/iscsivar.h projects/clang1000-import/sys/dev/ismt/ismt.c projects/clang1000-import/sys/dev/mlx5/mlx5_en/mlx5_en_main.c projects/clang1000-import/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c projects/clang1000-import/sys/dev/mlx5/port.h projects/clang1000-import/sys/dev/mmc/host/dwmmc.c projects/clang1000-import/sys/dev/mmc/host/dwmmc_hisi.c projects/clang1000-import/sys/dev/mmc/host/dwmmc_var.h projects/clang1000-import/sys/dev/mxge/if_mxge.c projects/clang1000-import/sys/dev/sound/pcm/dsp.c projects/clang1000-import/sys/dev/sound/pcm/mixer.c projects/clang1000-import/sys/dev/sound/pcm/sound.c projects/clang1000-import/sys/dev/sound/pcm/sound.h projects/clang1000-import/sys/dev/usb/input/ukbd.c projects/clang1000-import/sys/dev/virtio/virtio.c projects/clang1000-import/sys/dev/wtap/if_wtap.c projects/clang1000-import/sys/dev/wtap/if_wtapvar.h projects/clang1000-import/sys/dev/xen/netback/netback.c projects/clang1000-import/sys/fs/nullfs/null_vfsops.c projects/clang1000-import/sys/kern/kern_descrip.c projects/clang1000-import/sys/kern/kern_exec.c projects/clang1000-import/sys/kern/kern_linker.c projects/clang1000-import/sys/kern/kern_sendfile.c projects/clang1000-import/sys/kern/kern_shutdown.c projects/clang1000-import/sys/kern/kern_synch.c projects/clang1000-import/sys/kern/kern_thread.c projects/clang1000-import/sys/kern/kern_umtx.c projects/clang1000-import/sys/kern/sched_4bsd.c projects/clang1000-import/sys/kern/sched_ule.c projects/clang1000-import/sys/kern/subr_kobj.c projects/clang1000-import/sys/kern/uipc_ktls.c projects/clang1000-import/sys/kern/uipc_shm.c projects/clang1000-import/sys/kern/vfs_bio.c projects/clang1000-import/sys/kern/vfs_cache.c projects/clang1000-import/sys/kern/vfs_lookup.c projects/clang1000-import/sys/kern/vfs_mountroot.c projects/clang1000-import/sys/modules/Makefile projects/clang1000-import/sys/net/if.c projects/clang1000-import/sys/net/if_edsc.c projects/clang1000-import/sys/net/if_llatbl.c projects/clang1000-import/sys/net/if_llatbl.h projects/clang1000-import/sys/net/if_var.h projects/clang1000-import/sys/net/route.c projects/clang1000-import/sys/netgraph/ng_car.c projects/clang1000-import/sys/netgraph/ng_car.h projects/clang1000-import/sys/netinet/icmp6.h projects/clang1000-import/sys/netinet/ip6.h projects/clang1000-import/sys/netinet/tcp_hpts.c projects/clang1000-import/sys/netinet/tcp_syncache.c projects/clang1000-import/sys/netinet6/in6_fib.c projects/clang1000-import/sys/netinet6/in6_fib.h projects/clang1000-import/sys/netinet6/in6_src.c projects/clang1000-import/sys/netinet6/ip6_fastfwd.c projects/clang1000-import/sys/netinet6/ip6_output.c projects/clang1000-import/sys/netinet6/ip6_var.h projects/clang1000-import/sys/nlm/nlm_prot_impl.c projects/clang1000-import/sys/powerpc/conf/NOTES projects/clang1000-import/sys/powerpc/powernv/platform_powernv.c projects/clang1000-import/sys/powerpc/powerpc/uma_machdep.c projects/clang1000-import/sys/rpc/rpc_generic.c projects/clang1000-import/sys/security/audit/audit_bsm.c projects/clang1000-import/sys/security/audit/audit_bsm_klib.c projects/clang1000-import/sys/sys/elf_common.h projects/clang1000-import/sys/sys/filedesc.h projects/clang1000-import/sys/sys/param.h projects/clang1000-import/sys/sys/refcount.h projects/clang1000-import/sys/sys/signalvar.h projects/clang1000-import/sys/sys/syscallsubr.h projects/clang1000-import/sys/ufs/ffs/ffs_alloc.c projects/clang1000-import/sys/vm/uma_core.c projects/clang1000-import/sys/vm/vm_mmap.c projects/clang1000-import/sys/vm/vm_page.c projects/clang1000-import/targets/pseudo/userland/Makefile.depend projects/clang1000-import/targets/pseudo/userland/gnu/Makefile.depend projects/clang1000-import/tests/sys/net/Makefile projects/clang1000-import/tests/sys/net/if_epair.c projects/clang1000-import/tests/sys/netinet/redirect.sh projects/clang1000-import/tests/sys/netinet6/redirect.sh projects/clang1000-import/tools/boot/ci-qemu-test.sh projects/clang1000-import/usr.bin/Makefile projects/clang1000-import/usr.bin/calendar/calendars/calendar.history projects/clang1000-import/usr.bin/hexdump/tests/Makefile projects/clang1000-import/usr.bin/hexdump/tests/hexdump_test.sh projects/clang1000-import/usr.bin/netstat/inet6.c projects/clang1000-import/usr.bin/tftp/main.c projects/clang1000-import/usr.bin/tftp/tftp.1 projects/clang1000-import/usr.sbin/ntp/config.h projects/clang1000-import/usr.sbin/ntp/libntp/Makefile projects/clang1000-import/usr.sbin/powerd/powerd.8 projects/clang1000-import/usr.sbin/powerd/powerd.c Directory Properties: projects/clang1000-import/ (props changed) projects/clang1000-import/contrib/elftoolchain/ (props changed) projects/clang1000-import/contrib/libarchive/ (props changed) projects/clang1000-import/contrib/ntp/ (props changed) projects/clang1000-import/sys/cddl/contrib/opensolaris/ (props changed) projects/clang1000-import/sys/contrib/ipfilter/ (props changed) Modified: projects/clang1000-import/Makefile.inc1 ============================================================================== --- projects/clang1000-import/Makefile.inc1 Thu Mar 5 17:53:38 2020 (r358677) +++ projects/clang1000-import/Makefile.inc1 Thu Mar 5 17:55:36 2020 (r358678) @@ -2233,12 +2233,6 @@ ${_bt}-usr.bin/clang/llvm-tblgen: ${_bt}-lib/clang/lib ${_bt}-usr.bin/clang/lldb-tblgen: ${_bt}-lib/clang/libllvmminimal .endif -# Build BSDL or GPL DTC depending on GPL_DTC option. -_dtc= usr.bin/dtc -.if ${MK_GPL_DTC} != "no" -_dtc= gnu/usr.bin/dtc -.endif - .if ${MK_LOCALES} != "no" _localedef= usr.bin/localedef .endif @@ -2360,7 +2354,7 @@ bootstrap-tools: ${_bt}-links .PHONY ${_clang_tblgen} \ ${_kerberos5_bootstrap_tools} \ ${_strfile} \ - ${_dtc} \ + usr.bin/dtc \ ${_cat} \ ${_kbdcontrol} \ ${_elftoolchain_libs} \ Modified: projects/clang1000-import/ObsoleteFiles.inc ============================================================================== --- projects/clang1000-import/ObsoleteFiles.inc Thu Mar 5 17:53:38 2020 (r358677) +++ projects/clang1000-import/ObsoleteFiles.inc Thu Mar 5 17:55:36 2020 (r358678) @@ -273,6 +273,16 @@ OLD_DIRS+=usr/lib/clang/9.0.1/lib/freebsd OLD_DIRS+=usr/lib/clang/9.0.1/lib OLD_DIRS+=usr/lib/clang/9.0.1 +# 20200301: bktr removed +OLD_DIRS+=usr/include/dev/bktr +OLD_FILES+=usr/include/dev/bktr/ioctl_bktr.h +OLD_FILES+=usr/include/dev/bktr/ioctl_bt848.h +OLD_FILES+=usr/include/dev/bktr/ioctl_meteor.h +.if ${TARGET_ARCH} == "i386" +OLD_FILES+=usr/include/machine/ioctl_bktr.h +OLD_FILES+=usr/include/machine/ioctl_meteor.h +.endif +OLD_FILES+=usr/share/man/man4/bktr.4.gz # 20200229: GCC 4.2.1 removed .if !defined(WITH_PORT_BASE_GCC) OLD_FILES+=usr/bin/g++ @@ -875,7 +885,6 @@ OLD_FILES+=usr/lib32/libsupc++.so OLD_LIBS+=usr/lib32/libsupc++.so.1 OLD_FILES+=usr/lib32/libsupc++_p.a .endif -OLD_FILES+=usr/libexec/cc1plus OLD_LIBS+=usr/lib/libgomp.so.1 OLD_FILES+=usr/lib/libgomp_p.a OLD_FILES+=usr/lib32/libgcov.a Modified: projects/clang1000-import/UPDATING ============================================================================== --- projects/clang1000-import/UPDATING Thu Mar 5 17:53:38 2020 (r358677) +++ projects/clang1000-import/UPDATING Thu Mar 5 17:55:36 2020 (r358678) @@ -32,6 +32,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: information about prerequisites and upgrading, if you are not already using clang 3.5.0 or higher. +20200301: + Removed brooktree driver (bktr.4) from the tree. + +20200229: + The WITH_GPL_DTC option has been removed. The BSD-licenced device tree + compiler in usr.bin/dtc is used on all architectures which use dtc, and + the GPL dtc is available (if needed) from the sysutils/dtc port. + 20200229: The WITHOUT_LLVM_LIBUNWIND option has been removed. LLVM's libunwind is used by all supported CPU architectures. Modified: projects/clang1000-import/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- projects/clang1000-import/contrib/elftoolchain/readelf/readelf.c Thu Mar 5 17:53:38 2020 (r358677) +++ projects/clang1000-import/contrib/elftoolchain/readelf/readelf.c Thu Mar 5 17:55:36 2020 (r358678) @@ -3669,6 +3669,9 @@ dump_notes(struct readelf *re) static struct flag_desc note_feature_ctl_flags[] = { { NT_FREEBSD_FCTL_ASLR_DISABLE, "ASLR_DISABLE" }, + { NT_FREEBSD_FCTL_PROTMAX_DISABLE, "PROTMAX_DISABLE" }, + { NT_FREEBSD_FCTL_STKGAP_DISABLE, "STKGAP_DISABLE" }, + { NT_FREEBSD_FCTL_WXNEEDED, "WXNEEDED" }, { 0, NULL } }; @@ -3725,6 +3728,7 @@ dump_notes_content(struct readelf *re, const char *buf { Elf_Note *note; const char *end, *name; + uint32_t namesz, descsz; printf("\nNotes at offset %#010jx with length %#010jx:\n", (uintmax_t) off, (uintmax_t) sz); @@ -3736,9 +3740,16 @@ dump_notes_content(struct readelf *re, const char *buf return; } note = (Elf_Note *)(uintptr_t) buf; + namesz = roundup2(note->n_namesz, 4); + descsz = roundup2(note->n_descsz, 4); + if (namesz < note->n_namesz || descsz < note->n_descsz || + buf + namesz + descsz > end) { + warnx("invalid note header"); + return; + } buf += sizeof(Elf_Note); name = buf; - buf += roundup2(note->n_namesz, 4); + buf += namesz; /* * The name field is required to be nul-terminated, and * n_namesz includes the terminating nul in observed @@ -3757,7 +3768,7 @@ dump_notes_content(struct readelf *re, const char *buf printf(" %s\n", note_type(name, re->ehdr.e_type, note->n_type)); dump_notes_data(re, name, note->n_type, buf, note->n_descsz); - buf += roundup2(note->n_descsz, 4); + buf += descsz; } } Modified: projects/clang1000-import/contrib/libarchive/cpio/cpio.c ============================================================================== --- projects/clang1000-import/contrib/libarchive/cpio/cpio.c Thu Mar 5 17:53:38 2020 (r358677) +++ projects/clang1000-import/contrib/libarchive/cpio/cpio.c Thu Mar 5 17:55:36 2020 (r358678) @@ -737,7 +737,7 @@ file_to_archive(struct cpio *cpio, const char *srcpath */ destpath = srcpath; if (cpio->destdir) { - len = strlen(cpio->destdir) + strlen(srcpath) + 8; + len = cpio->destdir_len + strlen(srcpath) + 8; if (len >= cpio->pass_destpath_alloc) { while (len >= cpio->pass_destpath_alloc) { cpio->pass_destpath_alloc += 512; @@ -1228,15 +1228,14 @@ mode_pass(struct cpio *cpio, const char *destdir) struct lafe_line_reader *lr; const char *p; int r; - size_t destdir_len; /* Ensure target dir has a trailing '/' to simplify path surgery. */ - destdir_len = strlen(destdir); - cpio->destdir = malloc(destdir_len + 8); - memcpy(cpio->destdir, destdir, destdir_len); - if (destdir_len == 0 || destdir[destdir_len - 1] != '/') - cpio->destdir[destdir_len++] = '/'; - cpio->destdir[destdir_len++] = '\0'; + cpio->destdir_len = strlen(destdir); + cpio->destdir = malloc(cpio->destdir_len + 8); + memcpy(cpio->destdir, destdir, cpio->destdir_len); + if (cpio->destdir_len == 0 || destdir[cpio->destdir_len - 1] != '/') + cpio->destdir[cpio->destdir_len++] = '/'; + cpio->destdir[cpio->destdir_len] = '\0'; cpio->archive = archive_write_disk_new(); if (cpio->archive == NULL) Modified: projects/clang1000-import/contrib/libarchive/cpio/cpio.h ============================================================================== --- projects/clang1000-import/contrib/libarchive/cpio/cpio.h Thu Mar 5 17:53:38 2020 (r358677) +++ projects/clang1000-import/contrib/libarchive/cpio/cpio.h Thu Mar 5 17:55:36 2020 (r358678) @@ -64,6 +64,7 @@ struct cpio { int option_numeric_uid_gid; /* -n */ int option_rename; /* -r */ char *destdir; + size_t destdir_len; size_t pass_destpath_alloc; char *pass_destpath; int uid_override; Modified: projects/clang1000-import/contrib/libarchive/cpio/test/test_format_newc.c ============================================================================== --- projects/clang1000-import/contrib/libarchive/cpio/test/test_format_newc.c Thu Mar 5 17:53:38 2020 (r358677) +++ projects/clang1000-import/contrib/libarchive/cpio/test/test_format_newc.c Thu Mar 5 17:55:36 2020 (r358678) @@ -49,10 +49,11 @@ is_hex(const char *p, size_t l) return (1); } -static int +/* Convert up to 8 hex characters to unsigned 32-bit decimal integer */ +static uint32_t from_hex(const char *p, size_t l) { - int r = 0; + uint32_t r = 0; while (l > 0) { r *= 16; @@ -82,11 +83,11 @@ DEFINE_TEST(test_format_newc) { FILE *list; int r; - int devmajor, devminor, ino, gid; - int uid = -1; + uint32_t devmajor, devminor, ino, gid, uid; time_t t, t2, now; char *p, *e; - size_t s, fs, ns; + size_t s; + uint64_t fs, ns; char result[1024]; assertUmask(0); @@ -199,9 +200,11 @@ DEFINE_TEST(test_format_newc) #else assertEqualInt(0x81a4, from_hex(e + 14, 8)); /* Mode */ #endif - if (uid < 0) - uid = from_hex(e + 22, 8); +#if defined(_WIN32) + uid = from_hex(e + 22, 8); +#else assertEqualInt(from_hex(e + 22, 8), uid); /* uid */ +#endif gid = from_hex(e + 30, 8); /* gid */ assertEqualMem(e + 38, "00000003", 8); /* nlink */ t = from_hex(e + 46, 8); /* mtime */ @@ -215,14 +218,14 @@ DEFINE_TEST(test_format_newc) " first appearance should be empty, so this file size\n" " field should be zero"); assertEqualInt(0, from_hex(e + 54, 8)); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); devmajor = from_hex(e + 62, 8); /* devmajor */ devminor = from_hex(e + 70, 8); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000006", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "file1\0", 6); /* Name contents */ @@ -249,14 +252,14 @@ DEFINE_TEST(test_format_newc) " at t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualMem(e + 54, "00000005", 8); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000008", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "symlink\0\0\0", 10); /* Name contents */ @@ -285,14 +288,14 @@ DEFINE_TEST(test_format_newc) "t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualMem(e + 54, "00000000", 8); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000004", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "dir\0\0\0", 6); /* Name contents */ @@ -319,14 +322,14 @@ DEFINE_TEST(test_format_newc) "t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualInt(10, from_hex(e + 54, 8)); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000009", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "hardlink\0\0", 10); /* Name contents */ Modified: projects/clang1000-import/contrib/libarchive/libarchive/archive_read.c ============================================================================== --- projects/clang1000-import/contrib/libarchive/libarchive/archive_read.c Thu Mar 5 17:53:38 2020 (r358677) +++ projects/clang1000-import/contrib/libarchive/libarchive/archive_read.c Thu Mar 5 17:55:36 2020 (r358678) @@ -892,15 +892,16 @@ archive_read_data(struct archive *_a, void *buff, size len = a->read_data_remaining; if (len > s) len = s; - if (len) + if (len) { memcpy(dest, a->read_data_block, len); - s -= len; - a->read_data_block += len; - a->read_data_remaining -= len; - a->read_data_output_offset += len; - a->read_data_offset += len; - dest += len; - bytes_read += len; + s -= len; + a->read_data_block += len; + a->read_data_remaining -= len; + a->read_data_output_offset += len; + a->read_data_offset += len; + dest += len; + bytes_read += len; + } } } a->read_data_is_posix_read = 0; Modified: projects/clang1000-import/contrib/libarchive/libarchive/archive_read_open_filename.c ============================================================================== --- projects/clang1000-import/contrib/libarchive/libarchive/archive_read_open_filename.c Thu Mar 5 17:53:38 2020 (r358677) +++ projects/clang1000-import/contrib/libarchive/libarchive/archive_read_open_filename.c Thu Mar 5 17:55:36 2020 (r358678) @@ -221,7 +221,9 @@ file_open(struct archive *a, void *client_data) struct read_file_data *mine = (struct read_file_data *)client_data; void *buffer; const char *filename = NULL; +#if defined(_WIN32) && !defined(__CYGWIN__) const wchar_t *wfilename = NULL; +#endif int fd = -1; int is_disk_like = 0; #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) @@ -281,10 +283,12 @@ file_open(struct archive *a, void *client_data) #endif } if (fstat(fd, &st) != 0) { +#if defined(_WIN32) && !defined(__CYGWIN__) if (mine->filename_type == FNT_WCS) archive_set_error(a, errno, "Can't stat '%S'", wfilename); else +#endif archive_set_error(a, errno, "Can't stat '%s'", filename); goto fail; Modified: projects/clang1000-import/contrib/libarchive/libarchive/archive_read_support_format_xar.c ============================================================================== --- projects/clang1000-import/contrib/libarchive/libarchive/archive_read_support_format_xar.c Thu Mar 5 17:53:38 2020 (r358677) +++ projects/clang1000-import/contrib/libarchive/libarchive/archive_read_support_format_xar.c Thu Mar 5 17:55:36 2020 (r358678) @@ -458,6 +458,11 @@ archive_read_support_format_xar(struct archive *_a) return (ARCHIVE_FATAL); } + /* initialize xar->file_queue */ + xar->file_queue.allocated = 0; + xar->file_queue.used = 0; + xar->file_queue.files = NULL; + r = __archive_read_register_format(a, xar, "xar", @@ -1221,10 +1226,12 @@ heap_add_entry(struct archive_read *a, /* Expand our pending files list as necessary. */ if (heap->used >= heap->allocated) { struct xar_file **new_pending_files; - int new_size = heap->allocated * 2; + int new_size; if (heap->allocated < 1024) new_size = 1024; + else + new_size = heap->allocated * 2; /* Overflow might keep us from growing the list. */ if (new_size <= heap->allocated) { archive_set_error(&a->archive, @@ -1238,9 +1245,11 @@ heap_add_entry(struct archive_read *a, ENOMEM, "Out of memory"); return (ARCHIVE_FATAL); } - memcpy(new_pending_files, heap->files, - heap->allocated * sizeof(new_pending_files[0])); - free(heap->files); + if (heap->allocated) { + memcpy(new_pending_files, heap->files, + heap->allocated * sizeof(new_pending_files[0])); + free(heap->files); + } heap->files = new_pending_files; heap->allocated = new_size; } Modified: projects/clang1000-import/contrib/libarchive/libarchive/archive_util.c ============================================================================== --- projects/clang1000-import/contrib/libarchive/libarchive/archive_util.c Thu Mar 5 17:53:38 2020 (r358677) +++ projects/clang1000-import/contrib/libarchive/libarchive/archive_util.c Thu Mar 5 17:55:36 2020 (r358678) @@ -365,6 +365,7 @@ __archive_mktempx(const char *tmpdir, wchar_t *templat } fd = _open_osfhandle((intptr_t)h, _O_BINARY | _O_RDWR); if (fd == -1) { + la_dosmaperr(GetLastError()); CloseHandle(h); goto exit_tmpfile; } else Modified: projects/clang1000-import/contrib/libarchive/libarchive/archive_write_disk_posix.c ============================================================================== --- projects/clang1000-import/contrib/libarchive/libarchive/archive_write_disk_posix.c Thu Mar 5 17:53:38 2020 (r358677) +++ projects/clang1000-import/contrib/libarchive/libarchive/archive_write_disk_posix.c Thu Mar 5 17:55:36 2020 (r358678) @@ -1856,8 +1856,9 @@ finish_metadata: if (a->tmpname) { if (rename(a->tmpname, a->name) == -1) { archive_set_error(&a->archive, errno, - "rename failed"); - ret = ARCHIVE_FATAL; + "Failed to rename temporary file"); + ret = ARCHIVE_FAILED; + unlink(a->tmpname); } a->tmpname = NULL; } @@ -2144,8 +2145,11 @@ restore_entry(struct archive_write_disk *a) if ((a->flags & ARCHIVE_EXTRACT_SAFE_WRITES) && S_ISREG(a->st.st_mode)) { /* Use a temporary file to extract */ - if ((a->fd = la_mktemp(a)) == -1) + if ((a->fd = la_mktemp(a)) == -1) { + archive_set_error(&a->archive, errno, + "Can't create temporary file"); return ARCHIVE_FAILED; + } a->pst = NULL; en = 0; } else { Modified: projects/clang1000-import/contrib/libarchive/libarchive/archive_write_set_format_xar.c ============================================================================== --- projects/clang1000-import/contrib/libarchive/libarchive/archive_write_set_format_xar.c Thu Mar 5 17:53:38 2020 (r358677) +++ projects/clang1000-import/contrib/libarchive/libarchive/archive_write_set_format_xar.c Thu Mar 5 17:55:36 2020 (r358678) @@ -681,7 +681,8 @@ xar_write_data(struct archive_write *a, const void *bu { struct xar *xar; enum la_zaction run; - size_t size, rsize; + size_t size = 0; + size_t rsize; int r; xar = (struct xar *)a->format_data; Modified: projects/clang1000-import/contrib/libarchive/libarchive/cpio.5 ============================================================================== --- projects/clang1000-import/contrib/libarchive/libarchive/cpio.5 Thu Mar 5 17:53:38 2020 (r358677) +++ projects/clang1000-import/contrib/libarchive/libarchive/cpio.5 Thu Mar 5 17:55:36 2020 (r358678) @@ -244,7 +244,7 @@ Note that this format supports only 4 gigabyte files ( older ASCII format, which supports 8 gigabyte files). .Pp In this format, hardlinked files are handled by setting the -filesize to zero for each entry except the last one that +filesize to zero for each entry except the first one that appears in the archive. .Ss New CRC Format The CRC format is identical to the new ASCII format described Modified: projects/clang1000-import/contrib/libarchive/libarchive/test/test_read_format_zip.c ============================================================================== --- projects/clang1000-import/contrib/libarchive/libarchive/test/test_read_format_zip.c Thu Mar 5 17:53:38 2020 (r358677) +++ projects/clang1000-import/contrib/libarchive/libarchive/test/test_read_format_zip.c Thu Mar 5 17:55:36 2020 (r358678) @@ -916,3 +916,53 @@ DEFINE_TEST(test_read_format_zip_lzma_alone_leak) * suite under Valgrind or ASan, the test runner won't return with * exit code 0 in case if a memory leak. */ } + +DEFINE_TEST(test_read_format_zip_lzma_stream_end) +{ + const char *refname = "test_read_format_zip_lzma_stream_end.zipx"; + struct archive *a; + struct archive_entry *ae; + + assert((a = archive_read_new()) != NULL); + if (ARCHIVE_OK != archive_read_support_filter_lzma(a)) { + skipping("lzma reading not fully supported on this platform"); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); + return; + } + extract_reference_file(refname); + + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, refname, 37)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString("ZIP 6.3 (lzma)", archive_format_name(a)); + assertEqualString("vimrc", archive_entry_pathname(ae)); + assertEqualIntA(a, 0, extract_one(a, ae, 0xBA8E3BAA)); + assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a)); +} + +DEFINE_TEST(test_read_format_zip_lzma_stream_end_blockread) +{ + const char *refname = "test_read_format_zip_lzma_stream_end.zipx"; + struct archive *a; + struct archive_entry *ae; + + assert((a = archive_read_new()) != NULL); + if (ARCHIVE_OK != archive_read_support_filter_lzma(a)) { + skipping("lzma reading not fully supported on this platform"); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); + return; + } + extract_reference_file(refname); + + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, refname, 37)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString("ZIP 6.3 (lzma)", archive_format_name(a)); + assertEqualString("vimrc", archive_entry_pathname(ae)); + assertEqualIntA(a, 0, extract_one_using_blocks(a, 13, 0xBA8E3BAA)); + assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a)); +} Copied: projects/clang1000-import/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu (from r358676, head/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang1000-import/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu Thu Mar 5 17:55:36 2020 (r358678, copy of r358676, head/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu) @@ -0,0 +1,19 @@ +begin 664 test_read_format_zip_lzma_stream_end.zipx +M4$L#!#\``@`.`#TQD4VJ.XZZ/@(``)`#```%````=FEM)82Q1PWAL +M+U`,N0L_$]^&650C/X$D6#4QFD$\A/"_![4!O/5O/!KH`WCQ*4?T2*]4P#/D +M0'9I?EZG=N69Z0V;H0I=CP*$?".I\ +MGMG/80.A'^W>R4J'S/CZ%P`8`>F=R>R&R$2T@EM#X)"OQH1?A7,`:4IU9WV! +M#2W*DXT',;.4YIN4A:-X)O=IREL201ZSOC=YSAU[C4-::/YV8\)%"L17+>VC +M%/'B]ZCQN$2(Q*9*\KJZ`Y131`]5C&G';@1S-QES_RZF!2OX45@58+??ES%( +MUJ<(\`11M$NO)HK#/MK-9RT"15.2I:IZN8VTM1_?$G\L#BH67]$S%[4 +M%C-$\Q<+./&HV](4,7)OL-@C^M0F"2O!0N$OHOW54H87^QLBQVH*D%A<#SI% +M/#+-5U(W';:KC)RE>0Y^5YI!RECQNR"R4.UW9IR!@:B!UB8?_D5$FT8YCJHJ +M2[2"-&-_D2BJ6#XK[6G=%K"%;'^-+0]FHCY4ER#`^ + +* [Sec 3610] process_control() should bail earlier on short packets. stenn@ + - Reported by Philippe Antoine +* [Sec 3596] Highly predictable timestamp attack. + - Reported by Miroslav Lichvar +* [Sec 3592] DoS attack on client ntpd + - Reported by Miroslav Lichvar +* [Bug 3637] Emit the version of ntpd in saveconfig. stenn@ +* [Bug 3636] NMEA: combine time/date from multiple sentences +* [Bug 3635] Make leapsecond file hash check optional +* [Bug 3634] Typo in discipline.html, reported by Jason Harrison. stenn@ +* [Bug 3628] raw DCF decoding - improve robustness with Zeller's congruence + - implement Zeller's congruence in libparse and libntp +* [Bug 3627] SIGSEGV on FreeBSD-12 with stack limit and stack gap + - integrated patch by Cy Schubert +* [Bug 3620] memory leak in ntpq sysinfo + - applied patch by Gerry Garvey +* [Bug 3619] Honour drefid setting in cooked mode and sysinfo + - applied patch by Gerry Garvey +* [Bug 3617] Add support for ACE III and Copernicus II receivers + - integrated patch by Richard Steedman +* [Bug 3615] accelerate refclock startup +* [Bug 3613] Propagate noselect to mobilized pool servers + - Reported by Martin Burnicki +* [Bug 3612] Use-of-uninitialized-value in receive function + - Reported by Philippe Antoine +* [Bug 3611] NMEA time interpreted incorrectly + - officially document new "trust date" mode bit for NMEA driver + - restore the (previously undocumented) "trust date" feature lost with [bug 3577] +* [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter + - mostly based on a patch by Michael Haardt, implementing 'fudge minjitter' +* [Bug 3608] libparse fails to compile on S11.4SRU13 and later + - removed ffs() and fls() prototypes as per Brian Utterback +* [Bug 3604] Wrong param byte order passing into record_raw_stats() in + ntp_io.c + - fixed byte and paramter order as suggested by wei6410@sina.com +* [Bug 3601] Tests fail to link on platforms with ntp_cv_gc_sections_runs=no +* [Bug 3599] Build fails on linux-m68k due to alignment issues + - added padding as suggested by John Paul Adrian Glaubitz +* [Bug 3594] ntpd discards messages coming through nmead +* [Bug 3593] ntpd discards silently nmea messages after the 5th string +* [Bug 3590] Update refclock_oncore.c to the new GPS date API +* [Bug 3585] Unity tests mix buffered and unbuffered output + - stdout+stderr are set to line buffered during test setup now +* [Bug 3583] synchronization error + - set clock to base date if system time is before that limit +* [Bug 3582] gpsdjson refclock fudgetime1 adjustment is doubled +* [Bug 3580] Possible bug ntpq-subs (NULL dereference in dogetassoc) + - Reported by Paulo Neves +* [Bug 3577] Update refclock_zyfer.c to the new GPS date API + - also updates for refclock_nmea.c and refclock_jupiter.c +* [Bug 3576] New GPS date function API +* [Bug 3573] nptdate: missleading error message +* [Bug 3570] NMEA driver docs: talker ID not mentioned, typo +* [Bug 3569] cleanup MOD_NANO/STA_NANO handling for 'ntpadjtimex()' + - sidekick: service port resolution in 'ntpdate' +* [Bug 3550] Reproducible build: Respect SOURCE_DATE_EPOCH + - applied patch by Douglas Royds +* [Bug 3542] ntpdc monlist parameters cannot be set +* [Bug 3533] ntpdc peer_info ipv6 issues + - applied patch by Gerry Garvey +* [Bug 3531] make check: test-decodenetnum fails + - try to harden 'decodenetnum()' against 'getaddrinfo()' errors + - fix wrong cond-compile tests in unit tests +* [Bug 3517] Reducing build noise +* [Bug 3516] Require tooling from this decade + - patch by Philipp Prindeville +* [Bug 3515] Refactor ntpdmain() dispatcher loop and group common code + - patch by Philipp Prindeville +* [Bug 3511] Get rid of AC_LANG_SOURCE() warnings + - patch by Philipp Prindeville +* [Bug 3510] Flatten out the #ifdef nesting in ntpdmain() + - partial application of patch by Philipp Prindeville +* [Bug 3491] Signed values of LFP datatypes should always display a sign + - applied patch by Gerry Garvey & fixed unit tests +* [Bug 3490] Patch to support Trimble Resolution Receivers + - applied (modified) patch by Richard Steedman +* [Bug 3473] RefID of refclocks should always be text format + - applied patch by Gerry Garvey (with minor formatting changes) +* [Bug 3132] Building 4.2.8p8 with disabled local libopts fails + - applied patch by Miroslav Lichvar +* [Bug 3094] ntpd trying to listen for broadcasts on a completely ipv6 network + +* [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user + is specified with -u + - monitor daemon child startup & propagate exit codes +* [Bug 1433] runtime check whether the kernel really supports capabilities + - (modified) patch by Kurt Roeckx +* Clean up sntp/networking.c:sendpkt() error message. +* Provide more detail on unrecognized config file parser tokens. +* Startup log improvements. +* Update the copyright year. +* html/confopt.html: cleanup. + +--- (4.2.8p13) 2019/03/07 Released by Harlan Stenn * [Sec 3565] Crafted null dereference attack in authenticated Modified: projects/clang1000-import/contrib/ntp/CommitLog ============================================================================== --- projects/clang1000-import/contrib/ntp/CommitLog Thu Mar 5 17:53:38 2020 (r358677) +++ projects/clang1000-import/contrib/ntp/CommitLog Thu Mar 5 17:55:36 2020 (r358678) @@ -1,10 +1,3065 @@ -ChangeSet@1.3849, 2019-02-20 17:13:36-08:00, harlan@ntp-build.tal1.ntfo.org +ChangeSet@1.3896, 2020-03-03 17:42:43-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P14 + TAG: NTP_4_2_8P14 + + ChangeLog@1.1974 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntp.conf.texi@1.221 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntp.keys.texi@1.206 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntpd.texi@1.520 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.5man@1.255 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.5mdoc@1.255 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.conf.html@1.203 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.conf.man.in@1.255 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.mdoc.in@1.255 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.5man@1.240 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.keys.5mdoc@1.240 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.html@1.201 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.man.in@1.240 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.keys.mdoc.in@1.240 +1 -1 + NTP_4_2_8P14 + + ntpd/ntpd-opts.c@1.543 +7 -7 + NTP_4_2_8P14 + + ntpd/ntpd-opts.h@1.542 +3 -3 + NTP_4_2_8P14 + + ntpd/ntpd.1ntpdman@1.349 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.1ntpdmdoc@1.349 +1 -1 + NTP_4_2_8P14 + + ntpd/ntpd.html@1.194 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.man.in@1.349 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.mdoc.in@1.349 +1 -1 + NTP_4_2_8P14 + + ntpdc/invoke-ntpdc.texi@1.517 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc-opts.c@1.536 +7 -7 + NTP_4_2_8P14 + + ntpdc/ntpdc-opts.h@1.535 +3 -3 + NTP_4_2_8P14 + + ntpdc/ntpdc.1ntpdcman@1.348 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.1ntpdcmdoc@1.348 +1 -1 + NTP_4_2_8P14 + + ntpdc/ntpdc.html@1.363 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.man.in@1.348 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.mdoc.in@1.348 +1 -1 + NTP_4_2_8P14 + + ntpq/invoke-ntpq.texi@1.527 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq-opts.c@1.545 +7 -7 + NTP_4_2_8P14 + + ntpq/ntpq-opts.h@1.543 +3 -3 + NTP_4_2_8P14 + + ntpq/ntpq.1ntpqman@1.355 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.1ntpqmdoc@1.355 +1 -1 + NTP_4_2_8P14 + + ntpq/ntpq.html@1.194 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.man.in@1.355 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.mdoc.in@1.355 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.519 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd-opts.c@1.538 +7 -7 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd-opts.h@1.537 +3 -3 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.348 +2 -2 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.348 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.html@1.187 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.man.in@1.348 +2 -2 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.348 +1 -1 + NTP_4_2_8P14 + + packageinfo.sh@1.544 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.109 +2 -2 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.html@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.man.in@1.108 +2 -2 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.113 +1 -1 + NTP_4_2_8P14 + + scripts/invoke-plot_summary.texi@1.131 +2 -2 + NTP_4_2_8P14 + + scripts/invoke-summary.texi@1.130 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.341 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait-opts@1.77 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.337 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.338 +1 -1 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.html@1.359 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.man.in@1.337 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.338 +1 -1 + NTP_4_2_8P14 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.116 +1 -1 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.html@1.131 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.man.in@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.117 +1 -1 + NTP_4_2_8P14 + + scripts/ntptrace/invoke-ntptrace.texi@1.130 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.1ntptraceman@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.117 +1 -1 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.html@1.132 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.man.in@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.mdoc.in@1.118 +1 -1 + NTP_4_2_8P14 + + scripts/plot_summary-opts@1.80 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.1plot_summaryman@1.129 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.1plot_summarymdoc@1.129 +1 -1 + NTP_4_2_8P14 + + scripts/plot_summary.html@1.134 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.man.in@1.129 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.mdoc.in@1.129 +1 -1 + NTP_4_2_8P14 + + scripts/summary-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/summary.1summaryman@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/summary.1summarymdoc@1.128 +1 -1 + NTP_4_2_8P14 + + scripts/summary.html@1.133 +2 -2 + NTP_4_2_8P14 + + scripts/summary.man.in@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/summary.mdoc.in@1.128 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/invoke-update-leap.texi@1.29 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap-opts@1.30 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.1update-leapman@1.29 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.1update-leapmdoc@1.29 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.html@1.30 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.man.in@1.29 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.mdoc.in@1.29 +1 -1 + NTP_4_2_8P14 + + sntp/invoke-sntp.texi@1.519 +2 -2 + NTP_4_2_8P14 + + sntp/sntp-opts.c@1.539 +7 -7 + NTP_4_2_8P14 + + sntp/sntp-opts.h@1.537 +3 -3 + NTP_4_2_8P14 + + sntp/sntp.1sntpman@1.354 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.1sntpmdoc@1.354 +1 -1 + NTP_4_2_8P14 + + sntp/sntp.html@1.535 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.man.in@1.354 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.mdoc.in@1.354 +1 -1 + NTP_4_2_8P14 + + util/invoke-ntp-keygen.texi@1.522 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen-opts.c@1.541 +7 -7 + NTP_4_2_8P14 + + util/ntp-keygen-opts.h@1.539 +3 -3 + NTP_4_2_8P14 + + util/ntp-keygen.1ntp-keygenman@1.350 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.1ntp-keygenmdoc@1.350 +1 -1 + NTP_4_2_8P14 + + util/ntp-keygen.html@1.195 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.man.in@1.350 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.mdoc.in@1.350 +1 -1 + NTP_4_2_8P14 + +ChangeSet@1.3895, 2020-03-03 17:09:57-08:00, ntpreleng@ntp-build.tal1.ntfo.org + quiet some debug messages + + ntpd/ntp_config.c@1.375 +0 -2 + quiet some debug messages + + ntpd/ntp_peer.c@1.166 +2 -0 + quiet some debug messages + +ChangeSet@1.3894, 2020-03-03 16:49:54-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P13 + TAG: NTP_4_2_8P13 + + ChangeLog@1.1973 +1 -0 + NTP_4_2_8P13 + + ntpd/invoke-ntp.conf.texi@1.220 +31 -7 + NTP_4_2_8P13 + + ntpd/invoke-ntp.keys.texi@1.205 +1 -1 + NTP_4_2_8P13 + + ntpd/invoke-ntpd.texi@1.519 +3 -3 + NTP_4_2_8P13 + + ntpd/ntp.conf.5man@1.254 +34 -9 + NTP_4_2_8P13 + + ntpd/ntp.conf.5mdoc@1.254 +41 -6 + NTP_4_2_8P13 + + ntpd/ntp.conf.html@1.202 +33 -7 + NTP_4_2_8P13 + + ntpd/ntp.conf.man.in@1.254 +34 -9 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Thu Mar 5 18:09:20 2020 Return-Path: Delivered-To: svn-src-projects@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4E9C226FB70 for ; Thu, 5 Mar 2020 18:09: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 48YJfl6yG3z4Lyf; Thu, 5 Mar 2020 18:09:19 +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 DC8E3B239; Thu, 5 Mar 2020 18:09:19 +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 025I9JiB078493; Thu, 5 Mar 2020 18:09:19 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025I9JOa078491; Thu, 5 Mar 2020 18:09:19 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003051809.025I9JOa078491@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 5 Mar 2020 18:09:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r358681 - projects/clang1000-import/contrib/llvm-project/lld/ELF X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: projects/clang1000-import/contrib/llvm-project/lld/ELF X-SVN-Commit-Revision: 358681 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 18:09:20 -0000 Author: dim Date: Thu Mar 5 18:09:19 2020 New Revision: 358681 URL: https://svnweb.freebsd.org/changeset/base/358681 Log: Revert r357259, after the merge from head which added linker scripts for stand/i386 boot: Revert upstream lld r371957 (git commit 06bb7dfbd) by Fangrui Song: [ELF] Map the ELF header at imageBase If there is no readonly section, we map: * The ELF header at imageBase+maxPageSize * Program headers at imageBase+maxPageSize+sizeof(Ehdr) * The first section .text at imageBase+maxPageSize+sizeof(Ehdr)+sizeof(program headers) Due to the interaction between Writer::fixSectionAlignments and LinkerScript::allocateHeaders, `alignDown(p_vaddr(R PT_LOAD)) = alignDown(p_vaddr(RX PT_LOAD))`. The RX PT_LOAD will override the R PT_LOAD at runtime, which is not ideal: ``` // PHDR at 0x401034, should be 0x400034 PHDR 0x000034 0x00401034 0x00401034 0x000a0 0x000a0 R 0x4 // R PT_LOAD contains just Ehdr and program headers. // At 0x401000, should be 0x400000 LOAD 0x000000 0x00401000 0x00401000 0x000d4 0x000d4 R 0x1000 LOAD 0x0000d4 0x004010d4 0x004010d4 0x00001 0x00001 R E 0x1000 ``` * createPhdrs allocates the headers to the R PT_LOAD. * fixSectionAlignments assigns `imageBase+maxPageSize+sizeof(Ehdr)+sizeof(program headers)` (formula: `alignTo(dot, maxPageSize) + dot % config->maxPageSize`) to addrExpr of .text * allocateHeaders computes the minimum address among SHF_ALLOC sections, i.e. addr(.text) * allocateHeaders sets address of ELF header to `addr(.text)-sizeof(Ehdr)-sizeof(program headers) = imageBase+maxPageSize` The main observation is that when the SECTIONS command is not used, we don't have to call allocateHeaders. This requires an assumption that the presence of PT_PHDR and addresses of headers can be decided regardless of address information. This may seem natural because dot is not manipulated by a linker script. The other thing is that we have to drop the special rule for -T
in `getInitialDot`. If -Ttext is smaller than the image base, the headers will not be allocated with the old behavior (allocateHeaders is called) but always allocated with the new behavior. The behavior change is not a problem. Whether and where headers are allocated can vary among linkers, or ld.bfd across different versions (--enable-separate-code or not). It is thus advised to use a linker script with the PHDRS command to have a consistent behavior across linkers. If PT_PHDR is needed, an explicit --image-base can be a simpler alternative. Differential Revision: https://reviews.llvm.org/D67325 llvm-svn: 371957 Modified: projects/clang1000-import/contrib/llvm-project/lld/ELF/LinkerScript.cpp projects/clang1000-import/contrib/llvm-project/lld/ELF/Writer.cpp Modified: projects/clang1000-import/contrib/llvm-project/lld/ELF/LinkerScript.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/lld/ELF/LinkerScript.cpp Thu Mar 5 18:06:29 2020 (r358680) +++ projects/clang1000-import/contrib/llvm-project/lld/ELF/LinkerScript.cpp Thu Mar 5 18:09:19 2020 (r358681) @@ -1020,17 +1020,13 @@ static uint64_t computeBase(uint64_t min, bool allocat return alignDown(min, config->maxPageSize); } -// Try to find an address for the file and program headers output sections, -// which were unconditionally added to the first PT_LOAD segment earlier. +// When the SECTIONS command is used, try to find an address for the file and +// program headers output sections, which can be added to the first PT_LOAD +// segment when program headers are created. // -// When using the default layout, we check if the headers fit below the first -// allocated section. When using a linker script, we also check if the headers -// are covered by the output section. This allows omitting the headers by not -// leaving enough space for them in the linker script; this pattern is common -// in embedded systems. -// -// If there isn't enough space for these sections, we'll remove them from the -// PT_LOAD segment, and we'll also remove the PT_PHDR segment. +// We check if the headers fit below the first allocated section. If there isn't +// enough space for these sections, we'll remove them from the PT_LOAD segment, +// and we'll also remove the PT_PHDR segment. void LinkerScript::allocateHeaders(std::vector &phdrs) { uint64_t min = std::numeric_limits::max(); for (OutputSection *sec : outputSections) @@ -1076,28 +1072,23 @@ LinkerScript::AddressState::AddressState() { } } -static uint64_t getInitialDot() { - // By default linker scripts use an initial value of 0 for '.', - // but prefer -image-base if set. - if (script->hasSectionsCommand) - return config->imageBase ? *config->imageBase : 0; - - uint64_t startAddr = UINT64_MAX; - // The sections with -T
have been sorted in order of ascending - // address. We must lower startAddr if the lowest -T
as - // calls to setDot() must be monotonically increasing. - for (auto &kv : config->sectionStartMap) - startAddr = std::min(startAddr, kv.second); - return std::min(startAddr, target->getImageBase() + elf::getHeaderSize()); -} - // Here we assign addresses as instructed by linker script SECTIONS // sub-commands. Doing that allows us to use final VA values, so here // we also handle rest commands like symbol assignments and ASSERTs. // Returns a symbol that has changed its section or value, or nullptr if no // symbol has changed. const Defined *LinkerScript::assignAddresses() { - dot = getInitialDot(); + if (script->hasSectionsCommand) { + // With a linker script, assignment of addresses to headers is covered by + // allocateHeaders(). + dot = config->imageBase.getValueOr(0); + } else { + // Assign addresses to headers right now. + dot = target->getImageBase(); + Out::elfHeader->addr = dot; + Out::programHeaders->addr = dot + Out::elfHeader->size; + dot += getHeaderSize(); + } auto deleter = std::make_unique(); ctx = deleter.get(); Modified: projects/clang1000-import/contrib/llvm-project/lld/ELF/Writer.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/lld/ELF/Writer.cpp Thu Mar 5 18:06:29 2020 (r358680) +++ projects/clang1000-import/contrib/llvm-project/lld/ELF/Writer.cpp Thu Mar 5 18:09:19 2020 (r358681) @@ -569,7 +569,8 @@ template void Writer::run() { for (OutputSection *sec : outputSections) sec->maybeCompress(); - script->allocateHeaders(mainPart->phdrs); + if (script->hasSectionsCommand) + script->allocateHeaders(mainPart->phdrs); // Remove empty PT_LOAD to avoid causing the dynamic linker to try to mmap a // 0 sized region. This has to be done late since only after assignAddresses From owner-svn-src-projects@freebsd.org Thu Mar 5 18:11:55 2020 Return-Path: Delivered-To: svn-src-projects@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46DBC26FD59 for ; Thu, 5 Mar 2020 18:11:55 +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 48YJjl0jjfz4T2f; Thu, 5 Mar 2020 18:11: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 CB897B2B4; Thu, 5 Mar 2020 18:11:54 +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 025IBsec083287; Thu, 5 Mar 2020 18:11:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025IBlCQ083250; Thu, 5 Mar 2020 18:11:47 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003051811.025IBlCQ083250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 5 Mar 2020 18:11:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r358682 - in projects/clang1000-import: contrib/llvm-project/clang/include/clang/AST contrib/llvm-project/clang/include/clang/Sema contrib/llvm-project/clang/lib/AST contrib/llvm-projec... X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in projects/clang1000-import: contrib/llvm-project/clang/include/clang/AST contrib/llvm-project/clang/include/clang/Sema contrib/llvm-project/clang/lib/AST contrib/llvm-project/clang/lib/Format contri... X-SVN-Commit-Revision: 358682 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 18:11:55 -0000 Author: dim Date: Thu Mar 5 18:11:47 2020 New Revision: 358682 URL: https://svnweb.freebsd.org/changeset/base/358682 Log: Merge ^/vendor/llvm-project/release-10.x up to its last change (upstream commit llvmorg-10.0.0-rc3-1-gc290cb61fdc), and bump versions. Added: projects/clang1000-import/contrib/llvm-project/llvm/include/llvm/Support/Windows/ - copied from r358681, vendor/llvm-project/release-10.x/llvm/include/llvm/Support/Windows/ Deleted: projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/WindowsSupport.h Modified: projects/clang1000-import/contrib/llvm-project/clang/include/clang/AST/Expr.h projects/clang1000-import/contrib/llvm-project/clang/include/clang/Sema/Sema.h projects/clang1000-import/contrib/llvm-project/clang/lib/AST/ASTImporter.cpp projects/clang1000-import/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp projects/clang1000-import/contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp projects/clang1000-import/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp projects/clang1000-import/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp projects/clang1000-import/contrib/llvm-project/clang/lib/Sema/TreeTransform.h projects/clang1000-import/contrib/llvm-project/lld/docs/ReleaseNotes.rst projects/clang1000-import/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp projects/clang1000-import/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp projects/clang1000-import/contrib/llvm-project/llvm/include/llvm/module.modulemap projects/clang1000-import/contrib/llvm-project/llvm/lib/Analysis/TargetLibraryInfo.cpp projects/clang1000-import/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/CRC.cpp projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Compression.cpp projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/InitLLVM.cpp projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/RandomNumberGenerator.cpp projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/DynamicLibrary.inc projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Host.inc projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Memory.inc projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Path.inc projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Process.inc projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Program.inc projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Signals.inc projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/ThreadLocal.inc projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Threading.inc projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/raw_ostream.cpp projects/clang1000-import/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp projects/clang1000-import/contrib/llvm-project/llvm/lib/Transforms/Scalar/SROA.cpp projects/clang1000-import/contrib/llvm-project/llvm/tools/llvm-ar/llvm-ar.cpp projects/clang1000-import/lib/clang/include/VCSVersion.inc projects/clang1000-import/lib/clang/include/llvm/Support/VCSRevision.h Directory Properties: projects/clang1000-import/contrib/llvm-project/ (props changed) projects/clang1000-import/contrib/llvm-project/clang/ (props changed) projects/clang1000-import/contrib/llvm-project/lld/ (props changed) projects/clang1000-import/contrib/llvm-project/lldb/ (props changed) projects/clang1000-import/contrib/llvm-project/llvm/ (props changed) Modified: projects/clang1000-import/contrib/llvm-project/clang/include/clang/AST/Expr.h ============================================================================== --- projects/clang1000-import/contrib/llvm-project/clang/include/clang/AST/Expr.h Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/clang/include/clang/AST/Expr.h Thu Mar 5 18:11:47 2020 (r358682) @@ -3955,14 +3955,14 @@ class StmtExpr : public Expr { Stmt *SubStmt; SourceLocation LParenLoc, RParenLoc; public: - // FIXME: Does type-dependence need to be computed differently? - // FIXME: Do we need to compute instantiation instantiation-dependence for - // statements? (ugh!) StmtExpr(CompoundStmt *substmt, QualType T, - SourceLocation lp, SourceLocation rp) : + SourceLocation lp, SourceLocation rp, bool InDependentContext) : + // Note: we treat a statement-expression in a dependent context as always + // being value- and instantiation-dependent. This matches the behavior of + // lambda-expressions and GCC. Expr(StmtExprClass, T, VK_RValue, OK_Ordinary, - T->isDependentType(), false, false, false), - SubStmt(substmt), LParenLoc(lp), RParenLoc(rp) { } + T->isDependentType(), InDependentContext, InDependentContext, false), + SubStmt(substmt), LParenLoc(lp), RParenLoc(rp) {} /// Build an empty statement expression. explicit StmtExpr(EmptyShell Empty) : Expr(StmtExprClass, Empty) { } Modified: projects/clang1000-import/contrib/llvm-project/clang/include/clang/Sema/Sema.h ============================================================================== --- projects/clang1000-import/contrib/llvm-project/clang/include/clang/Sema/Sema.h Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/clang/include/clang/Sema/Sema.h Thu Mar 5 18:11:47 2020 (r358682) @@ -4923,7 +4923,7 @@ class Sema final { (public) LabelDecl *TheDecl); void ActOnStartStmtExpr(); - ExprResult ActOnStmtExpr(SourceLocation LPLoc, Stmt *SubStmt, + ExprResult ActOnStmtExpr(Scope *S, SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc); // "({..})" // Handle the final expression in a statement expression. ExprResult ActOnStmtExprResult(ExprResult E); Modified: projects/clang1000-import/contrib/llvm-project/clang/lib/AST/ASTImporter.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/clang/lib/AST/ASTImporter.cpp Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/clang/lib/AST/ASTImporter.cpp Thu Mar 5 18:11:47 2020 (r358682) @@ -6724,8 +6724,9 @@ ExpectedStmt ASTNodeImporter::VisitStmtExpr(StmtExpr * SourceLocation ToLParenLoc, ToRParenLoc; std::tie(ToSubStmt, ToType, ToLParenLoc, ToRParenLoc) = *Imp; - return new (Importer.getToContext()) StmtExpr( - ToSubStmt, ToType, ToLParenLoc, ToRParenLoc); + return new (Importer.getToContext()) + StmtExpr(ToSubStmt, ToType, ToLParenLoc, ToRParenLoc, + E->isInstantiationDependent()); } ExpectedStmt ASTNodeImporter::VisitUnaryOperator(UnaryOperator *E) { Modified: projects/clang1000-import/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp Thu Mar 5 18:11:47 2020 (r358682) @@ -2707,10 +2707,17 @@ bool TokenAnnotator::spaceRequiredBetween(const Annota return false; if (Right.isOneOf(tok::star, tok::amp, tok::ampamp) && (Left.is(tok::identifier) || Left.isSimpleTypeSpecifier()) && - Left.Previous && Left.Previous->is(tok::kw_operator)) - // Space between the type and the * - // operator void*(), operator char*(), operator Foo*() dependant - // on PointerAlignment style. + // Space between the type and the * in: + // operator void*() + // operator char*() + // operator /*comment*/ const char*() + // operator volatile /*comment*/ char*() + // operator Foo*() + // dependent on PointerAlignment style. + Left.Previous && + (Left.Previous->endsSequence(tok::kw_operator) || + Left.Previous->endsSequence(tok::kw_const, tok::kw_operator) || + Left.Previous->endsSequence(tok::kw_volatile, tok::kw_operator))) return (Style.PointerAlignment != FormatStyle::PAS_Left); const auto SpaceRequiredForArrayInitializerLSquare = [](const FormatToken &LSquareTok, const FormatStyle &Style) { Modified: projects/clang1000-import/contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp Thu Mar 5 18:11:47 2020 (r358682) @@ -2655,7 +2655,8 @@ Parser::ParseParenExpression(ParenParseOption &ExprTyp // If the substmt parsed correctly, build the AST node. if (!Stmt.isInvalid()) { - Result = Actions.ActOnStmtExpr(OpenLoc, Stmt.get(), Tok.getLocation()); + Result = Actions.ActOnStmtExpr(getCurScope(), OpenLoc, Stmt.get(), + Tok.getLocation()); } else { Actions.ActOnStmtExprError(); } Modified: projects/clang1000-import/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp Thu Mar 5 18:11:47 2020 (r358682) @@ -13908,9 +13908,8 @@ void Sema::ActOnStmtExprError() { PopExpressionEvaluationContext(); } -ExprResult -Sema::ActOnStmtExpr(SourceLocation LPLoc, Stmt *SubStmt, - SourceLocation RPLoc) { // "({..})" +ExprResult Sema::ActOnStmtExpr(Scope *S, SourceLocation LPLoc, Stmt *SubStmt, + SourceLocation RPLoc) { // "({..})" assert(SubStmt && isa(SubStmt) && "Invalid action invocation!"); CompoundStmt *Compound = cast(SubStmt); @@ -13939,9 +13938,18 @@ Sema::ActOnStmtExpr(SourceLocation LPLoc, Stmt *SubStm } } + bool IsDependentContext = false; + if (S) + IsDependentContext = S->getTemplateParamParent() != nullptr; + else + // FIXME: This is not correct when substituting inside a templated + // context that isn't a DeclContext (such as a variable template). + IsDependentContext = CurContext->isDependentContext(); + // FIXME: Check that expression type is complete/non-abstract; statement // expressions are not lvalues. - Expr *ResStmtExpr = new (Context) StmtExpr(Compound, Ty, LPLoc, RPLoc); + Expr *ResStmtExpr = + new (Context) StmtExpr(Compound, Ty, LPLoc, RPLoc, IsDependentContext); if (StmtExprMayBindToTemp) return MaybeBindToTemporary(ResStmtExpr); return ResStmtExpr; Modified: projects/clang1000-import/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp Thu Mar 5 18:11:47 2020 (r358682) @@ -6800,8 +6800,9 @@ Stmt *Sema::MaybeCreateStmtWithCleanups(Stmt *SubStmt) // a new AsmStmtWithTemporaries. CompoundStmt *CompStmt = CompoundStmt::Create( Context, SubStmt, SourceLocation(), SourceLocation()); - Expr *E = new (Context) StmtExpr(CompStmt, Context.VoidTy, SourceLocation(), - SourceLocation()); + Expr *E = new (Context) + StmtExpr(CompStmt, Context.VoidTy, SourceLocation(), SourceLocation(), + CurContext->isDependentContext()); return MaybeCreateExprWithCleanups(E); } Modified: projects/clang1000-import/contrib/llvm-project/clang/lib/Sema/TreeTransform.h ============================================================================== --- projects/clang1000-import/contrib/llvm-project/clang/lib/Sema/TreeTransform.h Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/clang/lib/Sema/TreeTransform.h Thu Mar 5 18:11:47 2020 (r358682) @@ -2526,10 +2526,9 @@ class TreeTransform { (public) /// /// By default, performs semantic analysis to build the new expression. /// Subclasses may override this routine to provide different behavior. - ExprResult RebuildStmtExpr(SourceLocation LParenLoc, - Stmt *SubStmt, - SourceLocation RParenLoc) { - return getSema().ActOnStmtExpr(LParenLoc, SubStmt, RParenLoc); + ExprResult RebuildStmtExpr(SourceLocation LParenLoc, Stmt *SubStmt, + SourceLocation RParenLoc) { + return getSema().ActOnStmtExpr(nullptr, LParenLoc, SubStmt, RParenLoc); } /// Build a new __builtin_choose_expr expression. @@ -11801,6 +11800,8 @@ TreeTransform::TransformLambdaExpr(LambdaExpr NewTrailingRequiresClause = getDerived().TransformExpr(TRC); // Create the local class that will describe the lambda. + // FIXME: KnownDependent below is wrong when substituting inside a templated + // context that isn't a DeclContext (such as a variable template). CXXRecordDecl *OldClass = E->getLambdaClass(); CXXRecordDecl *Class = getSema().createLambdaClosureType(E->getIntroducerRange(), Modified: projects/clang1000-import/contrib/llvm-project/lld/docs/ReleaseNotes.rst ============================================================================== --- projects/clang1000-import/contrib/llvm-project/lld/docs/ReleaseNotes.rst Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/lld/docs/ReleaseNotes.rst Thu Mar 5 18:11:47 2020 (r358682) @@ -5,10 +5,6 @@ lld 10.0.0 Release Notes .. contents:: :local: -.. warning:: - These are in-progress notes for the upcoming LLVM 10.0.0 release. - Release notes for previous releases can be found on - `the Download Page `_. Introduction ============ @@ -33,51 +29,95 @@ ELF Improvements * New ``elf32btsmipn32_fbsd`` and ``elf32ltsmipn32_fbsd`` emulations are supported. -* Relax MIPS ``jalr``and ``jr`` instructions marked by the ``R_MIPS_JALR`` +* Relax MIPS ``jalr`` and ``jr`` instructions marked by the ``R_MIPS_JALR`` relocation. +* For certain "undefined symbol" errors, a definition with a close spelling will be suggested. + (`D67039 `_) +* ``extern "C"`` is suggested if an undefined reference is mangled(unmangled) while there + is a likely unmangled(mangled) definition. + (`D69592 `_ `D69650 `_) +* New ``-z noseparate-code``, ``-z separate-code`` and ``-z separate-loadable-segments``. + ``-z noseparate-code`` is the default, which can reduce sizes of linked binaries by up to + 3 times maxpagesize. + (`D64903 `_ `D67481 `_) +* ``-z force-bti`` and ``-z pac-plt`` are added for AArch64 Branch Target Identification and Pointer Authentication. + (`D62609 `_) +* ``--fix-cortex-a8`` is added to fix erratum 657417. + (`D67284 `_) +* ``-z force-ibt`` and ``-z shstk`` are added for Intel Control-flow Enforcement Technology. + (`D59780 `_) +* ``PT_GNU_PROPERTY`` is added to help loaders locate the ``.note.gnu.property`` section. + It may be used by a future Linux kernel. + (`D70961 `_) +* For ``--compress-debug-sections=zlib``, ``-O0`` and ``-O1`` enable compression level 1 + while ``-O2`` enables compression level 6. ``-O1`` (default) is faster than before. + (`D70658 `_) +* Range extension thunks with addends are implemented for AArch64, PowerPC32 and PowerPC64. + (`D70637 `_ `D70937 `_ + `D73424 `_) +* ``R_RISCV_ALIGN`` will be errored because linker relaxation for RISC-V is not supported. + Pass ``-mno-relax`` to disable ``R_RISCV_ALIGN``. + (`D71820 `_) +* The ARM port will no longer insert interworking thunks for non STT_FUNC symbols. + (`D73474 `_) +* The quality of PowerPC32 port has been greatly improved (canonical PLT, copy + relocations, non-preemptible IFUNC, range extension thunks with addends). + It can link FreeBSD 13.0 userland. +* The PowerPC64 port supports non-preemptible IFUNC. + (`D71509 `_) +* lld creates a RO PT_LOAD and a RX PT_LOAD without a linker script. + lld creates a unified RX PT_LOAD with a linker script. + A future release will eliminate this difference and use a RO PT_LOAD and a RX PT_LOAD by default. + The linker script case will require ``--no-rosegment`` to restore the current behavior. +* GNU style compressed debug sections ``.zdebug`` (obsoleted by ``SHF_COMPRESSED``) + are supported for input files, but not for the output. + A future release may drop ``.zdebug`` support. -* Reduced size of linked MIPS binaries. +Breaking changes +---------------- -COFF Improvements ------------------ +* ``-Ttext=$base`` (base is usually 0) is no longer supported. + If PT_PHDR is needed, use ``--image-base=$base`` instead. + If PT_PHDR is not needed, use a linker script with `.text 0 : { *(.text*) }` as the first + output section description. + See https://bugs.llvm.org/show_bug.cgi?id=44715 for more information. + (`D67325 `_) +* ``-Ttext-segment`` is no longer supported. Its meaning was different from GNU ld's and + could cause subtle bugs. + (`D70468 `_) -* ... MinGW Improvements ------------------ * Allow using custom .edata sections from input object files (for use by Wine) - (`dadc6f248868 `) + (`dadc6f248868 `_) * Don't implicitly create import libraries unless requested - (`6540e55067e3 `) + (`6540e55067e3 `_) * Support merging multiple resource object files - (`3d3a9b3b413d `) + (`3d3a9b3b413d `_) and properly handle the default manifest object files that GCC can pass - (`d581dd501381 `) + (`d581dd501381 `_) * Demangle itanium symbol names in warnings/error messages - (`a66fc1c99f3e `) + (`a66fc1c99f3e `_) * Print source locations for undefined references and duplicate symbols, if possible - (`1d06d48bb346 `) + (`1d06d48bb346 `_) and - (`b38f577c015c `) + (`b38f577c015c `_) * Look for more filename patterns when resolving ``-l`` options - (`0226c35262df `) + (`0226c35262df `_) * Don't error out on duplicate absolute symbols with the same value (which can happen for the default-null symbol for weak symbols) - (`1737cc750c46 `) + (`1737cc750c46 `_) -MachO Improvements ------------------- - -* Item 1. WebAssembly Improvements ------------------------ Modified: projects/clang1000-import/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Thu Mar 5 18:11:47 2020 (r358682) @@ -50,7 +50,7 @@ #include #endif -#if LLVM_ENABLE_ZLIB +#if defined(HAVE_LIBZ) #include #endif @@ -582,7 +582,7 @@ bool GDBRemoteCommunication::DecompressPacket() { } #endif -#if LLVM_ENABLE_ZLIB +#if defined(HAVE_LIBZ) if (decompressed_bytes == 0 && decompressed_bufsize != ULONG_MAX && decompressed_buffer != nullptr && m_compression_type == CompressionType::ZlibDeflate) { Modified: projects/clang1000-import/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Thu Mar 5 18:11:47 2020 (r358682) @@ -1045,7 +1045,7 @@ void GDBRemoteCommunicationClient::MaybeEnableCompress } #endif -#if LLVM_ENABLE_ZLIB +#if defined(HAVE_LIBZ) if (avail_type == CompressionType::None) { for (auto compression : supported_compressions) { if (compression == "zlib-deflate") { Modified: projects/clang1000-import/contrib/llvm-project/llvm/include/llvm/module.modulemap ============================================================================== --- projects/clang1000-import/contrib/llvm-project/llvm/include/llvm/module.modulemap Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/llvm/include/llvm/module.modulemap Thu Mar 5 18:11:47 2020 (r358682) @@ -380,6 +380,9 @@ module LLVM_Utils { umbrella "Support" module * { export * } + + // Exclude this; it should only be used on Windows. + exclude header "Support/Windows/WindowsSupport.h" // Exclude these; they are fundamentally non-modular. exclude header "Support/PluginLoader.h" Modified: projects/clang1000-import/contrib/llvm-project/llvm/lib/Analysis/TargetLibraryInfo.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/llvm/lib/Analysis/TargetLibraryInfo.cpp Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/llvm/lib/Analysis/TargetLibraryInfo.cpp Thu Mar 5 18:11:47 2020 (r358682) @@ -470,6 +470,9 @@ static void initialize(TargetLibraryInfoImpl &TLI, con TLI.setUnavailable(LibFunc_tmpfile64); // Relaxed math functions are included in math-finite.h on Linux (GLIBC). + // Note that math-finite.h is no longer supported by top-of-tree GLIBC, + // so we keep these functions around just so that they're recognized by + // the ConstantFolder. TLI.setUnavailable(LibFunc_acos_finite); TLI.setUnavailable(LibFunc_acosf_finite); TLI.setUnavailable(LibFunc_acosl_finite); Modified: projects/clang1000-import/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Thu Mar 5 18:11:47 2020 (r358682) @@ -3867,7 +3867,6 @@ void SelectionDAGLegalize::ConvertNodeToLibcall(SDNode SmallVector Results; SDLoc dl(Node); // FIXME: Check flags on the node to see if we can use a finite call. - bool CanUseFiniteLibCall = TM.Options.NoInfsFPMath && TM.Options.NoNaNsFPMath; unsigned Opc = Node->getOpcode(); switch (Opc) { case ISD::ATOMIC_FENCE: { @@ -3976,68 +3975,28 @@ void SelectionDAGLegalize::ConvertNodeToLibcall(SDNode break; case ISD::FLOG: case ISD::STRICT_FLOG: - if (CanUseFiniteLibCall && DAG.getLibInfo().has(LibFunc_log_finite)) - ExpandFPLibCall(Node, RTLIB::LOG_FINITE_F32, - RTLIB::LOG_FINITE_F64, - RTLIB::LOG_FINITE_F80, - RTLIB::LOG_FINITE_F128, - RTLIB::LOG_FINITE_PPCF128, Results); - else - ExpandFPLibCall(Node, RTLIB::LOG_F32, RTLIB::LOG_F64, - RTLIB::LOG_F80, RTLIB::LOG_F128, - RTLIB::LOG_PPCF128, Results); + ExpandFPLibCall(Node, RTLIB::LOG_F32, RTLIB::LOG_F64, RTLIB::LOG_F80, + RTLIB::LOG_F128, RTLIB::LOG_PPCF128, Results); break; case ISD::FLOG2: case ISD::STRICT_FLOG2: - if (CanUseFiniteLibCall && DAG.getLibInfo().has(LibFunc_log2_finite)) - ExpandFPLibCall(Node, RTLIB::LOG2_FINITE_F32, - RTLIB::LOG2_FINITE_F64, - RTLIB::LOG2_FINITE_F80, - RTLIB::LOG2_FINITE_F128, - RTLIB::LOG2_FINITE_PPCF128, Results); - else - ExpandFPLibCall(Node, RTLIB::LOG2_F32, RTLIB::LOG2_F64, - RTLIB::LOG2_F80, RTLIB::LOG2_F128, - RTLIB::LOG2_PPCF128, Results); + ExpandFPLibCall(Node, RTLIB::LOG2_F32, RTLIB::LOG2_F64, RTLIB::LOG2_F80, + RTLIB::LOG2_F128, RTLIB::LOG2_PPCF128, Results); break; case ISD::FLOG10: case ISD::STRICT_FLOG10: - if (CanUseFiniteLibCall && DAG.getLibInfo().has(LibFunc_log10_finite)) - ExpandFPLibCall(Node, RTLIB::LOG10_FINITE_F32, - RTLIB::LOG10_FINITE_F64, - RTLIB::LOG10_FINITE_F80, - RTLIB::LOG10_FINITE_F128, - RTLIB::LOG10_FINITE_PPCF128, Results); - else - ExpandFPLibCall(Node, RTLIB::LOG10_F32, RTLIB::LOG10_F64, - RTLIB::LOG10_F80, RTLIB::LOG10_F128, - RTLIB::LOG10_PPCF128, Results); + ExpandFPLibCall(Node, RTLIB::LOG10_F32, RTLIB::LOG10_F64, RTLIB::LOG10_F80, + RTLIB::LOG10_F128, RTLIB::LOG10_PPCF128, Results); break; case ISD::FEXP: case ISD::STRICT_FEXP: - if (CanUseFiniteLibCall && DAG.getLibInfo().has(LibFunc_exp_finite)) - ExpandFPLibCall(Node, RTLIB::EXP_FINITE_F32, - RTLIB::EXP_FINITE_F64, - RTLIB::EXP_FINITE_F80, - RTLIB::EXP_FINITE_F128, - RTLIB::EXP_FINITE_PPCF128, Results); - else - ExpandFPLibCall(Node, RTLIB::EXP_F32, RTLIB::EXP_F64, - RTLIB::EXP_F80, RTLIB::EXP_F128, - RTLIB::EXP_PPCF128, Results); + ExpandFPLibCall(Node, RTLIB::EXP_F32, RTLIB::EXP_F64, RTLIB::EXP_F80, + RTLIB::EXP_F128, RTLIB::EXP_PPCF128, Results); break; case ISD::FEXP2: case ISD::STRICT_FEXP2: - if (CanUseFiniteLibCall && DAG.getLibInfo().has(LibFunc_exp2_finite)) - ExpandFPLibCall(Node, RTLIB::EXP2_FINITE_F32, - RTLIB::EXP2_FINITE_F64, - RTLIB::EXP2_FINITE_F80, - RTLIB::EXP2_FINITE_F128, - RTLIB::EXP2_FINITE_PPCF128, Results); - else - ExpandFPLibCall(Node, RTLIB::EXP2_F32, RTLIB::EXP2_F64, - RTLIB::EXP2_F80, RTLIB::EXP2_F128, - RTLIB::EXP2_PPCF128, Results); + ExpandFPLibCall(Node, RTLIB::EXP2_F32, RTLIB::EXP2_F64, RTLIB::EXP2_F80, + RTLIB::EXP2_F128, RTLIB::EXP2_PPCF128, Results); break; case ISD::FTRUNC: case ISD::STRICT_FTRUNC: @@ -4107,16 +4066,8 @@ void SelectionDAGLegalize::ConvertNodeToLibcall(SDNode } case ISD::FPOW: case ISD::STRICT_FPOW: - if (CanUseFiniteLibCall && DAG.getLibInfo().has(LibFunc_pow_finite)) - ExpandFPLibCall(Node, RTLIB::POW_FINITE_F32, - RTLIB::POW_FINITE_F64, - RTLIB::POW_FINITE_F80, - RTLIB::POW_FINITE_F128, - RTLIB::POW_FINITE_PPCF128, Results); - else - ExpandFPLibCall(Node, RTLIB::POW_F32, RTLIB::POW_F64, - RTLIB::POW_F80, RTLIB::POW_F128, - RTLIB::POW_PPCF128, Results); + ExpandFPLibCall(Node, RTLIB::POW_F32, RTLIB::POW_F64, RTLIB::POW_F80, + RTLIB::POW_F128, RTLIB::POW_PPCF128, Results); break; case ISD::LROUND: case ISD::STRICT_LROUND: Modified: projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/CRC.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/CRC.cpp Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/CRC.cpp Thu Mar 5 18:11:47 2020 (r358682) @@ -25,7 +25,7 @@ using namespace llvm; -#if !LLVM_ENABLE_ZLIB +#if LLVM_ENABLE_ZLIB == 0 || !HAVE_ZLIB_H static const uint32_t CRCTable[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, Modified: projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Compression.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Compression.cpp Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Compression.cpp Thu Mar 5 18:11:47 2020 (r358682) @@ -17,13 +17,13 @@ #include "llvm/Support/Compiler.h" #include "llvm/Support/Error.h" #include "llvm/Support/ErrorHandling.h" -#if LLVM_ENABLE_ZLIB +#if LLVM_ENABLE_ZLIB == 1 && HAVE_ZLIB_H #include #endif using namespace llvm; -#if LLVM_ENABLE_ZLIB +#if LLVM_ENABLE_ZLIB == 1 && HAVE_LIBZ static Error createError(StringRef Err) { return make_error(Err, inconvertibleErrorCode()); } Modified: projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp Thu Mar 5 18:11:47 2020 (r358682) @@ -254,7 +254,7 @@ bool CrashRecoveryContext::RunSafely(function_ref #ifdef _WIN32 -#include "Windows/WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #endif using namespace llvm; Modified: projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/RandomNumberGenerator.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/RandomNumberGenerator.cpp Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/RandomNumberGenerator.cpp Thu Mar 5 18:11:47 2020 (r358682) @@ -17,7 +17,7 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #ifdef _WIN32 -#include "Windows/WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #else #include "Unix/Unix.h" #endif Modified: projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/DynamicLibrary.inc ============================================================================== --- projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/DynamicLibrary.inc Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/DynamicLibrary.inc Thu Mar 5 18:11:47 2020 (r358682) @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===// -#include "WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #include "llvm/Support/ConvertUTF.h" #include "llvm/Support/raw_ostream.h" Modified: projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Host.inc ============================================================================== --- projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Host.inc Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Host.inc Thu Mar 5 18:11:47 2020 (r358682) @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===// -#include "WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #include #include Modified: projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Memory.inc ============================================================================== --- projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Memory.inc Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Memory.inc Thu Mar 5 18:11:47 2020 (r358682) @@ -17,7 +17,7 @@ #include "llvm/Support/WindowsError.h" // The Windows.h header must be the last one included. -#include "WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" static DWORD getWindowsProtectionFlags(unsigned Flags) { switch (Flags & llvm::sys::Memory::MF_RWE_MASK) { Modified: projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Path.inc ============================================================================== --- projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Path.inc Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Path.inc Thu Mar 5 18:11:47 2020 (r358682) @@ -25,7 +25,7 @@ // These two headers must be included last, and make sure shlobj is required // after Windows.h to make sure it picks up our definition of _WIN32_WINNT -#include "WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #include #include Modified: projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Process.inc ============================================================================== --- projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Process.inc Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Process.inc Thu Mar 5 18:11:47 2020 (r358682) @@ -19,7 +19,7 @@ #include // The Windows.h header must be after LLVM and standard headers. -#include "WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #include #include Modified: projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Program.inc ============================================================================== --- projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Program.inc Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Program.inc Thu Mar 5 18:11:47 2020 (r358682) @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===// -#include "WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/ConvertUTF.h" #include "llvm/Support/Errc.h" Modified: projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Signals.inc ============================================================================== --- projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Signals.inc Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Signals.inc Thu Mar 5 18:11:47 2020 (r358682) @@ -23,7 +23,7 @@ #include "llvm/Support/raw_ostream.h" // The Windows.h header must be after LLVM and standard headers. -#include "WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #ifdef __MINGW32__ #include Modified: projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/ThreadLocal.inc ============================================================================== --- projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/ThreadLocal.inc Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/ThreadLocal.inc Thu Mar 5 18:11:47 2020 (r358682) @@ -15,7 +15,7 @@ //=== is guaranteed to work on *all* Win32 variants. //===----------------------------------------------------------------------===// -#include "WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #include "llvm/Support/ThreadLocal.h" namespace llvm { Modified: projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Threading.inc ============================================================================== --- projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Threading.inc Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/Windows/Threading.inc Thu Mar 5 18:11:47 2020 (r358682) @@ -13,7 +13,7 @@ #include "llvm/ADT/SmallString.h" #include "llvm/ADT/Twine.h" -#include "WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #include // Windows will at times define MemoryFence. Modified: projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/raw_ostream.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/raw_ostream.cpp Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/llvm/lib/Support/raw_ostream.cpp Thu Mar 5 18:11:47 2020 (r358682) @@ -60,7 +60,7 @@ #ifdef _WIN32 #include "llvm/Support/ConvertUTF.h" -#include "Windows/WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #endif using namespace llvm; Modified: projects/clang1000-import/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp Thu Mar 5 18:11:47 2020 (r358682) @@ -218,13 +218,21 @@ Instruction *InstCombiner::FoldIntegerTypedPHI(PHINode return nullptr; // If any of the operand that requires casting is a terminator - // instruction, do not do it. + // instruction, do not do it. Similarly, do not do the transform if the value + // is PHI in a block with no insertion point, for example, a catchswitch + // block, since we will not be able to insert a cast after the PHI. if (any_of(AvailablePtrVals, [&](Value *V) { if (V->getType() == IntToPtr->getType()) return false; - auto *Inst = dyn_cast(V); - return Inst && Inst->isTerminator(); + if (!Inst) + return false; + if (Inst->isTerminator()) + return true; + auto *BB = Inst->getParent(); + if (isa(Inst) && BB->getFirstInsertionPt() == BB->end()) + return true; + return false; })) return nullptr; @@ -264,8 +272,10 @@ Instruction *InstCombiner::FoldIntegerTypedPHI(PHINode if (auto *IncomingI = dyn_cast(IncomingVal)) { BasicBlock::iterator InsertPos(IncomingI); InsertPos++; + BasicBlock *BB = IncomingI->getParent(); if (isa(IncomingI)) - InsertPos = IncomingI->getParent()->getFirstInsertionPt(); + InsertPos = BB->getFirstInsertionPt(); + assert(InsertPos != BB->end() && "should have checked above"); InsertNewInstBefore(CI, *InsertPos); } else { auto *InsertBB = &IncomingBB->getParent()->getEntryBlock(); Modified: projects/clang1000-import/contrib/llvm-project/llvm/lib/Transforms/Scalar/SROA.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/llvm/lib/Transforms/Scalar/SROA.cpp Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/llvm/lib/Transforms/Scalar/SROA.cpp Thu Mar 5 18:11:47 2020 (r358682) @@ -2519,6 +2519,8 @@ class llvm::sroa::AllocaSliceRewriter (private) NewLI->setAAMetadata(AATags); if (LI.isVolatile()) NewLI->setAtomic(LI.getOrdering(), LI.getSyncScopeID()); + if (NewLI->isAtomic()) + NewLI->setAlignment(LI.getAlign()); // Any !nonnull metadata or !range metadata on the old load is also valid // on the new load. This is even true in some cases even when the loads @@ -2709,6 +2711,8 @@ class llvm::sroa::AllocaSliceRewriter (private) NewSI->setAAMetadata(AATags); if (SI.isVolatile()) NewSI->setAtomic(SI.getOrdering(), SI.getSyncScopeID()); + if (NewSI->isAtomic()) + NewSI->setAlignment(SI.getAlign()); Pass.DeadInsts.insert(&SI); deleteIfTriviallyDead(OldOp); Modified: projects/clang1000-import/contrib/llvm-project/llvm/tools/llvm-ar/llvm-ar.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/llvm/tools/llvm-ar/llvm-ar.cpp Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/contrib/llvm-project/llvm/tools/llvm-ar/llvm-ar.cpp Thu Mar 5 18:11:47 2020 (r358682) @@ -45,8 +45,7 @@ #endif #ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN -#include +#include "llvm/Support/Windows/WindowsSupport.h" #endif using namespace llvm; Modified: projects/clang1000-import/lib/clang/include/VCSVersion.inc ============================================================================== --- projects/clang1000-import/lib/clang/include/VCSVersion.inc Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/lib/clang/include/VCSVersion.inc Thu Mar 5 18:11:47 2020 (r358682) @@ -1,14 +1,14 @@ // $FreeBSD$ -#define LLVM_REVISION "llvmorg-10.0.0-rc2-70-ge5cb70267e7" +#define LLVM_REVISION "llvmorg-10.0.0-rc3-1-gc290cb61fdc" #define LLVM_REPOSITORY "git@github.com:llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-10.0.0-rc2-70-ge5cb70267e7" +#define CLANG_REVISION "llvmorg-10.0.0-rc3-1-gc290cb61fdc" #define CLANG_REPOSITORY "git@github.com:llvm/llvm-project.git" // - -#define LLD_REVISION "llvmorg-10.0.0-rc2-70-ge5cb70267e7-1300007" +#define LLD_REVISION "llvmorg-10.0.0-rc3-1-gc290cb61fdc-1300007" #define LLD_REPOSITORY "FreeBSD" -#define LLDB_REVISION "llvmorg-10.0.0-rc2-70-ge5cb70267e7" +#define LLDB_REVISION "llvmorg-10.0.0-rc3-1-gc290cb61fdc" #define LLDB_REPOSITORY "git@github.com:llvm/llvm-project.git" Modified: projects/clang1000-import/lib/clang/include/llvm/Support/VCSRevision.h ============================================================================== --- projects/clang1000-import/lib/clang/include/llvm/Support/VCSRevision.h Thu Mar 5 18:09:19 2020 (r358681) +++ projects/clang1000-import/lib/clang/include/llvm/Support/VCSRevision.h Thu Mar 5 18:11:47 2020 (r358682) @@ -1,3 +1,3 @@ /* $FreeBSD$ */ -#define LLVM_REVISION "llvmorg-10.0.0-rc2-70-ge5cb70267e7" +#define LLVM_REVISION "llvmorg-10.0.0-rc3-1-gc290cb61fdc" #define LLVM_REPOSITORY "git@github.com:llvm/llvm-project.git" From owner-svn-src-projects@freebsd.org Fri Mar 6 17:11:34 2020 Return-Path: Delivered-To: svn-src-projects@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 21B0926C5D7 for ; Fri, 6 Mar 2020 17:11:34 +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 48YvKd1BRMz3KFG; Fri, 6 Mar 2020 17:11:33 +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 C2A8223578; Fri, 6 Mar 2020 17:11: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 026HBWGl013164; Fri, 6 Mar 2020 17:11:32 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026HBTpD010760; Fri, 6 Mar 2020 17:11:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003061711.026HBTpD010760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 6 Mar 2020 17:11:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r358712 - in projects/clang1000-import: contrib/elftoolchain/libelf contrib/elftoolchain/readelf lib/libc/powerpc64/string libexec/tftpd/tests sbin/mount_nfs sys/amd64/conf sys/arm64/in... X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in projects/clang1000-import: contrib/elftoolchain/libelf contrib/elftoolchain/readelf lib/libc/powerpc64/string libexec/tftpd/tests sbin/mount_nfs sys/amd64/conf sys/arm64/include sys/cddl/contrib/op... X-SVN-Commit-Revision: 358712 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 17:11:34 -0000 Author: dim Date: Fri Mar 6 17:11:29 2020 New Revision: 358712 URL: https://svnweb.freebsd.org/changeset/base/358712 Log: Merge ^/head r358678 through r358711. Added: projects/clang1000-import/sys/dev/aacraid/aacraid_endian.c - copied unchanged from r358711, head/sys/dev/aacraid/aacraid_endian.c projects/clang1000-import/sys/dev/aacraid/aacraid_endian.h - copied unchanged from r358711, head/sys/dev/aacraid/aacraid_endian.h Modified: projects/clang1000-import/contrib/elftoolchain/libelf/libelf_convert.m4 projects/clang1000-import/contrib/elftoolchain/readelf/readelf.c projects/clang1000-import/lib/libc/powerpc64/string/bcopy_resolver.c projects/clang1000-import/lib/libc/powerpc64/string/memcpy.S projects/clang1000-import/lib/libc/powerpc64/string/memcpy_vsx.S projects/clang1000-import/libexec/tftpd/tests/Makefile projects/clang1000-import/sbin/mount_nfs/mount_nfs.c projects/clang1000-import/sys/amd64/conf/NOTES projects/clang1000-import/sys/arm64/include/armreg.h projects/clang1000-import/sys/arm64/include/hypervisor.h projects/clang1000-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c projects/clang1000-import/sys/conf/NOTES projects/clang1000-import/sys/conf/files.powerpc projects/clang1000-import/sys/dev/aacraid/aacraid.c projects/clang1000-import/sys/dev/aacraid/aacraid_cam.c projects/clang1000-import/sys/dev/ixl/if_ixl.c projects/clang1000-import/sys/dev/ixl/ixl_pf_main.c projects/clang1000-import/sys/dev/mfi/mfi_tbolt.c projects/clang1000-import/sys/dev/rt/if_rt.c projects/clang1000-import/sys/modules/Makefile projects/clang1000-import/sys/modules/aacraid/Makefile projects/clang1000-import/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c projects/clang1000-import/sys/powerpc/conf/GENERIC64 projects/clang1000-import/sys/sys/kernel.h Directory Properties: projects/clang1000-import/ (props changed) projects/clang1000-import/contrib/elftoolchain/ (props changed) projects/clang1000-import/sys/cddl/contrib/opensolaris/ (props changed) Modified: projects/clang1000-import/contrib/elftoolchain/libelf/libelf_convert.m4 ============================================================================== --- projects/clang1000-import/contrib/elftoolchain/libelf/libelf_convert.m4 Fri Mar 6 17:02:14 2020 (r358711) +++ projects/clang1000-import/contrib/elftoolchain/libelf/libelf_convert.m4 Fri Mar 6 17:11:29 2020 (r358712) @@ -1022,7 +1022,7 @@ _libelf_cvt_NOTE_tof(unsigned char *dst, size_t dsz, u count -= sizeof(Elf_Note); if (count < sz) - sz = count; + return (0); (void) memcpy(dst, src, sz); Modified: projects/clang1000-import/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- projects/clang1000-import/contrib/elftoolchain/readelf/readelf.c Fri Mar 6 17:02:14 2020 (r358711) +++ projects/clang1000-import/contrib/elftoolchain/readelf/readelf.c Fri Mar 6 17:11:29 2020 (r358712) @@ -1283,6 +1283,7 @@ note_type_xen(unsigned int nt) case 15: return "XEN_ELFNOTE_INIT_P2M"; case 16: return "XEN_ELFNOTE_MOD_START_PFN"; case 17: return "XEN_ELFNOTE_SUPPORTED_FEATURES"; + case 18: return "XEN_ELFNOTE_PHYS32_ENTRY"; default: return (note_type_unknown(nt)); } } @@ -3676,6 +3677,33 @@ static struct flag_desc note_feature_ctl_flags[] = { }; static void +dump_note_string(const char *description, const char *s, size_t len) +{ + size_t i; + int printable = 1; + + if (len == 0 || s[--len] != '\0') { + printable = 0; + } else { + for (i = 0; i < len; i++) { + if (!isprint(s[i])) { + printable = 0; + break; + } + } + } + + if (printable) { + printf(" %s: %s\n", description, s); + } else { + printf(" description data:"); + for (i = 0; i < len; i++) + printf(" %02x", (unsigned char)s[i]); + printf("\n"); + } +} + +static void dump_notes_data(struct readelf *re, const char *name, uint32_t type, const char *buf, size_t sz) { @@ -3713,6 +3741,30 @@ dump_notes_data(struct readelf *re, const char *name, switch (type) { case NT_GNU_PROPERTY_TYPE_0: dump_gnu_property_type_0(re, buf, sz); + return; + } + } else if (strcmp(name, "Xen") == 0) { + switch (type) { + case 5: + dump_note_string("Xen version", buf, sz); + return; + case 6: + dump_note_string("Guest OS", buf, sz); + return; + case 7: + dump_note_string("Guest version", buf, sz); + return; + case 8: + dump_note_string("Loader", buf, sz); + return; + case 9: + dump_note_string("PAE mode", buf, sz); + return; + case 10: + dump_note_string("Features", buf, sz); + return; + case 11: + dump_note_string("BSD symtab", buf, sz); return; } } Modified: projects/clang1000-import/lib/libc/powerpc64/string/bcopy_resolver.c ============================================================================== --- projects/clang1000-import/lib/libc/powerpc64/string/bcopy_resolver.c Fri Mar 6 17:02:14 2020 (r358711) +++ projects/clang1000-import/lib/libc/powerpc64/string/bcopy_resolver.c Fri Mar 6 17:11:29 2020 (r358712) @@ -66,7 +66,7 @@ DEFINE_UIFUNC(, FN_RET, FN_NAME, FN_PARAMS) * Since POWER ISA 2.07B this is solved transparently * by the hardware */ - if (cpu_features2 & PPC_FEATURE2_ARCH_2_07) + if (cpu_features & PPC_FEATURE_HAS_VSX) return (FN_NAME_VSX); else return (FN_NAME_NOVSX); Modified: projects/clang1000-import/lib/libc/powerpc64/string/memcpy.S ============================================================================== --- projects/clang1000-import/lib/libc/powerpc64/string/memcpy.S Fri Mar 6 17:02:14 2020 (r358711) +++ projects/clang1000-import/lib/libc/powerpc64/string/memcpy.S Fri Mar 6 17:11:29 2020 (r358712) @@ -39,6 +39,11 @@ WEAK_REFERENCE(__memcpy, memcpy); #define BLOCK_BYTES (1 << BLOCK_BITS) #define BLOCK_MASK (BLOCK_BYTES - 1) +/* Minimum 8 byte alignment, to avoid cache-inhibited alignment faults. */ +#ifndef ALIGN_MASK +#define ALIGN_MASK 0x7 +#endif + /* * r3: dst * r4: src @@ -48,6 +53,12 @@ ENTRY(FN_NAME) cmpdi %r5, 0 /* len == 0? nothing to do */ beqlr- + /* If src and dst are relatively misaligned, do byte copies. */ + andi. %r8, %r3, ALIGN_MASK + andi. %r7, %r4, ALIGN_MASK + cmpd %r8, %r7 + mr %r7, %r5 + bne .Lcopy_remaining_fix_index_byte mr %r8, %r3 /* save dst */ /* align src */ Modified: projects/clang1000-import/lib/libc/powerpc64/string/memcpy_vsx.S ============================================================================== --- projects/clang1000-import/lib/libc/powerpc64/string/memcpy_vsx.S Fri Mar 6 17:02:14 2020 (r358711) +++ projects/clang1000-import/lib/libc/powerpc64/string/memcpy_vsx.S Fri Mar 6 17:11:29 2020 (r358712) @@ -30,6 +30,7 @@ #define FN_NAME __memcpy_vsx #define BLOCK_BITS 6 +#define ALIGN_MASK 0xf /* * r5: bytes to copy (multiple of BLOCK_BYTES) Modified: projects/clang1000-import/libexec/tftpd/tests/Makefile ============================================================================== --- projects/clang1000-import/libexec/tftpd/tests/Makefile Fri Mar 6 17:02:14 2020 (r358711) +++ projects/clang1000-import/libexec/tftpd/tests/Makefile Fri Mar 6 17:11:29 2020 (r358712) @@ -10,5 +10,6 @@ TEST_METADATA.functional+= timeout=15 LIBADD= util WARNS?= 6 +CSTD= c11 .include Modified: projects/clang1000-import/sbin/mount_nfs/mount_nfs.c ============================================================================== --- projects/clang1000-import/sbin/mount_nfs/mount_nfs.c Fri Mar 6 17:02:14 2020 (r358711) +++ projects/clang1000-import/sbin/mount_nfs/mount_nfs.c Fri Mar 6 17:11:29 2020 (r358712) @@ -514,7 +514,7 @@ sec_num_to_name(int flavor) static time_t rtm_ifinfo_sleep(time_t sec) { - char buf[2048]; + char buf[2048] __aligned(__alignof(struct if_msghdr)); fd_set rfds; struct timeval tv, start; ssize_t nread; Modified: projects/clang1000-import/sys/amd64/conf/NOTES ============================================================================== --- projects/clang1000-import/sys/amd64/conf/NOTES Fri Mar 6 17:02:14 2020 (r358711) +++ projects/clang1000-import/sys/amd64/conf/NOTES Fri Mar 6 17:11:29 2020 (r358712) @@ -417,10 +417,6 @@ device aac device aacp # SCSI Passthrough interface (optional, CAM required) # -# Adaptec by PMC RAID controllers, Series 6/7/8 and upcoming families -device aacraid # Container interface, CAM required - -# # Highpoint RocketRAID 27xx. device hpt27xx Modified: projects/clang1000-import/sys/arm64/include/armreg.h ============================================================================== --- projects/clang1000-import/sys/arm64/include/armreg.h Fri Mar 6 17:02:14 2020 (r358711) +++ projects/clang1000-import/sys/arm64/include/armreg.h Fri Mar 6 17:11:29 2020 (r358712) @@ -73,6 +73,11 @@ #define CNTHCTL_EL1PCEN (1 << 1) /* Allow EL0/1 physical timer access */ #define CNTHCTL_EL1PCTEN (1 << 0) /*Allow EL0/1 physical counter access*/ +/* CNTP_CTL_EL0 - Counter-timer Physical Timer Control register */ +#define CNTP_CTL_ENABLE (1 << 0) +#define CNTP_CTL_IMASK (1 << 1) +#define CNTP_CTL_ISTATUS (1 << 2) + /* CPACR_EL1 */ #define CPACR_FPEN_MASK (0x3 << 20) #define CPACR_FPEN_TRAP_ALL1 (0x0 << 20) /* Traps from EL0 and EL1 */ @@ -129,22 +134,53 @@ #define DCZID_BS_SIZE(reg) (((reg) & DCZID_BS_MASK) >> DCZID_BS_SHIFT) /* ESR_ELx */ -#define ESR_ELx_ISS_MASK 0x00ffffff +#define ESR_ELx_ISS_MASK 0x01ffffff #define ISS_INSN_FnV (0x01 << 10) #define ISS_INSN_EA (0x01 << 9) #define ISS_INSN_S1PTW (0x01 << 7) #define ISS_INSN_IFSC_MASK (0x1f << 0) -#define ISS_DATA_ISV (0x01 << 24) -#define ISS_DATA_SAS_MASK (0x03 << 22) -#define ISS_DATA_SSE (0x01 << 21) -#define ISS_DATA_SRT_MASK (0x1f << 16) + +#define ISS_MSR_DIR_SHIFT 0 +#define ISS_MSR_DIR (0x01 << ISS_MSR_DIR_SHIFT) +#define ISS_MSR_Rt_SHIFT 5 +#define ISS_MSR_Rt_MASK (0x1f << ISS_MSR_Rt_SHIFT) +#define ISS_MSR_Rt(x) (((x) & ISS_MSR_Rt_MASK) >> ISS_MSR_Rt_SHIFT) +#define ISS_MSR_CRm_SHIFT 1 +#define ISS_MSR_CRm_MASK (0xf << ISS_MSR_CRm_SHIFT) +#define ISS_MSR_CRm(x) (((x) & ISS_MSR_CRm_MASK) >> ISS_MSR_CRm_SHIFT) +#define ISS_MSR_CRn_SHIFT 10 +#define ISS_MSR_CRn_MASK (0xf << ISS_MSR_CRn_SHIFT) +#define ISS_MSR_CRn(x) (((x) & ISS_MSR_CRn_MASK) >> ISS_MSR_CRn_SHIFT) +#define ISS_MSR_OP1_SHIFT 14 +#define ISS_MSR_OP1_MASK (0x7 << ISS_MSR_OP1_SHIFT) +#define ISS_MSR_OP1(x) (((x) & ISS_MSR_OP1_MASK) >> ISS_MSR_OP1_SHIFT) +#define ISS_MSR_OP2_SHIFT 17 +#define ISS_MSR_OP2_MASK (0x7 << ISS_MSR_OP2_SHIFT) +#define ISS_MSR_OP2(x) (((x) & ISS_MSR_OP2_MASK) >> ISS_MSR_OP2_SHIFT) +#define ISS_MSR_OP0_SHIFT 20 +#define ISS_MSR_OP0_MASK (0x3 << ISS_MSR_OP0_SHIFT) +#define ISS_MSR_OP0(x) (((x) & ISS_MSR_OP0_MASK) >> ISS_MSR_OP0_SHIFT) +#define ISS_MSR_REG_MASK \ + (ISS_MSR_OP0_MASK | ISS_MSR_OP2_MASK | ISS_MSR_OP1_MASK | \ + ISS_MSR_CRn_MASK | ISS_MSR_CRm_MASK) + + +#define ISS_DATA_ISV_SHIFT 24 +#define ISS_DATA_ISV (0x01 << ISS_DATA_ISV_SHIFT) +#define ISS_DATA_SAS_SHIFT 22 +#define ISS_DATA_SAS_MASK (0x03 << ISS_DATA_SAS_SHIFT) +#define ISS_DATA_SSE_SHIFT 21 +#define ISS_DATA_SSE (0x01 << ISS_DATA_SSE_SHIFT) +#define ISS_DATA_SRT_SHIFT 16 +#define ISS_DATA_SRT_MASK (0x1f << ISS_DATA_SRT_SHIFT) #define ISS_DATA_SF (0x01 << 15) #define ISS_DATA_AR (0x01 << 14) #define ISS_DATA_FnV (0x01 << 10) #define ISS_DATA_EA (0x01 << 9) #define ISS_DATA_CM (0x01 << 8) #define ISS_DATA_S1PTW (0x01 << 7) -#define ISS_DATA_WnR (0x01 << 6) +#define ISS_DATA_WnR_SHIFT 6 +#define ISS_DATA_WnR (0x01 << ISS_DATA_WnR_SHIFT) #define ISS_DATA_DFSC_MASK (0x3f << 0) #define ISS_DATA_DFSC_ASF_L0 (0x00 << 0) #define ISS_DATA_DFSC_ASF_L1 (0x01 << 0) @@ -177,10 +213,12 @@ #define ESR_ELx_EC_MASK (0x3f << 26) #define ESR_ELx_EXCEPTION(esr) (((esr) & ESR_ELx_EC_MASK) >> ESR_ELx_EC_SHIFT) #define EXCP_UNKNOWN 0x00 /* Unkwn exception */ +#define EXCP_TRAP_WFI_WFE 0x01 /* Trapped WFI or WFE */ #define EXCP_FP_SIMD 0x07 /* VFP/SIMD trap */ #define EXCP_ILL_STATE 0x0e /* Illegal execution state */ #define EXCP_SVC32 0x11 /* SVC trap for AArch32 */ #define EXCP_SVC64 0x15 /* SVC trap for AArch64 */ +#define EXCP_HVC 0x16 /* HVC trap */ #define EXCP_MSR 0x18 /* MSR/MRS trap */ #define EXCP_INSN_ABORT_L 0x20 /* Instruction abort, from lower EL */ #define EXCP_INSN_ABORT 0x21 /* Instruction abort, from same EL */ @@ -220,10 +258,6 @@ /* ICC_SRE_EL1 */ #define ICC_SRE_EL1_SRE (1U << 0) -/* ICC_SRE_EL2 */ -#define ICC_SRE_EL2_SRE (1U << 0) -#define ICC_SRE_EL2_EN (1U << 3) - /* ID_AA64DFR0_EL1 */ #define ID_AA64DFR0_EL1 MRS_REG(3, 0, 0, 5, 0) #define ID_AA64DFR0_DebugVer_SHIFT 0 @@ -725,6 +759,8 @@ #define TCR_TG1_4K (2 << TCR_TG1_SHIFT) #define TCR_TG1_64K (3 << TCR_TG1_SHIFT) +#define TCR_TG0_MASK 0x000000000000c000 + #define TCR_SH1_SHIFT 28 #define TCR_SH1_IS (0x3UL << TCR_SH1_SHIFT) #define TCR_ORGN1_SHIFT 26 @@ -751,6 +787,7 @@ #define TCR_T1SZ_SHIFT 16 #define TCR_T0SZ_SHIFT 0 +#define TCR_T0SZ_MASK 0x3f #define TCR_T1SZ(x) ((x) << TCR_T1SZ_SHIFT) #define TCR_T0SZ(x) ((x) << TCR_T0SZ_SHIFT) #define TCR_TxSZ(x) (TCR_T1SZ(x) | TCR_T0SZ(x)) Modified: projects/clang1000-import/sys/arm64/include/hypervisor.h ============================================================================== --- projects/clang1000-import/sys/arm64/include/hypervisor.h Fri Mar 6 17:02:14 2020 (r358711) +++ projects/clang1000-import/sys/arm64/include/hypervisor.h Fri Mar 6 17:11:29 2020 (r358712) @@ -34,19 +34,21 @@ * e.g. specific to EL2, or controlling the hypervisor. */ -/* - * Architecture feature trap register - */ +/* CNTHCTL_EL2 - Counter-timer Hypervisor Control register */ +#define CNTHCTL_EVNTI_MASK (0xf << 4) /* Bit to trigger event stream */ +#define CNTHCTL_EVNTDIR (1 << 3) /* Control transition trigger bit */ +#define CNTHCTL_EVNTEN (1 << 2) /* Enable event stream */ +#define CNTHCTL_EL1PCEN (1 << 1) /* Allow EL0/1 physical timer access */ +#define CNTHCTL_EL1PCTEN (1 << 0) /*Allow EL0/1 physical counter access*/ + +/* CPTR_EL2 - Architecture feature trap register */ #define CPTR_RES0 0x7fefc800 #define CPTR_RES1 0x000033ff #define CPTR_TFP 0x00000400 #define CPTR_TTA 0x00100000 #define CPTR_TCPAC 0x80000000 -/* - * Hypervisor Config Register - */ - +/* HCR_EL2 - Hypervisor Config Register */ #define HCR_VM 0x0000000000000001 #define HCR_SWIO 0x0000000000000002 #define HCR_PTW 0x0000000000000004 @@ -58,6 +60,9 @@ #define HCR_VSE 0x0000000000000100 #define HCR_FB 0x0000000000000200 #define HCR_BSU_MASK 0x0000000000000c00 +#define HCR_BSU_IS 0x0000000000000400 +#define HCR_BSU_OS 0x0000000000000800 +#define HCR_BSU_FS 0x0000000000000c00 #define HCR_DC 0x0000000000001000 #define HCR_TWI 0x0000000000002000 #define HCR_TWE 0x0000000000004000 @@ -69,7 +74,7 @@ #define HCR_TIDCP 0x0000000000100000 #define HCR_TACR 0x0000000000200000 #define HCR_TSW 0x0000000000400000 -#define HCR_TPC 0x0000000000800000 +#define HCR_TPCP 0x0000000000800000 #define HCR_TPU 0x0000000001000000 #define HCR_TTLB 0x0000000002000000 #define HCR_TVM 0x0000000004000000 @@ -92,5 +97,89 @@ #define HCR_NV1 0x0000080000000000 #define HCR_AT 0x0000100000000000 -#endif +/* HPFAR_EL2 - Hypervisor IPA Fault Address Register */ +#define HPFAR_EL2_FIPA_SHIFT 4 +#define HPFAR_EL2_FIPA_MASK 0xfffffffff0 +/* ICC_SRE_EL2 */ +#define ICC_SRE_EL2_SRE (1U << 0) +#define ICC_SRE_EL2_EN (1U << 3) + +/* SCTLR_EL2 - System Control Register */ +#define SCTLR_EL2_RES1 0x30c50830 +#define SCTLR_EL2_M_SHIFT 0 +#define SCTLR_EL2_M (0x1 << SCTLR_EL2_M_SHIFT) +#define SCTLR_EL2_A_SHIFT 1 +#define SCTLR_EL2_A (0x1 << SCTLR_EL2_A_SHIFT) +#define SCTLR_EL2_C_SHIFT 2 +#define SCTLR_EL2_C (0x1 << SCTLR_EL2_C_SHIFT) +#define SCTLR_EL2_SA_SHIFT 3 +#define SCTLR_EL2_SA (0x1 << SCTLR_EL2_SA_SHIFT) +#define SCTLR_EL2_I_SHIFT 12 +#define SCTLR_EL2_I (0x1 << SCTLR_EL2_I_SHIFT) +#define SCTLR_EL2_WXN_SHIFT 19 +#define SCTLR_EL2_WXN (0x1 << SCTLR_EL2_WXN_SHIFT) +#define SCTLR_EL2_EE_SHIFT 25 +#define SCTLR_EL2_EE (0x1 << SCTLR_EL2_EE_SHIFT) + +/* TCR_EL2 - Translation Control Register */ +#define TCR_EL2_RES1 ((0x1UL << 31) | (0x1UL << 23)) +#define TCR_EL2_T0SZ_SHIFT 0 +#define TCR_EL2_T0SZ_MASK (0x3f << TCR_EL2_T0SZ_SHIFT) +#define TCR_EL2_T0SZ(x) ((x) << TCR_EL2_T0SZ_SHIFT) +/* Bits 7:6 are reserved */ +#define TCR_EL2_IRGN0_SHIFT 8 +#define TCR_EL2_IRGN0_MASK (0x3 << TCR_EL2_IRGN0_SHIFT) +#define TCR_EL2_ORGN0_SHIFT 10 +#define TCR_EL2_ORGN0_MASK (0x3 << TCR_EL2_ORGN0_SHIFT) +#define TCR_EL2_SH0_SHIFT 12 +#define TCR_EL2_SH0_MASK (0x3 << TCR_EL2_SH0_SHIFT) +#define TCR_EL2_TG0_SHIFT 14 +#define TCR_EL2_TG0_MASK (0x3 << TCR_EL2_TG0_SHIFT) +#define TCR_EL2_PS_SHIFT 16 +#define TCR_EL2_PS_32BITS (0 << TCR_EL2_PS_SHIFT) +#define TCR_EL2_PS_36BITS (1 << TCR_EL2_PS_SHIFT) +#define TCR_EL2_PS_40BITS (2 << TCR_EL2_PS_SHIFT) +#define TCR_EL2_PS_42BITS (3 << TCR_EL2_PS_SHIFT) +#define TCR_EL2_PS_44BITS (4 << TCR_EL2_PS_SHIFT) +#define TCR_EL2_PS_48BITS (5 << TCR_EL2_PS_SHIFT) +#define TCR_EL2_PS_52BITS (6 << TCR_EL2_PS_SHIFT) /* ARMv8.2-LPA */ + +/* VMPDIR_EL2 - Virtualization Multiprocessor ID Register */ +#define VMPIDR_EL2_U 0x0000000040000000 +#define VMPIDR_EL2_MT 0x0000000001000000 +#define VMPIDR_EL2_RES1 0x0000000080000000 + +/* VTCR_EL2 - Virtualization Translation Control Register */ +#define VTCR_EL2_RES1 (0x1 << 31) +#define VTCR_EL2_T0SZ_MASK 0x3f +#define VTCR_EL2_SL0_SHIFT 6 +#define VTCR_EL2_SL0_4K_LVL2 (0x0 << VTCR_EL2_SL0_SHIFT) +#define VTCR_EL2_SL0_4K_LVL1 (0x1 << VTCR_EL2_SL0_SHIFT) +#define VTCR_EL2_SL0_4K_LVL0 (0x2 << VTCR_EL2_SL0_SHIFT) +#define VTCR_EL2_IRGN0_SHIFT 8 +#define VTCR_EL2_IRGN0_WBWA (0x1 << VTCR_EL2_IRGN0_SHIFT) +#define VTCR_EL2_ORGN0_SHIFT 10 +#define VTCR_EL2_ORGN0_WBWA (0x1 << VTCR_EL2_ORGN0_SHIFT) +#define VTCR_EL2_SH0_SHIFT 12 +#define VTCR_EL2_SH0_NS (0x0 << VTCR_EL2_SH0_SHIFT) +#define VTCR_EL2_SH0_OS (0x2 << VTCR_EL2_SH0_SHIFT) +#define VTCR_EL2_SH0_IS (0x3 << VTCR_EL2_SH0_SHIFT) +#define VTCR_EL2_TG0_SHIFT 14 +#define VTCR_EL2_TG0_4K (0x0 << VTCR_EL2_TG0_SHIFT) +#define VTCR_EL2_TG0_64K (0x1 << VTCR_EL2_TG0_SHIFT) +#define VTCR_EL2_TG0_16K (0x2 << VTCR_EL2_TG0_SHIFT) +#define VTCR_EL2_PS_SHIFT 16 +#define VTCR_EL2_PS_32BIT (0x0 << VTCR_EL2_PS_SHIFT) +#define VTCR_EL2_PS_36BIT (0x1 << VTCR_EL2_PS_SHIFT) +#define VTCR_EL2_PS_40BIT (0x2 << VTCR_EL2_PS_SHIFT) +#define VTCR_EL2_PS_42BIT (0x3 << VTCR_EL2_PS_SHIFT) +#define VTCR_EL2_PS_44BIT (0x4 << VTCR_EL2_PS_SHIFT) +#define VTCR_EL2_PS_48BIT (0x5 << VTCR_EL2_PS_SHIFT) + +/* VTTBR_EL2 - Virtualization Translation Table Base Register */ +#define VTTBR_VMID_MASK 0xffff000000000000 +#define VTTBR_VMID_SHIFT 48 +#define VTTBR_HOST 0x0000000000000000 + +#endif /* !_MACHINE_HYPERVISOR_H_ */ Modified: projects/clang1000-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- projects/clang1000-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Fri Mar 6 17:02:14 2020 (r358711) +++ projects/clang1000-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Fri Mar 6 17:11:29 2020 (r358712) @@ -137,12 +137,6 @@ extern int zfs_vdev_async_write_active_min_dirty_perce */ int zfs_scan_strict_mem_lim = B_FALSE; -/* - * Maximum number of parallelly executing I/Os per top-level vdev. - * Tune with care. Very high settings (hundreds) are known to trigger - * some firmware bugs and resets on certain SSDs. - */ -int zfs_top_maxinflight = 32; /* maximum I/Os per top-level */ unsigned int zfs_resilver_delay = 2; /* number of ticks to delay resilver -- 2 is a good number */ unsigned int zfs_scrub_delay = 4; /* number of ticks to delay scrub -- 4 is a good number */ unsigned int zfs_scan_idle = 50; /* idle window in clock ticks */ @@ -186,8 +180,6 @@ boolean_t zfs_no_scrub_io = B_FALSE; /* set to disable boolean_t zfs_no_scrub_prefetch = B_FALSE; /* set to disable scrub prefetch */ SYSCTL_DECL(_vfs_zfs); -SYSCTL_UINT(_vfs_zfs, OID_AUTO, top_maxinflight, CTLFLAG_RWTUN, - &zfs_top_maxinflight, 0, "Maximum I/Os per top-level vdev"); SYSCTL_UINT(_vfs_zfs, OID_AUTO, resilver_delay, CTLFLAG_RWTUN, &zfs_resilver_delay, 0, "Number of ticks to delay resilver"); SYSCTL_UINT(_vfs_zfs, OID_AUTO, scrub_delay, CTLFLAG_RWTUN, @@ -1538,7 +1530,6 @@ dsl_scan_prefetch_thread(void *arg) dsl_scan_t *scn = arg; spa_t *spa = scn->scn_dp->dp_spa; vdev_t *rvd = spa->spa_root_vdev; - uint64_t maxinflight = rvd->vdev_children * zfs_top_maxinflight; scan_prefetch_issue_ctx_t *spic; /* loop until we are told to stop */ Modified: projects/clang1000-import/sys/conf/NOTES ============================================================================== --- projects/clang1000-import/sys/conf/NOTES Fri Mar 6 17:02:14 2020 (r358711) +++ projects/clang1000-import/sys/conf/NOTES Fri Mar 6 17:11:29 2020 (r358712) @@ -1490,6 +1490,8 @@ options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK) # # SCSI host adapters: # +# aacraid: Adaptec by PMC RAID controllers, Series 6/7/8 and upcoming +# families. Container interface, CAM required. # ahc: Adaptec 274x/284x/2910/293x/294x/394x/3950x/3960x/398X/4944/ # 19160x/29160x, aic7770/aic78xx # ahd: Adaptec 29320/39320 Controllers. @@ -1512,6 +1514,7 @@ options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK) # 53C876, 53C885, 53C895, 53C895A, 53C896, 53C897, 53C1510D, # 53C1010-33, 53C1010-66. +device aacraid device ahc device ahd device esp Modified: projects/clang1000-import/sys/conf/files.powerpc ============================================================================== --- projects/clang1000-import/sys/conf/files.powerpc Fri Mar 6 17:02:14 2020 (r358711) +++ projects/clang1000-import/sys/conf/files.powerpc Fri Mar 6 17:11:29 2020 (r358712) @@ -16,6 +16,7 @@ cddl/dev/dtrace/powerpc/dtrace_subr.c optional dtrace cddl/dev/fbt/powerpc/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support crypto/des/des_enc.c optional crypto | ipsec | ipsec_support | netsmb +dev/aacraid/aacraid_endian.c optional aacraid dev/adb/adb_bus.c optional adb dev/adb/adb_kbd.c optional adb dev/adb/adb_mouse.c optional adb Modified: projects/clang1000-import/sys/dev/aacraid/aacraid.c ============================================================================== --- projects/clang1000-import/sys/dev/aacraid/aacraid.c Fri Mar 6 17:02:14 2020 (r358711) +++ projects/clang1000-import/sys/dev/aacraid/aacraid.c Fri Mar 6 17:11:29 2020 (r358712) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifndef FILTER_HANDLED #define FILTER_HANDLED 0x02 @@ -386,7 +387,7 @@ aac_daemon(void *arg) AAC_FIBSTATE_ASYNC | AAC_FIBSTATE_FAST_RESPONSE; fib->Header.Command = SendHostTime; - *(uint32_t *)fib->data = tv.tv_sec; + *(uint32_t *)fib->data = htole32(tv.tv_sec); aacraid_map_command_sg(cm, NULL, 0, 0); aacraid_release_command(cm); @@ -446,6 +447,7 @@ aac_get_container_info(struct aac_softc *sc, struct aa mi->Command = VM_NameServe; mi->MntType = FT_FILESYS; mi->MntCount = cid; + aac_mntinfo_tole(mi); if (sync_fib) { if (aac_sync_fib(sc, ContainerCommand, 0, fib, @@ -476,6 +478,7 @@ aac_get_container_info(struct aac_softc *sc, struct aa } } bcopy(&fib->data[0], mir, sizeof(struct aac_mntinforesp)); + aac_mntinforesp_toh(mir); /* UID */ *uid = cid; @@ -490,10 +493,12 @@ aac_get_container_info(struct aac_softc *sc, struct aa ccfg->Command = VM_ContainerConfig; ccfg->CTCommand.command = CT_CID_TO_32BITS_UID; ccfg->CTCommand.param[0] = cid; + aac_cnt_config_tole(ccfg); if (sync_fib) { rval = aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof(struct aac_cnt_config)); + aac_cnt_config_toh(ccfg); if (rval == 0 && ccfg->Command == ST_OK && ccfg->CTCommand.param[0] == CT_OK && mir->MntTable[0].VolType != CT_PASSTHRU) @@ -512,6 +517,7 @@ aac_get_container_info(struct aac_softc *sc, struct aa AAC_FIBSTATE_FAST_RESPONSE; fib->Header.Command = ContainerCommand; rval = aacraid_wait_command(cm); + aac_cnt_config_toh(ccfg); if (rval == 0 && ccfg->Command == ST_OK && ccfg->CTCommand.param[0] == CT_OK && mir->MntTable[0].VolType != CT_PASSTHRU) @@ -804,8 +810,8 @@ aacraid_shutdown(device_t dev) cc = (struct aac_close_command *)&fib->data[0]; bzero(cc, sizeof(struct aac_close_command)); - cc->Command = VM_CloseAll; - cc->ContainerId = 0xfffffffe; + cc->Command = htole32(VM_CloseAll); + cc->ContainerId = htole32(0xfffffffe); if (aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof(struct aac_close_command))) printf("FAILED.\n"); @@ -905,6 +911,8 @@ aacraid_new_intr_type1(void *arg) cm = sc->aac_sync_cm; aac_unmap_command(cm); cm->cm_flags |= AAC_CMD_COMPLETED; + aac_fib_header_toh(&cm->cm_fib->Header); + /* is there a completion handler? */ if (cm->cm_complete != NULL) { cm->cm_complete(cm); @@ -931,7 +939,8 @@ aacraid_new_intr_type1(void *arg) for (;;) { isFastResponse = isAif = noMoreAif = 0; /* remove toggle bit (31) */ - handle = (sc->aac_common->ac_host_rrq[index] & 0x7fffffff); + handle = (le32toh(sc->aac_common->ac_host_rrq[index]) & + 0x7fffffff); /* check fast response bit (30) */ if (handle & 0x40000000) isFastResponse = 1; @@ -944,6 +953,7 @@ aacraid_new_intr_type1(void *arg) cm = sc->aac_commands + (handle - 1); fib = cm->cm_fib; + aac_fib_header_toh(&fib->Header); sc->aac_rrq_outstanding[vector_no]--; if (isAif) { noMoreAif = (fib->Header.XferState & AAC_FIBSTATE_NOMOREAIF) ? 1:0; @@ -954,7 +964,7 @@ aacraid_new_intr_type1(void *arg) } else { if (isFastResponse) { fib->Header.XferState |= AAC_FIBSTATE_DONEADAP; - *((u_int32_t *)(fib->data)) = ST_OK; + *((u_int32_t *)(fib->data)) = htole32(ST_OK); cm->cm_flags |= AAC_CMD_FASTRESP; } aac_remove_busy(cm); @@ -1342,6 +1352,10 @@ aacraid_map_command_sg(void *arg, bus_dma_segment_t *s raw->flags |= RIO2_SGL_CONFORMANT; } + for (i = 0; i < nseg; i++) + aac_sge_ieee1212_tole(sg + i); + aac_raw_io2_tole(raw); + /* update the FIB size for the s/g count */ fib->Header.Size += nseg * sizeof(struct aac_sge_ieee1212); @@ -1349,33 +1363,37 @@ aacraid_map_command_sg(void *arg, bus_dma_segment_t *s } else if (fib->Header.Command == RawIo) { struct aac_sg_tableraw *sg; sg = (struct aac_sg_tableraw *)cm->cm_sgtable; - sg->SgCount = nseg; + sg->SgCount = htole32(nseg); for (i = 0; i < nseg; i++) { sg->SgEntryRaw[i].SgAddress = segs[i].ds_addr; sg->SgEntryRaw[i].SgByteCount = segs[i].ds_len; sg->SgEntryRaw[i].Next = 0; sg->SgEntryRaw[i].Prev = 0; sg->SgEntryRaw[i].Flags = 0; + aac_sg_entryraw_tole(&sg->SgEntryRaw[i]); } + aac_raw_io_tole((struct aac_raw_io *)&fib->data[0]); /* update the FIB size for the s/g count */ fib->Header.Size += nseg*sizeof(struct aac_sg_entryraw); } else if ((cm->cm_sc->flags & AAC_FLAGS_SG_64BIT) == 0) { struct aac_sg_table *sg; sg = cm->cm_sgtable; - sg->SgCount = nseg; + sg->SgCount = htole32(nseg); for (i = 0; i < nseg; i++) { sg->SgEntry[i].SgAddress = segs[i].ds_addr; sg->SgEntry[i].SgByteCount = segs[i].ds_len; + aac_sg_entry_tole(&sg->SgEntry[i]); } /* update the FIB size for the s/g count */ fib->Header.Size += nseg*sizeof(struct aac_sg_entry); } else { struct aac_sg_table64 *sg; sg = (struct aac_sg_table64 *)cm->cm_sgtable; - sg->SgCount = nseg; + sg->SgCount = htole32(nseg); for (i = 0; i < nseg; i++) { sg->SgEntry64[i].SgAddress = segs[i].ds_addr; sg->SgEntry64[i].SgByteCount = segs[i].ds_len; + aac_sg_entry64_tole(&sg->SgEntry64[i]); } /* update the FIB size for the s/g count */ fib->Header.Size += nseg*sizeof(struct aac_sg_entry64); @@ -1405,11 +1423,13 @@ aacraid_map_command_sg(void *arg, bus_dma_segment_t *s cm->cm_flags |= AAC_CMD_MAPPED; if (cm->cm_flags & AAC_CMD_WAIT) { + aac_fib_header_tole(&fib->Header); aacraid_sync_command(sc, AAC_MONKER_SYNCFIB, cm->cm_fibphys, 0, 0, 0, NULL, NULL); } else if (sc->flags & AAC_FLAGS_SYNC_MODE) { u_int32_t wait = 0; sc->aac_sync_cm = cm; + aac_fib_header_tole(&fib->Header); aacraid_sync_command(sc, AAC_MONKER_SYNCFIB, cm->cm_fibphys, 0, 0, 0, &wait, NULL); } else { @@ -1788,6 +1808,8 @@ aac_init(struct aac_softc *sc) ip->MaxIoSize = sc->aac_max_sectors << 9; ip->MaxFibSize = sc->aac_max_fib_size; + aac_adapter_init_tole(ip); + /* * Do controller-type-specific initialisation */ @@ -1996,18 +2018,24 @@ aac_check_config(struct aac_softc *sc) ccfg->CTCommand.command = CT_GET_CONFIG_STATUS; ccfg->CTCommand.param[CNT_SIZE] = sizeof(struct aac_cf_status_hdr); + aac_cnt_config_tole(ccfg); rval = aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof (struct aac_cnt_config)); + aac_cnt_config_toh(ccfg); + cf_shdr = (struct aac_cf_status_hdr *)ccfg->CTCommand.data; if (rval == 0 && ccfg->Command == ST_OK && ccfg->CTCommand.param[0] == CT_OK) { - if (cf_shdr->action <= CFACT_PAUSE) { + if (le32toh(cf_shdr->action) <= CFACT_PAUSE) { bzero(ccfg, sizeof (*ccfg) - CT_PACKET_SIZE); ccfg->Command = VM_ContainerConfig; ccfg->CTCommand.command = CT_COMMIT_CONFIG; + aac_cnt_config_tole(ccfg); rval = aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof (struct aac_cnt_config)); + aac_cnt_config_toh(ccfg); + if (rval == 0 && ccfg->Command == ST_OK && ccfg->CTCommand.param[0] == CT_OK) { /* successful completion */ @@ -2087,6 +2115,8 @@ static int aac_sync_fib(struct aac_softc *sc, u_int32_t command, u_int32_t xferstate, struct aac_fib *fib, u_int16_t datasize) { + uint32_t ReceiverFibAddress; + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); mtx_assert(&sc->aac_io_lock, MA_OWNED); @@ -2105,18 +2135,22 @@ aac_sync_fib(struct aac_softc *sc, u_int32_t command, fib->Header.Size = sizeof(struct aac_fib_header) + datasize; fib->Header.SenderSize = sizeof(struct aac_fib); fib->Header.SenderFibAddress = 0; /* Not needed */ - fib->Header.u.ReceiverFibAddress = sc->aac_common_busaddr + + ReceiverFibAddress = sc->aac_common_busaddr + offsetof(struct aac_common, ac_sync_fib); + fib->Header.u.ReceiverFibAddress = ReceiverFibAddress; + aac_fib_header_tole(&fib->Header); /* * Give the FIB to the controller, wait for a response. */ if (aacraid_sync_command(sc, AAC_MONKER_SYNCFIB, - fib->Header.u.ReceiverFibAddress, 0, 0, 0, NULL, NULL)) { + ReceiverFibAddress, 0, 0, 0, NULL, NULL)) { fwprintf(sc, HBA_FLAGS_DBG_ERROR_B, "IO error"); + aac_fib_header_toh(&fib->Header); return(EIO); } + aac_fib_header_toh(&fib->Header); return (0); } @@ -2407,10 +2441,13 @@ aac_src_send_command(struct aac_softc *sc, struct aac_ pFibX->Handle = cm->cm_fib->Header.Handle; pFibX->HostAddress = cm->cm_fibphys; pFibX->Size = cm->cm_fib->Header.Size; + aac_fib_xporthdr_tole(pFibX); address = cm->cm_fibphys - sizeof(struct aac_fib_xporthdr); high_addr = (u_int32_t)(address >> 32); } + aac_fib_header_tole(&cm->cm_fib->Header); + if (fibsize > 31) fibsize = 31; aac_enqueue_busy(cm); @@ -2468,8 +2505,8 @@ aac_describe_controller(struct aac_softc *sc) supp_info = ((struct aac_supplement_adapter_info *)&fib->data[0]); adapter_type = (char *)supp_info->AdapterTypeText; - sc->aac_feature_bits = supp_info->FeatureBits; - sc->aac_support_opt2 = supp_info->SupportedOptions2; + sc->aac_feature_bits = le32toh(supp_info->FeatureBits); + sc->aac_support_opt2 = le32toh(supp_info->SupportedOptions2); } } device_printf(sc->aac_dev, "%s, aacraid driver %d.%d.%d-%d\n", @@ -2487,6 +2524,7 @@ aac_describe_controller(struct aac_softc *sc) /* save the kernel revision structure for later use */ info = (struct aac_adapter_info *)&fib->data[0]; + aac_adapter_info_toh(info); sc->aac_revision = info->KernelRevision; if (bootverbose) { @@ -2720,6 +2758,18 @@ aac_ioctl_event(struct aac_softc *sc, struct aac_event /* * Send a FIB supplied from userspace + * + * Currently, sending a FIB from userspace in BE hosts is not supported. + * There are several things that need to be considered in order to + * support this, such as: + * - At least the FIB data part from userspace should already be in LE, + * or else the kernel would need to know all FIB types to be able to + * correctly convert it to BE. + * - SG tables are converted to BE by aacraid_map_command_sg(). This + * conversion should be supressed if the FIB comes from userspace. + * - aacraid_wait_command() calls functions that convert the FIB header + * to LE. But if the header is already in LE, the conversion should not + * be performed. */ static int aac_ioctl_sendfib(struct aac_softc *sc, caddr_t ufib) @@ -2961,6 +3011,8 @@ aac_ioctl_send_raw_srb(struct aac_softc *sc, caddr_t a ScsiPortCommandU64 : ScsiPortCommand; cm->cm_sgtable = (struct aac_sg_table *)&srbcmd->sg_map; + aac_srb_tole(srbcmd); + /* send command */ if (transfer_data) { bus_dmamap_load(cm->cm_passthr_dmat, @@ -2978,7 +3030,7 @@ aac_ioctl_send_raw_srb(struct aac_softc *sc, caddr_t a mtx_unlock(&sc->aac_io_lock); /* copy data */ - if (transfer_data && (srbcmd->flags & AAC_SRB_FLAGS_DATA_IN)) { + if (transfer_data && (le32toh(srbcmd->flags) & AAC_SRB_FLAGS_DATA_IN)) { if ((error = copyout(cm->cm_data, (void *)(uintptr_t)srb_sg_address, cm->cm_datalen)) != 0) @@ -2989,6 +3041,7 @@ aac_ioctl_send_raw_srb(struct aac_softc *sc, caddr_t a } /* status */ + aac_srb_response_toh((struct aac_srb_response *)fib->data); error = copyout(fib->data, user_reply, sizeof(struct aac_srb_response)); out: @@ -3039,7 +3092,7 @@ aac_request_aif(struct aac_softc *sc) /* set AIF marker */ fib->Header.Handle = 0x00800000; fib->Header.Command = AifRequest; - ((struct aac_aif_command *)fib->data)->command = AifReqEvent; + ((struct aac_aif_command *)fib->data)->command = htole32(AifReqEvent); aacraid_map_command_sg(cm, NULL, 0, 0); } @@ -3080,9 +3133,9 @@ aac_handle_aif(struct aac_softc *sc, struct aac_fib *f aacraid_print_aif(sc, aif); /* Is it an event that we should care about? */ - switch (aif->command) { + switch (le32toh(aif->command)) { case AifCmdEventNotify: - switch (aif->data.EN.type) { + switch (le32toh(aif->data.EN.type)) { case AifEnAddContainer: case AifEnDeleteContainer: /* @@ -3174,10 +3227,10 @@ aac_handle_aif(struct aac_softc *sc, struct aac_fib *f break; case AifEnEnclosureManagement: - switch (aif->data.EN.data.EEE.eventType) { + switch (le32toh(aif->data.EN.data.EEE.eventType)) { case AIF_EM_DRIVE_INSERTION: case AIF_EM_DRIVE_REMOVAL: - channel = aif->data.EN.data.EEE.unitID; + channel = le32toh(aif->data.EN.data.EEE.unitID); if (sc->cam_rescan_cb != NULL) sc->cam_rescan_cb(sc, ((channel>>24) & 0xF) + 1, @@ -3189,7 +3242,7 @@ aac_handle_aif(struct aac_softc *sc, struct aac_fib *f case AifEnAddJBOD: case AifEnDeleteJBOD: case AifRawDeviceRemove: - channel = aif->data.EN.data.ECE.container; + channel = le32toh(aif->data.EN.data.ECE.container); if (sc->cam_rescan_cb != NULL) sc->cam_rescan_cb(sc, ((channel>>24) & 0xF) + 1, AAC_CAM_TARGET_WILDCARD); @@ -3209,6 +3262,8 @@ aac_handle_aif(struct aac_softc *sc, struct aac_fib *f if (next == 0) sc->aifq_filled = 1; bcopy(fib, &sc->aac_aifq[current], sizeof(struct aac_fib)); + /* Make aifq's FIB header and data LE */ + aac_fib_header_tole(&sc->aac_aifq[current].Header); /* modify AIF contexts */ if (sc->aifq_filled) { for (ctx = sc->fibctx; ctx; ctx = ctx->next) { @@ -3602,6 +3657,7 @@ aac_get_bus_info(struct aac_softc *sc) c_cmd->cmd = CT_GET_SCSI_METHOD; c_cmd->param = 0; + aac_ctcfg_tole(c_cmd); error = aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof(struct aac_ctcfg)); if (error) { @@ -3613,6 +3669,7 @@ aac_get_bus_info(struct aac_softc *sc) } c_resp = (struct aac_ctcfg_resp *)&fib->data[0]; + aac_ctcfg_resp_toh(c_resp); if (c_resp->Status != ST_OK) { device_printf(sc->aac_dev, "VM_ContainerConfig returned 0x%x\n", c_resp->Status); @@ -3632,6 +3689,7 @@ aac_get_bus_info(struct aac_softc *sc) vmi->ObjId = 0; vmi->IoctlCmd = GetBusInfo; + aac_vmioctl_tole(vmi); error = aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof(struct aac_vmi_businf_resp)); if (error) { @@ -3643,6 +3701,7 @@ aac_get_bus_info(struct aac_softc *sc) } vmi_resp = (struct aac_vmi_businf_resp *)&fib->data[0]; + aac_vmi_businf_resp_toh(vmi_resp); if (vmi_resp->Status != ST_OK) { device_printf(sc->aac_dev, "VM_Ioctl returned %d\n", vmi_resp->Status); @@ -3814,6 +3873,7 @@ aac_reset_adapter(struct aac_softc *sc) pc->Min = 1; pc->NoRescan = 1; + aac_pause_command_tole(pc); (void) aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof (struct aac_pause_command)); aac_release_sync_fib(sc); Modified: projects/clang1000-import/sys/dev/aacraid/aacraid_cam.c ============================================================================== --- projects/clang1000-import/sys/dev/aacraid/aacraid_cam.c Fri Mar 6 17:02:14 2020 (r358711) +++ projects/clang1000-import/sys/dev/aacraid/aacraid_cam.c Fri Mar 6 17:11:29 2020 (r358712) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifndef CAM_NEW_TRAN_CODE #define CAM_NEW_TRAN_CODE 1 @@ -417,6 +418,7 @@ aac_container_rw_command(struct cam_sim *sim, union cc if (sc->flags & AAC_FLAGS_NEW_COMM_TYPE2) { struct aac_raw_io2 *raw; + /* NOTE: LE conversion handled at aacraid_map_command_sg() */ raw = (struct aac_raw_io2 *)&fib->data[0]; bzero(raw, sizeof(struct aac_raw_io2)); fib->Header.Command = RawIo2; @@ -432,6 +434,7 @@ aac_container_rw_command(struct cam_sim *sim, union cc raw->flags = RIO2_IO_TYPE_WRITE | RIO2_SG_FORMAT_IEEE1212; } else if (sc->flags & AAC_FLAGS_RAW_IO) { struct aac_raw_io *raw; + /* NOTE: LE conversion handled at aacraid_map_command_sg() */ raw = (struct aac_raw_io *)&fib->data[0]; bzero(raw, sizeof(struct aac_raw_io)); fib->Header.Command = RawIo; @@ -452,6 +455,7 @@ aac_container_rw_command(struct cam_sim *sim, union cc br->ContainerId = ccb->ccb_h.target_id; br->BlockNumber = blockno; br->ByteCount = cm->cm_datalen; + aac_blockread_tole(br); fib->Header.Size += sizeof(struct aac_blockread); cm->cm_sgtable = &br->SgMap; } else { @@ -462,6 +466,7 @@ aac_container_rw_command(struct cam_sim *sim, union cc bw->BlockNumber = blockno; bw->ByteCount = cm->cm_datalen; bw->Stable = CUNSTABLE; + aac_blockwrite_tole(bw); fib->Header.Size += sizeof(struct aac_blockwrite); cm->cm_sgtable = &bw->SgMap; } @@ -476,6 +481,7 @@ aac_container_rw_command(struct cam_sim *sim, union cc br->BlockNumber = blockno; br->Pad = 0; br->Flags = 0; + aac_blockread64_tole(br); fib->Header.Size += sizeof(struct aac_blockread64); cm->cm_sgtable = (struct aac_sg_table *)&br->SgMap64; } else { @@ -487,6 +493,7 @@ aac_container_rw_command(struct cam_sim *sim, union cc bw->BlockNumber = blockno; bw->Pad = 0; bw->Flags = 0; + aac_blockwrite64_tole(bw); fib->Header.Size += sizeof(struct aac_blockwrite64); cm->cm_sgtable = (struct aac_sg_table *)&bw->SgMap64; } @@ -656,9 +663,10 @@ aac_container_special_command(struct cam_sim *sim, uni AAC_PM_DRIVERSUP_STOP_UNIT); ccfg->CTCommand.param[1] = co->co_mntobj.ObjectId; ccfg->CTCommand.param[2] = 0; /* 1 - immediate */ + aac_cnt_config_tole(ccfg); if (aacraid_wait_command(cm) != 0 || - *(u_int32_t *)&fib->data[0] != 0) { + le32toh(*(u_int32_t *)&fib->data[0]) != 0) { printf("Power Management: Error start/stop container %d\n", co->co_mntobj.ObjectId); } @@ -930,6 +938,7 @@ aac_passthrough_command(struct cam_sim *sim, union ccb srb->lun = ccb->ccb_h.target_lun; srb->timeout = ccb->ccb_h.timeout; /* XXX */ srb->retry_limit = 0; + aac_srb_tole(srb); cm->cm_complete = aac_cam_complete; cm->cm_ccb = ccb; @@ -1119,7 +1128,7 @@ aac_container_complete(struct aac_command *cm) fwprintf(cm->cm_sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); ccb = cm->cm_ccb; - status = ((u_int32_t *)cm->cm_fib->data)[0]; + status = le32toh(((u_int32_t *)cm->cm_fib->data)[0]); if (cm->cm_flags & AAC_CMD_RESET) { ccb->ccb_h.status = CAM_SCSI_BUS_RESET; @@ -1146,6 +1155,7 @@ aac_cam_complete(struct aac_command *cm) fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); ccb = cm->cm_ccb; srbr = (struct aac_srb_response *)&cm->cm_fib->data[0]; + aac_srb_response_toh(srbr); if (cm->cm_flags & AAC_CMD_FASTRESP) { /* fast response */ @@ -1297,6 +1307,7 @@ aac_cam_reset_bus(struct cam_sim *sim, union ccb *ccb) rbc = (struct aac_resetbus *)&vmi->IoctlBuf[0]; rbc->BusNumber = camsc->inf->BusNumber - 1; + aac_vmioctl_tole(vmi); if (aacraid_wait_command(cm) != 0) { device_printf(sc->aac_dev,"Error sending ResetBus command\n"); Copied: projects/clang1000-import/sys/dev/aacraid/aacraid_endian.c (from r358711, head/sys/dev/aacraid/aacraid_endian.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang1000-import/sys/dev/aacraid/aacraid_endian.c Fri Mar 6 17:11:29 2020 (r358712, copy of r358711, head/sys/dev/aacraid/aacraid_endian.c) @@ -0,0 +1,389 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Sat Mar 7 15:09:51 2020 Return-Path: Delivered-To: svn-src-projects@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78E412681FE for ; Sat, 7 Mar 2020 15:09:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48ZSZl2dD5z3Flp; Sat, 7 Mar 2020 15:09:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 394DAABD3; Sat, 7 Mar 2020 15:09:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 027F9pQv019036; Sat, 7 Mar 2020 15:09:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 027F9jFv019006; Sat, 7 Mar 2020 15:09:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003071509.027F9jFv019006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 7 Mar 2020 15:09:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r358731 - in projects/clang1000-import: contrib/elftoolchain/readelf share/man/man9 share/mk sys/cam sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/conf sys/dev/cxgbe/tom sys/dev/ii... X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in projects/clang1000-import: contrib/elftoolchain/readelf share/man/man9 share/mk sys/cam sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/conf sys/dev/cxgbe/tom sys/dev/iicbus sys/fs/mntfs sys/ker... X-SVN-Commit-Revision: 358731 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2020 15:09:51 -0000 Author: dim Date: Sat Mar 7 15:09:45 2020 New Revision: 358731 URL: https://svnweb.freebsd.org/changeset/base/358731 Log: Merge ^/head r358712 through r358730. Added: projects/clang1000-import/sys/fs/mntfs/ - copied from r358730, head/sys/fs/mntfs/ projects/clang1000-import/sys/sys/smr_types.h - copied unchanged from r358730, head/sys/sys/smr_types.h Modified: projects/clang1000-import/contrib/elftoolchain/readelf/readelf.c projects/clang1000-import/share/man/man9/counter.9 projects/clang1000-import/share/mk/bsd.compat.mk projects/clang1000-import/sys/cam/cam_periph.c projects/clang1000-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c projects/clang1000-import/sys/conf/files projects/clang1000-import/sys/dev/cxgbe/tom/t4_tom.c projects/clang1000-import/sys/dev/cxgbe/tom/t4_tom.h projects/clang1000-import/sys/dev/iicbus/ad7417.c projects/clang1000-import/sys/dev/iicbus/ds1631.c projects/clang1000-import/sys/dev/iicbus/ds1775.c projects/clang1000-import/sys/dev/iicbus/max6690.c projects/clang1000-import/sys/kern/subr_counter.c projects/clang1000-import/sys/kern/subr_pcpu.c projects/clang1000-import/sys/kern/subr_smr.c projects/clang1000-import/sys/kern/vfs_cache.c projects/clang1000-import/sys/kern/vfs_subr.c projects/clang1000-import/sys/netinet/igmp.c projects/clang1000-import/sys/powerpc/powerpc/uma_machdep.c projects/clang1000-import/sys/sys/_smr.h projects/clang1000-import/sys/sys/bufobj.h projects/clang1000-import/sys/sys/counter.h projects/clang1000-import/sys/sys/kernel.h projects/clang1000-import/sys/sys/mount.h projects/clang1000-import/sys/sys/smr.h projects/clang1000-import/sys/ufs/ffs/ffs_alloc.c projects/clang1000-import/sys/ufs/ffs/ffs_vfsops.c projects/clang1000-import/sys/ufs/ufs/ufsmount.h projects/clang1000-import/sys/vm/swap_pager.c projects/clang1000-import/sys/vm/uma_core.c projects/clang1000-import/sys/vm/vm_object.c projects/clang1000-import/sys/vm/vm_page.c projects/clang1000-import/sys/vm/vm_radix.c projects/clang1000-import/sys/vm/vm_reserv.c projects/clang1000-import/usr.bin/netstat/inet.c Directory Properties: projects/clang1000-import/ (props changed) projects/clang1000-import/contrib/elftoolchain/ (props changed) projects/clang1000-import/sys/cddl/contrib/opensolaris/ (props changed) Modified: projects/clang1000-import/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- projects/clang1000-import/contrib/elftoolchain/readelf/readelf.c Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/contrib/elftoolchain/readelf/readelf.c Sat Mar 7 15:09:45 2020 (r358731) @@ -3742,6 +3742,12 @@ dump_notes_data(struct readelf *re, const char *name, case NT_GNU_PROPERTY_TYPE_0: dump_gnu_property_type_0(re, buf, sz); return; + case NT_GNU_BUILD_ID: + printf(" Build ID: "); + for (i = 0; i < sz; i++) + printf("%02x", (unsigned char)buf[i]); + printf("\n"); + return; } } else if (strcmp(name, "Xen") == 0) { switch (type) { Modified: projects/clang1000-import/share/man/man9/counter.9 ============================================================================== --- projects/clang1000-import/share/man/man9/counter.9 Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/share/man/man9/counter.9 Sat Mar 7 15:09:45 2020 (r358731) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 22, 2017 +.Dd March 6, 2020 .Dt COUNTER 9 .Os .Sh NAME @@ -53,6 +53,8 @@ .Fn counter_u64_zero "counter_u64_t c" .Ft int64_t .Fn counter_ratecheck "struct counter_rate *cr" "int64_t limit" +.Fn COUNTER_U64_SYSINIT "counter_u64_t c" +.Fn COUNTER_U64_DEFINE_EARLY "counter_u64_t c" .In sys/sysctl.h .Fn SYSCTL_COUNTER_U64 parent nbr name access ptr descr .Fn SYSCTL_ADD_COUNTER_U64 ctx parent nbr name access ptr descr @@ -142,6 +144,20 @@ If the limit was reached on previous second, but was j then .Fn counter_ratecheck returns number of events since previous reset. +.It Fn COUNTER_U64_SYSINIT c +Define a +.Xr SYSINIT 9 +initializer for the global counter +.Fa c . +.It Fn COUNTER_U64_DEFINE_EARLY c +Define and initialize a global counter +.Fa c . +It is always safe to increment +.Fa c , +though updates prior to the +.Dv SI_SUB_COUNTER +.Xr SYSINIT 9 +event are lost. .It Fn SYSCTL_COUNTER_U64 parent nbr name access ptr descr Declare a static .Xr sysctl 9 @@ -245,6 +261,7 @@ SYSCTL_COUNTER_U64_ARRAY(_debug, OID_AUTO, counter_arr .Xr malloc 9 , .Xr ratecheck 9 , .Xr sysctl 9 , +.Xr SYSINIT 9 , .Xr uma 9 .Sh HISTORY The Modified: projects/clang1000-import/share/mk/bsd.compat.mk ============================================================================== --- projects/clang1000-import/share/mk/bsd.compat.mk Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/share/mk/bsd.compat.mk Sat Mar 7 15:09:45 2020 (r358731) @@ -4,8 +4,8 @@ __<${_this:T}>__: .if defined(_LIBCOMPAT) -COMPAT_ARCH= ${TARGET_ARCH} -COMPAT_CPUTYPE= ${TARGET_CPUTYPE} +COMPAT_ARCH?= ${TARGET_ARCH} +COMPAT_CPUTYPE?= ${CPUTYPE_${_LIBCOMPAT}} .if (defined(WANT_COMPILER_TYPE) && ${WANT_COMPILER_TYPE} == gcc) || \ (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) COMPAT_COMPILER_TYPE= gcc Modified: projects/clang1000-import/sys/cam/cam_periph.c ============================================================================== --- projects/clang1000-import/sys/cam/cam_periph.c Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/cam/cam_periph.c Sat Mar 7 15:09:45 2020 (r358731) @@ -649,7 +649,7 @@ cam_periph_invalidate(struct cam_periph *periph) cam_periph_assert(periph, MA_OWNED); /* - * We only call this routine the first time a peripheral is + * We only tear down the device the first time a peripheral is * invalidated. */ if ((periph->flags & CAM_PERIPH_INVALID) != 0) Modified: projects/clang1000-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- projects/clang1000-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Sat Mar 7 15:09:45 2020 (r358731) @@ -1752,7 +1752,7 @@ dmu_read_pages(objset_t *os, uint64_t object, vm_page_ break; } ASSERT(m->dirty == 0); - ASSERT(!pmap_page_is_mapped(m)); + ASSERT(!pmap_page_is_write_mapped(m)); ASSERT(db->db_size > PAGE_SIZE); bufoff = IDX_TO_OFF(m->pindex) % db->db_size; @@ -1867,7 +1867,7 @@ dmu_read_pages(objset_t *os, uint64_t object, vm_page_ break; } ASSERT(m->dirty == 0); - ASSERT(!pmap_page_is_mapped(m)); + ASSERT(!pmap_page_is_write_mapped(m)); ASSERT(db->db_size > PAGE_SIZE); bufoff = IDX_TO_OFF(m->pindex) % db->db_size; Modified: projects/clang1000-import/sys/conf/files ============================================================================== --- projects/clang1000-import/sys/conf/files Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/conf/files Sat Mar 7 15:09:45 2020 (r358731) @@ -3479,6 +3479,7 @@ fs/fuse/fuse_main.c optional fusefs fs/fuse/fuse_node.c optional fusefs fs/fuse/fuse_vfsops.c optional fusefs fs/fuse/fuse_vnops.c optional fusefs +fs/mntfs/mntfs_vnops.c standard fs/msdosfs/msdosfs_conv.c optional msdosfs fs/msdosfs/msdosfs_denode.c optional msdosfs fs/msdosfs/msdosfs_fat.c optional msdosfs Modified: projects/clang1000-import/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- projects/clang1000-import/sys/dev/cxgbe/tom/t4_tom.c Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/dev/cxgbe/tom/t4_tom.c Sat Mar 7 15:09:45 2020 (r358731) @@ -187,6 +187,8 @@ init_toepcb(struct vi_info *vi, struct toepcb *toep) if (ulp_mode(toep) == ULP_MODE_TCPDDP) ddp_init_toep(toep); + toep->flags |= TPF_INITIALIZED; + return (0); } @@ -210,9 +212,11 @@ free_toepcb(struct toepcb *toep) KASSERT(!(toep->flags & TPF_CPL_PENDING), ("%s: CPL pending", __func__)); - if (ulp_mode(toep) == ULP_MODE_TCPDDP) - ddp_uninit_toep(toep); - tls_uninit_toep(toep); + if (toep->flags & TPF_INITIALIZED) { + if (ulp_mode(toep) == ULP_MODE_TCPDDP) + ddp_uninit_toep(toep); + tls_uninit_toep(toep); + } free(toep, M_CXGBE); } Modified: projects/clang1000-import/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- projects/clang1000-import/sys/dev/cxgbe/tom/t4_tom.h Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/dev/cxgbe/tom/t4_tom.h Sat Mar 7 15:09:45 2020 (r358731) @@ -73,6 +73,7 @@ enum { TPF_SYNQE_EXPANDED = (1 << 9), /* toepcb ready, tid context updated */ TPF_FORCE_CREDITS = (1 << 10), /* always send credits */ TPF_KTLS = (1 << 11), /* send TLS records from KTLS */ + TPF_INITIALIZED = (1 << 12), /* init_toepcb has been called */ }; enum { Modified: projects/clang1000-import/sys/dev/iicbus/ad7417.c ============================================================================== --- projects/clang1000-import/sys/dev/iicbus/ad7417.c Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/dev/iicbus/ad7417.c Sat Mar 7 15:09:45 2020 (r358731) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2010 Andreas Tobler - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -143,7 +142,7 @@ ad7417_write(device_t dev, uint32_t addr, uint8_t reg, for (;;) { - if (iicbus_transfer(dev, msg, 1) == 0) + if (iicbus_transfer(dev, msg, nitems(msg)) == 0) return (0); if (++try > 5) { @@ -167,7 +166,7 @@ ad7417_read_1(device_t dev, uint32_t addr, uint8_t reg for (;;) { - err = iicbus_transfer(dev, msg, 2); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; @@ -195,7 +194,7 @@ ad7417_read_2(device_t dev, uint32_t addr, uint8_t reg for (;;) { - err = iicbus_transfer(dev, msg, 2); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; @@ -230,7 +229,7 @@ ad7417_write_read(device_t dev, uint32_t addr, struct for (;;) { - err = iicbus_transfer(dev, msg, 3); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; @@ -258,18 +257,18 @@ ad7417_init_adc(device_t dev, uint32_t addr) /* Clear Config2 */ buf = 0; - err = ad7417_write(dev, addr, AD7417_CONFIG2, &buf, 1); + err = ad7417_write(dev, addr, AD7417_CONFIG2, &buf, sizeof(buf)); /* Read & cache Config1 */ buf = 0; - err = ad7417_write(dev, addr, AD7417_CONFIG, &buf, 1); + err = ad7417_write(dev, addr, AD7417_CONFIG, &buf, sizeof(buf)); err = ad7417_read_1(dev, addr, AD7417_CONFIG, &buf); adc741x_config = (uint8_t)buf; /* Disable shutdown mode */ adc741x_config &= 0xfe; buf = adc741x_config; - err = ad7417_write(dev, addr, AD7417_CONFIG, &buf, 1); + err = ad7417_write(dev, addr, AD7417_CONFIG, &buf, sizeof(buf)); if (err < 0) return (-1); @@ -310,7 +309,7 @@ ad7417_probe(device_t dev) static int ad7417_fill_sensor_prop(device_t dev) { - phandle_t child; + phandle_t child, node; struct ad7417_softc *sc; u_int id[10]; char location[96]; @@ -359,13 +358,27 @@ ad7417_fill_sensor_prop(device_t dev) for (j = 0; j < i; j++) sc->sc_sensors[j].therm.zone = id[j]; + /* Some PowerMac's have the real location of the sensors on + child nodes of the hwsensor-location node. Check for and + fix the name if needed. + This is needed to apply the below HACK with the diode. + */ + j = 0; + for (node = OF_child(child); node != 0; node = OF_peer(node)) { + + OF_getprop(node, "location", location, sizeof(location)); + strcpy(sc->sc_sensors[i].therm.name, location); + j++; + } + /* Finish setting up sensor properties */ for (j = 0; j < i; j++) { sc->sc_sensors[j].dev = dev; /* HACK: Apple wired a random diode to the ADC line */ - if (strstr(sc->sc_sensors[j].therm.name, "DIODE TEMP") - != NULL) { + if ((strstr(sc->sc_sensors[j].therm.name, "DIODE TEMP") + != NULL) + || (strstr(sc->sc_sensors[j].therm.name, "AD1") != NULL)) { sc->sc_sensors[j].type = ADC7417_TEMP_SENSOR; sc->sc_sensors[j].therm.read = (int (*)(struct pmac_therm *))(ad7417_diode_read); @@ -444,10 +457,10 @@ ad7417_attach(device_t dev) } /* I use i to pass the sensor id. */ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - unit, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, dev, - i, ad7417_sensor_sysctl, - sc->sc_sensors[i].type == ADC7417_TEMP_SENSOR ? "IK" : "I", - desc); + unit, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, + dev, i, ad7417_sensor_sysctl, + sc->sc_sensors[i].type == ADC7417_TEMP_SENSOR ? + "IK" : "I", desc); } /* Dump sensor location, ID & type. */ if (bootverbose) { Modified: projects/clang1000-import/sys/dev/iicbus/ds1631.c ============================================================================== --- projects/clang1000-import/sys/dev/iicbus/ds1631.c Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/dev/iicbus/ds1631.c Sat Mar 7 15:09:45 2020 (r358731) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 Andreas Tobler - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -135,7 +134,7 @@ ds1631_write(device_t dev, uint32_t addr, uint8_t reg, for (;;) { - if (iicbus_transfer(dev, msg, 1) == 0) + if (iicbus_transfer(dev, msg, nitems(msg)) == 0) return (0); if (++try > 5) { device_printf(dev, "iicbus write failed\n"); @@ -158,7 +157,7 @@ ds1631_read_1(device_t dev, uint32_t addr, uint8_t reg for (;;) { - err = iicbus_transfer(dev, msg, 2); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; @@ -186,7 +185,7 @@ ds1631_read_2(device_t dev, uint32_t addr, uint8_t reg for (;;) { - err = iicbus_transfer(dev, msg, 2); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; @@ -275,7 +274,7 @@ ds1631_init(device_t dev, uint32_t addr) */ conf = DS1631_CONTROL_10BIT; - err = ds1631_write(dev, addr, DS1631_CONTROL, &conf, 1); + err = ds1631_write(dev, addr, DS1631_CONTROL, &conf, sizeof(conf)); if (err < 0) { device_printf(dev, "ds1631 write config failed: %x\n", err); return (-1); Modified: projects/clang1000-import/sys/dev/iicbus/ds1775.c ============================================================================== --- projects/clang1000-import/sys/dev/iicbus/ds1775.c Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/dev/iicbus/ds1775.c Sat Mar 7 15:09:45 2020 (r358731) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2010 Andreas Tobler - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -104,7 +103,7 @@ ds1775_read_2(device_t dev, uint32_t addr, uint8_t reg for (;;) { - err = iicbus_transfer(dev, msg, 2); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; Modified: projects/clang1000-import/sys/dev/iicbus/max6690.c ============================================================================== --- projects/clang1000-import/sys/dev/iicbus/max6690.c Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/dev/iicbus/max6690.c Sat Mar 7 15:09:45 2020 (r358731) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2010 Andreas Tobler - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -124,7 +123,7 @@ max6690_read(device_t dev, uint32_t addr, uint8_t reg, for (;;) { - err = iicbus_transfer(dev, msg, 4); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; if (busy[0] & 0x80) @@ -302,8 +301,9 @@ max6690_start(void *xdev) "Sensor Information"); /* I use i to pass the sensor id. */ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "temp", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, dev, i % 2, - max6690_sensor_sysctl, "IK", sysctl_desc); + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, + dev, i % 2, + max6690_sensor_sysctl, "IK", sysctl_desc); } /* Dump sensor location & ID. */ Modified: projects/clang1000-import/sys/kern/subr_counter.c ============================================================================== --- projects/clang1000-import/sys/kern/subr_counter.c Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/kern/subr_counter.c Sat Mar 7 15:09:45 2020 (r358731) @@ -172,3 +172,21 @@ counter_ratecheck(struct counter_rate *cr, int64_t lim return (val); } + +void +counter_u64_sysinit(void *arg) +{ + counter_u64_t *cp; + + cp = arg; + *cp = counter_u64_alloc(M_WAITOK); +} + +void +counter_u64_sysuninit(void *arg) +{ + counter_u64_t *cp; + + cp = arg; + counter_u64_free(*cp); +} Modified: projects/clang1000-import/sys/kern/subr_pcpu.c ============================================================================== --- projects/clang1000-import/sys/kern/subr_pcpu.c Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/kern/subr_pcpu.c Sat Mar 7 15:09:45 2020 (r358731) @@ -148,7 +148,7 @@ pcpu_zones_startup(void) pcpu_zone_64 = uma_zcreate("64 pcpu", sizeof(uint64_t), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_PCPU); } -SYSINIT(pcpu_zones, SI_SUB_VM, SI_ORDER_ANY, pcpu_zones_startup, NULL); +SYSINIT(pcpu_zones, SI_SUB_COUNTER, SI_ORDER_FIRST, pcpu_zones_startup, NULL); /* * First-fit extent based allocator for allocating space in the per-cpu Modified: projects/clang1000-import/sys/kern/subr_smr.c ============================================================================== --- projects/clang1000-import/sys/kern/subr_smr.c Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/kern/subr_smr.c Sat Mar 7 15:09:45 2020 (r358731) @@ -198,15 +198,15 @@ static uma_zone_t smr_zone; static SYSCTL_NODE(_debug, OID_AUTO, smr, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, "SMR Stats"); -static counter_u64_t advance = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(advance); SYSCTL_COUNTER_U64(_debug_smr, OID_AUTO, advance, CTLFLAG_RW, &advance, ""); -static counter_u64_t advance_wait = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(advance_wait); SYSCTL_COUNTER_U64(_debug_smr, OID_AUTO, advance_wait, CTLFLAG_RW, &advance_wait, ""); -static counter_u64_t poll = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(poll); SYSCTL_COUNTER_U64(_debug_smr, OID_AUTO, poll, CTLFLAG_RW, &poll, ""); -static counter_u64_t poll_scan = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(poll_scan); SYSCTL_COUNTER_U64(_debug_smr, OID_AUTO, poll_scan, CTLFLAG_RW, &poll_scan, ""); -static counter_u64_t poll_fail = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(poll_fail); SYSCTL_COUNTER_U64(_debug_smr, OID_AUTO, poll_fail, CTLFLAG_RW, &poll_fail, ""); /* @@ -631,15 +631,3 @@ smr_init(void) smr_zone = uma_zcreate("SMR CPU", sizeof(struct smr), NULL, NULL, NULL, NULL, (CACHE_LINE_SIZE * 2) - 1, UMA_ZONE_PCPU); } - -static void -smr_init_counters(void *unused) -{ - - advance = counter_u64_alloc(M_WAITOK); - advance_wait = counter_u64_alloc(M_WAITOK); - poll = counter_u64_alloc(M_WAITOK); - poll_scan = counter_u64_alloc(M_WAITOK); - poll_fail = counter_u64_alloc(M_WAITOK); -} -SYSINIT(smr_counters, SI_SUB_CPU, SI_ORDER_ANY, smr_init_counters, NULL); Modified: projects/clang1000-import/sys/kern/vfs_cache.c ============================================================================== --- projects/clang1000-import/sys/kern/vfs_cache.c Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/kern/vfs_cache.c Sat Mar 7 15:09:45 2020 (r358731) @@ -345,11 +345,12 @@ SYSCTL_INT(_debug_sizeof, OID_AUTO, namecache, CTLFLAG */ static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "Name cache statistics"); -#define STATNODE_ULONG(name, descr) \ +#define STATNODE_ULONG(name, descr) \ SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, CTLFLAG_RD, &name, 0, descr); -#define STATNODE_COUNTER(name, descr) \ - static counter_u64_t __read_mostly name; \ - SYSCTL_COUNTER_U64(_vfs_cache, OID_AUTO, name, CTLFLAG_RD, &name, descr); +#define STATNODE_COUNTER(name, descr) \ + static COUNTER_U64_DEFINE_EARLY(name); \ + SYSCTL_COUNTER_U64(_vfs_cache, OID_AUTO, name, CTLFLAG_RD, &name, \ + descr); STATNODE_ULONG(numneg, "Number of negative cache entries"); STATNODE_ULONG(numcache, "Number of cache entries"); STATNODE_COUNTER(numcachehv, "Number of namecache entries with vnodes held"); @@ -1936,26 +1937,6 @@ nchinit(void *dummy __unused) TAILQ_INIT(&ncneg_hot.nl_list); mtx_init(&ncneg_shrink_lock, "ncnegs", NULL, MTX_DEF); - - numcachehv = counter_u64_alloc(M_WAITOK); - numcalls = counter_u64_alloc(M_WAITOK); - dothits = counter_u64_alloc(M_WAITOK); - dotdothits = counter_u64_alloc(M_WAITOK); - numchecks = counter_u64_alloc(M_WAITOK); - nummiss = counter_u64_alloc(M_WAITOK); - nummisszap = counter_u64_alloc(M_WAITOK); - numposzaps = counter_u64_alloc(M_WAITOK); - numposhits = counter_u64_alloc(M_WAITOK); - numnegzaps = counter_u64_alloc(M_WAITOK); - numneghits = counter_u64_alloc(M_WAITOK); - numfullpathcalls = counter_u64_alloc(M_WAITOK); - numfullpathfail1 = counter_u64_alloc(M_WAITOK); - numfullpathfail2 = counter_u64_alloc(M_WAITOK); - numfullpathfail4 = counter_u64_alloc(M_WAITOK); - numfullpathfound = counter_u64_alloc(M_WAITOK); - zap_and_exit_bucket_relock_success = counter_u64_alloc(M_WAITOK); - numneg_evicted = counter_u64_alloc(M_WAITOK); - shrinking_skipped = counter_u64_alloc(M_WAITOK); } SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_SECOND, nchinit, NULL); Modified: projects/clang1000-import/sys/kern/vfs_subr.c ============================================================================== --- projects/clang1000-import/sys/kern/vfs_subr.c Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/kern/vfs_subr.c Sat Mar 7 15:09:45 2020 (r358731) @@ -2289,6 +2289,8 @@ buf_vlist_add(struct buf *bp, struct bufobj *bo, b_xfl int error; ASSERT_BO_WLOCKED(bo); + KASSERT((bo->bo_flag & BO_NOBUFS) == 0, + ("buf_vlist_add: bo %p does not allow bufs", bo)); KASSERT((xflags & BX_VNDIRTY) == 0 || (bo->bo_flag & BO_DEAD) == 0, ("dead bo %p", bo)); KASSERT((bp->b_xflags & (BX_VNDIRTY|BX_VNCLEAN)) == 0, Modified: projects/clang1000-import/sys/netinet/igmp.c ============================================================================== --- projects/clang1000-import/sys/netinet/igmp.c Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/netinet/igmp.c Sat Mar 7 15:09:45 2020 (r358731) @@ -145,6 +145,7 @@ static void igmp_v3_suppress_group_record(struct in_mu static int sysctl_igmp_default_version(SYSCTL_HANDLER_ARGS); static int sysctl_igmp_gsr(SYSCTL_HANDLER_ARGS); static int sysctl_igmp_ifinfo(SYSCTL_HANDLER_ARGS); +static int sysctl_igmp_stat(SYSCTL_HANDLER_ARGS); static const struct netisr_handler igmp_nh = { .nh_name = "igmp", @@ -260,8 +261,9 @@ VNET_DEFINE_STATIC(int, igmp_default_version) = IGMP_V /* * Virtualized sysctls. */ -SYSCTL_STRUCT(_net_inet_igmp, IGMPCTL_STATS, stats, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(igmpstat), igmpstat, ""); +SYSCTL_PROC(_net_inet_igmp, IGMPCTL_STATS, stats, + CTLFLAG_VNET | CTLTYPE_STRUCT | CTLFLAG_RW | CTLFLAG_MPSAFE, + &VNET_NAME(igmpstat), 0, sysctl_igmp_stat, "S,igmpstat", ""); SYSCTL_INT(_net_inet_igmp, OID_AUTO, recvifkludge, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(igmp_recvifkludge), 0, "Rewrite IGMPv1/v2 reports from 0.0.0.0 to contain subnet address"); @@ -333,6 +335,59 @@ igmp_restore_context(struct mbuf *m) #endif #endif return (m->m_pkthdr.flowid); +} + +/* + * IGMP statistics. + */ +static int +sysctl_igmp_stat(SYSCTL_HANDLER_ARGS) +{ + struct igmpstat igps0; + int error; + char *p; + + error = sysctl_wire_old_buffer(req, sizeof(V_igmpstat)); + if (error) + return (error); + + if (req->oldptr != NULL) { + if (req->oldlen < sizeof(V_igmpstat)) + error = ENOMEM; + else + error = SYSCTL_OUT(req, &V_igmpstat, + sizeof(V_igmpstat)); + } else + req->validlen = sizeof(V_igmpstat); + if (error) + goto out; + if (req->newptr != NULL) { + if (req->newlen < sizeof(V_igmpstat)) + error = ENOMEM; + else + error = SYSCTL_IN(req, &igps0, + sizeof(igps0)); + if (error) + goto out; + /* + * igps0 must be "all zero". + */ + p = (char *)&igps0; + while (*p == '\0' && p < (char *)&igps0 + sizeof(igps0)) + p++; + if (p != (char *)&igps0 + sizeof(igps0)) { + error = EINVAL; + goto out; + } + /* + * Avoid overwrite of the version and length field. + */ + igps0.igps_version = V_igmpstat.igps_version; + igps0.igps_len = V_igmpstat.igps_len; + bcopy(&igps0, &V_igmpstat, sizeof(V_igmpstat)); + } +out: + return (error); } /* Modified: projects/clang1000-import/sys/powerpc/powerpc/uma_machdep.c ============================================================================== --- projects/clang1000-import/sys/powerpc/powerpc/uma_machdep.c Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/powerpc/powerpc/uma_machdep.c Sat Mar 7 15:09:45 2020 (r358731) @@ -66,11 +66,6 @@ uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int return (NULL); pa = VM_PAGE_TO_PHYS(m); - - /* On book-e sizeof(void *) < sizeof(vm_paddr_t) */ - if ((vm_offset_t)pa != pa) - return (NULL); - #ifdef __powerpc64__ if ((wait & M_NODUMP) == 0) dump_add_page(pa); Modified: projects/clang1000-import/sys/sys/_smr.h ============================================================================== --- projects/clang1000-import/sys/sys/_smr.h Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/sys/_smr.h Sat Mar 7 15:09:45 2020 (r358731) @@ -35,4 +35,16 @@ typedef uint32_t smr_seq_t; typedef int32_t smr_delta_t; typedef struct smr *smr_t; +#define SMR_ENTERED(smr) \ + (curthread->td_critnest != 0 && zpcpu_get((smr))->c_seq != SMR_SEQ_INVALID) + +#define SMR_ASSERT_ENTERED(smr) \ + KASSERT(SMR_ENTERED(smr), ("Not in smr section")) + +#define SMR_ASSERT_NOT_ENTERED(smr) \ + KASSERT(!SMR_ENTERED(smr), ("In smr section.")); + +#define SMR_ASSERT(ex, fn) \ + KASSERT((ex), (fn ": Assertion " #ex " failed at %s:%d", __FILE__, __LINE__)) + #endif /* __SYS_SMR_H_ */ Modified: projects/clang1000-import/sys/sys/bufobj.h ============================================================================== --- projects/clang1000-import/sys/sys/bufobj.h Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/sys/bufobj.h Sat Mar 7 15:09:45 2020 (r358731) @@ -117,6 +117,7 @@ struct bufobj { #define BO_ONWORKLST (1 << 0) /* On syncer work-list */ #define BO_WWAIT (1 << 1) /* Wait for output to complete */ #define BO_DEAD (1 << 2) /* Dead; only with INVARIANTS */ +#define BO_NOBUFS (1 << 3) /* No bufs allowed */ #define BO_LOCKPTR(bo) (&(bo)->bo_lock) #define BO_LOCK(bo) rw_wlock(BO_LOCKPTR((bo))) Modified: projects/clang1000-import/sys/sys/counter.h ============================================================================== --- projects/clang1000-import/sys/sys/counter.h Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/sys/counter.h Sat Mar 7 15:09:45 2020 (r358731) @@ -74,5 +74,18 @@ struct counter_rate { int64_t counter_ratecheck(struct counter_rate *, int64_t); +#define COUNTER_U64_SYSINIT(c) \ + SYSINIT(c##_counter_sysinit, SI_SUB_COUNTER, \ + SI_ORDER_ANY, counter_u64_sysinit, &c); \ + SYSUNINIT(c##_counter_sysuninit, SI_SUB_COUNTER, \ + SI_ORDER_ANY, counter_u64_sysuninit, &c) + +#define COUNTER_U64_DEFINE_EARLY(c) \ + counter_u64_t __read_mostly c = EARLY_COUNTER; \ + COUNTER_U64_SYSINIT(c) + +void counter_u64_sysinit(void *); +void counter_u64_sysuninit(void *); + #endif /* _KERNEL */ #endif /* ! __SYS_COUNTER_H__ */ Modified: projects/clang1000-import/sys/sys/kernel.h ============================================================================== --- projects/clang1000-import/sys/sys/kernel.h Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/sys/kernel.h Sat Mar 7 15:09:45 2020 (r358731) @@ -91,7 +91,8 @@ enum sysinit_sub_id { SI_SUB_DONE = 0x0000001, /* processed*/ SI_SUB_TUNABLES = 0x0700000, /* establish tunable values */ SI_SUB_COPYRIGHT = 0x0800001, /* first use of console*/ - SI_SUB_VM = 0x1000000, /* virtual memory system init*/ + SI_SUB_VM = 0x1000000, /* virtual memory system init */ + SI_SUB_COUNTER = 0x1100000, /* counter(9) is initialized */ SI_SUB_KMEM = 0x1800000, /* kernel memory*/ SI_SUB_HYPERVISOR = 0x1A40000, /* * Hypervisor detection and Modified: projects/clang1000-import/sys/sys/mount.h ============================================================================== --- projects/clang1000-import/sys/sys/mount.h Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/sys/mount.h Sat Mar 7 15:09:45 2020 (r358731) @@ -940,6 +940,8 @@ extern struct sx vfsconf_sx; #define vfsconf_unlock() sx_xunlock(&vfsconf_sx) #define vfsconf_slock() sx_slock(&vfsconf_sx) #define vfsconf_sunlock() sx_sunlock(&vfsconf_sx) +struct vnode *mntfs_allocvp(struct mount *, struct vnode *); +void mntfs_freevp(struct vnode *); /* * Declarations for these vfs default operations are located in Modified: projects/clang1000-import/sys/sys/smr.h ============================================================================== --- projects/clang1000-import/sys/sys/smr.h Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/sys/smr.h Sat Mar 7 15:09:45 2020 (r358731) @@ -35,7 +35,8 @@ /* * Safe memory reclamation. See subr_smr.c for a description of the - * algorithm. + * algorithm, and smr_types.h for macros to define and access SMR-protected + * data structures. * * Readers synchronize with smr_enter()/exit() and writers may either * free directly to a SMR UMA zone or use smr_synchronize or wait. @@ -81,112 +82,6 @@ struct smr { #define SMR_LAZY 0x0001 /* Higher latency write, fast read. */ #define SMR_DEFERRED 0x0002 /* Aggregate updates to wr_seq. */ - -#define SMR_ENTERED(smr) \ - (curthread->td_critnest != 0 && zpcpu_get((smr))->c_seq != SMR_SEQ_INVALID) - -#define SMR_ASSERT_ENTERED(smr) \ - KASSERT(SMR_ENTERED(smr), ("Not in smr section")) - -#define SMR_ASSERT_NOT_ENTERED(smr) \ - KASSERT(!SMR_ENTERED(smr), ("In smr section.")); - -#define SMR_ASSERT(ex, fn) \ - KASSERT((ex), (fn ": Assertion " #ex " failed at %s:%d", __FILE__, __LINE__)) - -/* - * SMR Accessors are meant to provide safe access to SMR protected - * pointers and prevent misuse and accidental access. - * - * Accessors are grouped by type: - * entered - Use while in a read section (between smr_enter/smr_exit()) - * serialized - Use while holding a lock that serializes writers. Updates - * are synchronized with readers via included barriers. - * unserialized - Use after the memory is out of scope and not visible to - * readers. - * - * All acceses include a parameter for an assert to verify the required - * synchronization. For example, a writer might use: - * - * smr_serialized_store(pointer, value, mtx_owned(&writelock)); - * - * These are only enabled in INVARIANTS kernels. - */ - -/* Type restricting pointer access to force smr accessors. */ -#define SMR_TYPE_DECLARE(smrtype, type) \ -typedef struct { \ - type __ptr; /* Do not access directly */ \ -} smrtype - -/* - * Read from an SMR protected pointer while in a read section. - */ -#define smr_entered_load(p, smr) ({ \ - SMR_ASSERT(SMR_ENTERED((smr)), "smr_entered_load"); \ - (__typeof((p)->__ptr))atomic_load_acq_ptr((uintptr_t *)&(p)->__ptr); \ -}) - -/* - * Read from an SMR protected pointer while serialized by an - * external mechanism. 'ex' should contain an assert that the - * external mechanism is held. i.e. mtx_owned() - */ -#define smr_serialized_load(p, ex) ({ \ - SMR_ASSERT(ex, "smr_serialized_load"); \ - (__typeof((p)->__ptr))atomic_load_ptr(&(p)->__ptr); \ -}) - -/* - * Store 'v' to an SMR protected pointer while serialized by an - * external mechanism. 'ex' should contain an assert that the - * external mechanism is held. i.e. mtx_owned() - * - * Writers that are serialized with mutual exclusion or on a single - * thread should use smr_serialized_store() rather than swap. - */ -#define smr_serialized_store(p, v, ex) do { \ - SMR_ASSERT(ex, "smr_serialized_store"); \ - __typeof((p)->__ptr) _v = (v); \ - atomic_store_rel_ptr((uintptr_t *)&(p)->__ptr, (uintptr_t)_v); \ -} while (0) - -/* - * swap 'v' with an SMR protected pointer and return the old value - * while serialized by an external mechanism. 'ex' should contain - * an assert that the external mechanism is provided. i.e. mtx_owned() - * - * Swap permits multiple writers to update a pointer concurrently. - */ -#define smr_serialized_swap(p, v, ex) ({ \ - SMR_ASSERT(ex, "smr_serialized_swap"); \ - __typeof((p)->__ptr) _v = (v); \ - /* Release barrier guarantees contents are visible to reader */ \ - atomic_thread_fence_rel(); \ - (__typeof((p)->__ptr))atomic_swap_ptr( \ - (uintptr_t *)&(p)->__ptr, (uintptr_t)_v); \ -}) - -/* - * Read from an SMR protected pointer when no serialization is required - * such as in the destructor callback or when the caller guarantees other - * synchronization. - */ -#define smr_unserialized_load(p, ex) ({ \ - SMR_ASSERT(ex, "smr_unserialized_load"); \ - (__typeof((p)->__ptr))atomic_load_ptr(&(p)->__ptr); \ -}) - -/* - * Store to an SMR protected pointer when no serialiation is required - * such as in the destructor callback or when the caller guarantees other - * synchronization. - */ -#define smr_unserialized_store(p, v, ex) do { \ - SMR_ASSERT(ex, "smr_unserialized_store"); \ - __typeof((p)->__ptr) _v = (v); \ - atomic_store_ptr((uintptr_t *)&(p)->__ptr, (uintptr_t)_v); \ -} while (0) /* * Return the current write sequence number. This is not the same as the Copied: projects/clang1000-import/sys/sys/smr_types.h (from r358730, head/sys/sys/smr_types.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang1000-import/sys/sys/smr_types.h Sat Mar 7 15:09:45 2020 (r358731, copy of r358730, head/sys/sys/smr_types.h) @@ -0,0 +1,138 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019, 2020 Jeffrey Roberson + * + * 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 unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_SMR_TYPES_H_ +#define _SYS_SMR_TYPES_H_ + +#include + +/* + * SMR Accessors are meant to provide safe access to SMR protected + * pointers and prevent misuse and accidental access. + * + * Accessors are grouped by type: + * entered - Use while in a read section (between smr_enter/smr_exit()) + * serialized - Use while holding a lock that serializes writers. Updates + * are synchronized with readers via included barriers. + * unserialized - Use after the memory is out of scope and not visible to + * readers. + * + * All acceses include a parameter for an assert to verify the required + * synchronization. For example, a writer might use: + * + * smr_serialized_store(pointer, value, mtx_owned(&writelock)); + * + * These are only enabled in INVARIANTS kernels. + */ + +/* Type restricting pointer access to force smr accessors. */ +#define SMR_POINTER(type) \ +struct { \ + type __ptr; /* Do not access directly */ \ +} + +/* + * Read from an SMR protected pointer while in a read section. + */ +#define smr_entered_load(p, smr) ({ \ + SMR_ASSERT(SMR_ENTERED((smr)), "smr_entered_load"); \ + (__typeof((p)->__ptr))atomic_load_acq_ptr((uintptr_t *)&(p)->__ptr); \ +}) + +/* + * Read from an SMR protected pointer while serialized by an + * external mechanism. 'ex' should contain an assert that the + * external mechanism is held. i.e. mtx_owned() + */ +#define smr_serialized_load(p, ex) ({ \ + SMR_ASSERT(ex, "smr_serialized_load"); \ + (__typeof((p)->__ptr))atomic_load_ptr(&(p)->__ptr); \ +}) + +/* + * Store 'v' to an SMR protected pointer while serialized by an + * external mechanism. 'ex' should contain an assert that the + * external mechanism is held. i.e. mtx_owned() + * + * Writers that are serialized with mutual exclusion or on a single + * thread should use smr_serialized_store() rather than swap. + */ +#define smr_serialized_store(p, v, ex) do { \ + SMR_ASSERT(ex, "smr_serialized_store"); \ + __typeof((p)->__ptr) _v = (v); \ + atomic_store_rel_ptr((uintptr_t *)&(p)->__ptr, (uintptr_t)_v); \ +} while (0) + +/* + * swap 'v' with an SMR protected pointer and return the old value + * while serialized by an external mechanism. 'ex' should contain + * an assert that the external mechanism is provided. i.e. mtx_owned() + * + * Swap permits multiple writers to update a pointer concurrently. + */ +#define smr_serialized_swap(p, v, ex) ({ \ + SMR_ASSERT(ex, "smr_serialized_swap"); \ + __typeof((p)->__ptr) _v = (v); \ + /* Release barrier guarantees contents are visible to reader */ \ + atomic_thread_fence_rel(); \ + (__typeof((p)->__ptr))atomic_swap_ptr( \ + (uintptr_t *)&(p)->__ptr, (uintptr_t)_v); \ +}) + +/* + * Read from an SMR protected pointer when no serialization is required + * such as in the destructor callback or when the caller guarantees other + * synchronization. + */ +#define smr_unserialized_load(p, ex) ({ \ + SMR_ASSERT(ex, "smr_unserialized_load"); \ + (__typeof((p)->__ptr))atomic_load_ptr(&(p)->__ptr); \ +}) + +/* + * Store to an SMR protected pointer when no serialiation is required + * such as in the destructor callback or when the caller guarantees other + * synchronization. + */ +#define smr_unserialized_store(p, v, ex) do { \ + SMR_ASSERT(ex, "smr_unserialized_store"); \ + __typeof((p)->__ptr) _v = (v); \ + atomic_store_ptr((uintptr_t *)&(p)->__ptr, (uintptr_t)_v); \ +} while (0) + +#ifndef _KERNEL + +/* + * Load an SMR protected pointer when accessing kernel data structures through + * libkvm. + */ +#define smr_kvm_load(p) ((p)->__ptr) + +#endif /* !_KERNEL */ +#endif /* !_SYS_SMR_TYPES_H_ */ Modified: projects/clang1000-import/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- projects/clang1000-import/sys/ufs/ffs/ffs_alloc.c Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/ufs/ffs/ffs_alloc.c Sat Mar 7 15:09:45 2020 (r358731) @@ -3594,6 +3594,7 @@ buffered_write(fp, uio, active_cred, flags, td) struct inode *ip; struct buf *bp; struct fs *fs; + struct ufsmount *ump; struct filedesc *fdp; int error; daddr_t lbn; @@ -3622,10 +3623,12 @@ buffered_write(fp, uio, active_cred, flags, td) return (EINVAL); } ip = VTOI(vp); - if (ITODEVVP(ip) != devvp) { + ump = ip->i_ump; + if (ump->um_odevvp != devvp) { vput(vp); return (EINVAL); } + devvp = ump->um_devvp; fs = ITOFS(ip); vput(vp); foffset_lock_uio(fp, uio, flags); Modified: projects/clang1000-import/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- projects/clang1000-import/sys/ufs/ffs/ffs_vfsops.c Sat Mar 7 08:41:10 2020 (r358730) +++ projects/clang1000-import/sys/ufs/ffs/ffs_vfsops.c Sat Mar 7 15:09:45 2020 (r358731) @@ -151,7 +151,7 @@ static const char *ffs_opts[] = { "acls", "async", "no static int ffs_mount(struct mount *mp) { - struct vnode *devvp; + struct vnode *devvp, *odevvp; struct thread *td; struct ufsmount *ump = NULL; struct fs *fs; @@ -246,6 +246,7 @@ ffs_mount(struct mount *mp) if (mp->mnt_flag & MNT_UPDATE) { ump = VFSTOUFS(mp); fs = ump->um_fs; + odevvp = ump->um_odevvp; devvp = ump->um_devvp; if (fsckpid == -1 && ump->um_fsckpid > 0) { if ((error = ffs_flushfiles(mp, WRITECLOSE, td)) != 0 || @@ -337,16 +338,15 @@ ffs_mount(struct mount *mp) * If upgrade to read-write by non-root, then verify * that user has necessary permissions on the device. */ - vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); - error = VOP_ACCESS(devvp, VREAD | VWRITE, + vn_lock(odevvp, LK_EXCLUSIVE | LK_RETRY); + error = VOP_ACCESS(odevvp, VREAD | VWRITE, td->td_ucred, td); if (error) error = priv_check(td, PRIV_VFS_MOUNT_PERM); + VOP_UNLOCK(odevvp); if (error) { - VOP_UNLOCK(devvp); return (error); } - VOP_UNLOCK(devvp); fs->fs_flags &= ~FS_UNCLEAN; if (fs->fs_clean == 0) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***