From owner-svn-src-head@freebsd.org Sun Jul 5 00:07:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A35535BEA6; Sun, 5 Jul 2020 00:07:54 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (vtr.rulingia.com [IPv6:2001:19f0:5801:ebe:5400:1ff:fe53:30fd]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vtr.rulingia.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zptd2pJpz4Gfy; Sun, 5 Jul 2020 00:07:53 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) by vtr.rulingia.com (8.15.2/8.15.2) with ESMTPS id 06507jLt005121 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 5 Jul 2020 10:07:50 +1000 (AEST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.15.2/8.15.2) with ESMTPS id 06507dIO063481 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 5 Jul 2020 10:07:39 +1000 (AEST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.15.2/8.15.2/Submit) id 06507di0063480; Sun, 5 Jul 2020 10:07:39 +1000 (AEST) (envelope-from peter) Date: Sun, 5 Jul 2020 10:07:39 +1000 From: Peter Jeremy To: Oleksandr Tymoshenko Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362736 - head/sys/arm64/rockchip Message-ID: <20200705000739.GE30039@server.rulingia.com> References: <202006282111.05SLBAAq025544@repo.freebsd.org> <20200701085747.GA23928@server.rulingia.com> <20200701124738.GA30133@server.rulingia.com> <20200703002623.GA18584@bluezbox.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="sXc4Kmr5FA7axrvy" Content-Disposition: inline In-Reply-To: <20200703002623.GA18584@bluezbox.com> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp X-Rspamd-Queue-Id: 49zptd2pJpz4Gfy X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of peter@rulingia.com designates 2001:19f0:5801:ebe:5400:1ff:fe53:30fd as permitted sender) smtp.mailfrom=peter@rulingia.com X-Spamd-Result: default: False [-4.38 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.967]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+mx:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[rulingia.com]; NEURAL_HAM_LONG(-1.04)[-1.043]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.03)[0.026]; RCVD_COUNT_THREE(0.00)[3]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5800::/38, country:US]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2020 00:07:54 -0000 --sXc4Kmr5FA7axrvy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-Jul-02 17:26:23 -0700, Oleksandr Tymoshenko wro= te: >Could you try kernel with this patch? It's mostly debug output, >with one possible clock-related fix. > >https://people.freebsd.org/~gonzo/patches/rk3328-gmac-debug.patch It's still not working for me. I get the following: dwc0: mem 0xff540000-0xff54ffff irq = 44 on ofwbus0 setting RK3328 RX/TX delays: 24/36 >>> RK3328_GRF_MAC_CON1 (00000413): >>> gmac2io_gmii_clk_sel: 0x0 >>> gmac2io_rmii_extclk_sel: 0x1 >>> gmac2io_rmii_mode: 0x0 >>> gmac2io_rmii_clk_sel: 0x0 >>> gmac2io_phy_intf_sel: 0x1 >>> gmac2io_flowctrl: 0x0 >>> gmac2io_rxclk_dly_ena: 0x1 >>> gmac2io_txclk_dly_ena: 0x1 >>> RK3328_GRF_MAC_CON0 (00000c24): miibus0: on dwc0 rgephy0: PHY 0 on miibus0 rgephy0: OUI 0x00e04c, model 0x0011, rev. 6 rgephy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-F= DX, 1000baseT-FDX-master, auto >I have Rock64 v2, which, as you mentioned, has a known issue with GigE, so >my tests are not reliable. I'll try to get another RK3328 board for tests, >but it may take some time. I've asked on -arm if anyone else has tried this on a Rock64 v2 or v3. >If the clock fix doesn't help, I'll make >delays configuration run-time configurable with off by default until >more hardware is tested. That sounds like a good way forward - maybe boot and run-time configurable. It's a pity that there doesn't seem to be any documentation on what the numbers represent (or what the "default" value is) - which means that actually adjusting the delay numbers would be very time consuming. --=20 Peter Jeremy --sXc4Kmr5FA7axrvy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE2M6l8vfIeOACl4uUHZIUommfjLIFAl8BGctfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEQ4 Q0VBNUYyRjdDODc4RTAwMjk3OEI5NDFEOTIxNEEyNjk5RjhDQjIACgkQHZIUommf jLJjFQ/+IgzUBQZjUTUd4kgS739w6XR2uORohPk3ClK4x/rlqyvmOgYX98RR9ull bVI5/IUIcvbGynWEgpdHrYXxj6vRr38hiownDLb/TV9gB5SjYLSEX/uoALY/PpaQ jPEMRsIBnQpR+AXa29dHSO9R4554SxbOy0SVczzR2dyiPRBrl+AhLOD9h5T+7z1M 4z/WLm7OE/8U8eRPxr6srV7Vd9tDpHXiAI5AGZhGEWvLvaZvtp4stBZaV4ipg62X HzWp5HazUrkOv+tA94R0ahzFDcJnffFniMgFUcZ1kjxhhv+FoRo27f4c4rykaaqh azwOB/F8whXqr/w8oC4EMdwiZ1PYVwSOy27pO5DKaOt0rS5vXO9tvb0z4Fpxt6Px rv088cygimB6ebDFzz37snogH4QiOFvIibeHloLnPIA5mh/Ai7SGU64XwKauBWlx 0tDnBb5eJDJjnbZf5GNxSru395HKo1hoA3GRL1jN5pBPfM77NV5fJOHSI3T5rVcN JXuFF6Us8GjrLKX4NFaMzaliw34yjHWsFA0NrqxNU8+Skc8nNdTGyMqTZ/zf8+3v ngJMi9zVy9WvP9jcXUCYVYgjC5JjrmDzsKrXcO0nEGs+T5/ebbgiBweXwRfVPqAR P+NoztKlRjFPs/FHvENdZpBFH9VdM+XtuTAuumkKkI30OHJMXRE= =TTrl -----END PGP SIGNATURE----- --sXc4Kmr5FA7axrvy-- From owner-svn-src-head@freebsd.org Sun Jul 5 00:19:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DA19F35C253; Sun, 5 Jul 2020 00:19:08 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zq7c4ncRz4HNW; Sun, 5 Jul 2020 00:19:08 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 872E924C1E; Sun, 5 Jul 2020 00:19:08 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0650J8Wm090136; Sun, 5 Jul 2020 00:19:08 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0650J8bH090135; Sun, 5 Jul 2020 00:19:08 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202007050019.0650J8bH090135@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 5 Jul 2020 00:19:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362937 - head/sbin/newfs_msdos X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sbin/newfs_msdos X-SVN-Commit-Revision: 362937 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2020 00:19:08 -0000 Author: delphij Date: Sun Jul 5 00:19:08 2020 New Revision: 362937 URL: https://svnweb.freebsd.org/changeset/base/362937 Log: Use KERN_MAXPHYS. Suggested by: imp Reviewed by: imp, cem (earlier version), emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25563 Modified: head/sbin/newfs_msdos/mkfs_msdos.c Modified: head/sbin/newfs_msdos/mkfs_msdos.c ============================================================================== --- head/sbin/newfs_msdos/mkfs_msdos.c Sat Jul 4 18:37:04 2020 (r362936) +++ head/sbin/newfs_msdos/mkfs_msdos.c Sun Jul 5 00:19:08 2020 (r362937) @@ -41,8 +41,10 @@ static const char rcsid[] = #include #endif #include +#include #include +#include #include #include #include @@ -78,25 +80,6 @@ static const char rcsid[] = #define MAXCLS16 0xfff4U /* maximum FAT16 clusters */ #define MAXCLS32 0xffffff4U /* maximum FAT32 clusters */ -#ifndef CTASSERT -#define CTASSERT(x) _CTASSERT(x, __LINE__) -#define _CTASSERT(x, y) __CTASSERT(x, y) -#define __CTASSERT(x, y) typedef char __assert_ ## y [(x) ? 1 : -1] -#endif - -/* - * For better performance, we want to write larger chunks instead of - * individual sectors (the size can only be 512, 1024, 2048 or 4096 - * bytes). Assert that MAXPHYS can always hold an integer number of - * sectors by asserting that both are power of two numbers and the - * MAXPHYS is greater than MAXBPS. - */ -CTASSERT(powerof2(MAXPHYS)); -CTASSERT(powerof2(MAXBPS)); -CTASSERT(MAXPHYS > MAXBPS); - -const static ssize_t chunksize = MAXPHYS; - #define mincls(fat) ((fat) == 12 ? MINCLS12 : \ (fat) == 16 ? MINCLS16 : \ MINCLS32) @@ -240,6 +223,7 @@ static volatile sig_atomic_t got_siginfo; static void infohandler(int); static int check_mounted(const char *, mode_t); +static ssize_t getchunksize(void); static int getstdfmt(const char *, struct bpb *); static int getdiskinfo(int, const char *, const char *, int, struct bpb *); static void print_bpb(struct bpb *); @@ -272,6 +256,7 @@ mkfs_msdos(const char *fname, const char *dtype, const bool set_res, set_spf, set_spc; int fd, fd1, rv; struct msdos_options o = *op; + ssize_t chunksize; physbuf = NULL; rv = -1; @@ -640,6 +625,7 @@ mkfs_msdos(const char *fname, const char *dtype, const tm = localtime(&now); } + chunksize = getchunksize(); physbuf = malloc(chunksize); if (physbuf == NULL) { warn(NULL); @@ -848,6 +834,47 @@ check_mounted(const char *fname, mode_t mode) } #endif return 0; +} + +/* + * Get optimal I/O size + */ +static ssize_t +getchunksize(void) +{ + static int chunksize; + + if (chunksize != 0) + return ((ssize_t)chunksize); + +#ifdef KERN_MAXPHYS + int mib[2]; + size_t len; + + mib[0] = CTL_KERN; + mib[1] = KERN_MAXPHYS; + len = sizeof(chunksize); + + if (sysctl(mib, 2, &chunksize, &len, NULL, 0) == -1) { + warn("sysctl: KERN_MAXPHYS, using %zu", (size_t)MAXPHYS); + chunksize = 0; + } +#endif + if (chunksize == 0) + chunksize = MAXPHYS; + + /* + * For better performance, we want to write larger chunks instead of + * individual sectors (the size can only be 512, 1024, 2048 or 4096 + * bytes). Assert that chunksize can always hold an integer number of + * sectors by asserting that both are power of two numbers and the + * chunksize is greater than MAXBPS. + */ + static_assert(powerof2(MAXBPS), "MAXBPS is not power of 2"); + assert(powerof2(chunksize)); + assert(chunksize > MAXBPS); + + return ((ssize_t)chunksize); } /* From owner-svn-src-head@freebsd.org Sun Jul 5 05:14:34 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 275173611AC; Sun, 5 Jul 2020 05:14:34 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zxhV0BQRz4TnZ; Sun, 5 Jul 2020 05:14:34 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D072E85AD; Sun, 5 Jul 2020 05:14:33 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0655EX36074217; Sun, 5 Jul 2020 05:14:33 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0655EXfr074216; Sun, 5 Jul 2020 05:14:33 GMT (envelope-from np@FreeBSD.org) Message-Id: <202007050514.0655EXfr074216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sun, 5 Jul 2020 05:14:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362938 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 362938 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2020 05:14:34 -0000 Author: np Date: Sun Jul 5 05:14:33 2020 New Revision: 362938 URL: https://svnweb.freebsd.org/changeset/base/362938 Log: cxgbe(4): Fix a bug (introduced in r362905) where some tx traffic wasn't being reported to BPF. Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Sun Jul 5 00:19:08 2020 (r362937) +++ head/sys/dev/cxgbe/t4_sge.c Sun Jul 5 05:14:33 2020 (r362938) @@ -3013,6 +3013,7 @@ eth_tx(struct mp_ring *r, u_int cidx, u_int pidx, bool if (avail < n) break; /* out of descriptors */ } + ETHER_BPF_MTAP(ifp, m0); if (sc->flags & IS_VF) n = write_txpkt_vm_wr(sc, txq, m0); else From owner-svn-src-head@freebsd.org Sun Jul 5 07:40:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 39DAD3642C9; Sun, 5 Jul 2020 07:40:17 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4B00wd0lGtz4bmw; Sun, 5 Jul 2020 07:40:17 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from localhost (p548612f6.dip0.t-ipconnect.de [84.134.18.246]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id 9394E1487F; Sun, 5 Jul 2020 07:40:16 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Sun, 5 Jul 2020 09:40:14 +0200 From: Gordon Bergling To: Alexey Dokuchaev Cc: rgrimes@freebsd.org, Warner Losh , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r362809 - head/contrib/mandoc Message-ID: <20200705074014.GA16505@lion.0xfce3.net> References: <20200701234213.GA54023@FreeBSD.org> <202007020001.062010DA058837@gndrsh.dnsmgr.net> <20200702000613.GA93146@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200702000613.GA93146@FreeBSD.org> X-Url: X-Operating-System: FreeBSD 12.1-STABLE amd64 X-Host-Uptime: 9:07AM up 1 day, 21:57, 6 users, load averages: 4.67, 5.02, 4.83 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2020 07:40:17 -0000 On Thu, Jul 02, 2020 at 12:06:13AM +0000, Alexey Dokuchaev wrote: > On Wed, Jul 01, 2020 at 05:01:00PM -0700, Rodney W. Grimes wrote: > > Thats good, but realize the page already contains history that > > reads like: > > > > HISTORY > > Part of the functionality of whatis was already provided by the former > > manwhere utility in 1BSD. The apropos and whatis utilities first ap- > > peared in 2BSD. They were rewritten from scratch for OpenBSD 5.6. > > > > The -M option and the MANPATH variable first appeared in 4.3BSD; -m in > > 4.3BSD-Reno; -C in 4.4BSD Lite1; and -S and -s in OpenBSD 4.5 for apropos > > and in OpenBSD 5.6 for whatis. The options -acfhIKklOTWw appeared in > > OpenBSD 5.7. > > > > And further contains: > > > > AUTHORS > > Bill Joy wrote manwhere in 1977 and the original BSD apropos and whatis > > in February 1979. The current version was written by Kristaps Dzonsons > > and Ingo Schwarze . > > > > So the history is rich and complete, do we really need to say when we > > incorporated this into FreeBSD from OpenBSD's mandoc in the manual page? > > Ah, in this case, the only thing lacking from the current version is mention > of FreeBSD 11.1. Sorry for not checking with that before writing my reply. > My main point, however, was that reverse chronological order looks strange. I have created the following differential and integrated the given feedback. https://reviews.freebsd.org/D25566 If necessary I could revert r362809, but somebody should explicit request it. --Gordon From owner-svn-src-head@freebsd.org Sun Jul 5 10:57:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0ABE13685A6; Sun, 5 Jul 2020 10:57:29 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B05J86Rfmz3Y4X; Sun, 5 Jul 2020 10:57:28 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C14F3BE6D; Sun, 5 Jul 2020 10:57:28 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 065AvSno085086; Sun, 5 Jul 2020 10:57:28 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 065AvSaV085085; Sun, 5 Jul 2020 10:57:28 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202007051057.065AvSaV085085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 5 Jul 2020 10:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362941 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 362941 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2020 10:57:29 -0000 Author: trasz Date: Sun Jul 5 10:57:28 2020 New Revision: 362941 URL: https://svnweb.freebsd.org/changeset/base/362941 Log: Fix Linux recvmsg(2) when msg_namelen returned is 0. Previously it would fail with EINVAL, breaking some of the Python regression tests. While here, cap the user-controlled message length. Note that the code doesn't seem to be copying out the new length in either (success or failure) case. This will be addressed separately. Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25392 Modified: head/sys/compat/linux/linux_socket.c Modified: head/sys/compat/linux/linux_socket.c ============================================================================== --- head/sys/compat/linux/linux_socket.c Sun Jul 5 06:51:39 2020 (r362940) +++ head/sys/compat/linux/linux_socket.c Sun Jul 5 10:57:28 2020 (r362941) @@ -1196,11 +1196,14 @@ linux_recvmsg_common(struct thread *td, l_int s, struc if (error != 0) return (error); - if (msg->msg_name) { + if (msg->msg_name != NULL && msg->msg_namelen > 0) { + msg->msg_namelen = min(msg->msg_namelen, SOCK_MAXADDRLEN); sa = malloc(msg->msg_namelen, M_SONAME, M_WAITOK); msg->msg_name = sa; - } else + } else { sa = NULL; + msg->msg_name = NULL; + } uiov = msg->msg_iov; msg->msg_iov = iov; @@ -1210,7 +1213,10 @@ linux_recvmsg_common(struct thread *td, l_int s, struc if (error != 0) goto bad; - if (msg->msg_name) { + /* + * Note that kern_recvit() updates msg->msg_namelen. + */ + if (msg->msg_name != NULL && msg->msg_namelen > 0) { msg->msg_name = PTRIN(linux_msghdr.msg_name); error = bsd_to_linux_sockaddr(sa, &lsa, msg->msg_namelen); if (error == 0) From owner-svn-src-head@freebsd.org Sun Jul 5 13:08:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9930036B606; Sun, 5 Jul 2020 13:08:18 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B08C63TPtz3fdw; Sun, 5 Jul 2020 13:08:18 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5AB5EDAD0; Sun, 5 Jul 2020 13:08:18 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 065D8IHK065252; Sun, 5 Jul 2020 13:08:18 GMT (envelope-from zeising@FreeBSD.org) Received: (from zeising@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 065D8IX3065251; Sun, 5 Jul 2020 13:08:18 GMT (envelope-from zeising@FreeBSD.org) Message-Id: <202007051308.065D8IX3065251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zeising set sender to zeising@FreeBSD.org using -f From: Niclas Zeising Date: Sun, 5 Jul 2020 13:08:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362942 - head/sbin/shutdown X-SVN-Group: head X-SVN-Commit-Author: zeising X-SVN-Commit-Paths: head/sbin/shutdown X-SVN-Commit-Revision: 362942 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2020 13:08:18 -0000 Author: zeising (doc,ports committer) Date: Sun Jul 5 13:08:17 2020 New Revision: 362942 URL: https://svnweb.freebsd.org/changeset/base/362942 Log: shutdown.8: Fix typo Fix a typo in shutdown.8, use ',' instead of '.' when listing items. MFC after: 1 week Modified: head/sbin/shutdown/shutdown.8 Modified: head/sbin/shutdown/shutdown.8 ============================================================================== --- head/sbin/shutdown/shutdown.8 Sun Jul 5 10:57:28 2020 (r362941) +++ head/sbin/shutdown/shutdown.8 Sun Jul 5 13:08:17 2020 (r362942) @@ -135,7 +135,7 @@ suffix: .Dq Li s , .Dq Li sec , .Dq Li m , -.Dq Li min . +.Dq Li min , .Dq Li h , .Dq Li hour . .Pp From owner-svn-src-head@freebsd.org Sun Jul 5 13:15:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 952E336B4AF; Sun, 5 Jul 2020 13:15:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B08M63G0rz3gDN; Sun, 5 Jul 2020 13:15:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5358CDA73; Sun, 5 Jul 2020 13:15:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 065DFETt071248; Sun, 5 Jul 2020 13:15:14 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 065DFEQE071247; Sun, 5 Jul 2020 13:15:14 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202007051315.065DFEQE071247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 5 Jul 2020 13:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362943 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 362943 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2020 13:15:14 -0000 Author: trasz Date: Sun Jul 5 13:15:13 2020 New Revision: 362943 URL: https://svnweb.freebsd.org/changeset/base/362943 Log: Make linux(4) man page also mention /compat/linux/dev. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/share/man/man4/linux.4 Modified: head/share/man/man4/linux.4 ============================================================================== --- head/share/man/man4/linux.4 Sun Jul 5 13:08:17 2020 (r362942) +++ head/share/man/man4/linux.4 Sun Jul 5 13:15:13 2020 (r362943) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 4, 2020 +.Dd July 5, 2020 .Dt LINUX 4 .Os .Sh NAME @@ -129,6 +129,9 @@ Defaults to 0. .Bl -tag -width /compat/linux/dev/shm -compact .It Pa /compat/linux minimal Linux run-time environment +.It Pa /compat/linux/dev +device file system, see +.Xr devfs 5 .It Pa /compat/linux/dev/fd file descriptor file system mounted with the .Cm linrdlnk From owner-svn-src-head@freebsd.org Sun Jul 5 14:38:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 973F136D009; Sun, 5 Jul 2020 14:38:24 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0BC43YMlz41hq; Sun, 5 Jul 2020 14:38:24 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 591BCEF27; Sun, 5 Jul 2020 14:38:24 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 065EcO1V020762; Sun, 5 Jul 2020 14:38:24 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 065EcNxl020756; Sun, 5 Jul 2020 14:38:23 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202007051438.065EcNxl020756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 5 Jul 2020 14:38:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362944 - in head/sys: amd64/amd64 arm64/arm64 kern sys X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys: amd64/amd64 arm64/arm64 kern sys X-SVN-Commit-Revision: 362944 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2020 14:38:24 -0000 Author: andrew Date: Sun Jul 5 14:38:22 2020 New Revision: 362944 URL: https://svnweb.freebsd.org/changeset/base/362944 Log: Rerun kernel ifunc resolvers after all CPUs have started On architectures that use RELA relocations it is safe to rerun the ifunc resolvers on after all CPUs have started, but while they are sill parked. On arm64 with big.LITTLE this is needed as some SoCs have shipped with different ID register values the big and little clusters meaning we were unable to rely on the register values from the boot CPU. Add support for rerunning the resolvers on arm64 and amd64 as these are both RELA using architectures. Reviewed by: kib Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D25455 Modified: head/sys/amd64/amd64/elf_machdep.c head/sys/amd64/amd64/machdep.c head/sys/arm64/arm64/elf_machdep.c head/sys/arm64/arm64/machdep.c head/sys/kern/link_elf.c head/sys/sys/linker.h Modified: head/sys/amd64/amd64/elf_machdep.c ============================================================================== --- head/sys/amd64/amd64/elf_machdep.c Sun Jul 5 13:15:13 2020 (r362943) +++ head/sys/amd64/amd64/elf_machdep.c Sun Jul 5 14:38:22 2020 (r362944) @@ -186,7 +186,7 @@ elf_is_ifunc_reloc(Elf_Size r_info) /* Process one elf relocation with addend. */ static int elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, - int type, elf_lookup_fn lookup) + int type, bool late_ifunc, elf_lookup_fn lookup) { Elf64_Addr *where, val; Elf32_Addr *where32, val32; @@ -226,6 +226,13 @@ elf_reloc_internal(linker_file_t lf, Elf_Addr relocbas panic("unknown reloc type %d\n", type); } + if (late_ifunc) { + KASSERT(type == ELF_RELOC_RELA, + ("Only RELA ifunc relocations are supported")); + if (rtype != R_X86_64_IRELATIVE) + return (0); + } + switch (rtype) { case R_X86_64_NONE: /* none */ break; @@ -305,7 +312,7 @@ elf_reloc(linker_file_t lf, Elf_Addr relocbase, const elf_lookup_fn lookup) { - return (elf_reloc_internal(lf, relocbase, data, type, lookup)); + return (elf_reloc_internal(lf, relocbase, data, type, false, lookup)); } int @@ -313,7 +320,15 @@ elf_reloc_local(linker_file_t lf, Elf_Addr relocbase, int type, elf_lookup_fn lookup) { - return (elf_reloc_internal(lf, relocbase, data, type, lookup)); + return (elf_reloc_internal(lf, relocbase, data, type, false, lookup)); +} + +int +elf_reloc_late(linker_file_t lf, Elf_Addr relocbase, const void *data, + int type, elf_lookup_fn lookup) +{ + + return (elf_reloc_internal(lf, relocbase, data, type, true, lookup)); } int Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sun Jul 5 13:15:13 2020 (r362943) +++ head/sys/amd64/amd64/machdep.c Sun Jul 5 14:38:22 2020 (r362944) @@ -320,6 +320,13 @@ cpu_startup(dummy) cpu_setregs(); } +static void +late_ifunc_resolve(void *dummy __unused) +{ + link_elf_late_ireloc(); +} +SYSINIT(late_ifunc_resolve, SI_SUB_CPU, SI_ORDER_ANY, late_ifunc_resolve, NULL); + /* * Send an interrupt to process. * Modified: head/sys/arm64/arm64/elf_machdep.c ============================================================================== --- head/sys/arm64/arm64/elf_machdep.c Sun Jul 5 13:15:13 2020 (r362943) +++ head/sys/arm64/arm64/elf_machdep.c Sun Jul 5 14:38:22 2020 (r362944) @@ -143,8 +143,10 @@ reloc_instr_imm(Elf32_Addr *where, Elf_Addr val, u_int */ static int elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, - int type, int local, elf_lookup_fn lookup) + int type, int flags, elf_lookup_fn lookup) { +#define ARM64_ELF_RELOC_LOCAL (1 << 0) +#define ARM64_ELF_RELOC_LATE_IFUNC (1 << 1) Elf_Addr *where, addr, addend, val; Elf_Word rtype, symidx; const Elf_Rel *rel; @@ -170,7 +172,14 @@ elf_reloc_internal(linker_file_t lf, Elf_Addr relocbas panic("unknown reloc type %d\n", type); } - if (local) { + if ((flags & ARM64_ELF_RELOC_LATE_IFUNC) != 0) { + KASSERT(type == ELF_RELOC_RELA, + ("Only RELA ifunc relocations are supported")); + if (rtype != R_AARCH64_IRELATIVE) + return (0); + } + + if ((flags & ARM64_ELF_RELOC_LOCAL) != 0) { if (rtype == R_AARCH64_RELATIVE) *where = elf_relocaddr(lf, relocbase + addend); return (0); @@ -229,7 +238,8 @@ elf_reloc_local(linker_file_t lf, Elf_Addr relocbase, int type, elf_lookup_fn lookup) { - return (elf_reloc_internal(lf, relocbase, data, type, 1, lookup)); + return (elf_reloc_internal(lf, relocbase, data, type, + ARM64_ELF_RELOC_LOCAL, lookup)); } /* Process one elf relocation with addend. */ @@ -239,6 +249,15 @@ elf_reloc(linker_file_t lf, Elf_Addr relocbase, const { return (elf_reloc_internal(lf, relocbase, data, type, 0, lookup)); +} + +int +elf_reloc_late(linker_file_t lf, Elf_Addr relocbase, const void *data, + int type, elf_lookup_fn lookup) +{ + + return (elf_reloc_internal(lf, relocbase, data, type, + ARM64_ELF_RELOC_LATE_IFUNC, lookup)); } int Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Sun Jul 5 13:15:13 2020 (r362943) +++ head/sys/arm64/arm64/machdep.c Sun Jul 5 14:38:22 2020 (r362944) @@ -181,6 +181,13 @@ cpu_startup(void *dummy) SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL); +static void +late_ifunc_resolve(void *dummy __unused) +{ + link_elf_late_ireloc(); +} +SYSINIT(late_ifunc_resolve, SI_SUB_CPU, SI_ORDER_ANY, late_ifunc_resolve, NULL); + int cpu_idle_wakeup(int cpu) { Modified: head/sys/kern/link_elf.c ============================================================================== --- head/sys/kern/link_elf.c Sun Jul 5 13:15:13 2020 (r362943) +++ head/sys/kern/link_elf.c Sun Jul 5 14:38:22 2020 (r362944) @@ -1925,4 +1925,18 @@ link_elf_ireloc(caddr_t kmdp) link_elf_preload_parse_symbols(ef); relocate_file1(ef, elf_lookup_ifunc, elf_reloc, true); } + +#if defined(__aarch64__) || defined(__amd64__) +void +link_elf_late_ireloc(void) +{ + elf_file_t ef; + + KASSERT(linker_kernel_file != NULL, + ("link_elf_late_ireloc: No kernel linker file found")); + ef = (elf_file_t)linker_kernel_file; + + relocate_file1(ef, elf_lookup_ifunc, elf_reloc_late, true); +} +#endif #endif Modified: head/sys/sys/linker.h ============================================================================== --- head/sys/sys/linker.h Sun Jul 5 13:15:13 2020 (r362943) +++ head/sys/sys/linker.h Sun Jul 5 14:38:22 2020 (r362944) @@ -289,6 +289,12 @@ const Elf_Sym *elf_get_sym(linker_file_t _lf, Elf_Size const char *elf_get_symname(linker_file_t _lf, Elf_Size _symidx); void link_elf_ireloc(caddr_t kmdp); +#if defined(__aarch64__) || defined(__amd64__) +int elf_reloc_late(linker_file_t _lf, Elf_Addr base, const void *_rel, + int _type, elf_lookup_fn _lu); +void link_elf_late_ireloc(void); +#endif + typedef struct linker_ctf { const uint8_t *ctftab; /* Decompressed CTF data. */ int ctfcnt; /* Number of CTF data bytes. */ From owner-svn-src-head@freebsd.org Sun Jul 5 14:43:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1FC3236D072; Sun, 5 Jul 2020 14:43:15 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0BJg05F9z42TF; Sun, 5 Jul 2020 14:43:15 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB43AEE2F; Sun, 5 Jul 2020 14:43:14 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 065EhE6G026678; Sun, 5 Jul 2020 14:43:14 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 065EhEpU026677; Sun, 5 Jul 2020 14:43:14 GMT (envelope-from se@FreeBSD.org) Message-Id: <202007051443.065EhEpU026677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Sun, 5 Jul 2020 14:43:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362945 - head X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 362945 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2020 14:43:15 -0000 Author: se Date: Sun Jul 5 14:43:14 2020 New Revision: 362945 URL: https://svnweb.freebsd.org/changeset/base/362945 Log: Add a note regarding the introduction of the new bc and dc implementations that are built by default on -CURRENT after 2020-06-26. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Jul 5 14:38:22 2020 (r362944) +++ head/UPDATING Sun Jul 5 14:43:14 2020 (r362945) @@ -26,6 +26,15 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20200627: + A new implementation of bc and dc has been imorted in r362681. This + implementation corrects non-conformant behavior of the previous bc + and adds GNU bc compatible options. It offers a number of extensions, + is much faster on large values, and has support for message catalogs + (a number of languages are already supported, contributions of further + languages welcome). The option WITHOUT_GH_BC can be used to build the + world with the previous versions of bc and dc. + 20200625: r362639 changed the internal API used between the NFS kernel modules. As such, they all need to be rebuilt from sources. From owner-svn-src-head@freebsd.org Sun Jul 5 17:23:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EA0DA3486E4; Sun, 5 Jul 2020 17:23:06 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0Fs60H5qz4BJ7; Sun, 5 Jul 2020 17:23:05 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 065HMwYh074450; Sun, 5 Jul 2020 10:22:58 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 065HMwE1074449; Sun, 5 Jul 2020 10:22:58 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202007051722.065HMwE1074449@gndrsh.dnsmgr.net> Subject: Re: svn commit: r362809 - head/contrib/mandoc In-Reply-To: <20200705074014.GA16505@lion.0xfce3.net> To: Gordon Bergling Date: Sun, 5 Jul 2020 10:22:58 -0700 (PDT) CC: Alexey Dokuchaev , rgrimes@freebsd.org, Warner Losh , src-committers , svn-src-all , svn-src-head Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4B0Fs60H5qz4BJ7 X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [1.99 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.25)[0.255]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.19)[0.186]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.65)[0.645]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2020 17:23:07 -0000 > On Thu, Jul 02, 2020 at 12:06:13AM +0000, Alexey Dokuchaev wrote: > > On Wed, Jul 01, 2020 at 05:01:00PM -0700, Rodney W. Grimes wrote: > > > Thats good, but realize the page already contains history that > > > reads like: > > > > > > HISTORY > > > Part of the functionality of whatis was already provided by the former > > > manwhere utility in 1BSD. The apropos and whatis utilities first ap- > > > peared in 2BSD. They were rewritten from scratch for OpenBSD 5.6. > > > > > > The -M option and the MANPATH variable first appeared in 4.3BSD; -m in > > > 4.3BSD-Reno; -C in 4.4BSD Lite1; and -S and -s in OpenBSD 4.5 for apropos > > > and in OpenBSD 5.6 for whatis. The options -acfhIKklOTWw appeared in > > > OpenBSD 5.7. > > > > > > And further contains: > > > > > > AUTHORS > > > Bill Joy wrote manwhere in 1977 and the original BSD apropos and whatis > > > in February 1979. The current version was written by Kristaps Dzonsons > > > and Ingo Schwarze . > > > > > > So the history is rich and complete, do we really need to say when we > > > incorporated this into FreeBSD from OpenBSD's mandoc in the manual page? > > > > Ah, in this case, the only thing lacking from the current version is mention > > of FreeBSD 11.1. Sorry for not checking with that before writing my reply. > > My main point, however, was that reverse chronological order looks strange. > > I have created the following differential and integrated the given feedback. > > https://reviews.freebsd.org/D25566 > > If necessary I could revert r362809, but somebody should explicit request it. Consider it so requested. > --Gordon -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sun Jul 5 19:38:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E7FD834B250; Sun, 5 Jul 2020 19:38:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0JsS5qz9z4Jm8; Sun, 5 Jul 2020 19:38:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ABA0F12784; Sun, 5 Jul 2020 19:38:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 065Jcauh006031; Sun, 5 Jul 2020 19:38:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 065Jca0s006030; Sun, 5 Jul 2020 19:38:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202007051938.065Jca0s006030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 5 Jul 2020 19:38:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362946 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 362946 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2020 19:38:37 -0000 Author: hselasky Date: Sun Jul 5 19:38:36 2020 New Revision: 362946 URL: https://svnweb.freebsd.org/changeset/base/362946 Log: Fix include file order in io.h in the LinuxKPI. Make sure sys/types.h is included before machine/vm.h. PR: 247775 Submitted by: pkubaj@ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/io.h Modified: head/sys/compat/linuxkpi/common/include/linux/io.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/io.h Sun Jul 5 14:43:14 2020 (r362945) +++ head/sys/compat/linuxkpi/common/include/linux/io.h Sun Jul 5 19:38:36 2020 (r362946) @@ -31,9 +31,10 @@ #ifndef _LINUX_IO_H_ #define _LINUX_IO_H_ -#include #include #include + +#include #include #include From owner-svn-src-head@freebsd.org Sun Jul 5 19:53:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B55834BE21; Sun, 5 Jul 2020 19:53:55 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0KC70qG0z4KYf; Sun, 5 Jul 2020 19:53:55 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F361312929; Sun, 5 Jul 2020 19:53:54 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 065JrsaB018208; Sun, 5 Jul 2020 19:53:54 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 065Jrs9T018207; Sun, 5 Jul 2020 19:53:54 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202007051953.065Jrs9T018207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Sun, 5 Jul 2020 19:53:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362947 - head/usr.bin/truss X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: head/usr.bin/truss X-SVN-Commit-Revision: 362947 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2020 19:53:55 -0000 Author: kaktus Date: Sun Jul 5 19:53:54 2020 New Revision: 362947 URL: https://svnweb.freebsd.org/changeset/base/362947 Log: truss: print more information about traced sysctls MFC after: 2 weeks Sponsored by: Mysterious Code Ltd. Modified: head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Sun Jul 5 19:38:36 2020 (r362946) +++ head/usr.bin/truss/syscalls.c Sun Jul 5 19:53:54 2020 (r362947) @@ -1577,14 +1577,37 @@ print_cmsgs(FILE *fp, pid_t pid, bool receive, struct } static void -print_sysctl_oid(FILE *fp, int *oid, int len) +print_sysctl_oid(FILE *fp, int *oid, size_t len) { - int i; + size_t i; + bool first; - for (i = 0; i < len; i++) - fprintf(fp, ".%d", oid[i]); + first = true; + fprintf(fp, "{ "); + for (i = 0; i < len; i++) { + fprintf(fp, "%s%d", first ? "" : ".", oid[i]); + first = false; + } + fprintf(fp, " }"); } +static void +print_sysctl(FILE *fp, int *oid, size_t len) +{ + char name[BUFSIZ]; + int qoid[CTL_MAXNAME + 2]; + size_t i; + + qoid[0] = CTL_SYSCTL; + qoid[1] = CTL_SYSCTL_NAME; + memcpy(qoid + 2, oid, len * sizeof(int)); + i = sizeof(name); + if (sysctl(qoid, len + 2, name, &i, 0, 0) == -1) + print_sysctl_oid(fp, oid, len); + else + fprintf(fp, "%s", name); +} + /* * Converts a syscall argument into a string. Said string is * allocated via malloc(), so needs to be free()'d. sc is @@ -2298,9 +2321,8 @@ print_arg(struct syscall_args *sc, unsigned long *args break; case Sysctl: { char name[BUFSIZ]; - int oid[CTL_MAXNAME + 2], qoid[CTL_MAXNAME + 2]; - size_t i; - int len; + int oid[CTL_MAXNAME + 2]; + size_t len; memset(name, 0, sizeof(name)); len = args[sc->offset + 1]; @@ -2314,39 +2336,35 @@ print_arg(struct syscall_args *sc, unsigned long *args fprintf(fp, "debug"); break; case CTL_SYSCTL_NAME: - fprintf(fp, "name"); + fprintf(fp, "name "); print_sysctl_oid(fp, oid + 2, len - 2); break; case CTL_SYSCTL_NEXT: fprintf(fp, "next"); break; case CTL_SYSCTL_NAME2OID: - fprintf(fp, "name2oid"); + fprintf(fp, "name2oid %s", + get_string(pid, + args[sc->offset + 4], + args[sc->offset + 5])); break; case CTL_SYSCTL_OIDFMT: - fprintf(fp, "oidfmt"); - print_sysctl_oid(fp, oid + 2, len - 2); + fprintf(fp, "oidfmt "); + print_sysctl(fp, oid + 2, len - 2); break; case CTL_SYSCTL_OIDDESCR: - fprintf(fp, "oiddescr"); - print_sysctl_oid(fp, oid + 2, len - 2); + fprintf(fp, "oiddescr "); + print_sysctl(fp, oid + 2, len - 2); break; case CTL_SYSCTL_OIDLABEL: - fprintf(fp, "oidlabel"); - print_sysctl_oid(fp, oid + 2, len - 2); + fprintf(fp, "oidlabel "); + print_sysctl(fp, oid + 2, len - 2); break; default: - print_sysctl_oid(fp, oid + 1, len - 1); + print_sysctl(fp, oid + 1, len - 1); } } else { - qoid[0] = CTL_SYSCTL; - qoid[1] = CTL_SYSCTL_NAME; - memcpy(qoid + 2, oid, len * sizeof(int)); - i = sizeof(name); - if (sysctl(qoid, len + 2, name, &i, 0, 0) == -1) - print_sysctl_oid(fp, qoid + 2, len); - else - fprintf(fp, "%s", name); + print_sysctl(fp, oid, len); } fprintf(fp, "\""); } From owner-svn-src-head@freebsd.org Sun Jul 5 20:25:53 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 786AE34C061; Sun, 5 Jul 2020 20:25:53 +0000 (UTC) (envelope-from pawel.biernacki@gmail.com) Received: from mail-ej1-f65.google.com (mail-ej1-f65.google.com [209.85.218.65]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0Kw053scz4Ldk; Sun, 5 Jul 2020 20:25:52 +0000 (UTC) (envelope-from pawel.biernacki@gmail.com) Received: by mail-ej1-f65.google.com with SMTP id w6so40404856ejq.6; Sun, 05 Jul 2020 13:25:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=8e2JXRl8piMcpqatjjLOfeG1tUviJAvlBD6u3w32Uo8=; b=Cb9t3Rz54qOWWlBQtdk/dF+9VvyLl1s9sHFdqqZMF0QknreRaIguQiFf6fIOlvMtlX jyjtI7u/ohKhI49injzxdv/Z8BUxPvZIvPt2TJAbcpmRwS0PC2tzygreQ7CQZt/RDYxA chCVuzdgw1gBzyADQ/pQmiPkLQJZUdDLaW4868hJMkMcKSBlK4RStDO8TJQSyPlAwBbZ y8WeMxEpr3dt/mMVfQ4mpnB4ZtSyME5mUKERPwPSmIoxSkahKnvov1BVQ7aONlUtbjmQ oZDJ+G0kft5rfFNIDEV+9z0nfHpbHBTCMrBkUpP5vkxLGAdRRf7CD/m7gYGtrYMN+tKs rDJQ== X-Gm-Message-State: AOAM533Pw5R/de7FizFEtHMvD3AM1oRsvKvhP9d6QXfQu87cdLFKj/hd jl4Q95YZ+3XKdw6E0YlcOmU0QheVpBM= X-Google-Smtp-Source: ABdhPJwkxe/9jj9jBLIAt9QRFVZ4da3F6ISDRJLZQXsCwQ3pemMVO2Gc8ChbP4PaltJnwdDocFrwyQ== X-Received: by 2002:ac2:5382:: with SMTP id g2mr14286434lfh.129.1593980303740; Sun, 05 Jul 2020 13:18:23 -0700 (PDT) Received: from macbook.localdomain (31-172-188-241.noc.fibertech.net.pl. [31.172.188.241]) by smtp.gmail.com with ESMTPSA id 11sm4980462lju.102.2020.07.05.13.18.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Jul 2020 13:18:23 -0700 (PDT) From: =?utf-8?Q?Pawe=C5=82_Biernacki?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: Re: svn commit: r362947 - head/usr.bin/truss Date: Sun, 5 Jul 2020 22:18:18 +0200 References: <202007051953.065Jrs9T018207@repo.freebsd.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <202007051953.065Jrs9T018207@repo.freebsd.org> Message-Id: <03E07B95-A86B-488C-B3C8-061546E54BBC@FreeBSD.org> X-Mailer: Apple Mail (2.3608.120.23.2.1) X-Rspamd-Queue-Id: 4B0Kw053scz4Ldk X-Spamd-Bar: +++++++++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of pawelbiernacki@gmail.com designates 209.85.218.65 as permitted sender) smtp.mailfrom=pawelbiernacki@gmail.com X-Spamd-Result: default: False [11.85 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[209.85.218.65:from]; MV_CASE(0.50)[]; R_SPF_ALLOW(0.00)[+ip4:209.85.128.0/17]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_SHORT(-0.00)[-0.001]; FORGED_SENDER(0.30)[kaktus@FreeBSD.org,pawelbiernacki@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_NEQ_ENVFROM(0.00)[kaktus@FreeBSD.org,pawelbiernacki@gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_XBL(5.00)[31.172.188.241:received]; TAGGED_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; SH_AUTHBL_RECEIVED(4.00)[31.172.188.241:received]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_SPAM_MEDIUM(1.05)[1.051]; BAD_REP_POLICIES(0.10)[]; NEURAL_SPAM_LONG(1.00)[1.004]; RCVD_IN_DNSWL_NONE(0.00)[209.85.218.65:from]; RCVD_TLS_ALL(0.00)[]; GREYLIST(0.00)[pass,body] X-Spam: Yes X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2020 20:25:53 -0000 Before:=20 = __sysctl("sysctl.name2oid",2,0x7fffff763a80,0x7fffff763280,0x7fffff763680,= 8) =3D 0 (0x0) __sysctl("sysctl.oidfmt.6.2",4,0x7fffff763ae0,0x7fffff762e78,0x0,0) =3D = 0 (0x0) __sysctl("sysctl.name.6.2",4,0x7fffff762180,0x7fffff761d00,0x0,0) =3D 0 = (0x0) __sysctl("sysctl.oidfmt.6.2",4,0x7fffff762980,0x7fffff761d08,0x0,0) =3D = 0 (0x0) __sysctl("sysctl.oiddescr.6.2",4,0x7fffff762580,0x7fffff761d00,0x0,0) =3D = 0 (0x0) After: __sysctl("sysctl.name2oid = hw.model",2,0x7fffff161e60,0x7fffff161660,0x7fffff161a60,8) =3D 0 (0x0) __sysctl("sysctl.oidfmt hw.model",4,0x7fffff161ec0,0x7fffff161258,0x0,0) = =3D 0 (0x0) __sysctl("sysctl.name { 6.2 }",4,0x7fffff160560,0x7fffff1600e0,0x0,0) =3D = 0 (0x0) __sysctl("sysctl.oidfmt hw.model",4,0x7fffff160d60,0x7fffff1600e8,0x0,0) = =3D 0 (0x0) __sysctl("sysctl.oiddescr = hw.model",4,0x7fffff160960,0x7fffff1600e0,0x0,0) =3D 0 (0x0) Reminded by: mjg > On 5 Jul 2020, at 21:53, Pawel Biernacki wrote: >=20 > Author: kaktus > Date: Sun Jul 5 19:53:54 2020 > New Revision: 362947 > URL: https://svnweb.freebsd.org/changeset/base/362947 >=20 > Log: > truss: print more information about traced sysctls >=20 > MFC after: 2 weeks > Sponsored by: Mysterious Code Ltd. >=20 > Modified: > head/usr.bin/truss/syscalls.c >=20 > Modified: head/usr.bin/truss/syscalls.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/usr.bin/truss/syscalls.c Sun Jul 5 19:38:36 2020 = (r362946) > +++ head/usr.bin/truss/syscalls.c Sun Jul 5 19:53:54 2020 = (r362947) > @@ -1577,14 +1577,37 @@ print_cmsgs(FILE *fp, pid_t pid, bool receive, = struct=20 > } >=20 > static void > -print_sysctl_oid(FILE *fp, int *oid, int len) > +print_sysctl_oid(FILE *fp, int *oid, size_t len) > { > - int i; > + size_t i; > + bool first; >=20 > - for (i =3D 0; i < len; i++) > - fprintf(fp, ".%d", oid[i]); > + first =3D true; > + fprintf(fp, "{ "); > + for (i =3D 0; i < len; i++) { > + fprintf(fp, "%s%d", first ? "" : ".", oid[i]); > + first =3D false; > + } > + fprintf(fp, " }"); > } >=20 > +static void > +print_sysctl(FILE *fp, int *oid, size_t len) > +{ > + char name[BUFSIZ]; > + int qoid[CTL_MAXNAME + 2]; > + size_t i; > + > + qoid[0] =3D CTL_SYSCTL; > + qoid[1] =3D CTL_SYSCTL_NAME; > + memcpy(qoid + 2, oid, len * sizeof(int)); > + i =3D sizeof(name); > + if (sysctl(qoid, len + 2, name, &i, 0, 0) =3D=3D -1) > + print_sysctl_oid(fp, oid, len); > + else > + fprintf(fp, "%s", name); > +} > + > /* > * Converts a syscall argument into a string. Said string is > * allocated via malloc(), so needs to be free()'d. sc is > @@ -2298,9 +2321,8 @@ print_arg(struct syscall_args *sc, unsigned long = *args > break; > case Sysctl: { > char name[BUFSIZ]; > - int oid[CTL_MAXNAME + 2], qoid[CTL_MAXNAME + 2]; > - size_t i; > - int len; > + int oid[CTL_MAXNAME + 2]; > + size_t len; >=20 > memset(name, 0, sizeof(name)); > len =3D args[sc->offset + 1]; > @@ -2314,39 +2336,35 @@ print_arg(struct syscall_args *sc, unsigned = long *args > fprintf(fp, "debug"); > break; > case CTL_SYSCTL_NAME: > - fprintf(fp, "name"); > + fprintf(fp, "name "); > print_sysctl_oid(fp, oid + 2, = len - 2); > break; > case CTL_SYSCTL_NEXT: > fprintf(fp, "next"); > break; > case CTL_SYSCTL_NAME2OID: > - fprintf(fp, "name2oid"); > + fprintf(fp, "name2oid %s", > + get_string(pid, > + args[sc->offset + 4], > + args[sc->offset + 5])); > break; > case CTL_SYSCTL_OIDFMT: > - fprintf(fp, "oidfmt"); > - print_sysctl_oid(fp, oid + 2, = len - 2); > + fprintf(fp, "oidfmt "); > + print_sysctl(fp, oid + 2, len - = 2); > break; > case CTL_SYSCTL_OIDDESCR: > - fprintf(fp, "oiddescr"); > - print_sysctl_oid(fp, oid + 2, = len - 2); > + fprintf(fp, "oiddescr "); > + print_sysctl(fp, oid + 2, len - = 2); > break; > case CTL_SYSCTL_OIDLABEL: > - fprintf(fp, "oidlabel"); > - print_sysctl_oid(fp, oid + 2, = len - 2); > + fprintf(fp, "oidlabel "); > + print_sysctl(fp, oid + 2, len - = 2); > break; > default: > - print_sysctl_oid(fp, oid + 1, = len - 1); > + print_sysctl(fp, oid + 1, len - = 1); > } > } else { > - qoid[0] =3D CTL_SYSCTL; > - qoid[1] =3D CTL_SYSCTL_NAME; > - memcpy(qoid + 2, oid, len * = sizeof(int)); > - i =3D sizeof(name); > - if (sysctl(qoid, len + 2, name, &i, 0, = 0) =3D=3D -1) > - print_sysctl_oid(fp, qoid + 2, = len); > - else > - fprintf(fp, "%s", name); > + print_sysctl(fp, oid, len); > } > fprintf(fp, "\""); > } From owner-svn-src-head@freebsd.org Sun Jul 5 20:54:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 80B3334D0B2; Sun, 5 Jul 2020 20:54:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0LXV2p1Bz4My7; Sun, 5 Jul 2020 20:54:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 433231364C; Sun, 5 Jul 2020 20:54:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 065Ks2tP054543; Sun, 5 Jul 2020 20:54:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 065Ks2nZ054542; Sun, 5 Jul 2020 20:54:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202007052054.065Ks2nZ054542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 5 Jul 2020 20:54:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362948 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 362948 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2020 20:54:02 -0000 Author: kib Date: Sun Jul 5 20:54:01 2020 New Revision: 362948 URL: https://svnweb.freebsd.org/changeset/base/362948 Log: Fix typo. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Sun Jul 5 19:53:54 2020 (r362947) +++ head/sys/kern/vfs_vnops.c Sun Jul 5 20:54:01 2020 (r362948) @@ -1557,7 +1557,7 @@ vn_stat(struct vnode *vp, struct stat *sb, struct ucre * "a filesystem-specific preferred I/O block size for this * object. In some filesystem types, this may vary from file * to file" - * Use miminum/default of PAGE_SIZE (e.g. for VCHR). + * Use minimum/default of PAGE_SIZE (e.g. for VCHR). */ sb->st_blksize = max(PAGE_SIZE, vap->va_blocksize); From owner-svn-src-head@freebsd.org Sun Jul 5 21:55:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0268034EEC0; Sun, 5 Jul 2020 21:55:16 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0Mv85gZXz4Qx1; Sun, 5 Jul 2020 21:55:16 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A6EA313EF1; Sun, 5 Jul 2020 21:55:16 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 065LtGn3091274; Sun, 5 Jul 2020 21:55:16 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 065LtG6c091273; Sun, 5 Jul 2020 21:55:16 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202007052155.065LtG6c091273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 5 Jul 2020 21:55:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362949 - head/sys/fs/nfs X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfs X-SVN-Commit-Revision: 362949 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2020 21:55:17 -0000 Author: rmacklem Date: Sun Jul 5 21:55:16 2020 New Revision: 362949 URL: https://svnweb.freebsd.org/changeset/base/362949 Log: Add support for ext_pgs mbufs to nfsm_strtom(). Also, add a new function nfsm_add_ext_pgs() which will either add a page or add a new ext_pgs mbuf with a page to the mbuf list. Used by nfsm_strtom(). This is another in the series of commits that add support to the NFS client and server for building RPC messages in ext_pgs mbufs with anonymous pages. This is useful so that the entire mbuf list does not need to be copied before calling sosend() when NFS over TLS is enabled. Since ND_EXTPG is never set yet, there is no semantic change at this time. Modified: head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfs_var.h Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Sun Jul 5 20:54:01 2020 (r362948) +++ head/sys/fs/nfs/nfs_commonsubs.c Sun Jul 5 21:55:16 2020 (r362949) @@ -832,22 +832,38 @@ nfsm_strtom(struct nfsrv_descript *nd, const char *cp, bytesize = NFSX_UNSIGNED + siz + rem; m2 = nd->nd_mb; cp2 = nd->nd_bpos; - left = M_TRAILINGSPACE(m2); + if ((nd->nd_flag & ND_EXTPG) != 0) + left = nd->nd_bextpgsiz; + else + left = M_TRAILINGSPACE(m2); + KASSERT(((m2->m_flags & (M_EXT | M_EXTPG)) == + (M_EXT | M_EXTPG) && (nd->nd_flag & ND_EXTPG) != 0) || + ((m2->m_flags & (M_EXT | M_EXTPG)) != + (M_EXT | M_EXTPG) && (nd->nd_flag & ND_EXTPG) == 0), + ("nfsm_strtom: ext_pgs and non-ext_pgs mbufs mixed")); /* * Loop around copying the string to mbuf(s). */ while (siz > 0) { if (left == 0) { - if (siz > ncl_mbuf_mlen) - NFSMCLGET(m1, M_WAITOK); - else - NFSMGET(m1); - m1->m_len = 0; - m2->m_next = m1; - m2 = m1; - cp2 = mtod(m2, caddr_t); - left = M_TRAILINGSPACE(m2); + if ((nd->nd_flag & ND_EXTPG) != 0) { + m2 = nfsm_add_ext_pgs(m2, + nd->nd_maxextsiz, &nd->nd_bextpg); + cp2 = (char *)(void *)PHYS_TO_DMAP( + m2->m_epg_pa[nd->nd_bextpg]); + nd->nd_bextpgsiz = left = PAGE_SIZE; + } else { + if (siz > ncl_mbuf_mlen) + NFSMCLGET(m1, M_WAITOK); + else + NFSMGET(m1); + m1->m_len = 0; + cp2 = mtod(m1, char *); + left = M_TRAILINGSPACE(m1); + m2->m_next = m1; + m2 = m1; + } } if (left >= siz) xfer = siz; @@ -855,18 +871,31 @@ nfsm_strtom(struct nfsrv_descript *nd, const char *cp, xfer = left; NFSBCOPY(cp, cp2, xfer); cp += xfer; + cp2 += xfer; m2->m_len += xfer; siz -= xfer; left -= xfer; + if ((nd->nd_flag & ND_EXTPG) != 0) { + nd->nd_bextpgsiz -= xfer; + m2->m_epg_last_len += xfer; + } if (siz == 0 && rem) { if (left < rem) panic("nfsm_strtom"); - NFSBZERO(cp2 + xfer, rem); + NFSBZERO(cp2, rem); m2->m_len += rem; + cp2 += rem; + if ((nd->nd_flag & ND_EXTPG) != 0) { + nd->nd_bextpgsiz -= rem; + m2->m_epg_last_len += rem; + } } } nd->nd_mb = m2; - nd->nd_bpos = mtod(m2, caddr_t) + m2->m_len; + if ((nd->nd_flag & ND_EXTPG) != 0) + nd->nd_bpos = cp2; + else + nd->nd_bpos = mtod(m2, char *) + m2->m_len; return (bytesize); } @@ -4844,4 +4873,35 @@ nfsm_set(struct nfsrv_descript *nd, u_int offs) nd->nd_bextpgsiz = PAGE_SIZE; } else nd->nd_bpos = mtod(m, char *) + offs; +} + +/* + * Grow a ext_pgs mbuf list. Either allocate another page or add + * an mbuf to the list. + */ +struct mbuf * +nfsm_add_ext_pgs(struct mbuf *m, int maxextsiz, int *bextpg) +{ + struct mbuf *mp; + vm_page_t pg; + + if ((m->m_epg_npgs + 1) * PAGE_SIZE > maxextsiz) { + mp = mb_alloc_ext_plus_pages(PAGE_SIZE, M_WAITOK); + *bextpg = 0; + m->m_next = mp; + } else { + do { + pg = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | + VM_ALLOC_NOOBJ | VM_ALLOC_NODUMP | + VM_ALLOC_WIRED); + if (pg == NULL) + vm_wait(NULL); + } while (pg == NULL); + m->m_epg_pa[m->m_epg_npgs] = VM_PAGE_TO_PHYS(pg); + *bextpg = m->m_epg_npgs; + m->m_epg_npgs++; + m->m_epg_last_len = 0; + mp = m; + } + return (mp); } Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Sun Jul 5 20:54:01 2020 (r362948) +++ head/sys/fs/nfs/nfs_var.h Sun Jul 5 21:55:16 2020 (r362949) @@ -361,6 +361,7 @@ void nfsv4_freeslot(struct nfsclsession *, int); struct ucred *nfsrv_getgrpscred(struct ucred *); struct nfsdevice *nfsv4_findmirror(struct nfsmount *); void nfsm_set(struct nfsrv_descript *, u_int); +struct mbuf *nfsm_add_ext_pgs(struct mbuf *, int, int *); /* nfs_clcomsubs.c */ void nfsm_uiombuf(struct nfsrv_descript *, struct uio *, int); From owner-svn-src-head@freebsd.org Sun Jul 5 23:07:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E489034F968; Sun, 5 Jul 2020 23:07:54 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0PVy5T4Wz4TrW; Sun, 5 Jul 2020 23:07:54 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A10814AE6; Sun, 5 Jul 2020 23:07:54 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 065N7sfi034513; Sun, 5 Jul 2020 23:07:54 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 065N7sRn034512; Sun, 5 Jul 2020 23:07:54 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007052307.065N7sRn034512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Jul 2020 23:07:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362950 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 362950 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2020 23:07:55 -0000 Author: mjg Date: Sun Jul 5 23:07:54 2020 New Revision: 362950 URL: https://svnweb.freebsd.org/changeset/base/362950 Log: lockf: elide avoidable locking in lf_advlockasync While here assert on ls_threads state. Modified: head/sys/kern/kern_lockf.c Modified: head/sys/kern/kern_lockf.c ============================================================================== --- head/sys/kern/kern_lockf.c Sun Jul 5 21:55:16 2020 (r362949) +++ head/sys/kern/kern_lockf.c Sun Jul 5 23:07:54 2020 (r362950) @@ -637,6 +637,7 @@ retry_setlock: VI_UNLOCK(vp); } else { state = *statep; + MPASS(state->ls_threads >= 0); state->ls_threads++; VI_UNLOCK(vp); @@ -647,6 +648,7 @@ retry_setlock: free(ls, M_LOCKF); } } else { + MPASS(state->ls_threads >= 0); state->ls_threads++; VI_UNLOCK(vp); } @@ -657,8 +659,9 @@ retry_setlock: * locked. lf_purgelocks() requires that no new threads add * pending locks when vnode is marked by VIRF_DOOMED flag. */ - VI_LOCK(vp); if (VN_IS_DOOMED(vp)) { + VI_LOCK(vp); + MPASS(state->ls_threads > 0); state->ls_threads--; wakeup(state); VI_UNLOCK(vp); @@ -666,7 +669,6 @@ retry_setlock: lf_free_lock(lock); return (ENOENT); } - VI_UNLOCK(vp); switch (ap->a_op) { case F_SETLK: @@ -728,15 +730,11 @@ retry_setlock: sx_xunlock(&state->ls_lock); VI_LOCK(vp); - + MPASS(state->ls_threads > 0); state->ls_threads--; - if (LIST_EMPTY(&state->ls_active) && state->ls_threads == 0) { - KASSERT(LIST_EMPTY(&state->ls_pending), - ("freeable state with pending locks")); - } else { + if (state->ls_threads != 0) { wakeup(state); } - VI_UNLOCK(vp); if (error == EDOOFUS) { @@ -790,6 +788,7 @@ lf_purgelocks(struct vnode *vp, struct lockf **statep) VI_UNLOCK(vp); goto out_free; } + MPASS(state->ls_threads >= 0); state->ls_threads++; VI_UNLOCK(vp); @@ -1953,6 +1952,7 @@ lf_iteratelocks_vnode(struct vnode *vp, lf_iterator *f VI_UNLOCK(vp); return (0); } + MPASS(ls->ls_threads >= 0); ls->ls_threads++; VI_UNLOCK(vp); @@ -1976,6 +1976,7 @@ lf_iteratelocks_vnode(struct vnode *vp, lf_iterator *f } sx_xunlock(&ls->ls_lock); VI_LOCK(vp); + MPASS(ls->ls_threads > 0); ls->ls_threads--; wakeup(ls); VI_UNLOCK(vp); From owner-svn-src-head@freebsd.org Mon Jul 6 02:00:35 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB0DD3520E8; Mon, 6 Jul 2020 02:00:35 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0TLC5mCZz4Zft; Mon, 6 Jul 2020 02:00:35 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A8B2716D1E; Mon, 6 Jul 2020 02:00:35 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06620Z16037943; Mon, 6 Jul 2020 02:00:35 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06620ZZu037942; Mon, 6 Jul 2020 02:00:35 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007060200.06620ZZu037942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 6 Jul 2020 02:00:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362951 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 362951 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 02:00:36 -0000 Author: mjg Date: Mon Jul 6 02:00:35 2020 New Revision: 362951 URL: https://svnweb.freebsd.org/changeset/base/362951 Log: vfs: expand on vhold_smr comment Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Jul 5 23:07:54 2020 (r362950) +++ head/sys/kern/vfs_subr.c Mon Jul 6 02:00:35 2020 (r362951) @@ -3441,10 +3441,23 @@ vholdnz(struct vnode *vp) } /* - * Grab a hold count as long as the vnode is not getting freed. + * Grab a hold count unless the vnode is freed. * * Only use this routine if vfs smr is the only protection you have against * freeing the vnode. + * + * The code loops trying to add a hold count as long as the VHOLD_NO_SMR flag + * is not set. After the flag is set the vnode becomes immutable to anyone but + * the thread which managed to set the flag. + * + * It may be tempting to replace the loop with: + * count = atomic_fetchadd_int(&vp->v_holdcnt, 1); + * if (count & VHOLD_NO_SMR) { + * backpedal and error out; + * } + * + * However, while this is more performant, it hinders debugging by eliminating + * the previously mentioned invariant. */ bool vhold_smr(struct vnode *vp) From owner-svn-src-head@freebsd.org Mon Jul 6 06:28:20 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CC2EE35B57E; Mon, 6 Jul 2020 06:28:20 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4B0bH852Dtz4p8g; Mon, 6 Jul 2020 06:28:20 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from localhost (p548612f6.dip0.t-ipconnect.de [84.134.18.246]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id 4CFFD1F367; Mon, 6 Jul 2020 06:28:20 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Mon, 6 Jul 2020 08:28:19 +0200 From: Gordon Bergling To: rgrimes@freebsd.org Cc: Alexey Dokuchaev , Warner Losh , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r362809 - head/contrib/mandoc Message-ID: <20200706062819.GA88664@lion.0xfce3.net> References: <20200705074014.GA16505@lion.0xfce3.net> <202007051722.065HMwE1074449@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202007051722.065HMwE1074449@gndrsh.dnsmgr.net> X-Url: X-Operating-System: FreeBSD 12.1-STABLE amd64 X-Host-Uptime: 8:26AM up 2 days, 21:14, 6 users, load averages: 5.05, 4.99, 4.93 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 06:28:20 -0000 On Sun, Jul 05, 2020 at 10:22:58AM -0700, Rodney W. Grimes wrote: > > On Thu, Jul 02, 2020 at 12:06:13AM +0000, Alexey Dokuchaev wrote: > > > On Wed, Jul 01, 2020 at 05:01:00PM -0700, Rodney W. Grimes wrote: > > > > Thats good, but realize the page already contains history that > > > > reads like: > > > > > > > > HISTORY > > > > Part of the functionality of whatis was already provided by the former > > > > manwhere utility in 1BSD. The apropos and whatis utilities first ap- > > > > peared in 2BSD. They were rewritten from scratch for OpenBSD 5.6. > > > > > > > > The -M option and the MANPATH variable first appeared in 4.3BSD; -m in > > > > 4.3BSD-Reno; -C in 4.4BSD Lite1; and -S and -s in OpenBSD 4.5 for apropos > > > > and in OpenBSD 5.6 for whatis. The options -acfhIKklOTWw appeared in > > > > OpenBSD 5.7. > > > > > > > > And further contains: > > > > > > > > AUTHORS > > > > Bill Joy wrote manwhere in 1977 and the original BSD apropos and whatis > > > > in February 1979. The current version was written by Kristaps Dzonsons > > > > and Ingo Schwarze . > > > > > > > > So the history is rich and complete, do we really need to say when we > > > > incorporated this into FreeBSD from OpenBSD's mandoc in the manual page? > > > > > > Ah, in this case, the only thing lacking from the current version is mention > > > of FreeBSD 11.1. Sorry for not checking with that before writing my reply. > > > My main point, however, was that reverse chronological order looks strange. > > > > I have created the following differential and integrated the given feedback. > > > > https://reviews.freebsd.org/D25566 > > > > If necessary I could revert r362809, but somebody should explicit request it. > > Consider it so requested. Consider it done. --Gordon > -- > Rod Grimes rgrimes@freebsd.org > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" -- From owner-svn-src-head@freebsd.org Mon Jul 6 08:36:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B4BEE35FB5D; Mon, 6 Jul 2020 08:36:15 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0f6l4Jhhz3T8Q; Mon, 6 Jul 2020 08:36:15 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 726261B6C2; Mon, 6 Jul 2020 08:36:15 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0668aF3A090890; Mon, 6 Jul 2020 08:36:15 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0668aFZo090889; Mon, 6 Jul 2020 08:36:15 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <202007060836.0668aFZo090889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Mon, 6 Jul 2020 08:36:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362952 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: grehan X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362952 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 08:36:15 -0000 Author: grehan Date: Mon Jul 6 08:36:14 2020 New Revision: 362952 URL: https://svnweb.freebsd.org/changeset/base/362952 Log: Silence ACPI RTC error/warning in Linux guests. Allow guests to set the RTC bit in the ACPI PM control register. This eliminates an annoying (and harmless) Linux kernel boot message. PR: 244721 Submitted by: Jose Luis Duran MFC after: 1 week Modified: head/usr.sbin/bhyve/pm.c Modified: head/usr.sbin/bhyve/pm.c ============================================================================== --- head/usr.sbin/bhyve/pm.c Mon Jul 6 02:00:35 2020 (r362951) +++ head/usr.sbin/bhyve/pm.c Mon Jul 6 08:36:14 2020 (r362952) @@ -198,7 +198,7 @@ pm1_enable_handler(struct vmctx *ctx, int vcpu, int in * the global lock, but ACPI-CA whines profusely if it * can't set GBL_EN. */ - pm1_enable = *eax & (PM1_PWRBTN_EN | PM1_GBL_EN); + pm1_enable = *eax & (PM1_RTC_EN | PM1_PWRBTN_EN | PM1_GBL_EN); sci_update(ctx); } pthread_mutex_unlock(&pm_lock); From owner-svn-src-head@freebsd.org Mon Jul 6 08:50:16 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 274BD360361; Mon, 6 Jul 2020 08:50:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0fQw0DsGz3Twh; Mon, 6 Jul 2020 08:50:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6FE51BAAC; Mon, 6 Jul 2020 08:50:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0668oFa8098032; Mon, 6 Jul 2020 08:50:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0668oB1o098012; Mon, 6 Jul 2020 08:50:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202007060850.0668oB1o098012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 6 Jul 2020 08:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362953 - in head/sys: dev/mlx4/mlx4_core dev/mlx4/mlx4_en dev/mlx4/mlx4_ib dev/mlx5/mlx5_core dev/mlx5/mlx5_en dev/mlx5/mlx5_fpga_tools dev/mlx5/mlx5_ib dev/mthca ofed/drivers/infiniba... X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys: dev/mlx4/mlx4_core dev/mlx4/mlx4_en dev/mlx4/mlx4_ib dev/mlx5/mlx5_core dev/mlx5/mlx5_en dev/mlx5/mlx5_fpga_tools dev/mlx5/mlx5_ib dev/mthca ofed/drivers/infiniband/core ofed/drivers/infi... X-SVN-Commit-Revision: 362953 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 08:50:16 -0000 Author: hselasky Date: Mon Jul 6 08:50:11 2020 New Revision: 362953 URL: https://svnweb.freebsd.org/changeset/base/362953 Log: Infiniband clients must be attached and detached in a specific order in ibcore. Currently the linking order of the infiniband, IB, modules decide in which order the clients are attached and detached. For example one IB client may use resources from another IB client. This can lead to a potential deadlock at shutdown. For example if the ipoib is unregistered after the ib_multicast client is detached, then if ipoib is using multicast addresses a deadlock may happen, because ib_multicast will wait for all its resources to be freed before returning from the remove method. Fix this by using module_xxx_order() instead of module_xxx(). Differential Revision: https://reviews.freebsd.org/D23973 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx4/mlx4_core/mlx4_main.c head/sys/dev/mlx4/mlx4_en/mlx4_en_main.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c head/sys/dev/mlx5/mlx5_core/mlx5_main.c head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_main.c head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c head/sys/dev/mthca/mthca_main.c head/sys/ofed/drivers/infiniband/core/ib_cm.c head/sys/ofed/drivers/infiniband/core/ib_cma.c head/sys/ofed/drivers/infiniband/core/ib_device.c head/sys/ofed/drivers/infiniband/core/ib_iwcm.c head/sys/ofed/drivers/infiniband/core/ib_ucm.c head/sys/ofed/drivers/infiniband/core/ib_ucma.c head/sys/ofed/drivers/infiniband/core/ib_user_mad.c head/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c head/sys/ofed/drivers/infiniband/util/madeye.c Modified: head/sys/dev/mlx4/mlx4_core/mlx4_main.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_main.c Mon Jul 6 08:36:14 2020 (r362952) +++ head/sys/dev/mlx4/mlx4_core/mlx4_main.c Mon Jul 6 08:50:11 2020 (r362953) @@ -4218,8 +4218,8 @@ static void __exit mlx4_cleanup(void) destroy_workqueue(mlx4_wq); } -module_init(mlx4_init); -module_exit(mlx4_cleanup); +module_init_order(mlx4_init, SI_ORDER_FIRST); +module_exit_order(mlx4_cleanup, SI_ORDER_FIRST); static int mlx4_evhand(module_t mod, int event, void *arg) Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_main.c ============================================================================== --- head/sys/dev/mlx4/mlx4_en/mlx4_en_main.c Mon Jul 6 08:36:14 2020 (r362952) +++ head/sys/dev/mlx4/mlx4_en/mlx4_en_main.c Mon Jul 6 08:50:11 2020 (r362953) @@ -304,8 +304,8 @@ static void __exit mlx4_en_cleanup(void) mlx4_unregister_interface(&mlx4_en_interface); } -module_init(mlx4_en_init); -module_exit(mlx4_en_cleanup); +module_init_order(mlx4_en_init, SI_ORDER_SIXTH); +module_exit_order(mlx4_en_cleanup, SI_ORDER_SIXTH); static int mlx4en_evhand(module_t mod, int event, void *arg) Modified: head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c ============================================================================== --- head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c Mon Jul 6 08:36:14 2020 (r362952) +++ head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c Mon Jul 6 08:50:11 2020 (r362953) @@ -3319,8 +3319,8 @@ static void __exit mlx4_ib_cleanup(void) destroy_workqueue(wq); } -module_init_order(mlx4_ib_init, SI_ORDER_THIRD); -module_exit(mlx4_ib_cleanup); +module_init_order(mlx4_ib_init, SI_ORDER_SEVENTH); +module_exit_order(mlx4_ib_cleanup, SI_ORDER_SEVENTH); static int mlx4ib_evhand(module_t mod, int event, void *arg) Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_main.c Mon Jul 6 08:36:14 2020 (r362952) +++ head/sys/dev/mlx5/mlx5_core/mlx5_main.c Mon Jul 6 08:50:11 2020 (r362953) @@ -2026,5 +2026,5 @@ static void __exit cleanup(void) pci_unregister_driver(&mlx5_core_driver); } -module_init(init); -module_exit(cleanup); +module_init_order(init, SI_ORDER_FIRST); +module_exit_order(cleanup, SI_ORDER_FIRST); Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Mon Jul 6 08:36:14 2020 (r362952) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Mon Jul 6 08:50:11 2020 (r362953) @@ -4723,8 +4723,8 @@ mlx5e_show_version(void __unused *arg) } SYSINIT(mlx5e_show_version, SI_SUB_DRIVERS, SI_ORDER_ANY, mlx5e_show_version, NULL); -module_init_order(mlx5e_init, SI_ORDER_THIRD); -module_exit_order(mlx5e_cleanup, SI_ORDER_THIRD); +module_init_order(mlx5e_init, SI_ORDER_SIXTH); +module_exit_order(mlx5e_cleanup, SI_ORDER_SIXTH); #if (__FreeBSD_version >= 1100000) MODULE_DEPEND(mlx5en, linuxkpi, 1, 1, 1); Modified: head/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_main.c Mon Jul 6 08:36:14 2020 (r362952) +++ head/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_main.c Mon Jul 6 08:50:11 2020 (r362953) @@ -139,5 +139,5 @@ static void __exit mlx5_fpga_tools_exit(void) mlx5_fpga_tools_char_deinit(); } -module_init(mlx5_fpga_tools_init); -module_exit(mlx5_fpga_tools_exit); +module_init_order(mlx5_fpga_tools_init, SI_ORDER_SECOND); +module_exit_order(mlx5_fpga_tools_exit, SI_ORDER_SECOND); Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Mon Jul 6 08:36:14 2020 (r362952) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Mon Jul 6 08:50:11 2020 (r362953) @@ -3399,5 +3399,5 @@ mlx5_ib_show_version(void __unused *arg) } SYSINIT(mlx5_ib_show_version, SI_SUB_DRIVERS, SI_ORDER_ANY, mlx5_ib_show_version, NULL); -module_init_order(mlx5_ib_init, SI_ORDER_THIRD); -module_exit_order(mlx5_ib_cleanup, SI_ORDER_THIRD); +module_init_order(mlx5_ib_init, SI_ORDER_SEVENTH); +module_exit_order(mlx5_ib_cleanup, SI_ORDER_SEVENTH); Modified: head/sys/dev/mthca/mthca_main.c ============================================================================== --- head/sys/dev/mthca/mthca_main.c Mon Jul 6 08:36:14 2020 (r362952) +++ head/sys/dev/mthca/mthca_main.c Mon Jul 6 08:50:11 2020 (r362953) @@ -1271,8 +1271,8 @@ static void __exit mthca_cleanup(void) mthca_catas_cleanup(); } -module_init_order(mthca_init, SI_ORDER_THIRD); -module_exit(mthca_cleanup); +module_init_order(mthca_init, SI_ORDER_SEVENTH); +module_exit_order(mthca_cleanup, SI_ORDER_SEVENTH); MODULE_VERSION(mthca, 1); MODULE_DEPEND(mthca, ibcore, 1, 1, 1); Modified: head/sys/ofed/drivers/infiniband/core/ib_cm.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cm.c Mon Jul 6 08:36:14 2020 (r362952) +++ head/sys/ofed/drivers/infiniband/core/ib_cm.c Mon Jul 6 08:50:11 2020 (r362953) @@ -4180,5 +4180,5 @@ static void __exit ib_cm_cleanup(void) } module_init_order(ib_cm_init, SI_ORDER_SECOND); -module_exit_order(ib_cm_cleanup, SI_ORDER_FIRST); +module_exit_order(ib_cm_cleanup, SI_ORDER_SECOND); Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cma.c Mon Jul 6 08:36:14 2020 (r362952) +++ head/sys/ofed/drivers/infiniband/core/ib_cma.c Mon Jul 6 08:50:11 2020 (r362953) @@ -4619,5 +4619,5 @@ static void __exit cma_cleanup(void) destroy_workqueue(cma_wq); } -module_init(cma_init); -module_exit(cma_cleanup); +module_init_order(cma_init, SI_ORDER_FOURTH); +module_exit_order(cma_cleanup, SI_ORDER_FOURTH); Modified: head/sys/ofed/drivers/infiniband/core/ib_device.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_device.c Mon Jul 6 08:36:14 2020 (r362952) +++ head/sys/ofed/drivers/infiniband/core/ib_device.c Mon Jul 6 08:50:11 2020 (r362953) @@ -1060,8 +1060,25 @@ static void __exit ib_core_cleanup(void) destroy_workqueue(ib_wq); } -module_init(ib_core_init); -module_exit(ib_core_cleanup); +/* + * Typical loading and unloading order values and their use: + * + * SI_ORDER_FIRST (default for module_init): + * Core modules (PCI, infiniband) + * SI_ORDER_SECOND (default for module_exit): + * Infiniband core modules (CM) + * SI_ORDER_THIRD: + * SI_ORDER_FOURTH: + * Infiniband core modules (CMA) + * SI_ORDER_FIFTH: + * Infiniband user-space modules (UCM,UCMA,UMAD,UVERBS,IPOIB) + * SI_ORDER_SIXTH: + * Network HW driver modules + * SI_ORDER_SEVENTH: + * Infiniband HW driver modules + */ +module_init_order(ib_core_init, SI_ORDER_FIRST); +module_exit_order(ib_core_cleanup, SI_ORDER_FIRST); MODULE_VERSION(ibcore, 1); MODULE_DEPEND(ibcore, linuxkpi, 1, 1, 1); Modified: head/sys/ofed/drivers/infiniband/core/ib_iwcm.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_iwcm.c Mon Jul 6 08:36:14 2020 (r362952) +++ head/sys/ofed/drivers/infiniband/core/ib_iwcm.c Mon Jul 6 08:50:11 2020 (r362953) @@ -1052,5 +1052,5 @@ static void __exit iw_cm_cleanup(void) destroy_workqueue(iwcm_wq); } -module_init(iw_cm_init); -module_exit(iw_cm_cleanup); +module_init_order(iw_cm_init, SI_ORDER_FIRST); +module_exit_order(iw_cm_cleanup, SI_ORDER_FIRST); Modified: head/sys/ofed/drivers/infiniband/core/ib_ucm.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_ucm.c Mon Jul 6 08:36:14 2020 (r362952) +++ head/sys/ofed/drivers/infiniband/core/ib_ucm.c Mon Jul 6 08:50:11 2020 (r362953) @@ -1371,5 +1371,5 @@ static void __exit ib_ucm_cleanup(void) idr_destroy(&ctx_id_table); } -module_init_order(ib_ucm_init, SI_ORDER_THIRD); -module_exit(ib_ucm_cleanup); +module_init_order(ib_ucm_init, SI_ORDER_FIFTH); +module_exit_order(ib_ucm_cleanup, SI_ORDER_FIFTH); Modified: head/sys/ofed/drivers/infiniband/core/ib_ucma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_ucma.c Mon Jul 6 08:36:14 2020 (r362952) +++ head/sys/ofed/drivers/infiniband/core/ib_ucma.c Mon Jul 6 08:50:11 2020 (r362953) @@ -1782,5 +1782,5 @@ static void __exit ucma_cleanup(void) idr_destroy(&multicast_idr); } -module_init(ucma_init); -module_exit(ucma_cleanup); +module_init_order(ucma_init, SI_ORDER_FIFTH); +module_exit_order(ucma_cleanup, SI_ORDER_FIFTH); Modified: head/sys/ofed/drivers/infiniband/core/ib_user_mad.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_user_mad.c Mon Jul 6 08:36:14 2020 (r362952) +++ head/sys/ofed/drivers/infiniband/core/ib_user_mad.c Mon Jul 6 08:50:11 2020 (r362953) @@ -1405,5 +1405,5 @@ static void __exit ib_umad_cleanup(void) unregister_chrdev_region(overflow_maj, IB_UMAD_MAX_PORTS * 2); } -module_init_order(ib_umad_init, SI_ORDER_THIRD); -module_exit(ib_umad_cleanup); +module_init_order(ib_umad_init, SI_ORDER_FIFTH); +module_exit_order(ib_umad_cleanup, SI_ORDER_FIFTH); Modified: head/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c Mon Jul 6 08:36:14 2020 (r362952) +++ head/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c Mon Jul 6 08:50:11 2020 (r362953) @@ -1431,5 +1431,5 @@ static void __exit ib_uverbs_cleanup(void) idr_destroy(&ib_uverbs_srq_idr); } -module_init_order(ib_uverbs_init, SI_ORDER_THIRD); -module_exit(ib_uverbs_cleanup); +module_init_order(ib_uverbs_init, SI_ORDER_FIFTH); +module_exit_order(ib_uverbs_cleanup, SI_ORDER_FIFTH); Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Mon Jul 6 08:36:14 2020 (r362952) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Mon Jul 6 08:50:11 2020 (r362953) @@ -1753,8 +1753,8 @@ ipoib_resolvemulti(struct ifnet *ifp, struct sockaddr } } -module_init(ipoib_init_module); -module_exit(ipoib_cleanup_module); +module_init_order(ipoib_init_module, SI_ORDER_FIFTH); +module_exit_order(ipoib_cleanup_module, SI_ORDER_FIFTH); static int ipoib_evhand(module_t mod, int event, void *arg) Modified: head/sys/ofed/drivers/infiniband/util/madeye.c ============================================================================== --- head/sys/ofed/drivers/infiniband/util/madeye.c Mon Jul 6 08:36:14 2020 (r362952) +++ head/sys/ofed/drivers/infiniband/util/madeye.c Mon Jul 6 08:50:11 2020 (r362953) @@ -594,5 +594,5 @@ static void __exit ib_madeye_cleanup(void) ib_unregister_client(&madeye_client); } -module_init(ib_madeye_init); -module_exit(ib_madeye_cleanup); +module_init_order(ib_madeye_init, SI_ORDER_THIRD); +module_exit_order(ib_madeye_cleanup, SI_ORDER_THIRD); From owner-svn-src-head@freebsd.org Mon Jul 6 08:51:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E216360543; Mon, 6 Jul 2020 08:51:57 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0fSs0cPWz3VFP; Mon, 6 Jul 2020 08:51:57 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E48721BC7A; Mon, 6 Jul 2020 08:51:56 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0668pu9C003652; Mon, 6 Jul 2020 08:51:56 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0668puow003646; Mon, 6 Jul 2020 08:51:56 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202007060851.0668puow003646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 6 Jul 2020 08:51:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362954 - in head/sys: arm/broadcom/bcm2835 conf dev/pci X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys: arm/broadcom/bcm2835 conf dev/pci X-SVN-Commit-Revision: 362954 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 08:51:57 -0000 Author: andrew Date: Mon Jul 6 08:51:55 2020 New Revision: 362954 URL: https://svnweb.freebsd.org/changeset/base/362954 Log: Add a driver for bcm2838 PCI express controller This adds support for the Broadcom bcm2711 PCI express controller, found on the Raspberry Pi 4 (aka the bcm2838 SoC). The driver has only been developed against the soldered-on VIA XHCI controller and not tested with other end points. Submitted by: Robert Crowston Differential Revision: https://reviews.freebsd.org/D25068 Added: head/sys/arm/broadcom/bcm2835/bcm2838_pci.c (contents, props changed) Modified: head/sys/arm/broadcom/bcm2835/files.bcm283x head/sys/conf/files.arm64 head/sys/dev/pci/pci_host_generic_fdt.c head/sys/dev/pci/pci_host_generic_fdt.h Added: head/sys/arm/broadcom/bcm2835/bcm2838_pci.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/broadcom/bcm2835/bcm2838_pci.c Mon Jul 6 08:51:55 2020 (r362954) @@ -0,0 +1,743 @@ +/*- + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2020 Dr Robert Harvey Crowston + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * + * $FreeBSD$ + * + */ + +/* + * BCM2838-compatible PCI-express controller. + * + * Broadcom likes to give the same chip lots of different names. The name of + * this driver is taken from the Raspberry Pi 4 Broadcom 2838 chip. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include "pcib_if.h" +#include "msi_if.h" + +extern struct bus_space memmap_bus; + +#define BUS_SPACE_3G_MAXADDR 0xc0000000 +#define PCI_ID_VAL3 0x43c +#define CLASS_SHIFT 0x10 +#define SUBCLASS_SHIFT 0x8 + +#define REG_CONTROLLER_HW_REV 0x406c +#define REG_BRIDGE_CTRL 0x9210 +#define BRIDGE_DISABLE_FLAG 0x1 +#define BRIDGE_RESET_FLAG 0x2 +#define REG_BRIDGE_SERDES_MODE 0x4204 +#define REG_BRIDGE_CONFIG 0x4008 +#define REG_BRIDGE_MEM_WINDOW_LOW 0x4034 +#define REG_BRIDGE_MEM_WINDOW_HIGH 0x4038 +#define REG_BRIDGE_MEM_WINDOW_1 0x403c +#define REG_BRIDGE_GISB_WINDOW 0x402c +#define REG_BRIDGE_STATE 0x4068 +#define REG_BRIDGE_LINK_STATE 0x00bc +#define REG_BRIDGE_BUS_WINDOW_LOW 0x400c +#define REG_BRIDGE_BUS_WINDOW_HIGH 0x4010 +#define REG_BRIDGE_CPU_WINDOW_LOW 0x4070 +#define REG_BRIDGE_CPU_WINDOW_START_HIGH 0x4080 +#define REG_BRIDGE_CPU_WINDOW_END_HIGH 0x4084 + +#define REG_MSI_ADDR_LOW 0x4044 +#define REG_MSI_ADDR_HIGH 0x4048 +#define REG_MSI_CONFIG 0x404c +#define REG_MSI_CLR 0x4508 +#define REG_MSI_MASK_CLR 0x4514 +#define REG_MSI_RAISED 0x4500 +#define REG_MSI_EOI 0x4060 +#define NUM_MSI 32 + +#define REG_EP_CONFIG_CHOICE 0x9000 +#define REG_EP_CONFIG_DATA 0x8000 + +/* + * These values were obtained from runtime inspection of a Linux system using a + * JTAG. The very limited documentation I have obtained from Broadcom does not + * explain how to compute them. + */ +#define REG_VALUE_4GB_WINDOW 0x11 +#define REG_VALUE_4GB_CONFIG 0x88003000 +#define REG_VALUE_MSI_CONFIG 0xffe06540 + +struct bcm_pcib_irqsrc { + struct intr_irqsrc isrc; + u_int irq; + bool allocated; +}; + +struct bcm_pcib_softc { + struct generic_pcie_fdt_softc base; + device_t dev; + struct mtx config_mtx; + struct mtx msi_mtx; + struct resource *msi_irq_res; + void *msi_intr_cookie; + struct bcm_pcib_irqsrc *msi_isrcs; + pci_addr_t msi_addr; +}; + +static struct ofw_compat_data compat_data[] = { + {"brcm,bcm2711-pcie", 1}, + {"brcm,bcm7211-pcie", 1}, + {"brcm,bcm7445-pcie", 1}, + + {NULL, 0} +}; + +static int +bcm_pcib_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) + return (ENXIO); + + device_set_desc(dev, + "BCM2838-compatible PCI-express controller"); + return (BUS_PROBE_DEFAULT); +} + +static void +bcm_pcib_set_reg(struct bcm_pcib_softc *sc, uint32_t reg, uint32_t val) +{ + + bus_space_write_4(sc->base.base.bst, sc->base.base.bsh, reg, + htole32(val)); +} + +static uint32_t +bcm_pcib_read_reg(struct bcm_pcib_softc *sc, uint32_t reg) +{ + + return (le32toh(bus_space_read_4(sc->base.base.bst, sc->base.base.bsh, + reg))); +} + +static void +bcm_pcib_reset_controller(struct bcm_pcib_softc *sc) +{ + uint32_t val; + + val = bcm_pcib_read_reg(sc, REG_BRIDGE_CTRL); + val = val | BRIDGE_RESET_FLAG | BRIDGE_DISABLE_FLAG; + bcm_pcib_set_reg(sc, REG_BRIDGE_CTRL, val); + + DELAY(100); + + val = bcm_pcib_read_reg(sc, REG_BRIDGE_CTRL); + val = val & ~BRIDGE_RESET_FLAG; + bcm_pcib_set_reg(sc, REG_BRIDGE_CTRL, val); + + DELAY(100); + + bcm_pcib_set_reg(sc, REG_BRIDGE_SERDES_MODE, 0); + + DELAY(100); +} + +static void +bcm_pcib_enable_controller(struct bcm_pcib_softc *sc) +{ + uint32_t val; + + val = bcm_pcib_read_reg(sc, REG_BRIDGE_CTRL); + val = val & ~BRIDGE_DISABLE_FLAG; + bcm_pcib_set_reg(sc, REG_BRIDGE_CTRL, val); + + DELAY(100); +} + +static int +bcm_pcib_check_ranges(device_t dev) +{ + struct bcm_pcib_softc *sc; + struct pcie_range *ranges; + int error = 0, i; + + sc = device_get_softc(dev); + ranges = &sc->base.base.ranges[0]; + + /* The first range needs to be non-zero. */ + if (ranges[0].size == 0) { + device_printf(dev, "error: first outbound memory range " + "(pci addr: 0x%jx, cpu addr: 0x%jx) has zero size.\n", + ranges[0].pci_base, ranges[0].phys_base); + error = ENXIO; + } + + /* + * The controller can actually handle three distinct ranges, but we + * only implement support for one. + */ + for (i = 1; (bootverbose || error) && i < MAX_RANGES_TUPLES; ++i) { + if (ranges[i].size > 0) + device_printf(dev, + "note: outbound memory range %d (pci addr: 0x%jx, " + "cpu addr: 0x%jx, size: 0x%jx) will be ignored.\n", + i, ranges[i].pci_base, ranges[i].phys_base, + ranges[i].size); + } + + return (error); +} + +static const char * +bcm_pcib_link_state_string(uint32_t mode) +{ + + switch(mode & PCIEM_LINK_STA_SPEED) { + case 0: + return ("not up"); + case 1: + return ("2.5 GT/s"); + case 2: + return ("5.0 GT/s"); + case 4: + return ("8.0 GT/s"); + default: + return ("unknown"); + } +} + +static bus_addr_t +bcm_get_offset_and_prepare_config(struct bcm_pcib_softc *sc, u_int bus, + u_int slot, u_int func, u_int reg) +{ + /* + * Config for an end point is only available through a narrow window for + * one end point at a time. We first tell the controller which end point + * we want, then access it through the window. + */ + uint32_t func_index; + + if (bus == 0 && slot == 0 && func == 0) + /* + * Special case for root device; its config is always available + * through the zero-offset. + */ + return (reg); + + /* Tell the controller to show us the config in question. */ + func_index = PCIE_ADDR_OFFSET(bus, slot, func, 0); + bcm_pcib_set_reg(sc, REG_EP_CONFIG_CHOICE, func_index); + + return (REG_EP_CONFIG_DATA + reg); +} + +static bool +bcm_pcib_is_valid_quad(struct bcm_pcib_softc *sc, u_int bus, u_int slot, + u_int func, u_int reg) +{ + + if ((bus < sc->base.base.bus_start) || (bus > sc->base.base.bus_end)) + return (false); + if ((slot > PCI_SLOTMAX) || (func > PCI_FUNCMAX) || (reg > PCIE_REGMAX)) + return (false); + + if (bus == 0 && slot == 0 && func == 0) + return (true); + if (bus == 0) + /* + * Probing other slots and funcs on bus 0 will lock up the + * memory controller. + */ + return (false); + + return (true); +} + +static uint32_t +bcm_pcib_read_config(device_t dev, u_int bus, u_int slot, u_int func, u_int reg, + int bytes) +{ + struct bcm_pcib_softc *sc; + bus_space_handle_t h; + bus_space_tag_t t; + bus_addr_t offset; + uint32_t data; + + sc = device_get_softc(dev); + if (!bcm_pcib_is_valid_quad(sc, bus, slot, func, reg)) + return (~0U); + + mtx_lock(&sc->config_mtx); + offset = bcm_get_offset_and_prepare_config(sc, bus, slot, func, reg); + + t = sc->base.base.bst; + h = sc->base.base.bsh; + + switch (bytes) { + case 1: + data = bus_space_read_1(t, h, offset); + break; + case 2: + data = le16toh(bus_space_read_2(t, h, offset)); + break; + case 4: + data = le32toh(bus_space_read_4(t, h, offset)); + break; + default: + data = ~0U; + break; + } + + mtx_unlock(&sc->config_mtx); + return (data); +} + +static void +bcm_pcib_write_config(device_t dev, u_int bus, u_int slot, + u_int func, u_int reg, uint32_t val, int bytes) +{ + struct bcm_pcib_softc *sc; + bus_space_handle_t h; + bus_space_tag_t t; + uint32_t offset; + + sc = device_get_softc(dev); + if (!bcm_pcib_is_valid_quad(sc, bus, slot, func, reg)) + return; + + mtx_lock(&sc->config_mtx); + offset = bcm_get_offset_and_prepare_config(sc, bus, slot, func, reg); + + t = sc->base.base.bst; + h = sc->base.base.bsh; + + switch (bytes) { + case 1: + bus_space_write_1(t, h, offset, val); + break; + case 2: + bus_space_write_2(t, h, offset, htole16(val)); + break; + case 4: + bus_space_write_4(t, h, offset, htole32(val)); + break; + default: + break; + } + + mtx_unlock(&sc->config_mtx); +} + +static void +bcm_pcib_msi_intr_process(struct bcm_pcib_softc *sc, uint32_t interrupt_bitmap, + struct trapframe *tf) +{ + struct bcm_pcib_irqsrc *irqsrc; + uint32_t bit, irq; + + while ((bit = ffs(interrupt_bitmap))) { + irq = bit - 1; + + /* Acknowledge interrupt. */ + bcm_pcib_set_reg(sc, REG_MSI_CLR, 1 << irq); + + /* Send EOI. */ + bcm_pcib_set_reg(sc, REG_MSI_EOI, 1); + + /* Despatch to handler. */ + irqsrc = &sc->msi_isrcs[irq]; + if (intr_isrc_dispatch(&irqsrc->isrc, tf)) + device_printf(sc->dev, + "note: unexpected interrupt (%d) triggered.\n", + irq); + + /* Done with this interrupt. */ + interrupt_bitmap = interrupt_bitmap & ~(1 << irq); + } +} + +static int +bcm_pcib_msi_intr(void *arg) +{ + struct bcm_pcib_softc *sc; + struct trapframe *tf; + uint32_t interrupt_bitmap; + + sc = (struct bcm_pcib_softc *) arg; + tf = curthread->td_intr_frame; + + while ((interrupt_bitmap = bcm_pcib_read_reg(sc, REG_MSI_RAISED))) + bcm_pcib_msi_intr_process(sc, interrupt_bitmap, tf); + + return (FILTER_HANDLED); +} + +static int +bcm_pcib_alloc_msi(device_t dev, device_t child, int count, int maxcount, + device_t *pic, struct intr_irqsrc **srcs) +{ + struct bcm_pcib_softc *sc; + int first_int, i; + + sc = device_get_softc(dev); + mtx_lock(&sc->msi_mtx); + + /* Find a continguous region of free message-signalled interrupts. */ + for (first_int = 0; first_int + count < NUM_MSI; ) { + for (i = first_int; i < first_int + count; ++i) { + if (sc->msi_isrcs[i].allocated) + goto next; + } + goto found; +next: + first_int = i + 1; + } + + /* No appropriate region available. */ + mtx_unlock(&sc->msi_mtx); + device_printf(dev, "warning: failed to allocate %d MSI messages.\n", + count); + return (ENXIO); + +found: + /* Mark the messages as in use. */ + for (i = 0; i < count; ++i) { + sc->msi_isrcs[i + first_int].allocated = true; + srcs[i] = &(sc->msi_isrcs[i + first_int].isrc); + } + + mtx_unlock(&sc->msi_mtx); + *pic = device_get_parent(dev); + + return (0); +} + +static int +bcm_pcib_map_msi(device_t dev, device_t child, struct intr_irqsrc *isrc, + uint64_t *addr, uint32_t *data) +{ + struct bcm_pcib_softc *sc; + struct bcm_pcib_irqsrc *msi_msg; + + sc = device_get_softc(dev); + msi_msg = (struct bcm_pcib_irqsrc *) isrc; + + *addr = sc->msi_addr; + *data = (REG_VALUE_MSI_CONFIG & 0xffff) | msi_msg->irq; + return (0); +} + +static int +bcm_pcib_release_msi(device_t dev, device_t child, int count, + struct intr_irqsrc **isrc) +{ + struct bcm_pcib_softc *sc; + struct bcm_pcib_irqsrc *msi_isrc; + int i; + + sc = device_get_softc(dev); + mtx_lock(&sc->msi_mtx); + + for (i = 0; i < count; i++) { + msi_isrc = (struct bcm_pcib_irqsrc *) isrc[i]; + msi_isrc->allocated = false; + } + + mtx_unlock(&sc->msi_mtx); + return (0); +} + +static int +bcm_pcib_msi_attach(device_t dev) +{ + struct bcm_pcib_softc *sc; + phandle_t node, xref; + char const *bcm_name; + int i, rid; + + sc = device_get_softc(dev); + sc->msi_addr = 0xffffffffc; + + /* Clear any pending interrupts. */ + bcm_pcib_set_reg(sc, REG_MSI_CLR, 0xffffffff); + + rid = 1; + sc->msi_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_ACTIVE); + if (sc->msi_irq_res == NULL) { + device_printf(dev, "could not allocate MSI irq resource.\n"); + return (ENXIO); + } + + sc->msi_isrcs = malloc(sizeof(*sc->msi_isrcs) * NUM_MSI, M_DEVBUF, + M_WAITOK | M_ZERO); + + int error = bus_setup_intr(dev, sc->msi_irq_res, INTR_TYPE_BIO | + INTR_MPSAFE, bcm_pcib_msi_intr, NULL, sc, &sc->msi_intr_cookie); + if (error) { + device_printf(dev, "error: failed to setup MSI handler.\n"); + return (ENXIO); + } + + bcm_name = device_get_nameunit(dev); + for (i = 0; i < NUM_MSI; i++) { + sc->msi_isrcs[i].irq = i; + error = intr_isrc_register(&sc->msi_isrcs[i].isrc, dev, 0, + "%s,%u", bcm_name, i); + if (error) { + device_printf(dev, + "error: failed to register interrupt %d.\n", i); + return (ENXIO); + } + } + + node = ofw_bus_get_node(dev); + xref = OF_xref_from_node(node); + OF_device_register_xref(xref, dev); + + error = intr_msi_register(dev, xref); + if (error) + return (ENXIO); + + mtx_init(&sc->msi_mtx, "bcm_pcib: msi_mtx", NULL, MTX_DEF); + + bcm_pcib_set_reg(sc, REG_MSI_MASK_CLR, 0xffffffff); + bcm_pcib_set_reg(sc, REG_MSI_ADDR_LOW, (sc->msi_addr & 0xffffffff) | 1); + bcm_pcib_set_reg(sc, REG_MSI_ADDR_HIGH, (sc->msi_addr >> 32)); + bcm_pcib_set_reg(sc, REG_MSI_CONFIG, REG_VALUE_MSI_CONFIG); + + return (0); +} + +static void +bcm_pcib_relocate_bridge_window(device_t dev) +{ + /* + * In principle an out-of-bounds bridge window could be automatically + * adjusted at resource-activation time to lie within the bus address + * space by pcib_grow_window(), but that is not possible because the + * out-of-bounds resource allocation fails at allocation time. Instead, + * we will just fix up the window on the controller here, before it is + * re-discovered by pcib_probe_windows(). + */ + + struct bcm_pcib_softc *sc; + pci_addr_t base, size, new_base, new_limit; + uint16_t val; + + sc = device_get_softc(dev); + + val = bcm_pcib_read_config(dev, 0, 0, 0, PCIR_MEMBASE_1, 2); + base = PCI_PPBMEMBASE(0, val); + + val = bcm_pcib_read_config(dev, 0, 0, 0, PCIR_MEMLIMIT_1, 2); + size = PCI_PPBMEMLIMIT(0, val) - base; + + new_base = sc->base.base.ranges[0].pci_base; + val = (uint16_t) (new_base >> 16); + bcm_pcib_write_config(dev, 0, 0, 0, PCIR_MEMBASE_1, val, 2); + + new_limit = new_base + size; + val = (uint16_t) (new_limit >> 16); + bcm_pcib_write_config(dev, 0, 0, 0, PCIR_MEMLIMIT_1, val, 2); +} + +static uint32_t +encode_cpu_window_low(pci_addr_t phys_base, bus_size_t size) +{ + + return (((phys_base >> 0x10) & 0xfff0) | + ((phys_base + size - 1) & 0xfff00000)); +} + +static uint32_t +encode_cpu_window_start_high(pci_addr_t phys_base) +{ + + return ((phys_base >> 0x20) & 0xff); +} + +static uint32_t +encode_cpu_window_end_high(pci_addr_t phys_base, bus_size_t size) +{ + + return (((phys_base + size - 1) >> 0x20) & 0xff); +} + +static int +bcm_pcib_attach(device_t dev) +{ + struct bcm_pcib_softc *sc; + pci_addr_t phys_base, pci_base; + bus_size_t size; + uint32_t hardware_rev, bridge_state, link_state; + int error, tries; + + sc = device_get_softc(dev); + sc->dev = dev; + + error = pci_host_generic_setup_fdt(dev); + if (error) + return (error); + + error = bcm_pcib_check_ranges(dev); + if (error) + return (error); + + mtx_init(&sc->config_mtx, "bcm_pcib: config_mtx", NULL, MTX_DEF); + + bcm_pcib_reset_controller(sc); + + hardware_rev = bcm_pcib_read_reg(sc, REG_CONTROLLER_HW_REV) & 0xffff; + device_printf(dev, "hardware identifies as revision 0x%x.\n", + hardware_rev); + + /* + * Set PCI->CPU memory window. This encodes the inbound window showing + * up to 4 GiB of system memory to the controller, with zero offset. + * Thus, from the perspective of a device on the PCI-E bus, there is a + * 1:1 map from PCI-E bus addresses to system memory addresses. However, + * a hardware limitation means that the controller can only perform DMA + * on the lower 3 GiB of system memory. + */ + bcm_pcib_set_reg(sc, REG_BRIDGE_MEM_WINDOW_LOW, REG_VALUE_4GB_WINDOW); + bcm_pcib_set_reg(sc, REG_BRIDGE_MEM_WINDOW_HIGH, 0); + bcm_pcib_set_reg(sc, REG_BRIDGE_CONFIG, REG_VALUE_4GB_CONFIG); + bcm_pcib_set_reg(sc, REG_BRIDGE_GISB_WINDOW, 0); + bcm_pcib_set_reg(sc, REG_BRIDGE_MEM_WINDOW_1, 0); + + bcm_pcib_enable_controller(sc); + + /* Wait for controller to start. */ + for(tries = 0; ; ++tries) { + bridge_state = bcm_pcib_read_reg(sc, REG_BRIDGE_STATE); + + if ((bridge_state & 0x30) == 0x30) + /* Controller ready. */ + break; + + if (tries > 100) { + device_printf(dev, + "error: controller failed to start.\n"); + return (ENXIO); + } + + DELAY(1000); + } + + link_state = bcm_pcib_read_reg(sc, REG_BRIDGE_LINK_STATE) >> 0x10; + if (!link_state) { + device_printf(dev, "error: controller started but link is not " + "up.\n"); + return (ENXIO); + } + if (bootverbose) + device_printf(dev, "note: reported link speed is %s.\n", + bcm_pcib_link_state_string(link_state)); + + /* + * Set the CPU->PCI memory window. The map in this direction is not 1:1. + * Addresses seen by the CPU need to be adjusted to make sense to the + * controller as they pass through the window. + */ + pci_base = sc->base.base.ranges[0].pci_base; + phys_base = sc->base.base.ranges[0].phys_base; + size = sc->base.base.ranges[0].size; + + bcm_pcib_set_reg(sc, REG_BRIDGE_BUS_WINDOW_LOW, pci_base & 0xffffffff); + bcm_pcib_set_reg(sc, REG_BRIDGE_BUS_WINDOW_HIGH, pci_base >> 32); + + bcm_pcib_set_reg(sc, REG_BRIDGE_CPU_WINDOW_LOW, + encode_cpu_window_low(phys_base, size)); + bcm_pcib_set_reg(sc, REG_BRIDGE_CPU_WINDOW_START_HIGH, + encode_cpu_window_start_high(phys_base)); + bcm_pcib_set_reg(sc, REG_BRIDGE_CPU_WINDOW_END_HIGH, + encode_cpu_window_end_high(phys_base, size)); + + /* + * The controller starts up declaring itself an endpoint; readvertise it + * as a bridge. + */ + bcm_pcib_set_reg(sc, PCI_ID_VAL3, + PCIC_BRIDGE << CLASS_SHIFT | PCIS_BRIDGE_PCI << SUBCLASS_SHIFT); + + bcm_pcib_set_reg(sc, REG_BRIDGE_SERDES_MODE, 0x2); + DELAY(100); + + bcm_pcib_relocate_bridge_window(dev); + + /* Configure interrupts. */ + error = bcm_pcib_msi_attach(dev); + if (error) + return (error); + + /* Done. */ + device_add_child(dev, "pci", -1); + return (bus_generic_attach(dev)); +} + +/* + * Device method table. + */ +static device_method_t bcm_pcib_methods[] = { + /* Device interface. */ + DEVMETHOD(device_probe, bcm_pcib_probe), + DEVMETHOD(device_attach, bcm_pcib_attach), + + /* PCIB interface. */ + DEVMETHOD(pcib_read_config, bcm_pcib_read_config), + DEVMETHOD(pcib_write_config, bcm_pcib_write_config), + + /* MSI interface. */ + DEVMETHOD(msi_alloc_msi, bcm_pcib_alloc_msi), + DEVMETHOD(msi_release_msi, bcm_pcib_release_msi), + DEVMETHOD(msi_map_msi, bcm_pcib_map_msi), + + DEVMETHOD_END +}; + +DEFINE_CLASS_1(pcib, bcm_pcib_driver, bcm_pcib_methods, + sizeof(struct bcm_pcib_softc), generic_pcie_fdt_driver); + +static devclass_t bcm_pcib_devclass; +DRIVER_MODULE(pcib, simplebus, bcm_pcib_driver, bcm_pcib_devclass, 0, 0); + Modified: head/sys/arm/broadcom/bcm2835/files.bcm283x ============================================================================== --- head/sys/arm/broadcom/bcm2835/files.bcm283x Mon Jul 6 08:50:11 2020 (r362953) +++ head/sys/arm/broadcom/bcm2835/files.bcm283x Mon Jul 6 08:51:55 2020 (r362954) @@ -17,6 +17,7 @@ arm/broadcom/bcm2835/bcm2835_spi.c optional bcm2835_s arm/broadcom/bcm2835/bcm2835_vcbus.c standard arm/broadcom/bcm2835/bcm2835_vcio.c standard arm/broadcom/bcm2835/bcm2835_wdog.c standard +arm/broadcom/bcm2835/bcm2838_pci.c optional pci arm/broadcom/bcm2835/bcm283x_dwc_fdt.c optional dwcotg fdt dev/mbox/mbox_if.m standard Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Mon Jul 6 08:50:11 2020 (r362953) +++ head/sys/conf/files.arm64 Mon Jul 6 08:51:55 2020 (r362954) @@ -105,6 +105,7 @@ arm/broadcom/bcm2835/bcm2835_vcio.c optional soc_brcm arm/broadcom/bcm2835/bcm2835_wdog.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt arm/broadcom/bcm2835/bcm2836.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt arm/broadcom/bcm2835/bcm283x_dwc_fdt.c optional dwcotg fdt soc_brcm_bcm2837 | dwcotg fdt soc_brcm_bcm2838 +arm/broadcom/bcm2835/bcm2838_pci.c optional soc_brcm_bcm2838 fdt pci arm/freescale/vybrid/vf_i2c.c optional vf_i2c iicbus SOC_NXP_LS arm/mv/a37x0_gpio.c optional a37x0_gpio gpio fdt arm/mv/a37x0_iic.c optional a37x0_iic iicbus fdt Modified: head/sys/dev/pci/pci_host_generic_fdt.c ============================================================================== --- head/sys/dev/pci/pci_host_generic_fdt.c Mon Jul 6 08:50:11 2020 (r362953) +++ head/sys/dev/pci/pci_host_generic_fdt.c Mon Jul 6 08:51:55 2020 (r362954) @@ -120,7 +120,7 @@ generic_pcie_fdt_probe(device_t dev) } int -pci_host_generic_attach(device_t dev) +pci_host_generic_setup_fdt(device_t dev) { struct generic_pcie_fdt_softc *sc; phandle_t node; @@ -149,11 +149,27 @@ pci_host_generic_attach(device_t dev) /* TODO parse FDT bus ranges */ sc->base.bus_start = 0; sc->base.bus_end = 0xFF; + error = pci_host_generic_core_attach(dev); if (error != 0) return (error); ofw_bus_setup_iinfo(node, &sc->pci_iinfo, sizeof(cell_t)); + + return (0); +} + +int +pci_host_generic_attach(device_t dev) +{ + struct generic_pcie_fdt_softc *sc; + int error; + + sc = device_get_softc(dev); + + error = pci_host_generic_setup_fdt(dev); + if (error != 0) + return (error); device_add_child(dev, "pci", -1); return (bus_generic_attach(dev)); Modified: head/sys/dev/pci/pci_host_generic_fdt.h ============================================================================== --- head/sys/dev/pci/pci_host_generic_fdt.h Mon Jul 6 08:50:11 2020 (r362953) +++ head/sys/dev/pci/pci_host_generic_fdt.h Mon Jul 6 08:51:55 2020 (r362954) @@ -43,6 +43,7 @@ DECLARE_CLASS(generic_pcie_fdt_driver); struct resource *pci_host_generic_alloc_resource(device_t, device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); +int pci_host_generic_setup_fdt(device_t); int pci_host_generic_attach(device_t); int generic_pcie_get_id(device_t, device_t, enum pci_id_type, uintptr_t *); From owner-svn-src-head@freebsd.org Mon Jul 6 09:53:00 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC765362398; Mon, 6 Jul 2020 09:53:00 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0gqJ4CFdz3Ypf; Mon, 6 Jul 2020 09:53:00 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 737F81C817; Mon, 6 Jul 2020 09:53:00 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0669r0m3040922; Mon, 6 Jul 2020 09:53:00 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0669r04g040921; Mon, 6 Jul 2020 09:53:00 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202007060953.0669r04g040921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Mon, 6 Jul 2020 09:53:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362956 - head/lib/libcam X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/lib/libcam X-SVN-Commit-Revision: 362956 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 09:53:00 -0000 Author: 0mp (doc,ports committer) Date: Mon Jul 6 09:53:00 2020 New Revision: 362956 URL: https://svnweb.freebsd.org/changeset/base/362956 Log: Clean up cam.3 - Add a missing Pp [1] - Remove uses of Tn - Use "Xr open 2" when appropriate PR: 247783 [1] Submitted by: PauAmma [1] MFC after: 3 days Modified: head/lib/libcam/cam.3 Modified: head/lib/libcam/cam.3 ============================================================================== --- head/lib/libcam/cam.3 Mon Jul 6 09:04:06 2020 (r362955) +++ head/lib/libcam/cam.3 Mon Jul 6 09:53:00 2020 (r362956) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 11, 2017 +.Dd July 6, 2020 .Dt CAM 3 .Os .Sh NAME @@ -218,15 +218,12 @@ structure using .Fn cam_open_btl is similar to .Fn cam_open_spec_device , -except that it takes a -.Tn SCSI -bus, target and logical unit instead of a device name and unit number as +except that it takes a SCSI bus, +target and logical unit instead of a device name and unit number as arguments. The .Va path_id -argument is the CAM equivalent of a -.Tn SCSI -bus number. +argument is the CAM equivalent of a SCSI bus number. It represents the logical bus number in the system. The .Ar flags @@ -263,10 +260,13 @@ should be if the user wants the CAM library to allocate space for the .Va cam_device structure. +.Pp .Fn cam_close_device frees the .Va cam_device -structure allocated by one of the above open() calls, and closes the file +structure allocated by one of the above +.Xr open 2 +calls, and closes the file descriptor to the passthrough device. This routine should not be called if the user allocated space for the @@ -276,7 +276,9 @@ Instead, the user should call .Fn cam_close_spec_device . .Pp .Fn cam_close_spec_device -merely closes the file descriptor opened in one of the open() routines +merely closes the file descriptor opened in one of the +.Xr open 2 +routines described above. This function should be called when the .Va cam_device From owner-svn-src-head@freebsd.org Mon Jul 6 10:05:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 34B4C362B3B; Mon, 6 Jul 2020 10:05:36 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0h5r0X02z3Zfp; Mon, 6 Jul 2020 10:05:36 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E59C61C849; Mon, 6 Jul 2020 10:05:35 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 066A5ZUO046928; Mon, 6 Jul 2020 10:05:35 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 066A5Z5M046927; Mon, 6 Jul 2020 10:05:35 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202007061005.066A5Z5M046927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Mon, 6 Jul 2020 10:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362957 - head/bin/sh X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/bin/sh X-SVN-Commit-Revision: 362957 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 10:05:36 -0000 Author: 0mp (doc,ports committer) Date: Mon Jul 6 10:05:35 2020 New Revision: 362957 URL: https://svnweb.freebsd.org/changeset/base/362957 Log: Fix description of the "\$" sequence for PS1 The manual page documents "\$" to expand to either "$" or "#" followed by a single space. In reality, the single space character is not appended. PR: 247791 Submitted by: kd-dev@pm.me MFC after: 7 days Modified: head/bin/sh/sh.1 Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Mon Jul 6 09:53:00 2020 (r362956) +++ head/bin/sh/sh.1 Mon Jul 6 10:05:35 2020 (r362957) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd February 24, 2019 +.Dd July 6, 2020 .Dt SH 1 .Os .Sh NAME @@ -1425,9 +1425,9 @@ The final component of the current working directory. The entire path of the current working directory. .It Li \e$ Superuser status. -.Dq Li "$ " +.Dq Li "$" for normal users and -.Dq Li "# " +.Dq Li "#" for superusers. .It Li \e\e A literal backslash. From owner-svn-src-head@freebsd.org Mon Jul 6 11:58:00 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 42C2C364D43; Mon, 6 Jul 2020 11:58:00 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0kbW61R5z3gdk; Mon, 6 Jul 2020 11:57:59 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B31E31DC31; Mon, 6 Jul 2020 11:57:59 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 066BvxLu014820; Mon, 6 Jul 2020 11:57:59 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 066BvxTI014819; Mon, 6 Jul 2020 11:57:59 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <202007061157.066BvxTI014819@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Mon, 6 Jul 2020 11:57:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362958 - head/libexec/rtld-elf X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/libexec/rtld-elf X-SVN-Commit-Revision: 362958 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 11:58:00 -0000 Author: luporl Date: Mon Jul 6 11:57:59 2020 New Revision: 362958 URL: https://svnweb.freebsd.org/changeset/base/362958 Log: Handle non-PLT GNU IFUNC relocations in rtld In the last IFUNC related changes to rtld, the code that handled non-PLT GNU IFUNC relocations ended up getting lost. This could leave some relocations unhandled, causing crashes or misbehavior. This change restores the handling of these relocations, but now together with the other IFUNC relocations, allowing resolvers to reference external symbols. Reviewed by: kib MFC after: 2 weeks Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D25550 Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Mon Jul 6 10:05:35 2020 (r362957) +++ head/libexec/rtld-elf/rtld.c Mon Jul 6 11:57:59 2020 (r362958) @@ -3111,7 +3111,8 @@ resolve_object_ifunc(Obj_Entry *obj, bool bind_now, in return (0); obj->ifuncs_resolved = true; if (!obj->irelative && !obj->irelative_nonplt && - !((obj->bind_now || bind_now) && obj->gnu_ifunc)) + !((obj->bind_now || bind_now) && obj->gnu_ifunc) && + !obj->non_plt_gnu_ifunc) return (0); if (obj_disable_relro(obj) == -1 || (obj->irelative && reloc_iresolve(obj, lockstate) == -1) || @@ -3119,6 +3120,8 @@ resolve_object_ifunc(Obj_Entry *obj, bool bind_now, in lockstate) == -1) || ((obj->bind_now || bind_now) && obj->gnu_ifunc && reloc_gnu_ifunc(obj, flags, lockstate) == -1) || + (obj->non_plt_gnu_ifunc && reloc_non_plt(obj, &obj_rtld, + flags | SYMLOOK_IFUNC, lockstate) == -1) || obj_enforce_relro(obj) == -1) return (-1); return (0); From owner-svn-src-head@freebsd.org Mon Jul 6 14:52:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 95245369DA5; Mon, 6 Jul 2020 14:52:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0pSV3QGlz48sh; Mon, 6 Jul 2020 14:52:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 599871FDB0; Mon, 6 Jul 2020 14:52:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 066EqAC7025537; Mon, 6 Jul 2020 14:52:10 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 066EqAap025536; Mon, 6 Jul 2020 14:52:10 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007061452.066EqAap025536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 6 Jul 2020 14:52:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362962 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 362962 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 14:52:10 -0000 Author: markj Date: Mon Jul 6 14:52:09 2020 New Revision: 362962 URL: https://svnweb.freebsd.org/changeset/base/362962 Log: iflib: Fix handling of mbuf cluster allocation failures. When refilling an rx freelist, make sure we only update the hardware producer index if at least one cluster was allocated. Otherwise the NIC is programmed to write a previously used cluster, typically resulting in a use-after-free when packet data is written by the hardware. Also make sure that we don't update the fragment index cursor if the last allocation attempt didn't succeed. For at least Intel drivers, iflib assumes that the consumer index and fragment index cursor stay in lockstep, but this assumption was violated in the face of cluster allocation failures. Reported and tested by: pho Reviewed by: gallatin, hselasky MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25489 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Mon Jul 6 14:00:20 2020 (r362961) +++ head/sys/net/iflib.c Mon Jul 6 14:52:09 2020 (r362962) @@ -1975,7 +1975,8 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun bit_ffc(fl->ifl_rx_bitmap, fl->ifl_size, &frag_idx); MPASS(frag_idx >= 0); if ((cl = sd_cl[frag_idx]) == NULL) { - if ((cl = m_cljget(NULL, M_NOWAIT, fl->ifl_buf_size)) == NULL) + cl = m_cljget(NULL, M_NOWAIT, fl->ifl_buf_size); + if (__predict_false(cl == NULL)) break; cb_arg.error = 0; @@ -1983,12 +1984,8 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun err = bus_dmamap_load(fl->ifl_buf_tag, sd_map[frag_idx], cl, fl->ifl_buf_size, _rxq_refill_cb, &cb_arg, BUS_DMA_NOWAIT); - if (err != 0 || cb_arg.error) { - /* - * !zone_pack ? - */ - if (fl->ifl_zone == zone_pack) - uma_zfree(fl->ifl_zone, cl); + if (__predict_false(err != 0 || cb_arg.error)) { + uma_zfree(fl->ifl_zone, cl); break; } @@ -2004,9 +2001,9 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun BUS_DMASYNC_PREREAD); if (sd_m[frag_idx] == NULL) { - if ((m = m_gethdr(M_NOWAIT, MT_NOINIT)) == NULL) { + m = m_gethdr(M_NOWAIT, MT_NOINIT); + if (__predict_false(m == NULL)) break; - } sd_m[frag_idx] = m; } bit_set(fl->ifl_rx_bitmap, frag_idx); @@ -2036,25 +2033,32 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun } } - if (i) { - iru.iru_pidx = pidx; - iru.iru_count = i; - ctx->isc_rxd_refill(ctx->ifc_softc, &iru); - fl->ifl_pidx = idx; - fl->ifl_credits = credits; - } - DBG_COUNTER_INC(rxd_flush); - if (fl->ifl_pidx == 0) - pidx = fl->ifl_size - 1; - else - pidx = fl->ifl_pidx - 1; + if (n < count - 1) { + if (i != 0) { + iru.iru_pidx = pidx; + iru.iru_count = i; + ctx->isc_rxd_refill(ctx->ifc_softc, &iru); + fl->ifl_pidx = idx; + fl->ifl_credits = credits; + } + DBG_COUNTER_INC(rxd_flush); + if (fl->ifl_pidx == 0) + pidx = fl->ifl_size - 1; + else + pidx = fl->ifl_pidx - 1; - bus_dmamap_sync(fl->ifl_ifdi->idi_tag, fl->ifl_ifdi->idi_map, - BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); - ctx->isc_rxd_flush(ctx->ifc_softc, fl->ifl_rxq->ifr_id, fl->ifl_id, pidx); - fl->ifl_fragidx = frag_idx + 1; - if (fl->ifl_fragidx == fl->ifl_size) - fl->ifl_fragidx = 0; + bus_dmamap_sync(fl->ifl_ifdi->idi_tag, fl->ifl_ifdi->idi_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); + ctx->isc_rxd_flush(ctx->ifc_softc, fl->ifl_rxq->ifr_id, + fl->ifl_id, pidx); + if (__predict_true(bit_test(fl->ifl_rx_bitmap, frag_idx))) { + fl->ifl_fragidx = frag_idx + 1; + if (fl->ifl_fragidx == fl->ifl_size) + fl->ifl_fragidx = 0; + } else { + fl->ifl_fragidx = frag_idx; + } + } return (n == -1 ? 0 : IFLIB_RXEOF_EMPTY); } From owner-svn-src-head@freebsd.org Mon Jul 6 14:52:23 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F3601369DAB; Mon, 6 Jul 2020 14:52:22 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0pSk5sstz492F; Mon, 6 Jul 2020 14:52:22 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8FB6E1FD2B; Mon, 6 Jul 2020 14:52:22 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 066EqMES025589; Mon, 6 Jul 2020 14:52:22 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 066EqMhb025587; Mon, 6 Jul 2020 14:52:22 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007061452.066EqMhb025587@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 6 Jul 2020 14:52:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362963 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 362963 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 14:52:23 -0000 Author: markj Date: Mon Jul 6 14:52:21 2020 New Revision: 362963 URL: https://svnweb.freebsd.org/changeset/base/362963 Log: iflib: Fix some nits in the rx refill code. - Get rid of the ifl_vm_addrs array. It is not used by any existing consumer, so we are just dirtying a couple of cache lines for no reason. - Use uma_zalloc(fl->ifl_zone) instead of m_cljget(). Otherwise m_cljget() is doing unnecessary work to look up the correct zone, when iflib already knows what that zone is. - ifl_gen is only used when INVARIANTS is on, so make that more clear. - Fix some style nits and inconsistencies. Reviewed by: gallatin Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25490 Modified: head/sys/net/iflib.c head/sys/net/iflib.h Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Mon Jul 6 14:52:09 2020 (r362962) +++ head/sys/net/iflib.c Mon Jul 6 14:52:21 2020 (r362963) @@ -206,8 +206,6 @@ struct iflib_ctx { #define isc_rxd_pkt_get ifc_txrx.ift_rxd_pkt_get #define isc_rxd_refill ifc_txrx.ift_rxd_refill #define isc_rxd_flush ifc_txrx.ift_rxd_flush -#define isc_rxd_refill ifc_txrx.ift_rxd_refill -#define isc_rxd_refill ifc_txrx.ift_rxd_refill #define isc_legacy_intr ifc_txrx.ift_legacy_intr eventhandler_tag ifc_vlan_attach_event; eventhandler_tag ifc_vlan_detach_event; @@ -392,8 +390,7 @@ struct iflib_fl { bus_dma_tag_t ifl_buf_tag; iflib_dma_info_t ifl_ifdi; uint64_t ifl_bus_addrs[IFLIB_MAX_RX_REFRESH] __aligned(CACHE_LINE_SIZE); - caddr_t ifl_vm_addrs[IFLIB_MAX_RX_REFRESH]; - qidx_t ifl_rxd_idxs[IFLIB_MAX_RX_REFRESH]; + qidx_t ifl_rxd_idxs[IFLIB_MAX_RX_REFRESH]; } __aligned(CACHE_LINE_SIZE); static inline qidx_t @@ -854,7 +851,6 @@ netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring if (addr == NETMAP_BUF_BASE(na)) /* bad buf */ return netmap_ring_reinit(kring); - fl->ifl_vm_addrs[tmp_pidx] = addr; if (__predict_false(init)) { netmap_load_map(na, fl->ifl_buf_tag, map[nic_i], addr); @@ -1295,7 +1291,6 @@ iru_init(if_rxd_update_t iru, iflib_rxq_t rxq, uint8_t fl = &rxq->ifr_fl[flid]; iru->iru_paddrs = fl->ifl_bus_addrs; - iru->iru_vaddrs = &fl->ifl_vm_addrs[0]; iru->iru_idxs = fl->ifl_rxd_idxs; iru->iru_qsidx = rxq->ifr_id; iru->iru_buf_size = fl->ifl_buf_size; @@ -1916,7 +1911,7 @@ _rxq_refill_cb(void *arg, bus_dma_segment_t *segs, int } /** - * _iflib_fl_refill - refill an rxq free-buffer list + * iflib_fl_refill - refill an rxq free-buffer list * @ctx: the iflib context * @fl: the free list to refill * @count: the number of new buffers to allocate @@ -1925,7 +1920,7 @@ _rxq_refill_cb(void *arg, bus_dma_segment_t *segs, int * The caller must assure that @count does not exceed the queue's capacity. */ static uint8_t -_iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int count) +iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int count) { struct if_rxd_update iru; struct rxq_refill_cb_arg cb_arg; @@ -1962,12 +1957,13 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun if (n > 8) DBG_COUNTER_INC(fl_refills_large); iru_init(&iru, fl->ifl_rxq, fl->ifl_id); - while (n--) { + while (n-- > 0) { /* * We allocate an uninitialized mbuf + cluster, mbuf is * initialized after rx. * - * If the cluster is still set then we know a minimum sized packet was received + * If the cluster is still set then we know a minimum sized + * packet was received */ bit_ffc_at(fl->ifl_rx_bitmap, frag_idx, fl->ifl_size, &frag_idx); @@ -1975,7 +1971,7 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun bit_ffc(fl->ifl_rx_bitmap, fl->ifl_size, &frag_idx); MPASS(frag_idx >= 0); if ((cl = sd_cl[frag_idx]) == NULL) { - cl = m_cljget(NULL, M_NOWAIT, fl->ifl_buf_size); + cl = uma_zalloc(fl->ifl_zone, M_NOWAIT); if (__predict_false(cl == NULL)) break; @@ -1989,7 +1985,7 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun break; } - sd_ba[frag_idx] = bus_addr = cb_arg.seg.ds_addr; + sd_ba[frag_idx] = bus_addr = cb_arg.seg.ds_addr; sd_cl[frag_idx] = cl; #if MEMORY_LOGGING fl->ifl_cl_enqueued++; @@ -2014,22 +2010,23 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun DBG_COUNTER_INC(rx_allocs); fl->ifl_rxd_idxs[i] = frag_idx; fl->ifl_bus_addrs[i] = bus_addr; - fl->ifl_vm_addrs[i] = cl; credits++; i++; MPASS(credits <= fl->ifl_size); if (++idx == fl->ifl_size) { +#ifdef INVARIANTS fl->ifl_gen = 1; +#endif idx = 0; } if (n == 0 || i == IFLIB_MAX_RX_REFRESH) { iru.iru_pidx = pidx; iru.iru_count = i; ctx->isc_rxd_refill(ctx->ifc_softc, &iru); - i = 0; - pidx = idx; fl->ifl_pidx = idx; fl->ifl_credits = credits; + pidx = idx; + i = 0; } } @@ -2063,8 +2060,8 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun return (n == -1 ? 0 : IFLIB_RXEOF_EMPTY); } -static __inline uint8_t -__iflib_fl_refill_all(if_ctx_t ctx, iflib_fl_t fl) +static inline uint8_t +iflib_fl_refill_all(if_ctx_t ctx, iflib_fl_t fl) { /* we avoid allowing pidx to catch up with cidx as it confuses ixl */ int32_t reclaimable = fl->ifl_size - fl->ifl_credits - 1; @@ -2076,7 +2073,7 @@ __iflib_fl_refill_all(if_ctx_t ctx, iflib_fl_t fl) MPASS(reclaimable == delta); if (reclaimable > 0) - return (_iflib_fl_refill(ctx, fl, reclaimable)); + return (iflib_fl_refill(ctx, fl, reclaimable)); return (0); } @@ -2107,22 +2104,20 @@ iflib_fl_bufs_free(iflib_fl_t fl) bus_dmamap_sync(fl->ifl_buf_tag, sd_map, BUS_DMASYNC_POSTREAD); bus_dmamap_unload(fl->ifl_buf_tag, sd_map); - if (*sd_cl != NULL) - uma_zfree(fl->ifl_zone, *sd_cl); + uma_zfree(fl->ifl_zone, *sd_cl); + *sd_cl = NULL; if (*sd_m != NULL) { m_init(*sd_m, M_NOWAIT, MT_DATA, 0); uma_zfree(zone_mbuf, *sd_m); + *sd_m = NULL; } } else { - MPASS(*sd_cl == NULL); MPASS(*sd_m == NULL); } #if MEMORY_LOGGING fl->ifl_m_dequeued++; fl->ifl_cl_dequeued++; #endif - *sd_cl = NULL; - *sd_m = NULL; } #ifdef INVARIANTS for (i = 0; i < fl->ifl_size; i++) { @@ -2176,7 +2171,7 @@ iflib_fl_setup(iflib_fl_t fl) /* avoid pre-allocating zillions of clusters to an idle card * potentially speeding up attach */ - (void) _iflib_fl_refill(ctx, fl, min(128, fl->ifl_size)); + (void)iflib_fl_refill(ctx, fl, min(128, fl->ifl_size)); MPASS(min(128, fl->ifl_size) == fl->ifl_credits); if (min(128, fl->ifl_size) != fl->ifl_credits) return (ENOBUFS); @@ -2791,7 +2786,7 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) cidxp = &rxq->ifr_fl[0].ifl_cidx; if ((avail = iflib_rxd_avail(ctx, rxq, *cidxp, budget)) == 0) { for (i = 0, fl = &rxq->ifr_fl[0]; i < sctx->isc_nfl; i++, fl++) - retval |= __iflib_fl_refill_all(ctx, fl); + retval |= iflib_fl_refill_all(ctx, fl); DBG_COUNTER_INC(rx_unavail); return (retval); } @@ -2851,7 +2846,7 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) CURVNET_RESTORE(); /* make sure that we can refill faster than drain */ for (i = 0, fl = &rxq->ifr_fl[0]; i < sctx->isc_nfl; i++, fl++) - retval |= __iflib_fl_refill_all(ctx, fl); + retval |= iflib_fl_refill_all(ctx, fl); lro_enabled = (if_getcapenable(ifp) & IFCAP_LRO); if (lro_enabled) Modified: head/sys/net/iflib.h ============================================================================== --- head/sys/net/iflib.h Mon Jul 6 14:52:09 2020 (r362962) +++ head/sys/net/iflib.h Mon Jul 6 14:52:21 2020 (r362963) @@ -95,7 +95,6 @@ typedef struct if_rxd_info { typedef struct if_rxd_update { uint64_t *iru_paddrs; - caddr_t *iru_vaddrs; qidx_t *iru_idxs; qidx_t iru_pidx; uint16_t iru_qsidx; From owner-svn-src-head@freebsd.org Mon Jul 6 15:15:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5A44036A498; Mon, 6 Jul 2020 15:15:38 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0pzZ1hKkz4B78; Mon, 6 Jul 2020 15:15:38 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1917820594; Mon, 6 Jul 2020 15:15:38 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 066FFboZ038472; Mon, 6 Jul 2020 15:15:37 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 066FFb8D038471; Mon, 6 Jul 2020 15:15:37 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202007061515.066FFb8D038471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Mon, 6 Jul 2020 15:15:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362965 - head/sys/powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/powerpc/powernv X-SVN-Commit-Revision: 362965 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 15:15:38 -0000 Author: bdragon Date: Mon Jul 6 15:15:37 2020 New Revision: 362965 URL: https://svnweb.freebsd.org/changeset/base/362965 Log: [PowerPC] XIVE dispatch tweaks * Only read the DPCPU pointer once per xive_dispatch call. * Optimize HE decoding for the common cases. Reported by: jhibbits (in irc) Reviewed by: jhibbits Sponsored by: Tag1 Consulting, Inc. Differential Revision: https://reviews.freebsd.org/D25545 Modified: head/sys/powerpc/powernv/xive.c Modified: head/sys/powerpc/powernv/xive.c ============================================================================== --- head/sys/powerpc/powernv/xive.c Mon Jul 6 15:00:28 2020 (r362964) +++ head/sys/powerpc/powernv/xive.c Mon Jul 6 15:15:37 2020 (r362965) @@ -507,6 +507,7 @@ xive_dispatch(device_t dev, struct trapframe *tf) sc = device_get_softc(dev); + xive_cpud = DPCPU_PTR(xive_cpu_data); for (;;) { ack = xive_read_2(sc, XIVE_TM_SPC_ACK); cppr = (ack & 0xff); @@ -515,19 +516,17 @@ xive_dispatch(device_t dev, struct trapframe *tf) if (he == TM_QW3_NSR_HE_NONE) break; - switch (he) { - case TM_QW3_NSR_HE_NONE: - goto end; - case TM_QW3_NSR_HE_POOL: - case TM_QW3_NSR_HE_LSI: + + else if (__predict_false(he != TM_QW3_NSR_HE_PHYS)) { + /* + * We don't support TM_QW3_NSR_HE_POOL or + * TM_QW3_NSR_HE_LSI interrupts. + */ device_printf(dev, "Unexpected interrupt he type: %d\n", he); goto end; - case TM_QW3_NSR_HE_PHYS: - break; } - xive_cpud = DPCPU_PTR(xive_cpu_data); xive_write_1(sc, XIVE_TM_CPPR, cppr); for (;;) { From owner-svn-src-head@freebsd.org Mon Jul 6 16:33:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C306636BA8B; Mon, 6 Jul 2020 16:33:21 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0rjF4VWvz4GBb; Mon, 6 Jul 2020 16:33:21 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7DA81212A7; Mon, 6 Jul 2020 16:33:21 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 066GXLHp087145; Mon, 6 Jul 2020 16:33:21 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 066GXLDd087144; Mon, 6 Jul 2020 16:33:21 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007061633.066GXLDd087144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 6 Jul 2020 16:33:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362966 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 362966 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 16:33:21 -0000 Author: markj Date: Mon Jul 6 16:33:21 2020 New Revision: 362966 URL: https://svnweb.freebsd.org/changeset/base/362966 Log: Lift cpuset Capsicum checks into a subroutine. Otherwise the same checks are duplicated across four different system call implementations, cpuset_(get|set)(affinity|domain)(). No functional change intended. MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_cpuset.c Modified: head/sys/kern/kern_cpuset.c ============================================================================== --- head/sys/kern/kern_cpuset.c Mon Jul 6 15:15:37 2020 (r362965) +++ head/sys/kern/kern_cpuset.c Mon Jul 6 16:33:21 2020 (r362966) @@ -1582,6 +1582,25 @@ cpuset_setproc_update_set(struct proc *p, struct cpuse return (0); } +/* + * In Capability mode, the only accesses that are permitted are to the current + * thread and process' CPU and domain sets. + */ +static int +cpuset_check_capabilities(struct thread *td, cpulevel_t level, cpuwhich_t which, + id_t id) +{ + if (IN_CAPABILITY_MODE(td)) { + if (level != CPU_LEVEL_WHICH) + return (ECAPMODE); + if (which != CPU_WHICH_TID && which != CPU_WHICH_PID) + return (ECAPMODE); + if (id != -1) + return (ECAPMODE); + } + return (0); +} + #ifndef _SYS_SYSPROTO_H_ struct cpuset_args { cpusetid_t *setid; @@ -1739,15 +1758,9 @@ kern_cpuset_getaffinity(struct thread *td, cpulevel_t if (cpusetsize < sizeof(cpuset_t) || cpusetsize > CPU_MAXSIZE / NBBY) return (ERANGE); - /* In Capability mode, you can only get your own CPU set. */ - if (IN_CAPABILITY_MODE(td)) { - if (level != CPU_LEVEL_WHICH) - return (ECAPMODE); - if (which != CPU_WHICH_TID && which != CPU_WHICH_PID) - return (ECAPMODE); - if (id != -1) - return (ECAPMODE); - } + error = cpuset_check_capabilities(td, level, which, id); + if (error != 0) + return (error); size = cpusetsize; mask = malloc(size, M_TEMP, M_WAITOK | M_ZERO); error = cpuset_which(which, id, &p, &ttd, &set); @@ -1856,15 +1869,9 @@ kern_cpuset_setaffinity(struct thread *td, cpulevel_t if (cpusetsize < sizeof(cpuset_t) || cpusetsize > CPU_MAXSIZE / NBBY) return (ERANGE); - /* In Capability mode, you can only set your own CPU set. */ - if (IN_CAPABILITY_MODE(td)) { - if (level != CPU_LEVEL_WHICH) - return (ECAPMODE); - if (which != CPU_WHICH_TID && which != CPU_WHICH_PID) - return (ECAPMODE); - if (id != -1) - return (ECAPMODE); - } + error = cpuset_check_capabilities(td, level, which, id); + if (error != 0) + return (error); mask = malloc(cpusetsize, M_TEMP, M_WAITOK | M_ZERO); error = copyin(maskp, mask, cpusetsize); if (error) @@ -1987,15 +1994,9 @@ kern_cpuset_getdomain(struct thread *td, cpulevel_t le if (domainsetsize < sizeof(domainset_t) || domainsetsize > DOMAINSET_MAXSIZE / NBBY) return (ERANGE); - /* In Capability mode, you can only get your own domain set. */ - if (IN_CAPABILITY_MODE(td)) { - if (level != CPU_LEVEL_WHICH) - return (ECAPMODE); - if (which != CPU_WHICH_TID && which != CPU_WHICH_PID) - return (ECAPMODE); - if (id != -1) - return (ECAPMODE); - } + error = cpuset_check_capabilities(td, level, which, id); + if (error != 0) + return (error); mask = malloc(domainsetsize, M_TEMP, M_WAITOK | M_ZERO); bzero(&outset, sizeof(outset)); error = cpuset_which(which, id, &p, &ttd, &set); @@ -2122,15 +2123,9 @@ kern_cpuset_setdomain(struct thread *td, cpulevel_t le if (policy <= DOMAINSET_POLICY_INVALID || policy > DOMAINSET_POLICY_MAX) return (EINVAL); - /* In Capability mode, you can only set your own CPU set. */ - if (IN_CAPABILITY_MODE(td)) { - if (level != CPU_LEVEL_WHICH) - return (ECAPMODE); - if (which != CPU_WHICH_TID && which != CPU_WHICH_PID) - return (ECAPMODE); - if (id != -1) - return (ECAPMODE); - } + error = cpuset_check_capabilities(td, level, which, id); + if (error != 0) + return (error); memset(&domain, 0, sizeof(domain)); mask = malloc(domainsetsize, M_TEMP, M_WAITOK | M_ZERO); error = copyin(maskp, mask, domainsetsize); From owner-svn-src-head@freebsd.org Mon Jul 6 16:33:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 844B436BB03; Mon, 6 Jul 2020 16:33:32 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0rjR10QTz4G1n; Mon, 6 Jul 2020 16:33:30 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B9B9C213AB; Mon, 6 Jul 2020 16:33:29 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 066GXTC4087198; Mon, 6 Jul 2020 16:33:29 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 066GXTY9087195; Mon, 6 Jul 2020 16:33:29 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202007061633.066GXTY9087195@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Mon, 6 Jul 2020 16:33:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362967 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 362967 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 16:33:32 -0000 Author: kaktus Date: Mon Jul 6 16:33:28 2020 New Revision: 362967 URL: https://svnweb.freebsd.org/changeset/base/362967 Log: kern.tty_info_kstacks: add a compact format Add a more compact display format for kern.tty_info_kstacks inspired by procstat -kk. Set it as a default one. # sysctl kern.tty_info_kstacks=1 kern.tty_info_kstacks: 0 -> 1 # sleep 2 ^T load: 0.17 cmd: sleep 623 [nanslp] 0.72r 0.00u 0.00s 0% 2124k #0 0xffffffff80c4443e at mi_switch+0xbe #1 0xffffffff80c98044 at sleepq_catch_signals+0x494 #2 0xffffffff80c982c2 at sleepq_timedwait_sig+0x12 #3 0xffffffff80c43af3 at _sleep+0x193 #4 0xffffffff80c50e31 at kern_clock_nanosleep+0x1a1 #5 0xffffffff80c5119b at sys_nanosleep+0x3b #6 0xffffffff810ffc69 at amd64_syscall+0x119 #7 0xffffffff810d5520 at fast_syscall_common+0x101 sleep: about 1 second(s) left out of the original 2 ^C # sysctl kern.tty_info_kstacks=2 kern.tty_info_kstacks: 1 -> 2 # sleep 2 ^T load: 0.24 cmd: sleep 625 [nanslp] 0.81r 0.00u 0.00s 0% 2124k mi_switch+0xbe sleepq_catch_signals+0x494 sleepq_timedwait_sig+0x12 sleep+0x193 kern_clock_nanosleep+0x1a1 sys_nanosleep+0x3b amd64_syscall+0x119 fast_syscall_common+0x101 sleep: about 1 second(s) left out of the original 2 ^C Suggested by: avg Reviewed by: mjg Relnotes: yes Sponsored by: Mysterious Code Ltd. Differential Revision: https://reviews.freebsd.org/D25487 Modified: head/sys/kern/subr_stack.c head/sys/kern/tty_info.c head/sys/sys/stack.h Modified: head/sys/kern/subr_stack.c ============================================================================== --- head/sys/kern/subr_stack.c Mon Jul 6 16:33:21 2020 (r362966) +++ head/sys/kern/subr_stack.c Mon Jul 6 16:33:28 2020 (r362967) @@ -170,7 +170,8 @@ stack_print_short_ddb(const struct stack *st) * flags - M_WAITOK or M_NOWAIT (EWOULDBLOCK). */ int -stack_sbuf_print_flags(struct sbuf *sb, const struct stack *st, int flags) +stack_sbuf_print_flags(struct sbuf *sb, const struct stack *st, int flags, + enum stack_sbuf_fmt format) { char namebuf[64]; long offset; @@ -182,9 +183,19 @@ stack_sbuf_print_flags(struct sbuf *sb, const struct s &offset, flags); if (error == EWOULDBLOCK) return (error); - sbuf_printf(sb, "#%d %p at %s+%#lx\n", i, (void *)st->pcs[i], - namebuf, offset); + switch (format) { + case STACK_SBUF_FMT_LONG: + sbuf_printf(sb, "#%d %p at %s+%#lx\n", i, + (void *)st->pcs[i], namebuf, offset); + break; + case STACK_SBUF_FMT_COMPACT: + sbuf_printf(sb, "%s+%#lx ", namebuf, offset); + break; + default: + __assert_unreachable(); + } } + sbuf_nl_terminate(sb); return (0); } @@ -192,7 +203,7 @@ void stack_sbuf_print(struct sbuf *sb, const struct stack *st) { - (void)stack_sbuf_print_flags(sb, st, M_WAITOK); + (void)stack_sbuf_print_flags(sb, st, M_WAITOK, STACK_SBUF_FMT_LONG); } #if defined(DDB) || defined(WITNESS) Modified: head/sys/kern/tty_info.c ============================================================================== --- head/sys/kern/tty_info.c Mon Jul 6 16:33:21 2020 (r362966) +++ head/sys/kern/tty_info.c Mon Jul 6 16:33:28 2020 (r362967) @@ -239,10 +239,36 @@ sbuf_tty_drain(void *a, const char *d, int len) } #ifdef STACK -static bool tty_info_kstacks = true; -SYSCTL_BOOL(_kern, OID_AUTO, tty_info_kstacks, CTLFLAG_RWTUN, - &tty_info_kstacks, 0, - "Enable printing kernel stack(9) traces on ^T (tty info)"); +static int tty_info_kstacks = STACK_SBUF_FMT_LONG; + +static int +sysctl_tty_info_kstacks(SYSCTL_HANDLER_ARGS) +{ + enum stack_sbuf_fmt val; + int error; + + val = tty_info_kstacks; + error = sysctl_handle_int(oidp, &val, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + + switch (val) { + case STACK_SBUF_FMT_NONE: + case STACK_SBUF_FMT_LONG: + case STACK_SBUF_FMT_COMPACT: + tty_info_kstacks = val; + break; + default: + error = EINVAL; + } + + return (error); +} +SYSCTL_PROC(_kern, OID_AUTO, tty_info_kstacks, + CTLFLAG_RWTUN | CTLFLAG_MPSAFE | CTLTYPE_INT, NULL, 0, + sysctl_tty_info_kstacks, "I", + "Adjust format of kernel stack(9) traces on ^T (tty info): " + "0 - disabled; 1 - long; 2 - compact"); #endif /* @@ -254,7 +280,8 @@ tty_info(struct tty *tp) struct timeval rtime, utime, stime; #ifdef STACK struct stack stack; - int sterr; + int sterr, kstacks_val; + bool print_kstacks; #endif struct proc *p, *ppick; struct thread *td, *tdpick; @@ -337,7 +364,10 @@ tty_info(struct tty *tp) state = "unknown"; pctcpu = (sched_pctcpu(td) * 10000 + FSCALE / 2) >> FSHIFT; #ifdef STACK - if (tty_info_kstacks) { + kstacks_val = atomic_load_int(&tty_info_kstacks); + print_kstacks = (kstacks_val != STACK_SBUF_FMT_NONE); + + if (print_kstacks) { if (TD_IS_SWAPPED(td)) sterr = ENOENT; else @@ -366,8 +396,8 @@ tty_info(struct tty *tp) pctcpu / 100, rss); #ifdef STACK - if (tty_info_kstacks && sterr == 0) - stack_sbuf_print_flags(&sb, &stack, M_NOWAIT); + if (print_kstacks && sterr == 0) + stack_sbuf_print_flags(&sb, &stack, M_NOWAIT, kstacks_val); #endif out: Modified: head/sys/sys/stack.h ============================================================================== --- head/sys/sys/stack.h Mon Jul 6 16:33:21 2020 (r362966) +++ head/sys/sys/stack.h Mon Jul 6 16:33:28 2020 (r362967) @@ -39,6 +39,12 @@ MALLOC_DECLARE(M_STACK); struct sbuf; +enum stack_sbuf_fmt { + STACK_SBUF_FMT_NONE = 0, + STACK_SBUF_FMT_LONG = 1, + STACK_SBUF_FMT_COMPACT = 2, +}; + /* MI Routines. */ struct stack *stack_create(int); void stack_destroy(struct stack *); @@ -52,7 +58,7 @@ void stack_print_short_ddb(const struct stack *); void stack_sbuf_print(struct sbuf *, const struct stack *); void stack_sbuf_print_ddb(struct sbuf *, const struct stack *); int stack_sbuf_print_flags(struct sbuf *, const struct stack *, - int); + int, enum stack_sbuf_fmt); #ifdef KTR void stack_ktr(u_int, const char *, int, const struct stack *, u_int); From owner-svn-src-head@freebsd.org Mon Jul 6 16:34:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8C84236BB1A; Mon, 6 Jul 2020 16:34:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0rkB2z0Wz4G9T; Mon, 6 Jul 2020 16:34:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 49A1921225; Mon, 6 Jul 2020 16:34:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 066GYANO087275; Mon, 6 Jul 2020 16:34:10 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 066GYAGq087274; Mon, 6 Jul 2020 16:34:10 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007061634.066GYAGq087274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 6 Jul 2020 16:34:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362968 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 362968 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 16:34:10 -0000 Author: markj Date: Mon Jul 6 16:34:09 2020 New Revision: 362968 URL: https://svnweb.freebsd.org/changeset/base/362968 Log: Allow accesses of the caller's CPU and domain sets in capability mode. cpuset_(get|set)(affinity|domain)(2) permit a get or set of the calling thread or process' CPU and domain set in capability mode, but only when the thread or process ID is specified as -1. Extend this to cover the case where the ID actually matches the caller's TID or PID, since some code, such as our pthread_attr_get_np() implementation, always provides an explicit ID. It was not and still is not permitted to access CPU and domain sets for other threads in the same process when the process is in capability mode. This might change in the future. Submitted by: Greg V (original version) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25552 Modified: head/sys/kern/kern_cpuset.c Modified: head/sys/kern/kern_cpuset.c ============================================================================== --- head/sys/kern/kern_cpuset.c Mon Jul 6 16:33:28 2020 (r362967) +++ head/sys/kern/kern_cpuset.c Mon Jul 6 16:34:09 2020 (r362968) @@ -1595,7 +1595,9 @@ cpuset_check_capabilities(struct thread *td, cpulevel_ return (ECAPMODE); if (which != CPU_WHICH_TID && which != CPU_WHICH_PID) return (ECAPMODE); - if (id != -1) + if (id != -1 && + !(which == CPU_WHICH_TID && id == td->td_tid) && + !(which == CPU_WHICH_PID && id == td->td_proc->p_pid)) return (ECAPMODE); } return (0); From owner-svn-src-head@freebsd.org Mon Jul 6 16:34:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9C46C36B855; Mon, 6 Jul 2020 16:34:18 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0rkL0VFbz4GRl; Mon, 6 Jul 2020 16:34:17 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E4B42148D; Mon, 6 Jul 2020 16:34:16 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 066GYGNo087326; Mon, 6 Jul 2020 16:34:16 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 066GYGOu087325; Mon, 6 Jul 2020 16:34:16 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202007061634.066GYGOu087325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Mon, 6 Jul 2020 16:34:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362969 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 362969 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 16:34:19 -0000 Author: kaktus Date: Mon Jul 6 16:34:15 2020 New Revision: 362969 URL: https://svnweb.freebsd.org/changeset/base/362969 Log: kern.tty_info_kstacks: set compact format as default Modified: head/sys/kern/tty_info.c Modified: head/sys/kern/tty_info.c ============================================================================== --- head/sys/kern/tty_info.c Mon Jul 6 16:34:09 2020 (r362968) +++ head/sys/kern/tty_info.c Mon Jul 6 16:34:15 2020 (r362969) @@ -239,7 +239,7 @@ sbuf_tty_drain(void *a, const char *d, int len) } #ifdef STACK -static int tty_info_kstacks = STACK_SBUF_FMT_LONG; +static int tty_info_kstacks = STACK_SBUF_FMT_COMPACT; static int sysctl_tty_info_kstacks(SYSCTL_HANDLER_ARGS) From owner-svn-src-head@freebsd.org Mon Jul 6 16:34:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BB2AD36B47C; Mon, 6 Jul 2020 16:34:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0rkY4dkkz4GVv; Mon, 6 Jul 2020 16:34:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83E30212AB; Mon, 6 Jul 2020 16:34:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 066GYTPn087376; Mon, 6 Jul 2020 16:34:29 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 066GYTvP087375; Mon, 6 Jul 2020 16:34:29 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007061634.066GYTvP087375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 6 Jul 2020 16:34:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362970 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 362970 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 16:34:29 -0000 Author: markj Date: Mon Jul 6 16:34:29 2020 New Revision: 362970 URL: https://svnweb.freebsd.org/changeset/base/362970 Log: Permit cpuset_(get|set)domain() in capability mode. These system calls already perform validation of their parameters when called in capability mode, identical to cpuset_(get|set)affinity(). MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/capabilities.conf Modified: head/sys/kern/capabilities.conf ============================================================================== --- head/sys/kern/capabilities.conf Mon Jul 6 16:34:15 2020 (r362969) +++ head/sys/kern/capabilities.conf Mon Jul 6 16:34:29 2020 (r362970) @@ -149,8 +149,10 @@ copy_file_range ## #cpuset cpuset_getaffinity +cpuset_getdomain #cpuset_getid cpuset_setaffinity +cpuset_setdomain #cpuset_setid ## From owner-svn-src-head@freebsd.org Mon Jul 6 16:34:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA51336BBB3; Mon, 6 Jul 2020 16:34:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0rky521Vz4Gl9; Mon, 6 Jul 2020 16:34:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90F98212AF; Mon, 6 Jul 2020 16:34:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 066GYoSR087438; Mon, 6 Jul 2020 16:34:50 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 066GYoNl087436; Mon, 6 Jul 2020 16:34:50 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007061634.066GYoNl087436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 6 Jul 2020 16:34:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362971 - in head/sys: compat/freebsd32 kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: compat/freebsd32 kern X-SVN-Commit-Revision: 362971 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 16:34:50 -0000 Author: markj Date: Mon Jul 6 16:34:49 2020 New Revision: 362971 URL: https://svnweb.freebsd.org/changeset/base/362971 Log: Regenerate. Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/kern/init_sysent.c Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Mon Jul 6 16:34:29 2020 (r362970) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Mon Jul 6 16:34:49 2020 (r362971) @@ -650,8 +650,8 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_mknodat_args), (sy_call_t *)freebsd32_mknodat, AUE_MKNODAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 559 = freebsd32_mknodat */ #endif { AS(freebsd32_kevent_args), (sy_call_t *)freebsd32_kevent, AUE_KEVENT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 560 = freebsd32_kevent */ - { AS(freebsd32_cpuset_getdomain_args), (sy_call_t *)freebsd32_cpuset_getdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 561 = freebsd32_cpuset_getdomain */ - { AS(freebsd32_cpuset_setdomain_args), (sy_call_t *)freebsd32_cpuset_setdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 562 = freebsd32_cpuset_setdomain */ + { AS(freebsd32_cpuset_getdomain_args), (sy_call_t *)freebsd32_cpuset_getdomain, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 561 = freebsd32_cpuset_getdomain */ + { AS(freebsd32_cpuset_setdomain_args), (sy_call_t *)freebsd32_cpuset_setdomain, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 562 = freebsd32_cpuset_setdomain */ { AS(getrandom_args), (sy_call_t *)sys_getrandom, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 563 = getrandom */ { AS(getfhat_args), (sy_call_t *)sys_getfhat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 564 = getfhat */ { AS(fhlink_args), (sy_call_t *)sys_fhlink, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 565 = fhlink */ Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Mon Jul 6 16:34:29 2020 (r362970) +++ head/sys/kern/init_sysent.c Mon Jul 6 16:34:49 2020 (r362971) @@ -616,8 +616,8 @@ struct sysent sysent[] = { { AS(fhstatfs_args), (sy_call_t *)sys_fhstatfs, AUE_FHSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 558 = fhstatfs */ { AS(mknodat_args), (sy_call_t *)sys_mknodat, AUE_MKNODAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 559 = mknodat */ { AS(kevent_args), (sy_call_t *)sys_kevent, AUE_KEVENT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 560 = kevent */ - { AS(cpuset_getdomain_args), (sy_call_t *)sys_cpuset_getdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 561 = cpuset_getdomain */ - { AS(cpuset_setdomain_args), (sy_call_t *)sys_cpuset_setdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 562 = cpuset_setdomain */ + { AS(cpuset_getdomain_args), (sy_call_t *)sys_cpuset_getdomain, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 561 = cpuset_getdomain */ + { AS(cpuset_setdomain_args), (sy_call_t *)sys_cpuset_setdomain, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 562 = cpuset_setdomain */ { AS(getrandom_args), (sy_call_t *)sys_getrandom, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 563 = getrandom */ { AS(getfhat_args), (sy_call_t *)sys_getfhat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 564 = getfhat */ { AS(fhlink_args), (sy_call_t *)sys_fhlink, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 565 = fhlink */ From owner-svn-src-head@freebsd.org Mon Jul 6 17:47:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E2EC636CF70; Mon, 6 Jul 2020 17:47:29 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0tLn4k7Hz4L92; Mon, 6 Jul 2020 17:47:29 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8616821D55; Mon, 6 Jul 2020 17:47:29 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 066HlTTP031633; Mon, 6 Jul 2020 17:47:29 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 066HlTT8031632; Mon, 6 Jul 2020 17:47:29 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202007061747.066HlTT8031632@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Mon, 6 Jul 2020 17:47:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362972 - head/lib/libefivar X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/lib/libefivar X-SVN-Commit-Revision: 362972 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 17:47:30 -0000 Author: mhorne Date: Mon Jul 6 17:47:29 2020 New Revision: 362972 URL: https://svnweb.freebsd.org/changeset/base/362972 Log: libefivar: define MDE_CPU_RISCV64 The necessary definitions from EDK2 are present, so this allows the library to be built on RISC-V. Modified: head/lib/libefivar/efi-osdep.h Modified: head/lib/libefivar/efi-osdep.h ============================================================================== --- head/lib/libefivar/efi-osdep.h Mon Jul 6 16:34:49 2020 (r362971) +++ head/lib/libefivar/efi-osdep.h Mon Jul 6 17:47:29 2020 (r362972) @@ -104,6 +104,8 @@ typedef void VOID; #define MDE_CPU_ARM #elif defined(__aarch64__) #define MDE_CPU_AARCH64 +#elif defined(__riscv) +#define MDE_CPU_RISCV64 #endif /* FreeBSD doesn't have/use MDE_CPU_EBC or MDE_CPU_IPF (ia64) */ From owner-svn-src-head@freebsd.org Mon Jul 6 18:19:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0C79036D659; Mon, 6 Jul 2020 18:19:46 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0v416mQfz4N0v; Mon, 6 Jul 2020 18:19:45 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CABB9227D4; Mon, 6 Jul 2020 18:19:45 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 066IJjHX050165; Mon, 6 Jul 2020 18:19:45 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 066IJhE0050151; Mon, 6 Jul 2020 18:19:43 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202007061819.066IJhE0050151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Mon, 6 Jul 2020 18:19:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362973 - in head: share/mk stand stand/common stand/efi/include/riscv stand/efi/libefi stand/efi/loader stand/efi/loader/arch/riscv sys/riscv/include X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: in head: share/mk stand stand/common stand/efi/include/riscv stand/efi/libefi stand/efi/loader stand/efi/loader/arch/riscv sys/riscv/include X-SVN-Commit-Revision: 362973 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 18:19:46 -0000 Author: mhorne Date: Mon Jul 6 18:19:42 2020 New Revision: 362973 URL: https://svnweb.freebsd.org/changeset/base/362973 Log: RISC-V boot1.efi and loader.efi support This implementation doesn't have any major deviations from the other EFI ports. I've copied the boilerplate from arm and arm64. I've tested this with the following boot flows: OpenSBI (M-mode) -> u-boot (S-mode) -> loader.efi -> FreeBSD OpenSBI (M-mode) -> u-boot (S-mode) -> boot1.efi -> loader.efi -> FreeBSD Due to the way that u-boot handles secondary CPUs, OpenSBI >= v0.7 is required, as the HSM extension is needed to bring them up explicitly. Because of this, using BBL as the SBI implementation will not be possible. Additionally, there are a few recent u-boot changes that are required as well, all of which will be present in the upcoming v2020.07 release. Looks good: emaste Differential Revision: https://reviews.freebsd.org/D25135 Added: head/stand/efi/include/riscv/ head/stand/efi/include/riscv/efibind.h - copied unchanged from r362787, head/stand/efi/include/arm64/efibind.h head/stand/efi/loader/arch/riscv/ head/stand/efi/loader/arch/riscv/Makefile.inc (contents, props changed) head/stand/efi/loader/arch/riscv/exec.c - copied, changed from r362787, head/stand/efi/loader/arch/arm/exec.c head/stand/efi/loader/arch/riscv/ldscript.riscv (contents, props changed) head/stand/efi/loader/arch/riscv/start.S (contents, props changed) Modified: head/share/mk/src.opts.mk head/stand/common/self_reloc.c head/stand/defs.mk head/stand/efi/libefi/Makefile head/stand/efi/loader/copy.c head/stand/efi/loader/main.c head/stand/loader.mk head/sys/riscv/include/metadata.h Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Mon Jul 6 17:47:29 2020 (r362972) +++ head/share/mk/src.opts.mk Mon Jul 6 18:19:42 2020 (r362973) @@ -318,8 +318,8 @@ BROKEN_OPTIONS+=LIBSOFT # marked no longer broken with the switch to LLVM. BROKEN_OPTIONS+=GOOGLETEST SSP .endif -# EFI doesn't exist on mips, powerpc, or riscv. -.if ${__T:Mmips*} || ${__T:Mpowerpc*} || ${__T:Mriscv*} +# EFI doesn't exist on mips or powerpc. +.if ${__T:Mmips*} || ${__T:Mpowerpc*} BROKEN_OPTIONS+=EFI .endif # OFW is only for powerpc, exclude others Modified: head/stand/common/self_reloc.c ============================================================================== --- head/stand/common/self_reloc.c Mon Jul 6 17:47:29 2020 (r362972) +++ head/stand/common/self_reloc.c Mon Jul 6 18:19:42 2020 (r362973) @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include -#if defined(__aarch64__) || defined(__amd64__) +#if defined(__aarch64__) || defined(__amd64__) || defined(__riscv) #define ElfW_Rel Elf64_Rela #define ElfW_Dyn Elf64_Dyn #define ELFW_R_TYPE ELF64_R_TYPE @@ -55,6 +55,9 @@ __FBSDID("$FreeBSD$"); #elif defined(__i386__) #define RELOC_TYPE_NONE R_386_NONE #define RELOC_TYPE_RELATIVE R_386_RELATIVE +#elif defined(__riscv) +#define RELOC_TYPE_NONE R_RISCV_NONE +#define RELOC_TYPE_RELATIVE R_RISCV_RELATIVE #endif void self_reloc(Elf_Addr baseaddr, ElfW_Dyn *dynamic); Modified: head/stand/defs.mk ============================================================================== --- head/stand/defs.mk Mon Jul 6 17:47:29 2020 (r362972) +++ head/stand/defs.mk Mon Jul 6 18:19:42 2020 (r362973) @@ -115,13 +115,14 @@ AFLAGS+= --32 SSP_CFLAGS= # Add in the no float / no SIMD stuff and announce we're freestanding -# aarch64 and riscv don't have -msoft-float, but all others do. riscv -# currently has no /boot/loader, but may soon. +# aarch64 and riscv don't have -msoft-float, but all others do. CFLAGS+= -ffreestanding ${CFLAGS_NO_SIMD} .if ${MACHINE_CPUARCH} == "aarch64" CFLAGS+= -mgeneral-regs-only -ffixed-x18 -fPIC .elif ${MACHINE_CPUARCH} == "riscv" -CFLAGS+= -march=rv64imac -mabi=lp64 +CFLAGS+= -march=rv64imac -mabi=lp64 -fPIC +CFLAGS.clang+= -mcmodel=medium +CFLAGS.gcc+= -mcmodel=medany .else CFLAGS+= -msoft-float .endif @@ -146,6 +147,12 @@ CFLAGS+= -fPIC -mno-red-zone CFLAGS.clang+= -mno-movt CFLAGS.clang+= -mfpu=none CFLAGS+= -fPIC +.endif + +# Some RISC-V linkers have support for relaxations, while some (lld) do not +# yet. If this is the case we inhibit the compiler from emitting relaxations. +.if ${LINKER_FEATURES:Mriscv-relaxations} == "" +CFLAGS+= -mno-relax .endif # The boot loader build uses dd status=none, where possible, for reproducible Copied: head/stand/efi/include/riscv/efibind.h (from r362787, head/stand/efi/include/arm64/efibind.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/efi/include/riscv/efibind.h Mon Jul 6 18:19:42 2020 (r362973, copy of r362787, head/stand/efi/include/arm64/efibind.h) @@ -0,0 +1,217 @@ +/* $FreeBSD$ */ +/*++ + +Copyright (c) 1999 - 2003 Intel Corporation. All rights reserved +This software and associated documentation (if any) is furnished +under a license and may only be used or copied in accordance +with the terms of the license. Except as permitted by such +license, no part of this software or documentation may be +reproduced, stored in a retrieval system, or transmitted in any +form or by any means without the express written consent of +Intel Corporation. + +Module Name: + + efefind.h + +Abstract: + + EFI to compile bindings + + + + +Revision History + +--*/ + +#pragma pack() + + +#ifdef __FreeBSD__ +#include +#else +// +// Basic int types of various widths +// + +#if (__STDC_VERSION__ < 199901L ) + + // No ANSI C 1999/2000 stdint.h integer width declarations + + #ifdef _MSC_EXTENSIONS + + // Use Microsoft C compiler integer width declarations + + typedef unsigned __int64 uint64_t; + typedef __int64 int64_t; + typedef unsigned __int32 uint32_t; + typedef __int32 int32_t; + typedef unsigned __int16 uint16_t; + typedef __int16 int16_t; + typedef unsigned __int8 uint8_t; + typedef __int8 int8_t; + #else + #ifdef UNIX_LP64 + + // Use LP64 programming model from C_FLAGS for integer width declarations + + typedef unsigned long uint64_t; + typedef long int64_t; + typedef unsigned int uint32_t; + typedef int int32_t; + typedef unsigned short uint16_t; + typedef short int16_t; + typedef unsigned char uint8_t; + typedef char int8_t; + #else + + // Assume P64 programming model from C_FLAGS for integer width declarations + + typedef unsigned long long uint64_t; + typedef long long int64_t; + typedef unsigned int uint32_t; + typedef int int32_t; + typedef unsigned short uint16_t; + typedef short int16_t; + typedef unsigned char uint8_t; + typedef char int8_t; + #endif + #endif +#endif +#endif /* __FreeBSD__ */ + +// +// Basic EFI types of various widths +// + + +typedef uint64_t UINT64; +typedef int64_t INT64; +typedef uint32_t UINT32; +typedef int32_t INT32; +typedef uint16_t UINT16; +typedef int16_t INT16; +typedef uint8_t UINT8; +typedef int8_t INT8; + + +#undef VOID +#define VOID void + + +typedef int64_t INTN; +typedef uint64_t UINTN; + +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// BugBug: Code to debug +// +#define BIT63 0x8000000000000000 + +#define PLATFORM_IOBASE_ADDRESS (0xffffc000000 | BIT63) +#define PORT_TO_MEMD(_Port) (PLATFORM_IOBASE_ADDRESS | ( ( ( (_Port) & 0xfffc) << 10 ) | ( (_Port) & 0x0fff) ) ) + +// +// Macro's with casts make this much easier to use and read. +// +#define PORT_TO_MEM8D(_Port) (*(UINT8 *)(PORT_TO_MEMD(_Port))) +#define POST_CODE(_Data) (PORT_TO_MEM8D(0x80) = (_Data)) +// +// BugBug: End Debug Code!!! +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +#define EFIERR(a) (0x8000000000000000 | a) +#define EFI_ERROR_MASK 0x8000000000000000 +#define EFIERR_OEM(a) (0xc000000000000000 | a) + +#define BAD_POINTER 0xFBFBFBFBFBFBFBFB +#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFF + +#define BREAKPOINT() __break(0) + +// +// Pointers must be aligned to these address to function +// you will get an alignment fault if this value is less than 8 +// +#define MIN_ALIGNMENT_SIZE 8 + +#define ALIGN_VARIABLE(Value , Adjustment) \ + (UINTN) Adjustment = 0; \ + if((UINTN)Value % MIN_ALIGNMENT_SIZE) \ + (UINTN)Adjustment = MIN_ALIGNMENT_SIZE - ((UINTN)Value % MIN_ALIGNMENT_SIZE); \ + Value = (UINTN)Value + (UINTN)Adjustment + +// +// Define macros to create data structure signatures. +// + +#define EFI_SIGNATURE_16(A,B) ((A) | (B<<8)) +#define EFI_SIGNATURE_32(A,B,C,D) (EFI_SIGNATURE_16(A,B) | (EFI_SIGNATURE_16(C,D) << 16)) +#define EFI_SIGNATURE_64(A,B,C,D,E,F,G,H) (EFI_SIGNATURE_32(A,B,C,D) | ((UINT64)(EFI_SIGNATURE_32(E,F,G,H)) << 32)) + +// +// EFIAPI - prototype calling convention for EFI function pointers +// BOOTSERVICE - prototype for implementation of a boot service interface +// RUNTIMESERVICE - prototype for implementation of a runtime service interface +// RUNTIMEFUNCTION - prototype for implementation of a runtime function that is not a service +// RUNTIME_CODE - pragma macro for declaring runtime code +// + +#ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options + #ifdef _MSC_EXTENSIONS + #define EFIAPI __cdecl // Force C calling convention for Microsoft C compiler + #else + #define EFIAPI // Substitute expresion to force C calling convention + #endif +#endif + +#define BOOTSERVICE +#define RUNTIMESERVICE +#define RUNTIMEFUNCTION + +#define RUNTIME_CODE(a) alloc_text("rtcode", a) +#define BEGIN_RUNTIME_DATA() data_seg("rtdata") +#define END_RUNTIME_DATA() data_seg() + +#define VOLATILE volatile + +// +// BugBug: Need to find out if this is portable across compilers. +// +void __mfa (void); +#define MEMORY_FENCE() __mfa() + +#ifdef EFI_NO_INTERFACE_DECL + #define EFI_FORWARD_DECLARATION(x) + #define EFI_INTERFACE_DECL(x) +#else + #define EFI_FORWARD_DECLARATION(x) typedef struct _##x x + #define EFI_INTERFACE_DECL(x) typedef struct x +#endif + +// +// When build similar to FW, then link everything together as +// one big module. +// + +#define EFI_DRIVER_ENTRY_POINT(InitFunction) + +#define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \ + (_if)->LoadInternal(type, name, entry) +// entry(NULL, ST) + +#ifdef __FreeBSD__ +#define INTERFACE_DECL(x) struct x +#else +// +// Some compilers don't support the forward reference construct: +// typedef struct XXXXX +// +// The following macro provide a workaround for such cases. +// +#ifdef NO_INTERFACE_DECL +#define INTERFACE_DECL(x) +#else +#define INTERFACE_DECL(x) typedef struct x +#endif +#endif Modified: head/stand/efi/libefi/Makefile ============================================================================== --- head/stand/efi/libefi/Makefile Mon Jul 6 17:47:29 2020 (r362972) +++ head/stand/efi/libefi/Makefile Mon Jul 6 18:19:42 2020 (r362973) @@ -27,7 +27,8 @@ SRCS+= teken.c .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" SRCS+= time.c -.elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" +.elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \ + ${MACHINE_CPUARCH} == "riscv" SRCS+= time_event.c .endif Added: head/stand/efi/loader/arch/riscv/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/efi/loader/arch/riscv/Makefile.inc Mon Jul 6 18:19:42 2020 (r362973) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +HAVE_FDT=yes + +SRCS+= exec.c \ + efiserialio.c \ + start.S Copied and modified: head/stand/efi/loader/arch/riscv/exec.c (from r362787, head/stand/efi/loader/arch/arm/exec.c) ============================================================================== --- head/stand/efi/loader/arch/arm/exec.c Mon Jun 29 18:06:00 2020 (r362787, copy source) +++ head/stand/efi/loader/arch/riscv/exec.c Mon Jul 6 18:19:42 2020 (r362973) @@ -43,25 +43,11 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" #include "loader_efi.h" -extern vm_offset_t md_load(char *, vm_offset_t *); extern int bi_load(char *, vm_offset_t *, vm_offset_t *); static int -__elfN(arm_load)(char *filename, uint64_t dest, - struct preloaded_file **result) +__elfN(exec)(struct preloaded_file *fp) { - int r; - - r = __elfN(loadfile)(filename, dest, result); - if (r != 0) - return (r); - - return (0); -} - -static int -__elfN(arm_exec)(struct preloaded_file *fp) -{ struct file_metadata *fmp; vm_offset_t modulep, kernend; Elf_Ehdr *e; @@ -85,22 +71,22 @@ __elfN(arm_exec)(struct preloaded_file *fp) return (error); } - /* At this point we've called ExitBootServices, so we can't call - * printf or any other function that uses Boot Services */ - + /* + * At this point we've called ExitBootServices, so we can't call + * printf or any other function that uses Boot Services + */ dev_cleanup(); (*entry)((void *)modulep); panic("exec returned"); } -static struct file_format arm_elf = { - __elfN(arm_load), - __elfN(arm_exec) +static struct file_format riscv_elf = { + __elfN(loadfile), + __elfN(exec) }; struct file_format *file_formats[] = { - &arm_elf, + &riscv_elf, NULL }; - Added: head/stand/efi/loader/arch/riscv/ldscript.riscv ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/efi/loader/arch/riscv/ldscript.riscv Mon Jul 6 18:19:42 2020 (r362973) @@ -0,0 +1,87 @@ +/* $FreeBSD$ */ +OUTPUT_FORMAT("elf64-littleriscv", "elf64-littleriscv", "elf64-littleriscv") +OUTPUT_ARCH(riscv64) +ENTRY(_start) +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + . = 0; + ImageBase = .; + .text : { + *(.peheader) + *(.text .stub .text.* .gnu.linkonce.t.*) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.plt) + } =0x9090 + . = ALIGN(16); + .data : { + *(.rodata .rodata.* .gnu.linkonce.r.*) + *(.rodata1) + *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) + *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) + *(.opd) + *(.data .data.* .gnu.linkonce.d.*) + *(.data1) + *(.plabel) + + . = ALIGN(16); + __bss_start = .; + *(.sbss .sbss.* .gnu.linkonce.sb.*) + *(.scommon) + *(.dynbss) + *(.bss *.bss.*) + *(COMMON) + . = ALIGN(16); + __bss_end = .; + } + . = ALIGN(16); + set_Xcommand_set : { + __start_set_Xcommand_set = .; + *(set_Xcommand_set) + __stop_set_Xcommand_set = .; + } + set_Xficl_compile_set : { + __start_set_Xficl_compile_set = .; + *(set_Xficl_compile_set) + __stop_set_Xficl_compile_set = .; + } + . = ALIGN(16); + .sdata : { + /* + * u-boot expects the gp register to be untouched by the EFI payload, so we + * can't enable this yet. + */ + /* __global_pointer$ = . + 0x800; */ + *(.got.plt .got) + *(.sdata .sdata.* .gnu.linkonce.s.*) + *(dynsbss) + *(.scommon) + } + . = ALIGN(16); + .dynamic : { *(.dynamic) } + . = ALIGN(16); + .rela.dyn : { + *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) + *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) + *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) + *(.rela.got) + *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) + *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) + *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) + *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) + *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) + *(.rela.plt) + *(.relset_*) + *(.rela.dyn .rela.dyn.*) + } + . = ALIGN(16); + .reloc : { *(.reloc) } + . = ALIGN(16); + .dynsym : { *(.dynsym) } + _edata = .; + + /* Unused sections */ + .dynstr : { *(.dynstr) } + .hash : { *(.hash) } +} Added: head/stand/efi/loader/arch/riscv/start.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/efi/loader/arch/riscv/start.S Mon Jul 6 18:19:42 2020 (r362973) @@ -0,0 +1,168 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Mitchell Horne + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include + +/* + * We need to be a PE32+ file for EFI. On some architectures we can use + * objcopy to create the correct file, however on RISC-V we need to do + * it ourselves. + */ + +#define IMAGE_FILE_MACHINE_RISCV64 0x5064 + +#define IMAGE_SCN_CNT_CODE 0x00000020 +#define IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040 +#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000 +#define IMAGE_SCN_MEM_EXECUTE 0x20000000 +#define IMAGE_SCN_MEM_READ 0x40000000 + + .section .peheader,"a" +efi_start: + /* The MS-DOS Stub, only used to get the offset of the COFF header */ + .ascii "MZ" + .short 0 + .space 0x38 + .long pe_sig - efi_start + + /* The PE32 Signature. Needs to be 8-byte aligned */ + .align 3 +pe_sig: + .ascii "PE" + .short 0 +coff_head: + .short IMAGE_FILE_MACHINE_RISCV64 /* RISC-V 64 file */ + .short 2 /* 2 Sections */ + .long 0 /* Timestamp */ + .long 0 /* No symbol table */ + .long 0 /* No symbols */ + .short section_table - optional_header /* Optional header size */ + .short 0 /* Characteristics TODO: Fill in */ + +optional_header: + .short 0x020b /* PE32+ (64-bit addressing) */ + .byte 0 /* Major linker version */ + .byte 0 /* Minor linker version */ + .long _edata - _end_header /* Code size */ + .long 0 /* No initialized data */ + .long 0 /* No uninitialized data */ + .long _start - efi_start /* Entry point */ + .long _end_header - efi_start /* Start of code */ + +optional_windows_header: + .quad 0 /* Image base */ + .long 32 /* Section Alignment */ + .long 8 /* File alignment */ + .short 0 /* Major OS version */ + .short 0 /* Minor OS version */ + .short 0 /* Major image version */ + .short 0 /* Minor image version */ + .short 0 /* Major subsystem version */ + .short 0 /* Minor subsystem version */ + .long 0 /* Win32 version */ + .long _edata - efi_start /* Image size */ + .long _end_header - efi_start /* Header size */ + .long 0 /* Checksum */ + .short 0xa /* Subsystem (EFI app) */ + .short 0 /* DLL Characteristics */ + .quad 0 /* Stack reserve */ + .quad 0 /* Stack commit */ + .quad 0 /* Heap reserve */ + .quad 0 /* Heap commit */ + .long 0 /* Loader flags */ + .long 6 /* Number of RVAs */ + + /* RVAs: */ + .quad 0 + .quad 0 + .quad 0 + .quad 0 + .quad 0 + .quad 0 + +section_table: + /* We need a .reloc section for EFI */ + .ascii ".reloc" + .byte 0 + .byte 0 /* Pad to 8 bytes */ + .long 0 /* Virtual size */ + .long 0 /* Virtual address */ + .long 0 /* Size of raw data */ + .long 0 /* Pointer to raw data */ + .long 0 /* Pointer to relocations */ + .long 0 /* Pointer to line numbers */ + .short 0 /* Number of relocations */ + .short 0 /* Number of line numbers */ + .long (IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | \ + IMAGE_SCN_MEM_DISCARDABLE) /* Characteristics */ + + /* The contents of the loader */ + .ascii ".text" + .byte 0 + .byte 0 + .byte 0 /* Pad to 8 bytes */ + .long _edata - _end_header /* Virtual size */ + .long _end_header - efi_start /* Virtual address */ + .long _edata - _end_header /* Size of raw data */ + .long _end_header - efi_start /* Pointer to raw data */ + .long 0 /* Pointer to relocations */ + .long 0 /* Pointer to line numbers */ + .short 0 /* Number of relocations */ + .short 0 /* Number of line numbers */ + .long (IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE | \ + IMAGE_SCN_MEM_READ) /* Characteristics */ +_end_header: + + .text + .globl _start +_start: + /* Save the boot params to the stack */ + addi sp, sp, -16 + sd a0, 0(sp) + sd a1, 8(sp) + + /* Zero the BSS */ + lla t0, __bss_start + lla t1, __bss_end + +1: sd zero, 0(t0) + addi t0, t0, 8 + bltu t0, t1, 1b + + lla a0, ImageBase + lla a1, _DYNAMIC + call _C_LABEL(self_reloc) + + ld a1, 8(sp) + ld a0, 0(sp) + tail _C_LABEL(efi_main) + + /* NOTREACHED */ +2: wfi + j 2b Modified: head/stand/efi/loader/copy.c ============================================================================== --- head/stand/efi/loader/copy.c Mon Jul 6 17:47:29 2020 (r362972) +++ head/stand/efi/loader/copy.c Mon Jul 6 18:19:42 2020 (r362973) @@ -227,7 +227,7 @@ efi_copy_init(void) staging_base = staging; staging_end = staging + nr_pages * EFI_PAGE_SIZE; -#if defined(__aarch64__) || defined(__arm__) +#if defined(__aarch64__) || defined(__arm__) || defined(__riscv) /* * Round the kernel load address to a 2MiB value. This is needed * because the kernel builds a page table based on where it has @@ -277,7 +277,7 @@ before_staging: return (false); } addr = staging - nr_pages * EFI_PAGE_SIZE; -#if defined(__aarch64__) || defined(__arm__) +#if defined(__aarch64__) || defined(__arm__) || defined(__riscv) /* See efi_copy_init for why this is needed */ addr = rounddown2(addr, 2 * 1024 * 1024); #endif @@ -343,6 +343,11 @@ efi_copyout(const vm_offset_t src, void *dest, const s ssize_t efi_readin(readin_handle_t fd, vm_offset_t dest, const size_t len) { + + if (!stage_offset_set) { + stage_offset = (vm_offset_t)staging - dest; + stage_offset_set = 1; + } if (!efi_check_space(dest + stage_offset + len)) { errno = ENOMEM; Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Mon Jul 6 17:47:29 2020 (r362972) +++ head/stand/efi/loader/main.c Mon Jul 6 18:19:42 2020 (r362973) @@ -912,7 +912,7 @@ main(int argc, CHAR16 *argv[]) */ setenv("console", "efi", 1); uhowto = parse_uefi_con_out(); -#if defined(__aarch64__) || defined(__arm__) +#if defined(__aarch64__) || defined(__arm__) || defined(__riscv) if ((uhowto & RB_SERIAL) != 0) setenv("console", "comconsole", 1); #endif Modified: head/stand/loader.mk ============================================================================== --- head/stand/loader.mk Mon Jul 6 17:47:29 2020 (r362972) +++ head/stand/loader.mk Mon Jul 6 18:19:42 2020 (r362973) @@ -25,6 +25,9 @@ SRCS+= metadata.c .elif ${MACHINE} == "mips" SRCS+= load_elf32.c reloc_elf32.c SRCS+= metadata.c +.elif ${MACHINE_CPUARCH} == "riscv" +SRCS+= load_elf64.c reloc_elf64.c +SRCS+= metadata.c .endif .if ${LOADER_DISK_SUPPORT:Uyes} == "yes" Modified: head/sys/riscv/include/metadata.h ============================================================================== --- head/sys/riscv/include/metadata.h Mon Jul 6 17:47:29 2020 (r362972) +++ head/sys/riscv/include/metadata.h Mon Jul 6 18:19:42 2020 (r362973) @@ -30,6 +30,28 @@ #ifndef _MACHINE_METADATA_H_ #define _MACHINE_METADATA_H_ -#define MODINFOMD_DTBP 0x1001 +#define MODINFOMD_DTBP 0x1001 +#define MODINFOMD_EFI_MAP 0x1002 + +struct efi_map_header { + size_t memory_size; + size_t descriptor_size; + uint32_t descriptor_version; +}; + +/* + * Placeholder for now + */ +struct efi_fb { + uint64_t fb_addr; + uint64_t fb_size; + uint32_t fb_height; + uint32_t fb_width; + uint32_t fb_stride; + uint32_t fb_mask_red; + uint32_t fb_mask_green; + uint32_t fb_mask_blue; + uint32_t fb_mask_reserved; +}; #endif /* !_MACHINE_METADATA_H_ */ From owner-svn-src-head@freebsd.org Mon Jul 6 18:26:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3545036DA56; Mon, 6 Jul 2020 18:26:51 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4B0vDC0xL6z4NPk; Mon, 6 Jul 2020 18:26:51 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com [209.85.219.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id EEC95249DE; Mon, 6 Jul 2020 18:26:50 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: by mail-yb1-f175.google.com with SMTP id y13so19391785ybj.10; Mon, 06 Jul 2020 11:26:50 -0700 (PDT) X-Gm-Message-State: AOAM533AFWROifMzdY6h7r08LOq1PFetA0rKRcjv6xLcJZr2/yr+PPvl /iWSHib5HcD/0NTKYhkEFjfMVOVnu/xPPeanS74= X-Google-Smtp-Source: ABdhPJwmK0YJ7k4uG78Gg+5WlMg8Rj+dZP+k6UldZyWZcj7gf6+23RbzHmR9G39RCRQqUvUfRpb7QgX0t/gKSLaXuUI= X-Received: by 2002:a25:3851:: with SMTP id f78mr81569403yba.212.1594060009740; Mon, 06 Jul 2020 11:26:49 -0700 (PDT) MIME-Version: 1.0 References: <202007061819.066IJhE0050151@repo.freebsd.org> In-Reply-To: <202007061819.066IJhE0050151@repo.freebsd.org> From: Mitchell Horne Date: Mon, 6 Jul 2020 15:26:38 -0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r362973 - in head: share/mk stand stand/common stand/efi/include/riscv stand/efi/libefi stand/efi/loader stand/efi/loader/arch/riscv sys/riscv/include To: Mitchell Horne Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 18:26:51 -0000 On Mon, Jul 6, 2020 at 3:19 PM Mitchell Horne wrote: > > Author: mhorne > Date: Mon Jul 6 18:19:42 2020 > New Revision: 362973 > URL: https://svnweb.freebsd.org/changeset/base/362973 > > Log: > RISC-V boot1.efi and loader.efi support > > This implementation doesn't have any major deviations from the other EFI > ports. I've copied the boilerplate from arm and arm64. > > I've tested this with the following boot flows: > OpenSBI (M-mode) -> u-boot (S-mode) -> loader.efi -> FreeBSD > OpenSBI (M-mode) -> u-boot (S-mode) -> boot1.efi -> loader.efi -> FreeBSD > > Due to the way that u-boot handles secondary CPUs, OpenSBI >= v0.7 is required, > as the HSM extension is needed to bring them up explicitly. Because of this, > using BBL as the SBI implementation will not be possible. Additionally, there > are a few recent u-boot changes that are required as well, all of which will be > present in the upcoming v2020.07 release. > > Looks good: emaste > Differential Revision: https://reviews.freebsd.org/D25135 > > Added: > head/stand/efi/include/riscv/ > head/stand/efi/include/riscv/efibind.h > - copied unchanged from r362787, head/stand/efi/include/arm64/efibind.h > head/stand/efi/loader/arch/riscv/ > head/stand/efi/loader/arch/riscv/Makefile.inc (contents, props changed) > head/stand/efi/loader/arch/riscv/exec.c > - copied, changed from r362787, head/stand/efi/loader/arch/arm/exec.c > head/stand/efi/loader/arch/riscv/ldscript.riscv (contents, props changed) > head/stand/efi/loader/arch/riscv/start.S (contents, props changed) > Modified: > head/share/mk/src.opts.mk > head/stand/common/self_reloc.c > head/stand/defs.mk > head/stand/efi/libefi/Makefile > head/stand/efi/loader/copy.c > head/stand/efi/loader/main.c > head/stand/loader.mk > head/sys/riscv/include/metadata.h > > Modified: head/share/mk/src.opts.mk > ============================================================================== > --- head/share/mk/src.opts.mk Mon Jul 6 17:47:29 2020 (r362972) > +++ head/share/mk/src.opts.mk Mon Jul 6 18:19:42 2020 (r362973) > @@ -318,8 +318,8 @@ BROKEN_OPTIONS+=LIBSOFT > # marked no longer broken with the switch to LLVM. > BROKEN_OPTIONS+=GOOGLETEST SSP > .endif > -# EFI doesn't exist on mips, powerpc, or riscv. > -.if ${__T:Mmips*} || ${__T:Mpowerpc*} || ${__T:Mriscv*} > +# EFI doesn't exist on mips or powerpc. > +.if ${__T:Mmips*} || ${__T:Mpowerpc*} > BROKEN_OPTIONS+=EFI > .endif > # OFW is only for powerpc, exclude others > I meant to commit this hunk separately, but included it by mistake. The log would have been: Enable MK_EFI by default on RISC-V We can now build the EFI libraries, utilities, and bootloader. This is enough for EFI boot-time services and for us to un-break this option. Reviewed by: br Differential Revision: https://reviews.freebsd.org/D25137 > Modified: head/stand/common/self_reloc.c > ============================================================================== > --- head/stand/common/self_reloc.c Mon Jul 6 17:47:29 2020 (r362972) > +++ head/stand/common/self_reloc.c Mon Jul 6 18:19:42 2020 (r362973) > @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > -#if defined(__aarch64__) || defined(__amd64__) > +#if defined(__aarch64__) || defined(__amd64__) || defined(__riscv) > #define ElfW_Rel Elf64_Rela > #define ElfW_Dyn Elf64_Dyn > #define ELFW_R_TYPE ELF64_R_TYPE > @@ -55,6 +55,9 @@ __FBSDID("$FreeBSD$"); > #elif defined(__i386__) > #define RELOC_TYPE_NONE R_386_NONE > #define RELOC_TYPE_RELATIVE R_386_RELATIVE > +#elif defined(__riscv) > +#define RELOC_TYPE_NONE R_RISCV_NONE > +#define RELOC_TYPE_RELATIVE R_RISCV_RELATIVE > #endif > > void self_reloc(Elf_Addr baseaddr, ElfW_Dyn *dynamic); > > Modified: head/stand/defs.mk > ============================================================================== > --- head/stand/defs.mk Mon Jul 6 17:47:29 2020 (r362972) > +++ head/stand/defs.mk Mon Jul 6 18:19:42 2020 (r362973) > @@ -115,13 +115,14 @@ AFLAGS+= --32 > SSP_CFLAGS= > > # Add in the no float / no SIMD stuff and announce we're freestanding > -# aarch64 and riscv don't have -msoft-float, but all others do. riscv > -# currently has no /boot/loader, but may soon. > +# aarch64 and riscv don't have -msoft-float, but all others do. > CFLAGS+= -ffreestanding ${CFLAGS_NO_SIMD} > .if ${MACHINE_CPUARCH} == "aarch64" > CFLAGS+= -mgeneral-regs-only -ffixed-x18 -fPIC > .elif ${MACHINE_CPUARCH} == "riscv" > -CFLAGS+= -march=rv64imac -mabi=lp64 > +CFLAGS+= -march=rv64imac -mabi=lp64 -fPIC > +CFLAGS.clang+= -mcmodel=medium > +CFLAGS.gcc+= -mcmodel=medany > .else > CFLAGS+= -msoft-float > .endif > @@ -146,6 +147,12 @@ CFLAGS+= -fPIC -mno-red-zone > CFLAGS.clang+= -mno-movt > CFLAGS.clang+= -mfpu=none > CFLAGS+= -fPIC > +.endif > + > +# Some RISC-V linkers have support for relaxations, while some (lld) do not > +# yet. If this is the case we inhibit the compiler from emitting relaxations. > +.if ${LINKER_FEATURES:Mriscv-relaxations} == "" > +CFLAGS+= -mno-relax > .endif > > # The boot loader build uses dd status=none, where possible, for reproducible > > Copied: head/stand/efi/include/riscv/efibind.h (from r362787, head/stand/efi/include/arm64/efibind.h) > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/stand/efi/include/riscv/efibind.h Mon Jul 6 18:19:42 2020 (r362973, copy of r362787, head/stand/efi/include/arm64/efibind.h) > @@ -0,0 +1,217 @@ > +/* $FreeBSD$ */ > +/*++ > + > +Copyright (c) 1999 - 2003 Intel Corporation. All rights reserved > +This software and associated documentation (if any) is furnished > +under a license and may only be used or copied in accordance > +with the terms of the license. Except as permitted by such > +license, no part of this software or documentation may be > +reproduced, stored in a retrieval system, or transmitted in any > +form or by any means without the express written consent of > +Intel Corporation. > + > +Module Name: > + > + efefind.h > + > +Abstract: > + > + EFI to compile bindings > + > + > + > + > +Revision History > + > +--*/ > + > +#pragma pack() > + > + > +#ifdef __FreeBSD__ > +#include > +#else > +// > +// Basic int types of various widths > +// > + > +#if (__STDC_VERSION__ < 199901L ) > + > + // No ANSI C 1999/2000 stdint.h integer width declarations > + > + #ifdef _MSC_EXTENSIONS > + > + // Use Microsoft C compiler integer width declarations > + > + typedef unsigned __int64 uint64_t; > + typedef __int64 int64_t; > + typedef unsigned __int32 uint32_t; > + typedef __int32 int32_t; > + typedef unsigned __int16 uint16_t; > + typedef __int16 int16_t; > + typedef unsigned __int8 uint8_t; > + typedef __int8 int8_t; > + #else > + #ifdef UNIX_LP64 > + > + // Use LP64 programming model from C_FLAGS for integer width declarations > + > + typedef unsigned long uint64_t; > + typedef long int64_t; > + typedef unsigned int uint32_t; > + typedef int int32_t; > + typedef unsigned short uint16_t; > + typedef short int16_t; > + typedef unsigned char uint8_t; > + typedef char int8_t; > + #else > + > + // Assume P64 programming model from C_FLAGS for integer width declarations > + > + typedef unsigned long long uint64_t; > + typedef long long int64_t; > + typedef unsigned int uint32_t; > + typedef int int32_t; > + typedef unsigned short uint16_t; > + typedef short int16_t; > + typedef unsigned char uint8_t; > + typedef char int8_t; > + #endif > + #endif > +#endif > +#endif /* __FreeBSD__ */ > + > +// > +// Basic EFI types of various widths > +// > + > + > +typedef uint64_t UINT64; > +typedef int64_t INT64; > +typedef uint32_t UINT32; > +typedef int32_t INT32; > +typedef uint16_t UINT16; > +typedef int16_t INT16; > +typedef uint8_t UINT8; > +typedef int8_t INT8; > + > + > +#undef VOID > +#define VOID void > + > + > +typedef int64_t INTN; > +typedef uint64_t UINTN; > + > +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > +// BugBug: Code to debug > +// > +#define BIT63 0x8000000000000000 > + > +#define PLATFORM_IOBASE_ADDRESS (0xffffc000000 | BIT63) > +#define PORT_TO_MEMD(_Port) (PLATFORM_IOBASE_ADDRESS | ( ( ( (_Port) & 0xfffc) << 10 ) | ( (_Port) & 0x0fff) ) ) > + > +// > +// Macro's with casts make this much easier to use and read. > +// > +#define PORT_TO_MEM8D(_Port) (*(UINT8 *)(PORT_TO_MEMD(_Port))) > +#define POST_CODE(_Data) (PORT_TO_MEM8D(0x80) = (_Data)) > +// > +// BugBug: End Debug Code!!! > +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > + > +#define EFIERR(a) (0x8000000000000000 | a) > +#define EFI_ERROR_MASK 0x8000000000000000 > +#define EFIERR_OEM(a) (0xc000000000000000 | a) > + > +#define BAD_POINTER 0xFBFBFBFBFBFBFBFB > +#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFF > + > +#define BREAKPOINT() __break(0) > + > +// > +// Pointers must be aligned to these address to function > +// you will get an alignment fault if this value is less than 8 > +// > +#define MIN_ALIGNMENT_SIZE 8 > + > +#define ALIGN_VARIABLE(Value , Adjustment) \ > + (UINTN) Adjustment = 0; \ > + if((UINTN)Value % MIN_ALIGNMENT_SIZE) \ > + (UINTN)Adjustment = MIN_ALIGNMENT_SIZE - ((UINTN)Value % MIN_ALIGNMENT_SIZE); \ > + Value = (UINTN)Value + (UINTN)Adjustment > + > +// > +// Define macros to create data structure signatures. > +// > + > +#define EFI_SIGNATURE_16(A,B) ((A) | (B<<8)) > +#define EFI_SIGNATURE_32(A,B,C,D) (EFI_SIGNATURE_16(A,B) | (EFI_SIGNATURE_16(C,D) << 16)) > +#define EFI_SIGNATURE_64(A,B,C,D,E,F,G,H) (EFI_SIGNATURE_32(A,B,C,D) | ((UINT64)(EFI_SIGNATURE_32(E,F,G,H)) << 32)) > + > +// > +// EFIAPI - prototype calling convention for EFI function pointers > +// BOOTSERVICE - prototype for implementation of a boot service interface > +// RUNTIMESERVICE - prototype for implementation of a runtime service interface > +// RUNTIMEFUNCTION - prototype for implementation of a runtime function that is not a service > +// RUNTIME_CODE - pragma macro for declaring runtime code > +// > + > +#ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options > + #ifdef _MSC_EXTENSIONS > + #define EFIAPI __cdecl // Force C calling convention for Microsoft C compiler > + #else > + #define EFIAPI // Substitute expresion to force C calling convention > + #endif > +#endif > + > +#define BOOTSERVICE > +#define RUNTIMESERVICE > +#define RUNTIMEFUNCTION > + > +#define RUNTIME_CODE(a) alloc_text("rtcode", a) > +#define BEGIN_RUNTIME_DATA() data_seg("rtdata") > +#define END_RUNTIME_DATA() data_seg() > + > +#define VOLATILE volatile > + > +// > +// BugBug: Need to find out if this is portable across compilers. > +// > +void __mfa (void); > +#define MEMORY_FENCE() __mfa() > + > +#ifdef EFI_NO_INTERFACE_DECL > + #define EFI_FORWARD_DECLARATION(x) > + #define EFI_INTERFACE_DECL(x) > +#else > + #define EFI_FORWARD_DECLARATION(x) typedef struct _##x x > + #define EFI_INTERFACE_DECL(x) typedef struct x > +#endif > + > +// > +// When build similar to FW, then link everything together as > +// one big module. > +// > + > +#define EFI_DRIVER_ENTRY_POINT(InitFunction) > + > +#define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \ > + (_if)->LoadInternal(type, name, entry) > +// entry(NULL, ST) > + > +#ifdef __FreeBSD__ > +#define INTERFACE_DECL(x) struct x > +#else > +// > +// Some compilers don't support the forward reference construct: > +// typedef struct XXXXX > +// > +// The following macro provide a workaround for such cases. > +// > +#ifdef NO_INTERFACE_DECL > +#define INTERFACE_DECL(x) > +#else > +#define INTERFACE_DECL(x) typedef struct x > +#endif > +#endif > > Modified: head/stand/efi/libefi/Makefile > ============================================================================== > --- head/stand/efi/libefi/Makefile Mon Jul 6 17:47:29 2020 (r362972) > +++ head/stand/efi/libefi/Makefile Mon Jul 6 18:19:42 2020 (r362973) > @@ -27,7 +27,8 @@ SRCS+= teken.c > > .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" > SRCS+= time.c > -.elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" > +.elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \ > + ${MACHINE_CPUARCH} == "riscv" > SRCS+= time_event.c > .endif > > > Added: head/stand/efi/loader/arch/riscv/Makefile.inc > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/stand/efi/loader/arch/riscv/Makefile.inc Mon Jul 6 18:19:42 2020 (r362973) > @@ -0,0 +1,7 @@ > +# $FreeBSD$ > + > +HAVE_FDT=yes > + > +SRCS+= exec.c \ > + efiserialio.c \ > + start.S > > Copied and modified: head/stand/efi/loader/arch/riscv/exec.c (from r362787, head/stand/efi/loader/arch/arm/exec.c) > ============================================================================== > --- head/stand/efi/loader/arch/arm/exec.c Mon Jun 29 18:06:00 2020 (r362787, copy source) > +++ head/stand/efi/loader/arch/riscv/exec.c Mon Jul 6 18:19:42 2020 (r362973) > @@ -43,25 +43,11 @@ __FBSDID("$FreeBSD$"); > #include "bootstrap.h" > #include "loader_efi.h" > > -extern vm_offset_t md_load(char *, vm_offset_t *); > extern int bi_load(char *, vm_offset_t *, vm_offset_t *); > > static int > -__elfN(arm_load)(char *filename, uint64_t dest, > - struct preloaded_file **result) > +__elfN(exec)(struct preloaded_file *fp) > { > - int r; > - > - r = __elfN(loadfile)(filename, dest, result); > - if (r != 0) > - return (r); > - > - return (0); > -} > - > -static int > -__elfN(arm_exec)(struct preloaded_file *fp) > -{ > struct file_metadata *fmp; > vm_offset_t modulep, kernend; > Elf_Ehdr *e; > @@ -85,22 +71,22 @@ __elfN(arm_exec)(struct preloaded_file *fp) > return (error); > } > > - /* At this point we've called ExitBootServices, so we can't call > - * printf or any other function that uses Boot Services */ > - > + /* > + * At this point we've called ExitBootServices, so we can't call > + * printf or any other function that uses Boot Services > + */ > dev_cleanup(); > > (*entry)((void *)modulep); > panic("exec returned"); > } > > -static struct file_format arm_elf = { > - __elfN(arm_load), > - __elfN(arm_exec) > +static struct file_format riscv_elf = { > + __elfN(loadfile), > + __elfN(exec) > }; > > struct file_format *file_formats[] = { > - &arm_elf, > + &riscv_elf, > NULL > }; > - > > Added: head/stand/efi/loader/arch/riscv/ldscript.riscv > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/stand/efi/loader/arch/riscv/ldscript.riscv Mon Jul 6 18:19:42 2020 (r362973) > @@ -0,0 +1,87 @@ > +/* $FreeBSD$ */ > +OUTPUT_FORMAT("elf64-littleriscv", "elf64-littleriscv", "elf64-littleriscv") > +OUTPUT_ARCH(riscv64) > +ENTRY(_start) > +SECTIONS > +{ > + /* Read-only sections, merged into text segment: */ > + . = 0; > + ImageBase = .; > + .text : { > + *(.peheader) > + *(.text .stub .text.* .gnu.linkonce.t.*) > + /* .gnu.warning sections are handled specially by elf32.em. */ > + *(.gnu.warning) > + *(.plt) > + } =0x9090 > + . = ALIGN(16); > + .data : { > + *(.rodata .rodata.* .gnu.linkonce.r.*) > + *(.rodata1) > + *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) > + *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) > + *(.opd) > + *(.data .data.* .gnu.linkonce.d.*) > + *(.data1) > + *(.plabel) > + > + . = ALIGN(16); > + __bss_start = .; > + *(.sbss .sbss.* .gnu.linkonce.sb.*) > + *(.scommon) > + *(.dynbss) > + *(.bss *.bss.*) > + *(COMMON) > + . = ALIGN(16); > + __bss_end = .; > + } > + . = ALIGN(16); > + set_Xcommand_set : { > + __start_set_Xcommand_set = .; > + *(set_Xcommand_set) > + __stop_set_Xcommand_set = .; > + } > + set_Xficl_compile_set : { > + __start_set_Xficl_compile_set = .; > + *(set_Xficl_compile_set) > + __stop_set_Xficl_compile_set = .; > + } > + . = ALIGN(16); > + .sdata : { > + /* > + * u-boot expects the gp register to be untouched by the EFI payload, so we > + * can't enable this yet. > + */ > + /* __global_pointer$ = . + 0x800; */ > + *(.got.plt .got) > + *(.sdata .sdata.* .gnu.linkonce.s.*) > + *(dynsbss) > + *(.scommon) > + } > + . = ALIGN(16); > + .dynamic : { *(.dynamic) } > + . = ALIGN(16); > + .rela.dyn : { > + *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) > + *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) > + *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) > + *(.rela.got) > + *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) > + *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) > + *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) > + *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) > + *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) > + *(.rela.plt) > + *(.relset_*) > + *(.rela.dyn .rela.dyn.*) > + } > + . = ALIGN(16); > + .reloc : { *(.reloc) } > + . = ALIGN(16); > + .dynsym : { *(.dynsym) } > + _edata = .; > + > + /* Unused sections */ > + .dynstr : { *(.dynstr) } > + .hash : { *(.hash) } > +} > > Added: head/stand/efi/loader/arch/riscv/start.S > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/stand/efi/loader/arch/riscv/start.S Mon Jul 6 18:19:42 2020 (r362973) > @@ -0,0 +1,168 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2020 Mitchell Horne > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +#include > + > +/* > + * We need to be a PE32+ file for EFI. On some architectures we can use > + * objcopy to create the correct file, however on RISC-V we need to do > + * it ourselves. > + */ > + > +#define IMAGE_FILE_MACHINE_RISCV64 0x5064 > + > +#define IMAGE_SCN_CNT_CODE 0x00000020 > +#define IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040 > +#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000 > +#define IMAGE_SCN_MEM_EXECUTE 0x20000000 > +#define IMAGE_SCN_MEM_READ 0x40000000 > + > + .section .peheader,"a" > +efi_start: > + /* The MS-DOS Stub, only used to get the offset of the COFF header */ > + .ascii "MZ" > + .short 0 > + .space 0x38 > + .long pe_sig - efi_start > + > + /* The PE32 Signature. Needs to be 8-byte aligned */ > + .align 3 > +pe_sig: > + .ascii "PE" > + .short 0 > +coff_head: > + .short IMAGE_FILE_MACHINE_RISCV64 /* RISC-V 64 file */ > + .short 2 /* 2 Sections */ > + .long 0 /* Timestamp */ > + .long 0 /* No symbol table */ > + .long 0 /* No symbols */ > + .short section_table - optional_header /* Optional header size */ > + .short 0 /* Characteristics TODO: Fill in */ > + > +optional_header: > + .short 0x020b /* PE32+ (64-bit addressing) */ > + .byte 0 /* Major linker version */ > + .byte 0 /* Minor linker version */ > + .long _edata - _end_header /* Code size */ > + .long 0 /* No initialized data */ > + .long 0 /* No uninitialized data */ > + .long _start - efi_start /* Entry point */ > + .long _end_header - efi_start /* Start of code */ > + > +optional_windows_header: > + .quad 0 /* Image base */ > + .long 32 /* Section Alignment */ > + .long 8 /* File alignment */ > + .short 0 /* Major OS version */ > + .short 0 /* Minor OS version */ > + .short 0 /* Major image version */ > + .short 0 /* Minor image version */ > + .short 0 /* Major subsystem version */ > + .short 0 /* Minor subsystem version */ > + .long 0 /* Win32 version */ > + .long _edata - efi_start /* Image size */ > + .long _end_header - efi_start /* Header size */ > + .long 0 /* Checksum */ > + .short 0xa /* Subsystem (EFI app) */ > + .short 0 /* DLL Characteristics */ > + .quad 0 /* Stack reserve */ > + .quad 0 /* Stack commit */ > + .quad 0 /* Heap reserve */ > + .quad 0 /* Heap commit */ > + .long 0 /* Loader flags */ > + .long 6 /* Number of RVAs */ > + > + /* RVAs: */ > + .quad 0 > + .quad 0 > + .quad 0 > + .quad 0 > + .quad 0 > + .quad 0 > + > +section_table: > + /* We need a .reloc section for EFI */ > + .ascii ".reloc" > + .byte 0 > + .byte 0 /* Pad to 8 bytes */ > + .long 0 /* Virtual size */ > + .long 0 /* Virtual address */ > + .long 0 /* Size of raw data */ > + .long 0 /* Pointer to raw data */ > + .long 0 /* Pointer to relocations */ > + .long 0 /* Pointer to line numbers */ > + .short 0 /* Number of relocations */ > + .short 0 /* Number of line numbers */ > + .long (IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | \ > + IMAGE_SCN_MEM_DISCARDABLE) /* Characteristics */ > + > + /* The contents of the loader */ > + .ascii ".text" > + .byte 0 > + .byte 0 > + .byte 0 /* Pad to 8 bytes */ > + .long _edata - _end_header /* Virtual size */ > + .long _end_header - efi_start /* Virtual address */ > + .long _edata - _end_header /* Size of raw data */ > + .long _end_header - efi_start /* Pointer to raw data */ > + .long 0 /* Pointer to relocations */ > + .long 0 /* Pointer to line numbers */ > + .short 0 /* Number of relocations */ > + .short 0 /* Number of line numbers */ > + .long (IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE | \ > + IMAGE_SCN_MEM_READ) /* Characteristics */ > +_end_header: > + > + .text > + .globl _start > +_start: > + /* Save the boot params to the stack */ > + addi sp, sp, -16 > + sd a0, 0(sp) > + sd a1, 8(sp) > + > + /* Zero the BSS */ > + lla t0, __bss_start > + lla t1, __bss_end > + > +1: sd zero, 0(t0) > + addi t0, t0, 8 > + bltu t0, t1, 1b > + > + lla a0, ImageBase > + lla a1, _DYNAMIC > + call _C_LABEL(self_reloc) > + > + ld a1, 8(sp) > + ld a0, 0(sp) > + tail _C_LABEL(efi_main) > + > + /* NOTREACHED */ > +2: wfi > + j 2b > > Modified: head/stand/efi/loader/copy.c > ============================================================================== > --- head/stand/efi/loader/copy.c Mon Jul 6 17:47:29 2020 (r362972) > +++ head/stand/efi/loader/copy.c Mon Jul 6 18:19:42 2020 (r362973) > @@ -227,7 +227,7 @@ efi_copy_init(void) > staging_base = staging; > staging_end = staging + nr_pages * EFI_PAGE_SIZE; > > -#if defined(__aarch64__) || defined(__arm__) > +#if defined(__aarch64__) || defined(__arm__) || defined(__riscv) > /* > * Round the kernel load address to a 2MiB value. This is needed > * because the kernel builds a page table based on where it has > @@ -277,7 +277,7 @@ before_staging: > return (false); > } > addr = staging - nr_pages * EFI_PAGE_SIZE; > -#if defined(__aarch64__) || defined(__arm__) > +#if defined(__aarch64__) || defined(__arm__) || defined(__riscv) > /* See efi_copy_init for why this is needed */ > addr = rounddown2(addr, 2 * 1024 * 1024); > #endif > @@ -343,6 +343,11 @@ efi_copyout(const vm_offset_t src, void *dest, const s > ssize_t > efi_readin(readin_handle_t fd, vm_offset_t dest, const size_t len) > { > + > + if (!stage_offset_set) { > + stage_offset = (vm_offset_t)staging - dest; > + stage_offset_set = 1; > + } > > if (!efi_check_space(dest + stage_offset + len)) { > errno = ENOMEM; > > Modified: head/stand/efi/loader/main.c > ============================================================================== > --- head/stand/efi/loader/main.c Mon Jul 6 17:47:29 2020 (r362972) > +++ head/stand/efi/loader/main.c Mon Jul 6 18:19:42 2020 (r362973) > @@ -912,7 +912,7 @@ main(int argc, CHAR16 *argv[]) > */ > setenv("console", "efi", 1); > uhowto = parse_uefi_con_out(); > -#if defined(__aarch64__) || defined(__arm__) > +#if defined(__aarch64__) || defined(__arm__) || defined(__riscv) > if ((uhowto & RB_SERIAL) != 0) > setenv("console", "comconsole", 1); > #endif > > Modified: head/stand/loader.mk > ============================================================================== > --- head/stand/loader.mk Mon Jul 6 17:47:29 2020 (r362972) > +++ head/stand/loader.mk Mon Jul 6 18:19:42 2020 (r362973) > @@ -25,6 +25,9 @@ SRCS+= metadata.c > .elif ${MACHINE} == "mips" > SRCS+= load_elf32.c reloc_elf32.c > SRCS+= metadata.c > +.elif ${MACHINE_CPUARCH} == "riscv" > +SRCS+= load_elf64.c reloc_elf64.c > +SRCS+= metadata.c > .endif > > .if ${LOADER_DISK_SUPPORT:Uyes} == "yes" > > Modified: head/sys/riscv/include/metadata.h > ============================================================================== > --- head/sys/riscv/include/metadata.h Mon Jul 6 17:47:29 2020 (r362972) > +++ head/sys/riscv/include/metadata.h Mon Jul 6 18:19:42 2020 (r362973) > @@ -30,6 +30,28 @@ > #ifndef _MACHINE_METADATA_H_ > #define _MACHINE_METADATA_H_ > > -#define MODINFOMD_DTBP 0x1001 > +#define MODINFOMD_DTBP 0x1001 > +#define MODINFOMD_EFI_MAP 0x1002 > + > +struct efi_map_header { > + size_t memory_size; > + size_t descriptor_size; > + uint32_t descriptor_version; > +}; > + > +/* > + * Placeholder for now > + */ > +struct efi_fb { > + uint64_t fb_addr; > + uint64_t fb_size; > + uint32_t fb_height; > + uint32_t fb_width; > + uint32_t fb_stride; > + uint32_t fb_mask_red; > + uint32_t fb_mask_green; > + uint32_t fb_mask_blue; > + uint32_t fb_mask_reserved; > +}; > > #endif /* !_MACHINE_METADATA_H_ */ From owner-svn-src-head@freebsd.org Mon Jul 6 18:43:00 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B95C136E206; Mon, 6 Jul 2020 18:43:00 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0vZr4VYYz4PSn; Mon, 6 Jul 2020 18:43:00 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7EDFB22CA4; Mon, 6 Jul 2020 18:43:00 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 066Ih097068505; Mon, 6 Jul 2020 18:43:00 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 066Ih01S068504; Mon, 6 Jul 2020 18:43:00 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202007061843.066Ih01S068504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Mon, 6 Jul 2020 18:43:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362974 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 362974 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 18:43:00 -0000 Author: mhorne Date: Mon Jul 6 18:43:00 2020 New Revision: 362974 URL: https://svnweb.freebsd.org/changeset/base/362974 Log: src.conf.5: regen after r362972, r362973, RISC-V EFI support Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Mon Jul 6 18:19:42 2020 (r362973) +++ head/share/man/man5/src.conf.5 Mon Jul 6 18:43:00 2020 (r362974) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd June 24, 2020 +.Dd July 6, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -585,7 +585,7 @@ and .Xr efivar 8 . .Pp This is a default setting on -mips/mips, mips/mips64, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. +mips/mips, mips/mips64, powerpc/powerpc and powerpc/powerpc64. .It Va WITH_EFI Set to build .Xr efivar 3 @@ -593,7 +593,7 @@ and .Xr efivar 8 . .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64 and i386/i386. +amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, riscv/riscv64 and riscv/riscv64sf. .It Va WITHOUT_ELFTOOLCHAIN_BOOTSTRAP Set to not build ELF Tool Chain tools (addr2line, nm, size, strings and strip) From owner-svn-src-head@freebsd.org Mon Jul 6 20:54:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1EC5D348A17; Mon, 6 Jul 2020 20:54:40 +0000 (UTC) (envelope-from gonzo@freebsd.org) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0yVl6zPPz4Y7W; Mon, 6 Jul 2020 20:54:39 +0000 (UTC) (envelope-from gonzo@freebsd.org) Received: from localhost ([127.0.0.1] helo=id.bluezbox.com) by id.bluezbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94 (FreeBSD)) (envelope-from ) id 1jsY8M-000Ogj-BH; Mon, 06 Jul 2020 13:54:38 -0700 Received: (from gonzo@localhost) by id.bluezbox.com (8.15.2/8.15.2/Submit) id 066KschI094904; Mon, 6 Jul 2020 13:54:38 -0700 (PDT) (envelope-from gonzo@freebsd.org) X-Authentication-Warning: id.bluezbox.com: gonzo set sender to gonzo@freebsd.org using -f Date: Mon, 6 Jul 2020 13:54:38 -0700 From: Oleksandr Tymoshenko To: Peter Jeremy Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362736 - head/sys/arm64/rockchip Message-ID: <20200706205438.GA94576@bluezbox.com> References: <202006282111.05SLBAAq025544@repo.freebsd.org> <20200701085747.GA23928@server.rulingia.com> <20200701124738.GA30133@server.rulingia.com> <20200703002623.GA18584@bluezbox.com> <20200705000739.GE30039@server.rulingia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200705000739.GE30039@server.rulingia.com> X-Operating-System: FreeBSD/11.2-RELEASE-p10 (amd64) X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: Peter Jeremy (peter@rulingia.com) wrote: > On 2020-Jul-02 17:26:23 -0700, Oleksandr Tymoshenko wrote: > >Could you try kernel with this patch? It's mostly debug output, > >with one [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Rspamd-Queue-Id: 4B0yVl6zPPz4Y7W X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:14061, ipnet:45.55.0.0/19, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 20:54:40 -0000 Peter Jeremy (peter@rulingia.com) wrote: > On 2020-Jul-02 17:26:23 -0700, Oleksandr Tymoshenko wrote: > >Could you try kernel with this patch? It's mostly debug output, > >with one possible clock-related fix. > > > >https://people.freebsd.org/~gonzo/patches/rk3328-gmac-debug.patch > > It's still not working for me. I get the following: > dwc0: mem 0xff540000-0xff54ffff irq 44 on ofwbus0 > setting RK3328 RX/TX delays: 24/36 > >>> RK3328_GRF_MAC_CON1 (00000413): > >>> gmac2io_gmii_clk_sel: 0x0 > >>> gmac2io_rmii_extclk_sel: 0x1 > >>> gmac2io_rmii_mode: 0x0 > >>> gmac2io_rmii_clk_sel: 0x0 > >>> gmac2io_phy_intf_sel: 0x1 > >>> gmac2io_flowctrl: 0x0 > >>> gmac2io_rxclk_dly_ena: 0x1 > >>> gmac2io_txclk_dly_ena: 0x1 > >>> RK3328_GRF_MAC_CON0 (00000c24): > miibus0: on dwc0 > rgephy0: PHY 0 on miibus0 > rgephy0: OUI 0x00e04c, model 0x0011, rev. 6 > rgephy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto Thanks for running the test. Register values seem OK :( > >I have Rock64 v2, which, as you mentioned, has a known issue with GigE, so > >my tests are not reliable. I'll try to get another RK3328 board for tests, > >but it may take some time. > > I've asked on -arm if anyone else has tried this on a Rock64 v2 or v3. > > >If the clock fix doesn't help, I'll make > >delays configuration run-time configurable with off by default until > >more hardware is tested. > > That sounds like a good way forward - maybe boot and run-time configurable. > It's a pity that there doesn't seem to be any documentation on what the > numbers represent (or what the "default" value is) - which means that > actually adjusting the delay numbers would be very time consuming. There are no "default" values AFAIK. They depend on the board schematics. I was told that Rockhip partners use some kind of proprietary tool which they feed with values based on the scematics (like trace lengths) and tool calculates delays. With boot-time or run-time configuration I think it's possible to automate the search for good value. Something like this: https://github.com/ayufan-rock64/linux-build/blob/master/recipes/gmac-delays-test/range-test but with loader.conf modifications instead of DTB -- gonzo From owner-svn-src-head@freebsd.org Mon Jul 6 21:20:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 926CD3491A7; Mon, 6 Jul 2020 21:20:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0z563PSxz4ZmR; Mon, 6 Jul 2020 21:20:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 56EA324912; Mon, 6 Jul 2020 21:20:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 066LKw7v063633; Mon, 6 Jul 2020 21:20:58 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 066LKwdV063632; Mon, 6 Jul 2020 21:20:58 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007062120.066LKwdV063632@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 6 Jul 2020 21:20:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362976 - head/sys/net/route X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/net/route X-SVN-Commit-Revision: 362976 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 21:20:58 -0000 Author: markj Date: Mon Jul 6 21:20:57 2020 New Revision: 362976 URL: https://svnweb.freebsd.org/changeset/base/362976 Log: Split nhop_ref_object(). Now nhop_ref_object() unconditionally acquires a reference, and the new nhop_try_ref_object() uses refcount_acquire_if_not_zero() to conditionally acquire a reference. Since the former is cheaper, use it when we know that the initial counter value is non-zero. No functional change intended. Reviewed by: melifaro Differential Revision: https://reviews.freebsd.org/D25535 Modified: head/sys/net/route/nhop_ctl.c head/sys/net/route/shared.h Modified: head/sys/net/route/nhop_ctl.c ============================================================================== --- head/sys/net/route/nhop_ctl.c Mon Jul 6 20:23:14 2020 (r362975) +++ head/sys/net/route/nhop_ctl.c Mon Jul 6 21:20:57 2020 (r362976) @@ -598,10 +598,19 @@ destroy_nhop_epoch(epoch_context_t ctx) destroy_nhop(nh_priv); } -int +void nhop_ref_object(struct nhop_object *nh) { + u_int old; + old = refcount_acquire(&nh->nh_priv->nh_refcnt); + KASSERT(old > 0, ("%s: nhop object %p has 0 refs", __func__, nh)); +} + +int +nhop_try_ref_object(struct nhop_object *nh) +{ + return (refcount_acquire_if_not_zero(&nh->nh_priv->nh_refcnt)); } @@ -654,7 +663,7 @@ int nhop_ref_any(struct nhop_object *nh) { - return (nhop_ref_object(nh)); + return (nhop_try_ref_object(nh)); } void Modified: head/sys/net/route/shared.h ============================================================================== --- head/sys/net/route/shared.h Mon Jul 6 20:23:14 2020 (r362975) +++ head/sys/net/route/shared.h Mon Jul 6 21:20:57 2020 (r362976) @@ -51,7 +51,8 @@ struct rib_head; void nhops_init(void); int nhops_init_rib(struct rib_head *rh); void nhops_destroy_rib(struct rib_head *rh); -int nhop_ref_object(struct nhop_object *nh); +void nhop_ref_object(struct nhop_object *nh); +int nhop_try_ref_object(struct nhop_object *nh); int nhop_ref_any(struct nhop_object *nh); void nhop_free_any(struct nhop_object *nh); From owner-svn-src-head@freebsd.org Mon Jul 6 21:29:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0A5E03492D1; Mon, 6 Jul 2020 21:29:51 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0zHL6V1Pz4Zy6; Mon, 6 Jul 2020 21:29:50 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A811C24A27; Mon, 6 Jul 2020 21:29:50 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 066LToVf067105; Mon, 6 Jul 2020 21:29:50 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 066LToSl067104; Mon, 6 Jul 2020 21:29:50 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202007062129.066LToSl067104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Mon, 6 Jul 2020 21:29:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362977 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 362977 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 21:29:51 -0000 Author: kp Date: Mon Jul 6 21:29:50 2020 New Revision: 362977 URL: https://svnweb.freebsd.org/changeset/base/362977 Log: riscv plic: Do not complete interrupts until the interrupt handler has run We cannot complete the interrupt (i.e. write to the claims/complete register until the interrupt handler has actually run. We don't run the interrupt handler immediately from intr_isrc_dispatch(), we only schedule it for later execution. If we immediately complete it (i.e. before the interrupt handler proper has run) the interrupt may be triggered again if the interrupt source remains set. From RISC-V Instruction Set Manual: Volume II: Priviliged Architecture, 7.4 Interrupt Gateways: "If a level-sensitive interrupt source deasserts the interrupt after the PLIC core accepts the request and before the interrupt is serviced, the interrupt request remains present in the IP bit of the PLIC core and will be serviced by a handler, which will then have to determine that the interrupt device no longer requires service." In other words, we may receive interrupts twice. Avoid that by postponing the completion until after the interrupt handler has run. If the interrupt is handled by a filter rather than by scheduling an interrupt thread we must also complete the interrupt, so set up a post_filter handler (which is the same as the post_ithread handler). Reviewed by: mhorne Sponsored by: Axiado Differential Revision: https://reviews.freebsd.org/D25531 Modified: head/sys/riscv/riscv/plic.c Modified: head/sys/riscv/riscv/plic.c ============================================================================== --- head/sys/riscv/riscv/plic.c Mon Jul 6 21:20:57 2020 (r362976) +++ head/sys/riscv/riscv/plic.c Mon Jul 6 21:29:50 2020 (r362977) @@ -169,11 +169,11 @@ plic_intr(void *arg) sc = arg; cpu = PCPU_GET(cpuid); + /* Claim any pending interrupt. */ pending = RD4(sc, PLIC_CLAIM(sc, cpu)); if (pending) { tf = curthread->td_intr_frame; plic_irq_dispatch(sc, pending, tf); - WR4(sc, PLIC_CLAIM(sc, cpu), pending); } return (FILTER_HANDLED); @@ -384,7 +384,17 @@ plic_pre_ithread(device_t dev, struct intr_irqsrc *isr static void plic_post_ithread(device_t dev, struct intr_irqsrc *isrc) { + struct plic_softc *sc; + struct plic_irqsrc *src; + uint32_t cpu; + sc = device_get_softc(dev); + src = (struct plic_irqsrc *)isrc; + + cpu = CPU_FFS(&isrc->isrc_cpu) - 1; + + /* Complete the interrupt. */ + WR4(sc, PLIC_CLAIM(sc, cpu), src->irq); plic_enable_intr(dev, isrc); } @@ -451,6 +461,7 @@ static device_method_t plic_methods[] = { DEVMETHOD(pic_map_intr, plic_map_intr), DEVMETHOD(pic_pre_ithread, plic_pre_ithread), DEVMETHOD(pic_post_ithread, plic_post_ithread), + DEVMETHOD(pic_post_filter, plic_post_ithread), DEVMETHOD(pic_setup_intr, plic_setup_intr), DEVMETHOD(pic_bind_intr, plic_bind_intr), From owner-svn-src-head@freebsd.org Mon Jul 6 21:39:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 054BA3495FE; Mon, 6 Jul 2020 21:39:15 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0zVB6KJNz4brx; Mon, 6 Jul 2020 21:39:14 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8A6224AC8; Mon, 6 Jul 2020 21:39:14 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 066LdEKd073620; Mon, 6 Jul 2020 21:39:14 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 066LdE5b073619; Mon, 6 Jul 2020 21:39:14 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202007062139.066LdE5b073619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Mon, 6 Jul 2020 21:39:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362978 - head/stand X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/stand X-SVN-Commit-Revision: 362978 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 21:39:15 -0000 Author: mhorne Date: Mon Jul 6 21:39:14 2020 New Revision: 362978 URL: https://svnweb.freebsd.org/changeset/base/362978 Log: Fix cleandir target post r362973 Reported by: mmacy Modified: head/stand/defs.mk Modified: head/stand/defs.mk ============================================================================== --- head/stand/defs.mk Mon Jul 6 21:29:50 2020 (r362977) +++ head/stand/defs.mk Mon Jul 6 21:39:14 2020 (r362978) @@ -151,7 +151,7 @@ CFLAGS+= -fPIC # Some RISC-V linkers have support for relaxations, while some (lld) do not # yet. If this is the case we inhibit the compiler from emitting relaxations. -.if ${LINKER_FEATURES:Mriscv-relaxations} == "" +.if ${MACHINE_CPUARCH} == "riscv" && ${LINKER_FEATURES:Mriscv-relaxations} == "" CFLAGS+= -mno-relax .endif From owner-svn-src-head@freebsd.org Mon Jul 6 22:39:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7B1E134A933; Mon, 6 Jul 2020 22:39:43 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B10qz1rhxz4fgV; Mon, 6 Jul 2020 22:39:43 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 22A6E257A3; Mon, 6 Jul 2020 22:39:43 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 066MdhIq011218; Mon, 6 Jul 2020 22:39:43 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 066MdgeD011217; Mon, 6 Jul 2020 22:39:42 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202007062239.066MdgeD011217@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 6 Jul 2020 22:39:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362979 - head/cddl/contrib/opensolaris/tools/ctf/cvt X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/tools/ctf/cvt X-SVN-Commit-Revision: 362979 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2020 22:39:43 -0000 Author: brooks Date: Mon Jul 6 22:39:42 2020 New Revision: 362979 URL: https://svnweb.freebsd.org/changeset/base/362979 Log: Fix a Wvoid-pointer-to-enum-cast warning missed in r359978. This pattern is used in callbacks with void * data arguments and seems both relatively uncommon and relatively harmless. Silence the warning by casting through uintptr_t. This warning is on by default in Clang 11. MFC after: 3 days Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24425 Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/iidesc.c Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/iidesc.c ============================================================================== --- head/cddl/contrib/opensolaris/tools/ctf/cvt/iidesc.c Mon Jul 6 21:39:14 2020 (r362978) +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/iidesc.c Mon Jul 6 22:39:42 2020 (r362979) @@ -179,7 +179,7 @@ int iidesc_count_type(void *data, void *private) { iidesc_t *ii = data; - iitype_t match = (iitype_t)private; + iitype_t match = (iitype_t)(uintptr_t)private; return (ii->ii_type == match); } From owner-svn-src-head@freebsd.org Tue Jul 7 00:42:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2CF4434DD03; Tue, 7 Jul 2020 00:42:24 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B13YX0RFhz3X1h; Tue, 7 Jul 2020 00:42:24 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E650026B5D; Tue, 7 Jul 2020 00:42:23 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0670gNYG090085; Tue, 7 Jul 2020 00:42:23 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0670gNpp090084; Tue, 7 Jul 2020 00:42:23 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202007070042.0670gNpp090084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 7 Jul 2020 00:42:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362980 - head/sys/fs/nfs X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfs X-SVN-Commit-Revision: 362980 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 00:42:24 -0000 Author: rmacklem Date: Tue Jul 7 00:42:23 2020 New Revision: 362980 URL: https://svnweb.freebsd.org/changeset/base/362980 Log: Add support for ext_pgs mbufs to nfsrvd_rephead(). This is another in the series of commits that add support to the NFS client and server for building RPC messages in ext_pgs mbufs with anonymous pages. This is useful so that the entire mbuf list does not need to be copied before calling sosend() when NFS over TLS is enabled. Since ND_EXTPG is never set yet, there is no semantic change at this time. Modified: head/sys/fs/nfs/nfs_commonsubs.c Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Mon Jul 6 22:39:42 2020 (r362979) +++ head/sys/fs/nfs/nfs_commonsubs.c Tue Jul 7 00:42:23 2020 (r362980) @@ -4443,21 +4443,30 @@ nfsrvd_rephead(struct nfsrv_descript *nd) { struct mbuf *mreq; - /* - * If this is a big reply, use a cluster. - */ - if ((nd->nd_flag & ND_GSSINITREPLY) == 0 && - nfs_bigreply[nd->nd_procnum]) { - NFSMCLGET(mreq, M_WAITOK); - nd->nd_mreq = mreq; - nd->nd_mb = mreq; + if ((nd->nd_flag & ND_EXTPG) != 0) { + mreq = mb_alloc_ext_plus_pages(PAGE_SIZE, M_WAITOK); + nd->nd_mreq = nd->nd_mb = mreq; + nd->nd_bpos = (char *)(void *) + PHYS_TO_DMAP(mreq->m_epg_pa[0]); + nd->nd_bextpg = 0; + nd->nd_bextpgsiz = PAGE_SIZE; } else { - NFSMGET(mreq); - nd->nd_mreq = mreq; - nd->nd_mb = mreq; + /* + * If this is a big reply, use a cluster. + */ + if ((nd->nd_flag & ND_GSSINITREPLY) == 0 && + nfs_bigreply[nd->nd_procnum]) { + NFSMCLGET(mreq, M_WAITOK); + nd->nd_mreq = mreq; + nd->nd_mb = mreq; + } else { + NFSMGET(mreq); + nd->nd_mreq = mreq; + nd->nd_mb = mreq; + } + nd->nd_bpos = mtod(mreq, char *); + mreq->m_len = 0; } - nd->nd_bpos = mtod(mreq, caddr_t); - mreq->m_len = 0; if ((nd->nd_flag & ND_GSSINITREPLY) == 0) NFSM_BUILD(nd->nd_errp, int *, NFSX_UNSIGNED); From owner-svn-src-head@freebsd.org Tue Jul 7 02:41:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DB602350CAB; Tue, 7 Jul 2020 02:41:51 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B16CM5WPKz3dNl; Tue, 7 Jul 2020 02:41:51 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A0A9C8784; Tue, 7 Jul 2020 02:41:51 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0672fpah063698; Tue, 7 Jul 2020 02:41:51 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0672fpNo063696; Tue, 7 Jul 2020 02:41:51 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202007070241.0672fpNo063696@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 7 Jul 2020 02:41:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362981 - in head: . share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head: . share/man/man9 X-SVN-Commit-Revision: 362981 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 02:41:51 -0000 Author: glebius Date: Tue Jul 7 02:41:51 2020 New Revision: 362981 URL: https://svnweb.freebsd.org/changeset/base/362981 Log: Fixup for r360574: install new mlinks for sglist(9) and remove old ones. Modified: head/ObsoleteFiles.inc head/share/man/man9/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Jul 7 00:42:23 2020 (r362980) +++ head/ObsoleteFiles.inc Tue Jul 7 02:41:51 2020 (r362981) @@ -36,6 +36,12 @@ # xargs -n1 | sort | uniq -d; # done +# 20200706: update of sglist(9), r360574 +OLD_FILES+=usr/share/man/man9/sglist_append_ext_pgs.9 +OLD_FILES+=usr/share/man/man9/sglist_append_mb_ext_pgs.9 +OLD_FILES+=usr/share/man/man9/sglist_count_ext_pgs.9 +OLD_FILES+=usr/share/man/man9/sglist_count_mb_ext_pgs.9 + # 20200617: update opencsd to 0.14.2 OLD_FILES+=usr/include/opencsd/etmv4/trc_pkt_elem_etmv4d.h Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Tue Jul 7 00:42:23 2020 (r362980) +++ head/share/man/man9/Makefile Tue Jul 7 02:41:51 2020 (r362981) @@ -1902,9 +1902,8 @@ MLINKS+=sf_buf.9 sf_buf_alloc.9 \ MLINKS+=sglist.9 sglist_alloc.9 \ sglist.9 sglist_append.9 \ sglist.9 sglist_append_bio.9 \ - sglist.9 sglist_append_ext_pgs.9 \ - sglist.9 sglist_append_mb_ext_pgs.9 \ sglist.9 sglist_append_mbuf.9 \ + sglist.9 sglist_append_mbuf_epg.9 \ sglist.9 sglist_append_phys.9 \ sglist.9 sglist_append_sglist.9 \ sglist.9 sglist_append_uio.9 \ @@ -1914,8 +1913,7 @@ MLINKS+=sglist.9 sglist_alloc.9 \ sglist.9 sglist_clone.9 \ sglist.9 sglist_consume_uio.9 \ sglist.9 sglist_count.9 \ - sglist.9 sglist_count_ext_pgs.9 \ - sglist.9 sglist_count_mb_ext_pgs.9 \ + sglist.9 sglist_count_mbuf_epg.9 \ sglist.9 sglist_count_vmpages.9 \ sglist.9 sglist_free.9 \ sglist.9 sglist_hold.9 \ From owner-svn-src-head@freebsd.org Tue Jul 7 02:43:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A2B6E350EC9; Tue, 7 Jul 2020 02:43:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B16Fk3sx1z3f0V; Tue, 7 Jul 2020 02:43:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 695058374; Tue, 7 Jul 2020 02:43:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0672hsKq063827; Tue, 7 Jul 2020 02:43:54 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0672hsf8063826; Tue, 7 Jul 2020 02:43:54 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202007070243.0672hsf8063826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 7 Jul 2020 02:43:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362982 - head X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 362982 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 02:43:54 -0000 Author: glebius Date: Tue Jul 7 02:43:53 2020 New Revision: 362982 URL: https://svnweb.freebsd.org/changeset/base/362982 Log: Fixup r362981: remove gzipped manual pages. Pointy hat to: glebius Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Jul 7 02:41:51 2020 (r362981) +++ head/ObsoleteFiles.inc Tue Jul 7 02:43:53 2020 (r362982) @@ -37,10 +37,10 @@ # done # 20200706: update of sglist(9), r360574 -OLD_FILES+=usr/share/man/man9/sglist_append_ext_pgs.9 -OLD_FILES+=usr/share/man/man9/sglist_append_mb_ext_pgs.9 -OLD_FILES+=usr/share/man/man9/sglist_count_ext_pgs.9 -OLD_FILES+=usr/share/man/man9/sglist_count_mb_ext_pgs.9 +OLD_FILES+=usr/share/man/man9/sglist_append_ext_pgs.9.gz +OLD_FILES+=usr/share/man/man9/sglist_append_mb_ext_pgs.9.gz +OLD_FILES+=usr/share/man/man9/sglist_count_ext_pgs.9.gz +OLD_FILES+=usr/share/man/man9/sglist_count_mb_ext_pgs.9.gz # 20200617: update opencsd to 0.14.2 OLD_FILES+=usr/include/opencsd/etmv4/trc_pkt_elem_etmv4d.h From owner-svn-src-head@freebsd.org Tue Jul 7 07:51:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DFE8C358B66; Tue, 7 Jul 2020 07:51:10 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1F4G5CPTz4CS4; Tue, 7 Jul 2020 07:51:10 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7C25AC0AE; Tue, 7 Jul 2020 07:51:10 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0677pA7v051631; Tue, 7 Jul 2020 07:51:10 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0677pATb051630; Tue, 7 Jul 2020 07:51:10 GMT (envelope-from se@FreeBSD.org) Message-Id: <202007070751.0677pATb051630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Tue, 7 Jul 2020 07:51:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362987 - in head: contrib/bc usr.bin/gh-bc X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: in head: contrib/bc usr.bin/gh-bc X-SVN-Commit-Revision: 362987 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 07:51:10 -0000 Author: se Date: Tue Jul 7 07:51:09 2020 New Revision: 362987 URL: https://svnweb.freebsd.org/changeset/base/362987 Log: Update to version 3.1.1 This version fixes a regression with regard to tradtional behavior of the non-standard FreeBSD option "-e". In the previous version "-e quit" caused bc to exit before any computations had been performed, since all -e option parameters were concatenated and parsed as a whole, with quit causing the program to exit as soon as it was parsed. This version parses and executes commands passed with -e one by one and only exits after all prior commands have been executed. This commit is not a SVN merge, since the vendor import had been performed after the import to contrib. Instead the contents of contrib/bc has been removed and the new version is copied over unchanged from vendor/bc/dist. Replaced: head/contrib/bc/ - copied from r362986, vendor/bc/dist/ Modified: head/usr.bin/gh-bc/Makefile Modified: head/usr.bin/gh-bc/Makefile ============================================================================== --- head/usr.bin/gh-bc/Makefile Tue Jul 7 07:32:15 2020 (r362986) +++ head/usr.bin/gh-bc/Makefile Tue Jul 7 07:51:09 2020 (r362987) @@ -19,6 +19,7 @@ LINKS= ${BINDIR}/bc ${BINDIR}/dc CATALOGS= en_US.UTF-8 CATALOGS+= de_DE.UTF-8 de_DE.ISO8859-1 +CATALOGS+= es_ES.UTF-8 es_ES.ISO8859-1 CATALOGS+= fr_FR.UTF-8 fr_FR.ISO8859-1 CATALOGS+= ja_JP.UTF-8 ja_JP.eucJP CATALOGS+= nl_NL.UTF-8 nl_NL.ISO8859-1 @@ -37,8 +38,7 @@ CFLAGS+= -DBC_ENABLE_PROMPT CFLAGS+= -DBC_ENABLE_LONG_OPTIONS CFLAGS+= -DBC_ENABLE_EXTRA_MATH CFLAGS+= -DBC_ENABLE_HISTORY -CFLAGS+= -DBC_ENABLE_SIGNALS=0 -CFLAGS+= -DBC_NUM_KARATSUBA_LEN=64 +CFLAGS+= -DBC_ENABLE_RAND CFLAGS+= -DDC_ENABLED CFLAGS+= -DNDEBUG CFLAGS+= -DVERSION=${BCVERSION} @@ -46,8 +46,12 @@ CFLAGS+= -I${BCDIR}/include .if ${MK_NLS_CATALOGS} == "no" CFLAGS+= -DBC_ENABLE_NLS=0 +MAN_SRC_BC= bc/N.1 +MAN_SRC_DC= dc/N.1 .else CFLAGS+= -DBC_ENABLE_NLS=1 +MAN_SRC_BC= bc/A.1 +MAN_SRC_DC= dc/A.1 # prevent floating point incompatibilities caused by -flto on some architectures .if ${MACHINE_ARCH} != mips && ${MACHINE_ARCH} != mips64 && \ @@ -73,6 +77,8 @@ NLSLINKS_de_DE.UTF-8+= de_AT.UTF-8 de_CH.UTF-8 NLSLINKS_de_DE.ISO8859-1+= de_AT.ISO8859-1 de_CH.ISO8859-1 NLSLINKS_de_DE.ISO8859-1+= de_AT.ISO8859-15 de_CH.ISO8859-15 de_DE.ISO8859-15 +NLSLINKS_es_ES.ISO8859-1+= es_ES.ISO8859-15 + NLSLINKS_fr_FR.UTF-8+= fr_BE.UTF-8 fr_CA.UTF-8 fr_CH.UTF-8 NLSLINKS_fr_FR.ISO8859-1+= fr_BE.ISO8859-1 fr_CA.ISO8859-1 fr_CH.ISO8859-1 NLSLINKS_fr_FR.ISO8859-1+= fr_BE.ISO8859-15 fr_CA.ISO8859-15 fr_CH.ISO8859-15 \ @@ -97,5 +103,11 @@ bc_help.c: bc_help.txt dc_help.c: dc_help.txt cd ${BCDIR} && sh gen/strgen.sh gen/dc_help.txt ${.OBJDIR}/dc_help.c dc_help dc.h + +bc.1: + ${CP} ${BCDIR}/manuals/${MAN_SRC_BC} ${.OBJDIR}/bc.1 + +dc.1: + ${CP} ${BCDIR}/manuals/${MAN_SRC_DC} ${.OBJDIR}/dc.1 .include From owner-svn-src-head@freebsd.org Tue Jul 7 10:09:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 933DD35CAEE; Tue, 7 Jul 2020 10:09:11 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1J7W0kbxz4M4j; Tue, 7 Jul 2020 10:09:10 +0000 (UTC) (envelope-from ohartmann@walstatt.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1594116549; bh=6dIVqDzrH2FBr+ikfIrtwfkTdRcmnTTtaOC74SSUVfY=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=DxajF4Kyp3GOwSbiO8iddDpKjnOcy9bBoh1to2AvDuAnMZq6QaJZDlfK2NvzlwD0s xN8eaanbcydCBTxGhrtER3qd+BAIJB/nyJadamERrO4gOLqzCbxS/jrgX2tXReKDnz 4ZjJFMoc2qf9xdAJ2tyZBdtoR8pVcxwJ1Gn1CUNA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from hermann.fritz.box ([89.14.123.212]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MUGe1-1kJwIw0PjP-00REXu; Tue, 07 Jul 2020 12:09:09 +0200 Date: Tue, 7 Jul 2020 12:08:59 +0200 From: "Hartmann, O." To: Stefan =?ISO-8859-1?Q?E=DFer?= Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362987 - in head: contrib/bc usr.bin/gh-bc Message-ID: <20200707120859.383081bb@hermann.fritz.box> In-Reply-To: <202007070751.0677pATb051630@repo.freebsd.org> References: <202007070751.0677pATb051630@repo.freebsd.org> Organization: walstatt.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/jxlKD76reWCl/kDFAAYMWNn"; protocol="application/pgp-signature" X-Provags-ID: V03:K1:3ppUlU82L21Te39UgjY85DGfqw8P9lWJQkhkflwz+IwpHJUbzEZ BACF3MYEiZoPIp4axghWooNYcnZKFJ66FVFckrkgY+jw1PMY+EegkkASayrjS6rtW01Mo3u 3kfuNfYud4j3cQVyieqwh1oMe2t2FET7n/K/zT2jecCyQWQ8KjyJvMafqXn+jXT0svpN4Y7 fhmiR+AP1emZ8rQKlswxA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Q6D94D0mq+U=:CgamM6O85TCWzDyJbG2I0r w7SEkLlGfxCayNE4vKKZCcoWsQD/OrAVif7fplLoBMOnbUKEoItjmkF9qehlIokegxP8z+3BN +8XH+WSDCBHu3VjQ1av7IF9lWK7BRjPEliu2gLo9bZwgNLtjb4PGFyPCZMqDx4YY7P2oGKUkp eBObWOVIVVyR37L7HFAxm4HOmJZzDtftT7V3acdaxng6cyG29I2vTgBQP9LiC8MF4kT+85kb6 hKY+8+AdRQoWwDfZWNjlCUiGZBYqFfLn6LCe/2+ex0WZ637eJBKBnBFdppCP73cHiOyGmewVW 9p2Cwrwb/tilgh7jArU1dgUZSWCz9OpzbcaX9kkbMaQ0VNRKY74qHPnLwaL9I/ppUVn8N6u+d v07YeDAJI0lAoS2/64Hbh4zRyBRxuw2w/5utI723k0v453FQTHcMxsbTNuzSQyIiyJprH9j+u m17izTkMzDzWZx8MmsQbaekV9L+zns6cew9fEFGpDxTXZZDx9vmQeS8BQlLf5I2S0FkOTsRQq ucuXkJAn/KLCQVZYdEETeIIEQgEhzX6s7WNP58KpCii8lZ0rwJZLY1Fs7mC4lFTYVLaGtYxb0 shFj3xdMNVXg5kP/4MsfCO4U+6XjFZl/wR24jCaPzCoHTil1yuR/EU4EwcYVSx1PI/t5jUq69 xHdmDXxOZWaOSLor6CN1rVTym+axdtlCSveJtIM4RuZxMKY9p7Go6x3LkWa61JniLK2k2ex4x bzn9AGN7KnHXQ3lyXOvMnkEUWLwaQyJDyX98aVOMDEavvP2Zq2VkoteMVl3gr/KZDg++Zctxq uuSSZ5dVxIABsCa90SUfcqhuPyTq2VPTSvdtt2oQ62iAo3wNf6cb9Ss94zxAn608zoynGewcp LmJ4+9JyzurPn7UFeOVcHFEGtVNa6mRYjdrZWrrhNs4BPHDWQbFSWJvL0Cc9F20YsOVuLdtI1 p0y0qNC6B64w3veuNd/ZNQIZ4pDiunU2TVZigC9Dtlt0AOzNQr5KpEgkk2uP33Ii4LT7AnYeq g+sI9wIJ0mEw4spPnBSNpTeb6QCfCdXvyq2/xQtpzyKEaWp3fPkf5ijh9wJUFW6mvX4UNqbDb KIsu1L0mZbitHQwx8ULaPyI1WbM5wi04AH0YguWVdXLdriU5dspeJ8emgf11dUhR8trdFle7P q0qysiruEwWGhj4GwCAqJIc+w9JBxUjnLoOcT+GhX/IGHPiNE0o2f/iOuodmK7xXjyDaGTQwr Pv6beO9AywkFgSLwoyTemyRsE02t997DeeqFVnw== X-Rspamd-Queue-Id: 4B1J7W0kbxz4M4j X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 10:09:11 -0000 --Sig_/jxlKD76reWCl/kDFAAYMWNn Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, 7 Jul 2020 07:51:10 +0000 (UTC) Stefan E=C3=9Fer wrote: > Author: se > Date: Tue Jul 7 07:51:09 2020 > New Revision: 362987 > URL: https://svnweb.freebsd.org/changeset/base/362987 >=20 > Log: > Update to version 3.1.1 > =20 > This version fixes a regression with regard to tradtional behavior > of the non-standard FreeBSD option "-e". In the previous version "-e > quit" caused bc to exit before any computations had been performed, > since all -e option parameters were concatenated and parsed as a > whole, with quit causing the program to exit as soon as it was > parsed. This version parses and executes commands passed with -e one > by one and only exits after all prior commands have been executed. > =20 > This commit is not a SVN merge, since the vendor import had been > performed after the import to contrib. Instead the contents of > contrib/bc has been removed and the new version is copied over > unchanged from vendor/bc/dist. >=20 > Replaced: > head/contrib/bc/ > - copied from r362986, vendor/bc/dist/ > Modified: > head/usr.bin/gh-bc/Makefile >=20 > Modified: head/usr.bin/gh-bc/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.bin/gh-bc/Makefile Tue Jul 7 07:32:15 > 2020 (r362986) +++ head/usr.bin/gh-bc/Makefile Tue Jul > 7 07:51:09 2020 (r362987) @@ -19,6 +19,7 @@ LINKS=3D > ${BINDIR}/bc ${BINDIR}/dc=20 > CATALOGS=3D en_US.UTF-8 > CATALOGS+=3D de_DE.UTF-8 de_DE.ISO8859-1 > +CATALOGS+=3D es_ES.UTF-8 es_ES.ISO8859-1 > CATALOGS+=3D fr_FR.UTF-8 fr_FR.ISO8859-1 > CATALOGS+=3D ja_JP.UTF-8 ja_JP.eucJP > CATALOGS+=3D nl_NL.UTF-8 nl_NL.ISO8859-1 > @@ -37,8 +38,7 @@ CFLAGS+=3D -DBC_ENABLE_PROMPT > CFLAGS+=3D -DBC_ENABLE_LONG_OPTIONS > CFLAGS+=3D -DBC_ENABLE_EXTRA_MATH > CFLAGS+=3D -DBC_ENABLE_HISTORY > -CFLAGS+=3D -DBC_ENABLE_SIGNALS=3D0 > -CFLAGS+=3D -DBC_NUM_KARATSUBA_LEN=3D64 > +CFLAGS+=3D -DBC_ENABLE_RAND > CFLAGS+=3D -DDC_ENABLED > CFLAGS+=3D -DNDEBUG > CFLAGS+=3D -DVERSION=3D${BCVERSION} > @@ -46,8 +46,12 @@ CFLAGS+=3D -I${BCDIR}/include > =20 > .if ${MK_NLS_CATALOGS} =3D=3D "no" > CFLAGS+=3D -DBC_ENABLE_NLS=3D0 > +MAN_SRC_BC=3D bc/N.1 > +MAN_SRC_DC=3D dc/N.1 > .else > CFLAGS+=3D -DBC_ENABLE_NLS=3D1 > +MAN_SRC_BC=3D bc/A.1 > +MAN_SRC_DC=3D dc/A.1 > =20 > # prevent floating point incompatibilities caused by -flto on some > architectures .if ${MACHINE_ARCH} !=3D mips && ${MACHINE_ARCH} !=3D > mips64 && \ @@ -73,6 +77,8 @@ NLSLINKS_de_DE.UTF-8+=3D > de_AT.UTF-8 de_CH.UTF-8 NLSLINKS_de_DE.ISO8859-1+=3D de_AT.ISO8859-1 > de_CH.ISO8859-1 NLSLINKS_de_DE.ISO8859-1+=3D de_AT.ISO8859-15 > de_CH.ISO8859-15 de_DE.ISO8859-15=20 > +NLSLINKS_es_ES.ISO8859-1+=3D es_ES.ISO8859-15 > + > NLSLINKS_fr_FR.UTF-8+=3D fr_BE.UTF-8 fr_CA.UTF-8 fr_CH.UTF-8 > NLSLINKS_fr_FR.ISO8859-1+=3D fr_BE.ISO8859-1 fr_CA.ISO8859-1 > fr_CH.ISO8859-1 NLSLINKS_fr_FR.ISO8859-1+=3D fr_BE.ISO8859-15 > fr_CA.ISO8859-15 fr_CH.ISO8859-15 \ @@ -97,5 +103,11 @@ > bc_help.c: bc_help.txt=20 > dc_help.c: dc_help.txt > cd ${BCDIR} && sh gen/strgen.sh gen/dc_help.txt > ${.OBJDIR}/dc_help.c dc_help dc.h + > +bc.1: > + ${CP} ${BCDIR}/manuals/${MAN_SRC_BC} ${.OBJDIR}/bc.1 > + > +dc.1: > + ${CP} ${BCDIR}/manuals/${MAN_SRC_DC} ${.OBJDIR}/dc.1 > =20 > .include > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to > "svn-src-head-unsubscribe@freebsd.org" Thank you very much for this effort. Kind regards, O. Hartmann --Sig_/jxlKD76reWCl/kDFAAYMWNn Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQSy8IBxAPDkqVBaTJ44N1ZZPba5RwUCXwRJvAAKCRA4N1ZZPba5 R2V8AQDZoor+cYzkmF/FkND+ybc0xYb+A7ovu+bmHtoKPXeG1wD/WfPagQgDDvBt 2cOOnBdzBQg162HYALYQoo3BZkBSFQM= =+ScF -----END PGP SIGNATURE----- --Sig_/jxlKD76reWCl/kDFAAYMWNn-- From owner-svn-src-head@freebsd.org Tue Jul 7 12:11:00 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A0813609DF; Tue, 7 Jul 2020 12:11:00 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1Lr370QGz4W5s; Tue, 7 Jul 2020 12:10:59 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D4B33F419; Tue, 7 Jul 2020 12:10:59 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 067CAx3u016289; Tue, 7 Jul 2020 12:10:59 GMT (envelope-from rscheff@FreeBSD.org) Received: (from rscheff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 067CAxAY016288; Tue, 7 Jul 2020 12:10:59 GMT (envelope-from rscheff@FreeBSD.org) Message-Id: <202007071210.067CAxAY016288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rscheff set sender to rscheff@FreeBSD.org using -f From: Richard Scheffenegger Date: Tue, 7 Jul 2020 12:10:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362988 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: rscheff X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 362988 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 12:11:00 -0000 Author: rscheff Date: Tue Jul 7 12:10:59 2020 New Revision: 362988 URL: https://svnweb.freebsd.org/changeset/base/362988 Log: Fix KASSERT during tcp_newtcpcb when low on memory While testing with system default cc set to cubic, and running a memory exhaustion validation, FreeBSD panics for a missing inpcb reference / lock. Reviewed by: rgrimes (mentor), tuexen (mentor) Approved by: rgrimes (mentor), tuexen (mentor) MFC after: 3 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D25583 Modified: head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Tue Jul 7 07:51:09 2020 (r362987) +++ head/sys/netinet/tcp_subr.c Tue Jul 7 12:10:59 2020 (r362988) @@ -1702,6 +1702,12 @@ tcp_newtcpcb(struct inpcb *inp) KASSERT(!STAILQ_EMPTY(&cc_list), ("cc_list is empty!")); CC_ALGO(tp) = CC_DEFAULT(); CC_LIST_RUNLOCK(); + /* + * The tcpcb will hold a reference on its inpcb until tcp_discardcb() + * is called. + */ + in_pcbref(inp); /* Reference for tcpcb */ + tp->t_inpcb = inp; if (CC_ALGO(tp)->cb_init != NULL) if (CC_ALGO(tp)->cb_init(tp->ccv) > 0) { @@ -1746,12 +1752,6 @@ tcp_newtcpcb(struct inpcb *inp) if (V_tcp_do_sack) tp->t_flags |= TF_SACK_PERMIT; TAILQ_INIT(&tp->snd_holes); - /* - * The tcpcb will hold a reference on its inpcb until tcp_discardcb() - * is called. - */ - in_pcbref(inp); /* Reference for tcpcb */ - tp->t_inpcb = inp; /* * Init srtt to TCPTV_SRTTBASE (0), so we can tell that we have no From owner-svn-src-head@freebsd.org Tue Jul 7 12:24:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DEA793614C5; Tue, 7 Jul 2020 12:24:40 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1M7r5cQZz4X2h; Tue, 7 Jul 2020 12:24:40 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A074EF35A; Tue, 7 Jul 2020 12:24:40 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 067COerU025030; Tue, 7 Jul 2020 12:24:40 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 067COe7F025029; Tue, 7 Jul 2020 12:24:40 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202007071224.067COe7F025029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Tue, 7 Jul 2020 12:24:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362989 - head/stand/libsa/geli X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/libsa/geli X-SVN-Commit-Revision: 362989 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 12:24:40 -0000 Author: tsoome Date: Tue Jul 7 12:24:40 2020 New Revision: 362989 URL: https://svnweb.freebsd.org/changeset/base/362989 Log: loader: geli_dev_ioctl does return huge mediasize The DIOCGMEDIASIZE is calculated md->md_sectorsize * md->md_provsize, and for boot disk, the md_sectorsize is 4k. However, the md_provsize is already in units of bytes. Sponsored by: Netflix, Klara Inc. Modified: head/stand/libsa/geli/gelidev.c Modified: head/stand/libsa/geli/gelidev.c ============================================================================== --- head/stand/libsa/geli/gelidev.c Tue Jul 7 12:10:59 2020 (r362988) +++ head/stand/libsa/geli/gelidev.c Tue Jul 7 12:24:40 2020 (r362989) @@ -219,7 +219,7 @@ geli_dev_ioctl(struct open_file *f, u_long cmd, void * *(u_int *)data = md->md_sectorsize; break; case DIOCGMEDIASIZE: - *(uint64_t *)data = md->md_sectorsize * md->md_provsize; + *(uint64_t *)data = md->md_provsize; break; default: return (ENOTTY); From owner-svn-src-head@freebsd.org Tue Jul 7 16:07:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3A61B366130; Tue, 7 Jul 2020 16:07:40 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1S580nsRz3XD9; Tue, 7 Jul 2020 16:07:40 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EE1D611E74; Tue, 7 Jul 2020 16:07:39 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 067G7dwD061566; Tue, 7 Jul 2020 16:07:39 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 067G7dWM061565; Tue, 7 Jul 2020 16:07:39 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202007071607.067G7dWM061565@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Tue, 7 Jul 2020 16:07:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362992 - head/usr.bin/time X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/time X-SVN-Commit-Revision: 362992 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 16:07:40 -0000 Author: fernape (ports committer) Date: Tue Jul 7 16:07:39 2020 New Revision: 362992 URL: https://svnweb.freebsd.org/changeset/base/362992 Log: time(1): Add EXAMPLES section Add EXAMPLES showing all five flags: -a, -h, -l, -o, -p Approved by: manpages (bcr) Modified: head/usr.bin/time/time.1 Modified: head/usr.bin/time/time.1 ============================================================================== --- head/usr.bin/time/time.1 Tue Jul 7 13:51:16 2020 (r362991) +++ head/usr.bin/time/time.1 Tue Jul 7 16:07:39 2020 (r362992) @@ -28,7 +28,7 @@ .\" @(#)time.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 14, 2006 +.Dd July 7, 2020 .Dt TIME 1 .Os .Sh NAME @@ -129,6 +129,62 @@ If .Nm encounters any other error, the exit status is between 1 and 125 included. +.Sh EXAMPLES +Time the execution of +.Xr ls 1 +on an empty directory: +.Bd -literal -offset indent +$ /usr/bin/time ls + 0.00 real 0.00 user 0.00 sys +.Ed +.Pp +Time the execution of the +.Xr cp 1 +command and store the result in the +.Pa times.txt +file. +Then execute the command again to make a new copy and add the result to the same +file: +.Bd -literal -offset indent +$ /usr/bin/time -o times.txt cp FreeBSD-12.1-RELEASE-amd64-bootonly.iso copy1.iso +$ /usr/bin/time -a -o times.txt cp FreeBSD-12.1-RELEASE-amd64-bootonly.iso copy2.iso +.Ed +.Pp +The +.Pa times.txt +file will contain the times of both commands: +.Bd -literal -offset indent +$ cat times.txt + 0.68 real 0.00 user 0.22 sys + 0.67 real 0.00 user 0.21 sys +.Ed +.Pp +Time the +.Xr sleep 1 +command and show the results in a human friendly format. +Show the contents of the +.Em rusage +structure too: +.Bd -literal -offset indent +$ /usr/bin/time -l -h -p sleep 5 +real 5.01 +user 0.00 +sys 0.00 + 0 maximum resident set size + 0 average shared memory size + 0 average unshared data size + 0 average unshared stack size + 80 page reclaims + 0 page faults + 0 swaps + 1 block input operations + 0 block output operations + 0 messages sent + 0 messages received + 0 signals received + 3 voluntary context switches + 0 involuntary context switches +.Ed .Sh SEE ALSO .Xr builtin 1 , .Xr csh 1 , From owner-svn-src-head@freebsd.org Tue Jul 7 16:35:53 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9E06B36667E; Tue, 7 Jul 2020 16:35:53 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1Sjj3XNtz3Z7j; Tue, 7 Jul 2020 16:35:53 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5CBFE123D4; Tue, 7 Jul 2020 16:35:53 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 067GZr0L080474; Tue, 7 Jul 2020 16:35:53 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 067GZrpa080473; Tue, 7 Jul 2020 16:35:53 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007071635.067GZrpa080473@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 7 Jul 2020 16:35:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362993 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 362993 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 16:35:53 -0000 Author: markj Date: Tue Jul 7 16:35:52 2020 New Revision: 362993 URL: https://svnweb.freebsd.org/changeset/base/362993 Log: Rebuild sysent when capabilities.conf is updated. Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25571 Modified: head/sys/conf/sysent.mk Modified: head/sys/conf/sysent.mk ============================================================================== --- head/sys/conf/sysent.mk Tue Jul 7 16:07:39 2020 (r362992) +++ head/sys/conf/sysent.mk Tue Jul 7 16:35:52 2020 (r362993) @@ -22,6 +22,13 @@ SYSENT_CONF?= syscalls.conf SRCS+= ${SYSENT_FILE} SRCS+= ${SYSENT_CONF} +# Ensure that the target gets updated if the capabilities file is modified, +# even though it is not an explicit input to makesyscalls.lua. For some +# targets, like Linux system calls, this is unnecessary, but a spurious rebuild +# is both rare and harmless. +CAPABILITIES_CONF?= ${SYSDIR}/kern/capabilities.conf +SRCS+= ${CAPABILITIES_CONF} + MAKESYSCALLS_INTERP?= ${LUA} MAKESYSCALLS_SCRIPT?= ${SYSDIR}/tools/makesyscalls.lua MAKESYSCALLS= ${MAKESYSCALLS_INTERP} ${MAKESYSCALLS_SCRIPT} From owner-svn-src-head@freebsd.org Tue Jul 7 17:02:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C9C89367747; Tue, 7 Jul 2020 17:02:24 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1TJJ4bSbz3c2t; Tue, 7 Jul 2020 17:02:24 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 67F08128F2; Tue, 7 Jul 2020 17:02:24 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 067H2OFS098553; Tue, 7 Jul 2020 17:02:24 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 067H2OeA098513; Tue, 7 Jul 2020 17:02:24 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202007071702.067H2OeA098513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Tue, 7 Jul 2020 17:02:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362994 - head/usr.bin/timeout X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/timeout X-SVN-Commit-Revision: 362994 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 17:02:24 -0000 Author: fernape (ports committer) Date: Tue Jul 7 17:02:23 2020 New Revision: 362994 URL: https://svnweb.freebsd.org/changeset/base/362994 Log: timeout(1): Add EXAMPLES section Small EXAMPLES section showing the use of -s, -k and the different exit values Approved by: manpages (gbe) Differential Revision: https://reviews.freebsd.org/D25575 Modified: head/usr.bin/timeout/timeout.1 Modified: head/usr.bin/timeout/timeout.1 ============================================================================== --- head/usr.bin/timeout/timeout.1 Tue Jul 7 16:35:52 2020 (r362993) +++ head/usr.bin/timeout/timeout.1 Tue Jul 7 17:02:23 2020 (r362994) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 28, 2018 +.Dd July 7, 2020 .Dt TIMEOUT 1 .Os .Sh NAME @@ -136,6 +136,62 @@ If an invalid parameter is passed to or .Fl k , the exit status returned is 125. +.Sh EXAMPLES +Run +.Xr sleep 1 +with a time limit of 4 seconds. +Since the command completes in 2 seconds, the exit status is 0: +.Bd -literal -offset indent +$ timeout 4 sleep 2 +$ echo $? +0 +.Ed +.Pp +Run +.Xr sleep 1 +for 4 seconds and terminate process after 2 seconds. +124 is returned since no +.Fl -preserve-status +is used: +.Bd -literal -offset indent +$ timeout 2 sleep 4 +$ echo $? +124 +.Ed +.Pp +Same as above but preserving status. +Exit status is 128 + signal number (15 for +.Va SIGTERM ) +.Bd -literal -offset indent +$ timeout --preserve-status 2 sleep 4 +$ echo $? +143 +.Ed +.Pp +Same as above but sending +.Va SIGALRM +(signal number 14) instead of +.Va SIGTERM +.Bd -literal -offset indent +$ timeout --preserve-status -s SIGALRM 2 sleep 4 +$ echo $? +142 +.Ed +.Pp +Try to +.Xr fetch 1 +the single page version of the +.Fx +Handbook. +Send a +.Va SIGTERM +signal after 1 minute and send a +.Va SIGKILL +signal 5 seconds later if the process refuses to stop: +.Bd -literal -offset indent +timeout -k 5s 1m fetch \\ +https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/book.html +.Ed .Sh SEE ALSO .Xr kill 1 , .Xr signal 3 From owner-svn-src-head@freebsd.org Tue Jul 7 17:17:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6DCFA367BA2; Tue, 7 Jul 2020 17:17:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4B1TfC2LDRz3cw8; Tue, 7 Jul 2020 17:17:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-274.local (unknown [IPv6:2601:648:8203:2990:98ed:1435:28a2:b475]) (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 B63AC2E9A1; Tue, 7 Jul 2020 17:17:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r362902 - in head/lib/csu: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv To: Kjell Tore Ullavik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202007030009.06309gcC099579@repo.freebsd.org> <7b140e64-ba4d-d76e-29a4-d0587f7351a0@gmail.com> 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: <6a4ff241-c77d-c68c-f0f0-9a562fa66d3f@FreeBSD.org> Date: Tue, 7 Jul 2020 10:16:57 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <7b140e64-ba4d-d76e-29a4-d0587f7351a0@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 17:17:55 -0000 On 7/3/20 2:46 PM, Kjell Tore Ullavik wrote: > > Got a buildworld error for CURRENT, amd64 today. I have not rebuilt in > while, but maybe r362902 is related? Yes, it is a bug in that commit. I'll commit a fix once it's been reviewed. Thanks! -- John Baldwin From owner-svn-src-head@freebsd.org Tue Jul 7 18:19:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7AAB1348AC3; Tue, 7 Jul 2020 18:19:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1W0p2fsYz3gMH; Tue, 7 Jul 2020 18:19:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A66D139A7; Tue, 7 Jul 2020 18:19:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 067IJ6IG042580; Tue, 7 Jul 2020 18:19:06 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 067IJ6Qe042579; Tue, 7 Jul 2020 18:19:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202007071819.067IJ6Qe042579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 7 Jul 2020 18:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362995 - head/lib/csu X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/lib/csu X-SVN-Commit-Revision: 362995 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 18:19:06 -0000 Author: jhb Date: Tue Jul 7 18:19:05 2020 New Revision: 362995 URL: https://svnweb.freebsd.org/changeset/base/362995 Log: Invoke objcopy on the right object when building Scrt1.o on i386. This was a copy-paste bug in r362902. While here, switch to using ${.TARGET}. Reported by: Kjell Tore Ullavik Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25585 Modified: head/lib/csu/Makefile.inc Modified: head/lib/csu/Makefile.inc ============================================================================== --- head/lib/csu/Makefile.inc Tue Jul 7 17:02:23 2020 (r362994) +++ head/lib/csu/Makefile.inc Tue Jul 7 18:19:05 2020 (r362995) @@ -37,7 +37,7 @@ CLEANFILES+= ${OBJS} ${CRT1OBJS} crt1_c.o gcrt1_c.o Sc crt1.o: crt1_c.o ${CRT1OBJS} ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} .if ${MACHINE_ARCH} == "i386" - ${OBJCOPY} --localize-symbol _start1 crt1.o + ${OBJCOPY} --localize-symbol _start1 ${.TARGET} .endif gcrt1_c.o: crt1_c.c @@ -52,7 +52,7 @@ Scrt1_c.o: crt1_c.c Scrt1.o: Scrt1_c.o ${CRT1OBJS} ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} .if ${MACHINE_ARCH} == "i386" - ${OBJCOPY} --localize-symbol _start1 crt1.o + ${OBJCOPY} --localize-symbol _start1 ${.TARGET} .endif crtbegin.o: crtbegin.c From owner-svn-src-head@freebsd.org Tue Jul 7 19:09:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9D05B34A065; Tue, 7 Jul 2020 19:09:55 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1X7R40WWz41D6; Tue, 7 Jul 2020 19:09:55 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6DA3614314; Tue, 7 Jul 2020 19:09:55 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 067J9t9n073514; Tue, 7 Jul 2020 19:09:55 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 067J9dDC073497; Tue, 7 Jul 2020 19:09:39 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202007071909.067J9dDC073497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 7 Jul 2020 19:09:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362997 - in head/contrib/sqlite3: . tea X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head/contrib/sqlite3: . tea X-SVN-Commit-Revision: 362997 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 19:09:55 -0000 Author: cy Date: Tue Jul 7 19:09:38 2020 New Revision: 362997 URL: https://svnweb.freebsd.org/changeset/base/362997 Log: MFV r362990: Update sqlite to 3.32.3 (3320300). Release Announcement: https://www.sqlite.org/releaselog/3_32_3.html See also: ports r541414 PR: 247819 Reported by: Pavel Volkov MFC after: 1 week Modified: head/contrib/sqlite3/configure head/contrib/sqlite3/configure.ac head/contrib/sqlite3/sqlite3.c head/contrib/sqlite3/sqlite3.h head/contrib/sqlite3/tea/configure head/contrib/sqlite3/tea/configure.ac Directory Properties: head/contrib/sqlite3/ (props changed) Modified: head/contrib/sqlite3/configure ============================================================================== --- head/contrib/sqlite3/configure Tue Jul 7 18:37:06 2020 (r362996) +++ head/contrib/sqlite3/configure Tue Jul 7 19:09:38 2020 (r362997) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sqlite 3.32.2. +# Generated by GNU Autoconf 2.69 for sqlite 3.32.3. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.32.2' -PACKAGE_STRING='sqlite 3.32.2' +PACKAGE_VERSION='3.32.3' +PACKAGE_STRING='sqlite 3.32.3' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1341,7 +1341,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.32.2 to adapt to many kinds of systems. +\`configure' configures sqlite 3.32.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1412,7 +1412,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.32.2:";; + short | recursive ) echo "Configuration of sqlite 3.32.3:";; esac cat <<\_ACEOF @@ -1537,7 +1537,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.32.2 +sqlite configure 3.32.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1952,7 +1952,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.32.2, which was +It was created by sqlite $as_me 3.32.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2818,7 +2818,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.32.2' + VERSION='3.32.3' cat >>confdefs.h <<_ACEOF @@ -14438,7 +14438,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.32.2, which was +This file was extended by sqlite $as_me 3.32.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14495,7 +14495,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sqlite config.status 3.32.2 +sqlite config.status 3.32.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: head/contrib/sqlite3/configure.ac ============================================================================== --- head/contrib/sqlite3/configure.ac Tue Jul 7 18:37:06 2020 (r362996) +++ head/contrib/sqlite3/configure.ac Tue Jul 7 19:09:38 2020 (r362997) @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.32.2, http://www.sqlite.org) +AC_INIT(sqlite, 3.32.3, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) AC_CONFIG_AUX_DIR([.]) Modified: head/contrib/sqlite3/sqlite3.c ============================================================================== --- head/contrib/sqlite3/sqlite3.c Tue Jul 7 18:37:06 2020 (r362996) +++ head/contrib/sqlite3/sqlite3.c Tue Jul 7 19:09:38 2020 (r362997) @@ -1,6 +1,6 @@ /****************************************************************************** ** This file is an amalgamation of many separate C source files from SQLite -** version 3.32.2. By combining all the individual C code files into this +** version 3.32.3. By combining all the individual C code files into this ** single large file, the entire code can be compiled as a single translation ** unit. This allows many compilers to do optimizations that would not be ** possible if the files were compiled separately. Performance improvements @@ -1162,9 +1162,9 @@ extern "C" { ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.32.2" -#define SQLITE_VERSION_NUMBER 3032002 -#define SQLITE_SOURCE_ID "2020-06-04 12:58:43 ec02243ea6ce33b090870ae55ab8aa2534b54d216d45c4aa2fdbb00e86861e8c" +#define SQLITE_VERSION "3.32.3" +#define SQLITE_VERSION_NUMBER 3032003 +#define SQLITE_SOURCE_ID "2020-06-18 14:00:33 7ebdfa80be8e8e73324b8d66b3460222eb74c7e9dfd655b48d6ca7e1933cc8fd" /* ** CAPI3REF: Run-Time Library Version Numbers @@ -17863,11 +17863,11 @@ struct AggInfo { ExprList *pGroupBy; /* The group by clause */ struct AggInfo_col { /* For each column used in source tables */ Table *pTab; /* Source table */ + Expr *pExpr; /* The original expression */ int iTable; /* Cursor number of the source table */ - int iColumn; /* Column number within the source table */ - int iSorterColumn; /* Column number in the sorting index */ int iMem; /* Memory location that acts as accumulator */ - Expr *pExpr; /* The original expression */ + i16 iColumn; /* Column number within the source table */ + i16 iSorterColumn; /* Column number in the sorting index */ } *aCol; int nColumn; /* Number of used entries in aCol[] */ int nAccumulator; /* Number of columns that show through to the output. @@ -17880,9 +17880,18 @@ struct AggInfo { int iDistinct; /* Ephemeral table used to enforce DISTINCT */ } *aFunc; int nFunc; /* Number of entries in aFunc[] */ +#ifdef SQLITE_DEBUG + int iAggMagic; /* Magic number when valid */ +#endif + AggInfo *pNext; /* Next in list of them all */ }; /* +** Value for AggInfo.iAggMagic when the structure is valid +*/ +#define AggInfoMagic 0x2059e99e + +/* ** The datatype ynVar is a signed integer, either 16-bit or 32-bit. ** Usually it is 16-bits. But if SQLITE_MAX_VARIABLE_NUMBER is greater ** than 32767 we have to make it 32-bit. 16-bit is preferred because @@ -18462,6 +18471,7 @@ struct Select { #define SF_WhereBegin 0x0080000 /* Really a WhereBegin() call. Debug Only */ #define SF_WinRewrite 0x0100000 /* Window function rewrite accomplished */ #define SF_View 0x0200000 /* SELECT statement is a view */ +#define SF_NoopOrderBy 0x0400000 /* ORDER BY is ignored for this query */ /* ** The results of a SELECT can be distributed in several ways, as defined @@ -18678,6 +18688,7 @@ struct Parse { Parse *pToplevel; /* Parse structure for main program (or NULL) */ Table *pTriggerTab; /* Table triggers are being coded for */ Parse *pParentParse; /* Parent parser if this parser is nested */ + AggInfo *pAggList; /* List of all AggInfo objects */ int addrCrTab; /* Address of OP_CreateBtree opcode on CREATE TABLE */ u32 nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */ u32 oldmask; /* Mask of old.* columns referenced */ @@ -19644,6 +19655,7 @@ SQLITE_PRIVATE int sqlite3ExprCompareSkip(Expr*, Expr* SQLITE_PRIVATE int sqlite3ExprListCompare(ExprList*, ExprList*, int); SQLITE_PRIVATE int sqlite3ExprImpliesExpr(Parse*,Expr*, Expr*, int); SQLITE_PRIVATE int sqlite3ExprImpliesNonNullRow(Expr*,int); +SQLITE_PRIVATE void sqlite3AggInfoPersistWalkerInit(Walker*,Parse*); SQLITE_PRIVATE void sqlite3ExprAnalyzeAggregates(NameContext*, Expr*); SQLITE_PRIVATE void sqlite3ExprAnalyzeAggList(NameContext*,ExprList*); SQLITE_PRIVATE int sqlite3ExprCoveredByIndex(Expr*, int iCur, Index *pIdx); @@ -64526,16 +64538,18 @@ static int hasSharedCacheTableLock( ** table. */ if( isIndex ){ HashElem *p; + int bSeen = 0; for(p=sqliteHashFirst(&pSchema->idxHash); p; p=sqliteHashNext(p)){ Index *pIdx = (Index *)sqliteHashData(p); if( pIdx->tnum==(int)iRoot ){ - if( iTab ){ + if( bSeen ){ /* Two or more indexes share the same root page. There must ** be imposter tables. So just return true. The assert is not ** useful in that case. */ return 1; } iTab = pIdx->pTable->tnum; + bSeen = 1; } } }else{ @@ -66077,7 +66091,7 @@ static int freeSpace(MemPage *pPage, u16 iStart, u16 i nFrag = iFreeBlk - iEnd; if( iEnd>iFreeBlk ) return SQLITE_CORRUPT_PAGE(pPage); iEnd = iFreeBlk + get2byte(&data[iFreeBlk+2]); - if( NEVER(iEnd > pPage->pBt->usableSize) ){ + if( iEnd > pPage->pBt->usableSize ){ return SQLITE_CORRUPT_PAGE(pPage); } iSize = iEnd - iStart; @@ -87194,7 +87208,7 @@ case OP_Ge: { /* same as TK_GE, jump, in1, if( (flags1 | flags3)&MEM_Str ){ if( (flags1 & (MEM_Int|MEM_IntReal|MEM_Real|MEM_Str))==MEM_Str ){ applyNumericAffinity(pIn1,0); - assert( flags3==pIn3->flags ); + testcase( flags3==pIn3->flags ); flags3 = pIn3->flags; } if( (flags3 & (MEM_Int|MEM_IntReal|MEM_Real|MEM_Str))==MEM_Str ){ @@ -99536,7 +99550,12 @@ SQLITE_PRIVATE char sqlite3ExprAffinity(const Expr *pE op = pExpr->op; if( op==TK_SELECT ){ assert( pExpr->flags&EP_xIsSelect ); - return sqlite3ExprAffinity(pExpr->x.pSelect->pEList->a[0].pExpr); + if( ALWAYS(pExpr->x.pSelect) + && pExpr->x.pSelect->pEList + && ALWAYS(pExpr->x.pSelect->pEList->a[0].pExpr) + ){ + return sqlite3ExprAffinity(pExpr->x.pSelect->pEList->a[0].pExpr); + } } if( op==TK_REGISTER ) op = pExpr->op2; #ifndef SQLITE_OMIT_CAST @@ -101527,8 +101546,10 @@ static int exprNodeIsConstant(Walker *pWalker, Expr *p /* Fall through */ case TK_IF_NULL_ROW: case TK_REGISTER: + case TK_DOT: testcase( pExpr->op==TK_REGISTER ); testcase( pExpr->op==TK_IF_NULL_ROW ); + testcase( pExpr->op==TK_DOT ); pWalker->eCode = 0; return WRC_Abort; case TK_VARIABLE: @@ -105134,11 +105155,26 @@ SQLITE_PRIVATE int sqlite3ExprCoveredByIndex( */ struct SrcCount { SrcList *pSrc; /* One particular FROM clause in a nested query */ + int iSrcInner; /* Smallest cursor number in this context */ int nThis; /* Number of references to columns in pSrcList */ int nOther; /* Number of references to columns in other FROM clauses */ }; /* +** xSelect callback for sqlite3FunctionUsesThisSrc(). If this is the first +** SELECT with a FROM clause encountered during this iteration, set +** SrcCount.iSrcInner to the cursor number of the leftmost object in +** the FROM cause. +*/ +static int selectSrcCount(Walker *pWalker, Select *pSel){ + struct SrcCount *p = pWalker->u.pSrcCount; + if( p->iSrcInner==0x7FFFFFFF && ALWAYS(pSel->pSrc) && pSel->pSrc->nSrc ){ + pWalker->u.pSrcCount->iSrcInner = pSel->pSrc->a[0].iCursor; + } + return WRC_Continue; +} + +/* ** Count the number of references to columns. */ static int exprSrcCount(Walker *pWalker, Expr *pExpr){ @@ -105158,7 +105194,7 @@ static int exprSrcCount(Walker *pWalker, Expr *pExpr){ } if( inThis++; - }else if( nSrc==0 || pExpr->iTablea[0].iCursor ){ + }else if( pExpr->iTableiSrcInner ){ /* In a well-formed parse tree (no name resolution errors), ** TK_COLUMN nodes with smaller Expr.iTable values are in an ** outer context. Those are the only ones to count as "other" */ @@ -105180,9 +105216,10 @@ SQLITE_PRIVATE int sqlite3FunctionUsesThisSrc(Expr *pE assert( pExpr->op==TK_AGG_FUNCTION ); memset(&w, 0, sizeof(w)); w.xExprCallback = exprSrcCount; - w.xSelectCallback = sqlite3SelectWalkNoop; + w.xSelectCallback = selectSrcCount; w.u.pSrcCount = &cnt; cnt.pSrc = pSrcList; + cnt.iSrcInner = (pSrcList&&pSrcList->nSrc)?pSrcList->a[0].iCursor:0x7FFFFFFF; cnt.nThis = 0; cnt.nOther = 0; sqlite3WalkExprList(&w, pExpr->x.pList); @@ -105195,6 +105232,64 @@ SQLITE_PRIVATE int sqlite3FunctionUsesThisSrc(Expr *pE } /* +** This is a Walker expression node callback. +** +** For Expr nodes that contain pAggInfo pointers, make sure the AggInfo +** object that is referenced does not refer directly to the Expr. If +** it does, make a copy. This is done because the pExpr argument is +** subject to change. +** +** The copy is stored on pParse->pConstExpr with a register number of 0. +** This will cause the expression to be deleted automatically when the +** Parse object is destroyed, but the zero register number means that it +** will not generate any code in the preamble. +*/ +static int agginfoPersistExprCb(Walker *pWalker, Expr *pExpr){ + if( ALWAYS(!ExprHasProperty(pExpr, EP_TokenOnly|EP_Reduced)) + && pExpr->pAggInfo!=0 + ){ + AggInfo *pAggInfo = pExpr->pAggInfo; + int iAgg = pExpr->iAgg; + Parse *pParse = pWalker->pParse; + sqlite3 *db = pParse->db; + assert( pExpr->op==TK_AGG_COLUMN || pExpr->op==TK_AGG_FUNCTION ); + if( pExpr->op==TK_AGG_COLUMN ){ + assert( iAgg>=0 && iAggnColumn ); + if( pAggInfo->aCol[iAgg].pExpr==pExpr ){ + pExpr = sqlite3ExprDup(db, pExpr, 0); + if( pExpr ){ + pAggInfo->aCol[iAgg].pExpr = pExpr; + pParse->pConstExpr = + sqlite3ExprListAppend(pParse, pParse->pConstExpr, pExpr); + } + } + }else{ + assert( iAgg>=0 && iAggnFunc ); + if( pAggInfo->aFunc[iAgg].pExpr==pExpr ){ + pExpr = sqlite3ExprDup(db, pExpr, 0); + if( pExpr ){ + pAggInfo->aFunc[iAgg].pExpr = pExpr; + pParse->pConstExpr = + sqlite3ExprListAppend(pParse, pParse->pConstExpr, pExpr); + } + } + } + } + return WRC_Continue; +} + +/* +** Initialize a Walker object so that will persist AggInfo entries referenced +** by the tree that is walked. +*/ +SQLITE_PRIVATE void sqlite3AggInfoPersistWalkerInit(Walker *pWalker, Parse *pParse){ + memset(pWalker, 0, sizeof(*pWalker)); + pWalker->pParse = pParse; + pWalker->xExprCallback = agginfoPersistExprCb; + pWalker->xSelectCallback = sqlite3SelectWalkNoop; +} + +/* ** Add a new element to the pAggInfo->aCol[] array. Return the index of ** the new element. Return a negative number if malloc fails. */ @@ -105224,7 +105319,7 @@ static int addAggInfoFunc(sqlite3 *db, AggInfo *pInfo) &i ); return i; -} +} /* ** This is the xExprCallback for a tree walker. It is used to @@ -110255,12 +110350,21 @@ SQLITE_PRIVATE void sqlite3FinishCoding(Parse *pParse) */ sqlite3AutoincrementBegin(pParse); - /* Code constant expressions that where factored out of inner loops */ + /* Code constant expressions that where factored out of inner loops. + ** + ** The pConstExpr list might also contain expressions that we simply + ** want to keep around until the Parse object is deleted. Such + ** expressions have iConstExprReg==0. Do not generate code for + ** those expressions, of course. + */ if( pParse->pConstExpr ){ ExprList *pEL = pParse->pConstExpr; pParse->okConstFactor = 0; for(i=0; inExpr; i++){ - sqlite3ExprCode(pParse, pEL->a[i].pExpr, pEL->a[i].u.iConstExprReg); + int iReg = pEL->a[i].u.iConstExprReg; + if( iReg>0 ){ + sqlite3ExprCode(pParse, pEL->a[i].pExpr, iReg); + } } } @@ -128435,10 +128539,25 @@ SQLITE_PRIVATE int sqlite3SchemaToIndex(sqlite3 *db, S } /* +** Deallocate a single AggInfo object +*/ +static void agginfoFree(sqlite3 *db, AggInfo *p){ + sqlite3DbFree(db, p->aCol); + sqlite3DbFree(db, p->aFunc); + sqlite3DbFree(db, p); +} + +/* ** Free all memory allocations in the pParse object */ SQLITE_PRIVATE void sqlite3ParserReset(Parse *pParse){ sqlite3 *db = pParse->db; + AggInfo *pThis = pParse->pAggList; + while( pThis ){ + AggInfo *pNext = pThis->pNext; + agginfoFree(db, pThis); + pThis = pNext; + } sqlite3DbFree(db, pParse->aLabel); sqlite3ExprListDelete(db, pParse->pConstExpr); if( db ){ @@ -131553,9 +131672,7 @@ static int multiSelect( selectOpName(p->op))); rc = sqlite3Select(pParse, p, &uniondest); testcase( rc!=SQLITE_OK ); - /* Query flattening in sqlite3Select() might refill p->pOrderBy. - ** Be sure to delete p->pOrderBy, therefore, to avoid a memory leak. */ - sqlite3ExprListDelete(db, p->pOrderBy); + assert( p->pOrderBy==0 ); pDelete = p->pPrior; p->pPrior = pPrior; p->pOrderBy = 0; @@ -132628,6 +132745,7 @@ static int flattenSubquery( Expr *pWhere; /* The WHERE clause */ struct SrcList_item *pSubitem; /* The subquery */ sqlite3 *db = pParse->db; + Walker w; /* Walker to persist agginfo data */ /* Check to see if flattening is permitted. Return 0 if not. */ @@ -132941,7 +133059,7 @@ static int flattenSubquery( ** We look at every expression in the outer query and every place we see ** "a" we substitute "x*3" and every place we see "b" we substitute "y+10". */ - if( pSub->pOrderBy ){ + if( pSub->pOrderBy && (pParent->selFlags & SF_NoopOrderBy)==0 ){ /* At this point, any non-zero iOrderByCol values indicate that the ** ORDER BY column expression is identical to the iOrderByCol'th ** expression returned by SELECT statement pSub. Since these values @@ -132965,7 +133083,13 @@ static int flattenSubquery( if( isLeftJoin>0 ){ sqlite3SetJoinExpr(pWhere, iNewParent); } - pParent->pWhere = sqlite3ExprAnd(pParse, pWhere, pParent->pWhere); + if( pWhere ){ + if( pParent->pWhere ){ + pParent->pWhere = sqlite3PExpr(pParse, TK_AND, pWhere, pParent->pWhere); + }else{ + pParent->pWhere = pWhere; + } + } if( db->mallocFailed==0 ){ SubstContext x; x.pParse = pParse; @@ -133002,6 +133126,8 @@ static int flattenSubquery( /* Finially, delete what is left of the subquery and return ** success. */ + sqlite3AggInfoPersistWalkerInit(&w, pParse); + sqlite3WalkSelect(&w,pSub1); sqlite3SelectDelete(db, pSub1); #if SELECTTRACE_ENABLED @@ -133262,11 +133388,14 @@ static int pushDownWhereTerms( ){ Expr *pNew; int nChng = 0; + Select *pSel; if( pWhere==0 ) return 0; if( pSubq->selFlags & SF_Recursive ) return 0; /* restriction (2) */ #ifndef SQLITE_OMIT_WINDOWFUNC - if( pSubq->pWin ) return 0; /* restriction (6) */ + for(pSel=pSubq; pSel; pSel=pSel->pPrior){ + if( pSel->pWin ) return 0; /* restriction (6) */ + } #endif #ifdef SQLITE_DEBUG @@ -133466,6 +133595,14 @@ static int convertCompoundSelectToSubquery(Walker *pWa for(pX=p; pX && (pX->op==TK_ALL || pX->op==TK_SELECT); pX=pX->pPrior){} if( pX==0 ) return WRC_Continue; a = p->pOrderBy->a; +#ifndef SQLITE_OMIT_WINDOWFUNC + /* If iOrderByCol is already non-zero, then it has already been matched + ** to a result column of the SELECT statement. This occurs when the + ** SELECT is rewritten for window-functions processing and then passed + ** to sqlite3SelectPrep() and similar a second time. The rewriting done + ** by this function is not required in this case. */ + if( a[0].u.x.iOrderByCol ) return WRC_Continue; +#endif for(i=p->pOrderBy->nExpr-1; i>=0; i--){ if( a[i].pExpr->flags & EP_Collate ) break; } @@ -134586,10 +134723,10 @@ SQLITE_PRIVATE int sqlite3Select( Expr *pWhere; /* The WHERE clause. May be NULL */ ExprList *pGroupBy; /* The GROUP BY clause. May be NULL */ Expr *pHaving; /* The HAVING clause. May be NULL */ + AggInfo *pAggInfo = 0; /* Aggregate information */ int rc = 1; /* Value to return from this function */ DistinctCtx sDistinct; /* Info on how to code the DISTINCT keyword */ SortCtx sSort; /* Info on how to code the ORDER BY clause */ - AggInfo sAggInfo; /* Information used by aggregate queries */ int iEnd; /* Address of the end of the query */ sqlite3 *db; /* The database connection */ ExprList *pMinMaxOrderBy = 0; /* Added ORDER BY for min/max queries */ @@ -134601,7 +134738,6 @@ SQLITE_PRIVATE int sqlite3Select( return 1; } if( sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0) ) return 1; - memset(&sAggInfo, 0, sizeof(sAggInfo)); #if SELECTTRACE_ENABLED SELECTTRACE(1,pParse,p, ("begin processing:\n", pParse->addrExplain)); if( sqlite3SelectTrace & 0x100 ){ @@ -134623,6 +134759,7 @@ SQLITE_PRIVATE int sqlite3Select( sqlite3ExprListDelete(db, p->pOrderBy); p->pOrderBy = 0; p->selFlags &= ~SF_Distinct; + p->selFlags |= SF_NoopOrderBy; } sqlite3SelectPrep(pParse, p, 0); if( pParse->nErr || db->mallocFailed ){ @@ -135191,14 +135328,20 @@ SQLITE_PRIVATE int sqlite3Select( ** sAggInfo for all TK_AGG_FUNCTION nodes in expressions of the ** SELECT statement. */ + pAggInfo = sqlite3DbMallocZero(db, sizeof(*pAggInfo) ); + if( pAggInfo==0 ){ + goto select_end; + } + pAggInfo->pNext = pParse->pAggList; + pParse->pAggList = pAggInfo; memset(&sNC, 0, sizeof(sNC)); sNC.pParse = pParse; sNC.pSrcList = pTabList; - sNC.uNC.pAggInfo = &sAggInfo; + sNC.uNC.pAggInfo = pAggInfo; VVA_ONLY( sNC.ncFlags = NC_UAggInfo; ) - sAggInfo.mnReg = pParse->nMem+1; - sAggInfo.nSortingColumn = pGroupBy ? pGroupBy->nExpr : 0; - sAggInfo.pGroupBy = pGroupBy; + pAggInfo->mnReg = pParse->nMem+1; + pAggInfo->nSortingColumn = pGroupBy ? pGroupBy->nExpr : 0; + pAggInfo->pGroupBy = pGroupBy; sqlite3ExprAnalyzeAggList(&sNC, pEList); sqlite3ExprAnalyzeAggList(&sNC, sSort.pOrderBy); if( pHaving ){ @@ -135211,14 +135354,14 @@ SQLITE_PRIVATE int sqlite3Select( } sqlite3ExprAnalyzeAggregates(&sNC, pHaving); } - sAggInfo.nAccumulator = sAggInfo.nColumn; - if( p->pGroupBy==0 && p->pHaving==0 && sAggInfo.nFunc==1 ){ - minMaxFlag = minMaxQuery(db, sAggInfo.aFunc[0].pExpr, &pMinMaxOrderBy); + pAggInfo->nAccumulator = pAggInfo->nColumn; + if( p->pGroupBy==0 && p->pHaving==0 && pAggInfo->nFunc==1 ){ + minMaxFlag = minMaxQuery(db, pAggInfo->aFunc[0].pExpr, &pMinMaxOrderBy); }else{ minMaxFlag = WHERE_ORDERBY_NORMAL; } - for(i=0; inFunc; i++){ + Expr *pExpr = pAggInfo->aFunc[i].pExpr; assert( !ExprHasProperty(pExpr, EP_xIsSelect) ); sNC.ncFlags |= NC_InAggFunc; sqlite3ExprAnalyzeAggList(&sNC, pExpr->x.pList); @@ -135230,22 +135373,22 @@ SQLITE_PRIVATE int sqlite3Select( #endif sNC.ncFlags &= ~NC_InAggFunc; } - sAggInfo.mxReg = pParse->nMem; + pAggInfo->mxReg = pParse->nMem; if( db->mallocFailed ) goto select_end; #if SELECTTRACE_ENABLED if( sqlite3SelectTrace & 0x400 ){ int ii; - SELECTTRACE(0x400,pParse,p,("After aggregate analysis %p:\n", &sAggInfo)); + SELECTTRACE(0x400,pParse,p,("After aggregate analysis %p:\n", pAggInfo)); sqlite3TreeViewSelect(0, p, 0); - for(ii=0; iinColumn; ii++){ sqlite3DebugPrintf("agg-column[%d] iMem=%d\n", - ii, sAggInfo.aCol[ii].iMem); - sqlite3TreeViewExpr(0, sAggInfo.aCol[ii].pExpr, 0); + ii, pAggInfo->aCol[ii].iMem); + sqlite3TreeViewExpr(0, pAggInfo->aCol[ii].pExpr, 0); } - for(ii=0; iinFunc; ii++){ sqlite3DebugPrintf("agg-func[%d]: iMem=%d\n", - ii, sAggInfo.aFunc[ii].iMem); - sqlite3TreeViewExpr(0, sAggInfo.aFunc[ii].pExpr, 0); + ii, pAggInfo->aFunc[ii].iMem); + sqlite3TreeViewExpr(0, pAggInfo->aFunc[ii].pExpr, 0); } } #endif @@ -135270,10 +135413,11 @@ SQLITE_PRIVATE int sqlite3Select( ** that we do not need it after all, the OP_SorterOpen instruction ** will be converted into a Noop. */ - sAggInfo.sortingIdx = pParse->nTab++; - pKeyInfo = sqlite3KeyInfoFromExprList(pParse,pGroupBy,0,sAggInfo.nColumn); + pAggInfo->sortingIdx = pParse->nTab++; + pKeyInfo = sqlite3KeyInfoFromExprList(pParse, pGroupBy, + 0, pAggInfo->nColumn); addrSortingIdx = sqlite3VdbeAddOp4(v, OP_SorterOpen, - sAggInfo.sortingIdx, sAggInfo.nSortingColumn, + pAggInfo->sortingIdx, pAggInfo->nSortingColumn, 0, (char*)pKeyInfo, P4_KEYINFO); /* Initialize memory locations used by GROUP BY aggregate processing @@ -135328,8 +135472,8 @@ SQLITE_PRIVATE int sqlite3Select( nGroupBy = pGroupBy->nExpr; nCol = nGroupBy; j = nGroupBy; - for(i=0; i=j ){ + for(i=0; inColumn; i++){ + if( pAggInfo->aCol[i].iSorterColumn>=j ){ nCol++; j++; } @@ -135337,8 +135481,8 @@ SQLITE_PRIVATE int sqlite3Select( regBase = sqlite3GetTempRange(pParse, nCol); sqlite3ExprCodeExprList(pParse, pGroupBy, regBase, 0, 0); j = nGroupBy; - for(i=0; inColumn; i++){ + struct AggInfo_col *pCol = &pAggInfo->aCol[i]; if( pCol->iSorterColumn>=j ){ int r1 = j + regBase; sqlite3ExprCodeGetColumnOfTable(v, @@ -135348,16 +135492,16 @@ SQLITE_PRIVATE int sqlite3Select( } regRecord = sqlite3GetTempReg(pParse); sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nCol, regRecord); - sqlite3VdbeAddOp2(v, OP_SorterInsert, sAggInfo.sortingIdx, regRecord); + sqlite3VdbeAddOp2(v, OP_SorterInsert, pAggInfo->sortingIdx, regRecord); sqlite3ReleaseTempReg(pParse, regRecord); sqlite3ReleaseTempRange(pParse, regBase, nCol); sqlite3WhereEnd(pWInfo); - sAggInfo.sortingIdxPTab = sortPTab = pParse->nTab++; + pAggInfo->sortingIdxPTab = sortPTab = pParse->nTab++; sortOut = sqlite3GetTempReg(pParse); sqlite3VdbeAddOp3(v, OP_OpenPseudo, sortPTab, sortOut, nCol); - sqlite3VdbeAddOp2(v, OP_SorterSort, sAggInfo.sortingIdx, addrEnd); + sqlite3VdbeAddOp2(v, OP_SorterSort, pAggInfo->sortingIdx, addrEnd); VdbeComment((v, "GROUP BY sort")); VdbeCoverage(v); - sAggInfo.useSortingIdx = 1; + pAggInfo->useSortingIdx = 1; } /* If the index or temporary table used by the GROUP BY sort @@ -135381,14 +135525,14 @@ SQLITE_PRIVATE int sqlite3Select( */ addrTopOfLoop = sqlite3VdbeCurrentAddr(v); if( groupBySort ){ - sqlite3VdbeAddOp3(v, OP_SorterData, sAggInfo.sortingIdx, + sqlite3VdbeAddOp3(v, OP_SorterData, pAggInfo->sortingIdx, sortOut, sortPTab); } for(j=0; jnExpr; j++){ if( groupBySort ){ sqlite3VdbeAddOp3(v, OP_Column, sortPTab, j, iBMem+j); }else{ - sAggInfo.directMode = 1; + pAggInfo->directMode = 1; sqlite3ExprCode(pParse, pGroupBy->a[j].pExpr, iBMem+j); } } @@ -135418,14 +135562,14 @@ SQLITE_PRIVATE int sqlite3Select( ** the current row */ sqlite3VdbeJumpHere(v, addr1); - updateAccumulator(pParse, iUseFlag, &sAggInfo); + updateAccumulator(pParse, iUseFlag, pAggInfo); sqlite3VdbeAddOp2(v, OP_Integer, 1, iUseFlag); VdbeComment((v, "indicate data in accumulator")); /* End of the loop */ if( groupBySort ){ - sqlite3VdbeAddOp2(v, OP_SorterNext, sAggInfo.sortingIdx, addrTopOfLoop); + sqlite3VdbeAddOp2(v, OP_SorterNext, pAggInfo->sortingIdx, addrTopOfLoop); VdbeCoverage(v); }else{ sqlite3WhereEnd(pWInfo); @@ -135458,7 +135602,7 @@ SQLITE_PRIVATE int sqlite3Select( VdbeCoverage(v); VdbeComment((v, "Groupby result generator entry point")); sqlite3VdbeAddOp1(v, OP_Return, regOutputRow); - finalizeAggFunctions(pParse, &sAggInfo); + finalizeAggFunctions(pParse, pAggInfo); sqlite3ExprIfFalse(pParse, pHaving, addrOutputRow+1, SQLITE_JUMPIFNULL); selectInnerLoop(pParse, p, -1, &sSort, &sDistinct, pDest, @@ -135469,7 +135613,7 @@ SQLITE_PRIVATE int sqlite3Select( /* Generate a subroutine that will reset the group-by accumulator */ sqlite3VdbeResolveLabel(v, addrReset); - resetAccumulator(pParse, &sAggInfo); + resetAccumulator(pParse, pAggInfo); sqlite3VdbeAddOp2(v, OP_Integer, 0, iUseFlag); VdbeComment((v, "indicate accumulator empty")); sqlite3VdbeAddOp1(v, OP_Return, regReset); @@ -135477,7 +135621,7 @@ SQLITE_PRIVATE int sqlite3Select( } /* endif pGroupBy. Begin aggregate queries without GROUP BY: */ else { Table *pTab; - if( (pTab = isSimpleCount(p, &sAggInfo))!=0 ){ + if( (pTab = isSimpleCount(p, pAggInfo))!=0 ){ /* If isSimpleCount() returns a pointer to a Table structure, then ** the SQL statement is of the form: ** @@ -135532,7 +135676,7 @@ SQLITE_PRIVATE int sqlite3Select( if( pKeyInfo ){ sqlite3VdbeChangeP4(v, -1, (char *)pKeyInfo, P4_KEYINFO); } - sqlite3VdbeAddOp2(v, OP_Count, iCsr, sAggInfo.aFunc[0].iMem); + sqlite3VdbeAddOp2(v, OP_Count, iCsr, pAggInfo->aFunc[0].iMem); sqlite3VdbeAddOp1(v, OP_Close, iCsr); explainSimpleCount(pParse, pTab, pBest); }else{ @@ -135547,12 +135691,16 @@ SQLITE_PRIVATE int sqlite3Select( ** first row visited by the aggregate, so that they are updated at ** least once even if the FILTER clause means the min() or max() ** function visits zero rows. */ - if( sAggInfo.nAccumulator ){ - for(i=0; ifuncFlags&SQLITE_FUNC_NEEDCOLL ) break; + if( pAggInfo->nAccumulator ){ + for(i=0; inFunc; i++){ + if( ExprHasProperty(pAggInfo->aFunc[i].pExpr, EP_WinFunc) ){ + continue; + } + if( pAggInfo->aFunc[i].pFunc->funcFlags&SQLITE_FUNC_NEEDCOLL ){ + break; + } } - if( i==sAggInfo.nFunc ){ + if( i==pAggInfo->nFunc ){ regAcc = ++pParse->nMem; sqlite3VdbeAddOp2(v, OP_Integer, 0, regAcc); } @@ -135563,7 +135711,7 @@ SQLITE_PRIVATE int sqlite3Select( ** of output. */ assert( p->pGroupBy==0 ); - resetAccumulator(pParse, &sAggInfo); + resetAccumulator(pParse, pAggInfo); /* If this query is a candidate for the min/max optimization, then ** minMaxFlag will have been previously set to either @@ -135579,7 +135727,7 @@ SQLITE_PRIVATE int sqlite3Select( if( pWInfo==0 ){ goto select_end; } - updateAccumulator(pParse, regAcc, &sAggInfo); + updateAccumulator(pParse, regAcc, pAggInfo); if( regAcc ) sqlite3VdbeAddOp2(v, OP_Integer, 1, regAcc); if( sqlite3WhereIsOrdered(pWInfo)>0 ){ sqlite3VdbeGoto(v, sqlite3WhereBreakLabel(pWInfo)); @@ -135587,7 +135735,7 @@ SQLITE_PRIVATE int sqlite3Select( (minMaxFlag==WHERE_ORDERBY_MIN?"min":"max"))); } sqlite3WhereEnd(pWInfo); - finalizeAggFunctions(pParse, &sAggInfo); + finalizeAggFunctions(pParse, pAggInfo); } sSort.pOrderBy = 0; @@ -135626,8 +135774,25 @@ SQLITE_PRIVATE int sqlite3Select( */ select_end: sqlite3ExprListDelete(db, pMinMaxOrderBy); - sqlite3DbFree(db, sAggInfo.aCol); - sqlite3DbFree(db, sAggInfo.aFunc); +#ifdef SQLITE_DEBUG + if( pAggInfo && !db->mallocFailed ){ + for(i=0; inColumn; i++){ + Expr *pExpr = pAggInfo->aCol[i].pExpr; + assert( pExpr!=0 || db->mallocFailed ); + if( pExpr==0 ) continue; + assert( pExpr->pAggInfo==pAggInfo ); + assert( pExpr->iAgg==i ); + } + for(i=0; inFunc; i++){ + Expr *pExpr = pAggInfo->aFunc[i].pExpr; + assert( pExpr!=0 || db->mallocFailed ); + if( pExpr==0 ) continue; + assert( pExpr->pAggInfo==pAggInfo ); + assert( pExpr->iAgg==i ); + } + } +#endif + #if SELECTTRACE_ENABLED SELECTTRACE(0x1,pParse,p,("end processing\n")); if( (sqlite3SelectTrace & 0x2000)!=0 && ExplainQueryPlanParent(pParse)==0 ){ @@ -151319,12 +151484,16 @@ SQLITE_PRIVATE int sqlite3WindowRewrite(Parse *pParse, Window *pMWin = p->pWin; /* Master window object */ Window *pWin; /* Window object iterator */ Table *pTab; + Walker w; + u32 selFlags = p->selFlags; pTab = sqlite3DbMallocZero(db, sizeof(Table)); if( pTab==0 ){ return sqlite3ErrorToParser(db, SQLITE_NOMEM); } + sqlite3AggInfoPersistWalkerInit(&w, pParse); + sqlite3WalkSelect(&w, p); p->pSrc = 0; p->pWhere = 0; @@ -151405,7 +151574,6 @@ SQLITE_PRIVATE int sqlite3WindowRewrite(Parse *pParse, p->pSrc = sqlite3SrcListAppend(pParse, 0, 0, 0); if( p->pSrc ){ Table *pTab2; - Walker w; p->pSrc->a[0].pSelect = pSub; sqlite3SrcListAssignCursors(pParse, p->pSrc); pSub->selFlags |= SF_Expanded; @@ -168302,6 +168470,9 @@ static int fts3PoslistMerge( */ fts3GetDeltaVarint(&p1, &i1); fts3GetDeltaVarint(&p2, &i2); + if( i1<2 || i2<2 ){ + break; + } do { fts3PutDeltaVarint(&p, &iPrev, (i10 ); assert( *pbEof==0 ); - assert( p || *piDocid==0 ); + assert_fts3_nc( p || *piDocid==0 ); assert( !p || (p>=aDoclist && p<=&aDoclist[nDoclist]) ); if( p==0 ){ @@ -171205,7 +171376,7 @@ static void fts3EvalInvalidatePoslist(Fts3Phrase *pPhr ** ** Parameter nNear is passed the NEAR distance of the expression (5 in ** the example above). When this function is called, *paPoslist points to -** the position list, and *pnToken is the number of phrase tokens in, the +** the position list, and *pnToken is the number of phrase tokens in the ** phrase on the other side of the NEAR operator to pPhrase. For example, ** if pPhrase refers to the "def ghi" phrase, then *paPoslist points to ** the position list associated with phrase "abc". @@ -224824,7 +224995,7 @@ static void fts5SourceIdFunc( ){ assert( nArg==0 ); UNUSED_PARAM2(nArg, apUnused); - sqlite3_result_text(pCtx, "fts5: 2020-06-04 12:58:43 ec02243ea6ce33b090870ae55ab8aa2534b54d216d45c4aa2fdbb00e86861e8c", -1, SQLITE_TRANSIENT); + sqlite3_result_text(pCtx, "fts5: 2020-06-18 14:00:33 7ebdfa80be8e8e73324b8d66b3460222eb74c7e9dfd655b48d6ca7e1933cc8fd", -1, SQLITE_TRANSIENT); } /* @@ -229607,9 +229778,9 @@ SQLITE_API int sqlite3_stmt_init( #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */ /************** End of stmt.c ************************************************/ -#if __LINE__!=229610 +#if __LINE__!=229781 #undef SQLITE_SOURCE_ID -#define SQLITE_SOURCE_ID "2020-06-04 12:58:43 ec02243ea6ce33b090870ae55ab8aa2534b54d216d45c4aa2fdbb00e8686alt2" +#define SQLITE_SOURCE_ID "2020-06-18 14:00:33 7ebdfa80be8e8e73324b8d66b3460222eb74c7e9dfd655b48d6ca7e1933calt2" #endif /* Return the source-id for this library */ SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } Modified: head/contrib/sqlite3/sqlite3.h ============================================================================== --- head/contrib/sqlite3/sqlite3.h Tue Jul 7 18:37:06 2020 (r362996) +++ head/contrib/sqlite3/sqlite3.h Tue Jul 7 19:09:38 2020 (r362997) @@ -123,9 +123,9 @@ extern "C" { ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.32.2" -#define SQLITE_VERSION_NUMBER 3032002 -#define SQLITE_SOURCE_ID "2020-06-04 12:58:43 ec02243ea6ce33b090870ae55ab8aa2534b54d216d45c4aa2fdbb00e86861e8c" +#define SQLITE_VERSION "3.32.3" +#define SQLITE_VERSION_NUMBER 3032003 +#define SQLITE_SOURCE_ID "2020-06-18 14:00:33 7ebdfa80be8e8e73324b8d66b3460222eb74c7e9dfd655b48d6ca7e1933cc8fd" /* ** CAPI3REF: Run-Time Library Version Numbers Modified: head/contrib/sqlite3/tea/configure ============================================================================== --- head/contrib/sqlite3/tea/configure Tue Jul 7 18:37:06 2020 (r362996) +++ head/contrib/sqlite3/tea/configure Tue Jul 7 19:09:38 2020 (r362997) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sqlite 3.32.2. +# Generated by GNU Autoconf 2.69 for sqlite 3.32.3. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.32.2' -PACKAGE_STRING='sqlite 3.32.2' +PACKAGE_VERSION='3.32.3' +PACKAGE_STRING='sqlite 3.32.3' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1303,7 +1303,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.32.2 to adapt to many kinds of systems. +\`configure' configures sqlite 3.32.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1365,7 +1365,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.32.2:";; + short | recursive ) echo "Configuration of sqlite 3.32.3:";; esac cat <<\_ACEOF @@ -1467,7 +1467,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.32.2 +sqlite configure 3.32.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1878,7 +1878,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.32.2, which was +It was created by sqlite $as_me 3.32.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -9373,7 +9373,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.32.2, which was +This file was extended by sqlite $as_me 3.32.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9426,7 +9426,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sqlite config.status 3.32.2 +sqlite config.status 3.32.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: head/contrib/sqlite3/tea/configure.ac ============================================================================== --- head/contrib/sqlite3/tea/configure.ac Tue Jul 7 18:37:06 2020 (r362996) +++ head/contrib/sqlite3/tea/configure.ac Tue Jul 7 19:09:38 2020 (r362997) @@ -19,7 +19,7 @@ dnl to configure the system for the local environment. # so you can encode the package version directly into the source files. #----------------------------------------------------------------------- -AC_INIT([sqlite], [3.32.2]) +AC_INIT([sqlite], [3.32.3]) #-------------------------------------------------------------------- # Call TEA_INIT as the first TEA_ macro to set up initial vars. From owner-svn-src-head@freebsd.org Tue Jul 7 20:33:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 59DB134C58C; Tue, 7 Jul 2020 20:33:13 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1YzY1jvfz45QW; Tue, 7 Jul 2020 20:33:13 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1EDE615062; Tue, 7 Jul 2020 20:33:13 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 067KXD0l029719; Tue, 7 Jul 2020 20:33:13 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 067KXC9V029714; Tue, 7 Jul 2020 20:33:12 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <202007072033.067KXC9V029714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Tue, 7 Jul 2020 20:33:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362998 - in head: stand/defaults sys/amd64/amd64 sys/powerpc/aim sys/vm X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in head: stand/defaults sys/amd64/amd64 sys/powerpc/aim sys/vm X-SVN-Commit-Revision: 362998 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 20:33:13 -0000 Author: scottl Date: Tue Jul 7 20:33:11 2020 New Revision: 362998 URL: https://svnweb.freebsd.org/changeset/base/362998 Log: Migrate the feature of excluding RAM pages to use "excludelist" as its nomenclature. MFC after: 1 week Modified: head/stand/defaults/loader.conf head/sys/amd64/amd64/pmap.c head/sys/powerpc/aim/mmu_radix.c head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/stand/defaults/loader.conf ============================================================================== --- head/stand/defaults/loader.conf Tue Jul 7 19:09:38 2020 (r362997) +++ head/stand/defaults/loader.conf Tue Jul 7 20:33:11 2020 (r362998) @@ -49,12 +49,12 @@ entropy_cache_type="boot_entropy_cache" # Required for # must not change value even if the # _name above does change! -### RAM Blacklist configuration ############################ -ram_blacklist_load="NO" # Set this to YES to load a file +### RAM Excludelist configuration ############################ +ram_excludelist_load="NO" # Set this to YES to load a file # containing a list of addresses to # exclude from the running system. -ram_blacklist_name="/boot/blacklist.txt" # Set this to the name of the file -ram_blacklist_type="ram_blacklist" # Required for the kernel to find +ram_excludeist_name="/boot/excludelist.txt" # Set this to the name of the file +ram_excludelist_type="ram_excludelist" # Required for the kernel to find # the blacklist module ### Microcode loading configuration ######################## Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue Jul 7 19:09:38 2020 (r362997) +++ head/sys/amd64/amd64/pmap.c Tue Jul 7 20:33:11 2020 (r362998) @@ -2060,7 +2060,7 @@ pmap_init(void) int error, i, ret, skz63; /* L1TF, reserve page @0 unconditionally */ - vm_page_blacklist_add(0, bootverbose); + vm_page_excludelist_add(0, bootverbose); /* Detect bare-metal Skylake Server and Skylake-X. */ if (vm_guest == VM_GUEST_NO && cpu_vendor_id == CPU_VENDOR_INTEL && @@ -2081,7 +2081,7 @@ pmap_init(void) printf("SKZ63: skipping 4M RAM starting " "at physical 1G\n"); for (i = 0; i < atop(0x400000); i++) { - ret = vm_page_blacklist_add(0x40000000 + + ret = vm_page_excludelist_add(0x40000000 + ptoa(i), FALSE); if (!ret && bootverbose) printf("page at %#lx already used\n", Modified: head/sys/powerpc/aim/mmu_radix.c ============================================================================== --- head/sys/powerpc/aim/mmu_radix.c Tue Jul 7 19:09:38 2020 (r362997) +++ head/sys/powerpc/aim/mmu_radix.c Tue Jul 7 20:33:11 2020 (r362998) @@ -3557,7 +3557,7 @@ mmu_radix_init() int error, i, pv_npg; /* L1TF, reserve page @0 unconditionally */ - vm_page_blacklist_add(0, bootverbose); + vm_page_excludelist_add(0, bootverbose); zone_radix_pgd = uma_zcache_create("radix_pgd_cache", RADIX_PGD_SIZE, NULL, NULL, Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue Jul 7 19:09:38 2020 (r362997) +++ head/sys/vm/vm_page.c Tue Jul 7 20:33:11 2020 (r362998) @@ -155,10 +155,11 @@ vm_page_t vm_page_array; long vm_page_array_size; long first_page; -static TAILQ_HEAD(, vm_page) blacklist_head; -static int sysctl_vm_page_blacklist(SYSCTL_HANDLER_ARGS); -SYSCTL_PROC(_vm, OID_AUTO, page_blacklist, CTLTYPE_STRING | CTLFLAG_RD | - CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_page_blacklist, "A", "Blacklist pages"); +static TAILQ_HEAD(, vm_page) excludelist_head; +static int sysctl_vm_page_excludelist(SYSCTL_HANDLER_ARGS); +SYSCTL_PROC(_vm, OID_AUTO, page_excludelist, CTLTYPE_STRING | CTLFLAG_RD | + CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_page_excludelist, "A", + "Blacklist pages"); static uma_zone_t fakepg_zone; @@ -258,16 +259,16 @@ vm_set_page_size(void) } /* - * vm_page_blacklist_next: + * vm_page_excludelist_next: * - * Find the next entry in the provided string of blacklist + * Find the next entry in the provided string of excludelist * addresses. Entries are separated by space, comma, or newline. * If an invalid integer is encountered then the rest of the * string is skipped. Updates the list pointer to the next * character, or NULL if the string is exhausted or invalid. */ static vm_paddr_t -vm_page_blacklist_next(char **list, char *end) +vm_page_excludelist_next(char **list, char *end) { vm_paddr_t bad; char *cp, *pos; @@ -314,13 +315,13 @@ vm_page_blacklist_next(char **list, char *end) *list = cp; return (trunc_page(bad)); } - printf("Garbage in RAM blacklist, skipping\n"); + printf("Garbage in RAM excludelist, skipping\n"); *list = NULL; return (0); } bool -vm_page_blacklist_add(vm_paddr_t pa, bool verbose) +vm_page_excludelist_add(vm_paddr_t pa, bool verbose) { struct vm_domain *vmd; vm_page_t m; @@ -336,7 +337,7 @@ vm_page_blacklist_add(vm_paddr_t pa, bool verbose) vm_domain_free_unlock(vmd); if (ret != 0) { vm_domain_freecnt_inc(vmd, -1); - TAILQ_INSERT_TAIL(&blacklist_head, m, listq); + TAILQ_INSERT_TAIL(&excludelist_head, m, listq); if (verbose) printf("Skipping page with pa 0x%jx\n", (uintmax_t)pa); } @@ -344,35 +345,35 @@ vm_page_blacklist_add(vm_paddr_t pa, bool verbose) } /* - * vm_page_blacklist_check: + * vm_page_excludelist_check: * - * Iterate through the provided string of blacklist addresses, pulling + * Iterate through the provided string of excludelist addresses, pulling * each entry out of the physical allocator free list and putting it - * onto a list for reporting via the vm.page_blacklist sysctl. + * onto a list for reporting via the vm.page_excludelist sysctl. */ static void -vm_page_blacklist_check(char *list, char *end) +vm_page_excludelist_check(char *list, char *end) { vm_paddr_t pa; char *next; next = list; while (next != NULL) { - if ((pa = vm_page_blacklist_next(&next, end)) == 0) + if ((pa = vm_page_excludelist_next(&next, end)) == 0) continue; - vm_page_blacklist_add(pa, bootverbose); + vm_page_excludelist_add(pa, bootverbose); } } /* - * vm_page_blacklist_load: + * vm_page_excludelist_load: * - * Search for a special module named "ram_blacklist". It'll be a + * Search for a special module named "ram_excludelist". It'll be a * plain text file provided by the user via the loader directive * of the same name. */ static void -vm_page_blacklist_load(char **list, char **end) +vm_page_excludelist_load(char **list, char **end) { void *mod; u_char *ptr; @@ -381,7 +382,7 @@ vm_page_blacklist_load(char **list, char **end) mod = NULL; ptr = NULL; - mod = preload_search_by_type("ram_blacklist"); + mod = preload_search_by_type("ram_excludelist"); if (mod != NULL) { ptr = preload_fetch_addr(mod); len = preload_fetch_size(mod); @@ -395,7 +396,7 @@ vm_page_blacklist_load(char **list, char **end) } static int -sysctl_vm_page_blacklist(SYSCTL_HANDLER_ARGS) +sysctl_vm_page_excludelist(SYSCTL_HANDLER_ARGS) { vm_page_t m; struct sbuf sbuf; @@ -406,7 +407,7 @@ sysctl_vm_page_blacklist(SYSCTL_HANDLER_ARGS) if (error != 0) return (error); sbuf_new_for_sysctl(&sbuf, NULL, 128, req); - TAILQ_FOREACH(m, &blacklist_head, listq) { + TAILQ_FOREACH(m, &excludelist_head, listq) { sbuf_printf(&sbuf, "%s%#jx", first ? "" : ",", (uintmax_t)m->phys_addr); first = 0; @@ -793,14 +794,14 @@ vm_page_startup(vm_offset_t vaddr) } /* - * Remove blacklisted pages from the physical memory allocator. + * Remove excludelisted pages from the physical memory allocator. */ - TAILQ_INIT(&blacklist_head); - vm_page_blacklist_load(&list, &listend); - vm_page_blacklist_check(list, listend); + TAILQ_INIT(&excludelist_head); + vm_page_excludelist_load(&list, &listend); + vm_page_excludelist_check(list, listend); - list = kern_getenv("vm.blacklist"); - vm_page_blacklist_check(list, NULL); + list = kern_getenv("vm.excludelist"); + vm_page_excludelist_check(list, NULL); freeenv(list); #if VM_NRESERVLEVEL > 0 Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Tue Jul 7 19:09:38 2020 (r362997) +++ head/sys/vm/vm_page.h Tue Jul 7 20:33:11 2020 (r362998) @@ -613,7 +613,7 @@ vm_page_t vm_page_alloc_contig_domain(vm_object_t obje vm_page_t vm_page_alloc_freelist(int, int); vm_page_t vm_page_alloc_freelist_domain(int, int, int); void vm_page_bits_set(vm_page_t m, vm_page_bits_t *bits, vm_page_bits_t set); -bool vm_page_blacklist_add(vm_paddr_t pa, bool verbose); +bool vm_page_excludelist_add(vm_paddr_t pa, bool verbose); vm_page_t vm_page_grab(vm_object_t, vm_pindex_t, int); vm_page_t vm_page_grab_unlocked(vm_object_t, vm_pindex_t, int); int vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int allocflags, From owner-svn-src-head@freebsd.org Tue Jul 7 20:42:35 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C00E834C3F2; Tue, 7 Jul 2020 20:42:35 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1ZBM4jT6z463t; Tue, 7 Jul 2020 20:42:35 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8558615683; Tue, 7 Jul 2020 20:42:35 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 067KgZb6035654; Tue, 7 Jul 2020 20:42:35 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 067KgZqd035653; Tue, 7 Jul 2020 20:42:35 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <202007072042.067KgZqd035653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Tue, 7 Jul 2020 20:42:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362999 - head/stand/defaults X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: head/stand/defaults X-SVN-Commit-Revision: 362999 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 20:42:35 -0000 Author: scottl Date: Tue Jul 7 20:42:35 2020 New Revision: 362999 URL: https://svnweb.freebsd.org/changeset/base/362999 Log: Fix a example/docs typo from r362998, no functional change. Modified: head/stand/defaults/loader.conf Modified: head/stand/defaults/loader.conf ============================================================================== --- head/stand/defaults/loader.conf Tue Jul 7 20:33:11 2020 (r362998) +++ head/stand/defaults/loader.conf Tue Jul 7 20:42:35 2020 (r362999) @@ -53,7 +53,7 @@ entropy_cache_type="boot_entropy_cache" # Required for ram_excludelist_load="NO" # Set this to YES to load a file # containing a list of addresses to # exclude from the running system. -ram_excludeist_name="/boot/excludelist.txt" # Set this to the name of the file +ram_excludelist_name="/boot/excludelist.txt" # Set this to the name of the file ram_excludelist_type="ram_excludelist" # Required for the kernel to find # the blacklist module From owner-svn-src-head@freebsd.org Tue Jul 7 21:52:41 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 972DB34E0DB; Tue, 7 Jul 2020 21:52:41 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1blF25tcz49pG; Tue, 7 Jul 2020 21:52:41 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: by mail-yb1-xb2f.google.com with SMTP id h39so21298499ybj.3; Tue, 07 Jul 2020 14:52:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Yl1kIEgiwM+5Iaw/qF4C/2h1C9xeNhgX9Kf7knpsM8Q=; b=I82/y0FhtHrPl17iqzYocu1m5nuTuw3cpIl+FfFsVMwLDFYdJhr9fvIcccZpat10EB 0rDTgFJfd76jSiiJtWHnFb+qSbAqJefSS0lk3yyL59QRqDuIhdplRjTAwya2d+mGUVl2 9EAXSQFOOeDOISdwsATKpxdvmVVGPxjGnyF6R9gi/k7g8ThVfFPtYwciB35xtv/tVC95 D7WF775y+DPvQZPVSgkILtN3U2tgWJll4CrzrppaqaJ6gOj85TDgiEjDhyRHwjFyvT0v SFogbR2SzBkwfTvTv+I97KJ7iLqF3G+YyBiXsz1umBu1NMq2sLqCXpVE4rhixLD7EfpU Yr9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Yl1kIEgiwM+5Iaw/qF4C/2h1C9xeNhgX9Kf7knpsM8Q=; b=e+hjcazC1O2shfHLIZyhjDLuTf8YtjiCyYwEDxCrX4L2bPD/u7SCY6LwOv2yNNntWC R4oag2Qko6Fjp6aW3ARX2WHpulsbels4fNIqPjnzXmMEji9QB5qY7MR7HT3CsjrNaSAJ mDs1oETP1RPIRceQe7Nl64YeCmXtZIBPazdVSs+VHwJcHaYWXF50O+8oF8wTnvXQ4h8Y RP0dmltHSSGXWUgyD7vZXBlJ8xvxkBkHFF41th/x/34iQqEREKhuNwslTO4xv4L8U/dM isUE/ObrcUQaqNBl7zp9sTogvS5gcJVgC/kp5OiA1CQcwKw+wyh7dhkpdji5yA1byMsq nuRg== X-Gm-Message-State: AOAM530ngbClJBbBZvyey4YD+qfEtfnHLhUJrQZy2JqAsv0pPvsyLdkp Jx+U+tl5VuEbp+QcB1Ye9n/piqd2tEwD0LyjTkZZOg== X-Google-Smtp-Source: ABdhPJyFTfiAiE3nB0B+aq+qbRGIfeKMJAec0Zbgjptpzeja+Efwmx3phgxVGSwqdjsFEbJ4DdPfAwH6BK5d+1JB+7Y= X-Received: by 2002:a25:c045:: with SMTP id c66mr33762487ybf.314.1594158759947; Tue, 07 Jul 2020 14:52:39 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:ad26:0:0:0:0:0 with HTTP; Tue, 7 Jul 2020 14:52:39 -0700 (PDT) In-Reply-To: <202007072033.067KXC9V029714@repo.freebsd.org> References: <202007072033.067KXC9V029714@repo.freebsd.org> From: Oliver Pinter Date: Tue, 7 Jul 2020 23:52:39 +0200 Message-ID: Subject: Re: svn commit: r362998 - in head: stand/defaults sys/amd64/amd64 sys/powerpc/aim sys/vm To: Scott Long Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Rspamd-Queue-Id: 4B1blF25tcz49pG X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 21:52:41 -0000 On Tuesday, July 7, 2020, Scott Long wrote: > Author: scottl > Date: Tue Jul 7 20:33:11 2020 > New Revision: 362998 > URL: https://svnweb.freebsd.org/changeset/base/362998 > > Log: > Migrate the feature of excluding RAM pages to use "excludelist" > as its nomenclature. > > MFC after: 1 week > > Modified: > head/stand/defaults/loader.conf > head/sys/amd64/amd64/pmap.c > head/sys/powerpc/aim/mmu_radix.c > head/sys/vm/vm_page.c > head/sys/vm/vm_page.h > > Modified: head/stand/defaults/loader.conf > ============================================================ > ================== > --- head/stand/defaults/loader.conf Tue Jul 7 19:09:38 2020 > (r362997) > +++ head/stand/defaults/loader.conf Tue Jul 7 20:33:11 2020 > (r362998) > @@ -49,12 +49,12 @@ entropy_cache_type="boot_entropy_cache" # > Required for > # must not change value even if the > # _name above does change! > > -### RAM Blacklist configuration ############################ > -ram_blacklist_load="NO" # Set this to YES to load > a file > +### RAM Excludelist configuration ############################ > +ram_excludelist_load="NO" # Set this to YES to load a file > # containing a list of addresses to > # exclude from the running system. > -ram_blacklist_name="/boot/blacklist.txt" # Set this to the name of the > file > -ram_blacklist_type="ram_blacklist" # Required for the kernel to find > +ram_excludeist_name="/boot/excludelist.txt" # Set this to the name of > the file > +ram_excludelist_type="ram_excludelist" # Required for the kernel to find This will break systems where the blacklist file is already in use. At least please add this to release notes and provide a backward compatible way. > # the blacklist module > > ### Microcode loading configuration ######################## > > Modified: head/sys/amd64/amd64/pmap.c > ============================================================ > ================== > --- head/sys/amd64/amd64/pmap.c Tue Jul 7 19:09:38 2020 (r362997) > +++ head/sys/amd64/amd64/pmap.c Tue Jul 7 20:33:11 2020 (r362998) > @@ -2060,7 +2060,7 @@ pmap_init(void) > int error, i, ret, skz63; > > /* L1TF, reserve page @0 unconditionally */ > - vm_page_blacklist_add(0, bootverbose); > + vm_page_excludelist_add(0, bootverbose); > > /* Detect bare-metal Skylake Server and Skylake-X. */ > if (vm_guest == VM_GUEST_NO && cpu_vendor_id == CPU_VENDOR_INTEL && > @@ -2081,7 +2081,7 @@ pmap_init(void) > printf("SKZ63: skipping 4M RAM starting " > "at physical 1G\n"); > for (i = 0; i < atop(0x400000); i++) { > - ret = vm_page_blacklist_add(0x40000000 + > + ret = vm_page_excludelist_add(0x40000000 + > ptoa(i), FALSE); > if (!ret && bootverbose) > printf("page at %#lx already > used\n", > > Modified: head/sys/powerpc/aim/mmu_radix.c > ============================================================ > ================== > --- head/sys/powerpc/aim/mmu_radix.c Tue Jul 7 19:09:38 2020 > (r362997) > +++ head/sys/powerpc/aim/mmu_radix.c Tue Jul 7 20:33:11 2020 > (r362998) > @@ -3557,7 +3557,7 @@ mmu_radix_init() > int error, i, pv_npg; > > /* L1TF, reserve page @0 unconditionally */ > - vm_page_blacklist_add(0, bootverbose); > + vm_page_excludelist_add(0, bootverbose); > > zone_radix_pgd = uma_zcache_create("radix_pgd_cache", > RADIX_PGD_SIZE, NULL, NULL, > > Modified: head/sys/vm/vm_page.c > ============================================================ > ================== > --- head/sys/vm/vm_page.c Tue Jul 7 19:09:38 2020 (r362997) > +++ head/sys/vm/vm_page.c Tue Jul 7 20:33:11 2020 (r362998) > @@ -155,10 +155,11 @@ vm_page_t vm_page_array; > long vm_page_array_size; > long first_page; > > -static TAILQ_HEAD(, vm_page) blacklist_head; > -static int sysctl_vm_page_blacklist(SYSCTL_HANDLER_ARGS); > -SYSCTL_PROC(_vm, OID_AUTO, page_blacklist, CTLTYPE_STRING | CTLFLAG_RD | > - CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_page_blacklist, "A", "Blacklist > pages"); > +static TAILQ_HEAD(, vm_page) excludelist_head; > +static int sysctl_vm_page_excludelist(SYSCTL_HANDLER_ARGS); > +SYSCTL_PROC(_vm, OID_AUTO, page_excludelist, CTLTYPE_STRING | CTLFLAG_RD | > + CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_page_excludelist, "A", > + "Blacklist pages"); > > static uma_zone_t fakepg_zone; > > @@ -258,16 +259,16 @@ vm_set_page_size(void) > } > > /* > - * vm_page_blacklist_next: > + * vm_page_excludelist_next: > * > - * Find the next entry in the provided string of blacklist > + * Find the next entry in the provided string of excludelist > * addresses. Entries are separated by space, comma, or newline. > * If an invalid integer is encountered then the rest of the > * string is skipped. Updates the list pointer to the next > * character, or NULL if the string is exhausted or invalid. > */ > static vm_paddr_t > -vm_page_blacklist_next(char **list, char *end) > +vm_page_excludelist_next(char **list, char *end) > { > vm_paddr_t bad; > char *cp, *pos; > @@ -314,13 +315,13 @@ vm_page_blacklist_next(char **list, char *end) > *list = cp; > return (trunc_page(bad)); > } > - printf("Garbage in RAM blacklist, skipping\n"); > + printf("Garbage in RAM excludelist, skipping\n"); > *list = NULL; > return (0); > } > > bool > -vm_page_blacklist_add(vm_paddr_t pa, bool verbose) > +vm_page_excludelist_add(vm_paddr_t pa, bool verbose) > { > struct vm_domain *vmd; > vm_page_t m; > @@ -336,7 +337,7 @@ vm_page_blacklist_add(vm_paddr_t pa, bool verbose) > vm_domain_free_unlock(vmd); > if (ret != 0) { > vm_domain_freecnt_inc(vmd, -1); > - TAILQ_INSERT_TAIL(&blacklist_head, m, listq); > + TAILQ_INSERT_TAIL(&excludelist_head, m, listq); > if (verbose) > printf("Skipping page with pa 0x%jx\n", > (uintmax_t)pa); > } > @@ -344,35 +345,35 @@ vm_page_blacklist_add(vm_paddr_t pa, bool verbose) > } > > /* > - * vm_page_blacklist_check: > + * vm_page_excludelist_check: > * > - * Iterate through the provided string of blacklist addresses, pulling > + * Iterate through the provided string of excludelist addresses, > pulling > * each entry out of the physical allocator free list and putting it > - * onto a list for reporting via the vm.page_blacklist sysctl. > + * onto a list for reporting via the vm.page_excludelist sysctl. > */ > static void > -vm_page_blacklist_check(char *list, char *end) > +vm_page_excludelist_check(char *list, char *end) > { > vm_paddr_t pa; > char *next; > > next = list; > while (next != NULL) { > - if ((pa = vm_page_blacklist_next(&next, end)) == 0) > + if ((pa = vm_page_excludelist_next(&next, end)) == 0) > continue; > - vm_page_blacklist_add(pa, bootverbose); > + vm_page_excludelist_add(pa, bootverbose); > } > } > > /* > - * vm_page_blacklist_load: > + * vm_page_excludelist_load: > * > - * Search for a special module named "ram_blacklist". It'll be a > + * Search for a special module named "ram_excludelist". It'll be a > * plain text file provided by the user via the loader directive > * of the same name. > */ > static void > -vm_page_blacklist_load(char **list, char **end) > +vm_page_excludelist_load(char **list, char **end) > { > void *mod; > u_char *ptr; > @@ -381,7 +382,7 @@ vm_page_blacklist_load(char **list, char **end) > mod = NULL; > ptr = NULL; > > - mod = preload_search_by_type("ram_blacklist"); > + mod = preload_search_by_type("ram_excludelist"); > if (mod != NULL) { > ptr = preload_fetch_addr(mod); > len = preload_fetch_size(mod); > @@ -395,7 +396,7 @@ vm_page_blacklist_load(char **list, char **end) > } > > static int > -sysctl_vm_page_blacklist(SYSCTL_HANDLER_ARGS) > +sysctl_vm_page_excludelist(SYSCTL_HANDLER_ARGS) > { > vm_page_t m; > struct sbuf sbuf; > @@ -406,7 +407,7 @@ sysctl_vm_page_blacklist(SYSCTL_HANDLER_ARGS) > if (error != 0) > return (error); > sbuf_new_for_sysctl(&sbuf, NULL, 128, req); > - TAILQ_FOREACH(m, &blacklist_head, listq) { > + TAILQ_FOREACH(m, &excludelist_head, listq) { > sbuf_printf(&sbuf, "%s%#jx", first ? "" : ",", > (uintmax_t)m->phys_addr); > first = 0; > @@ -793,14 +794,14 @@ vm_page_startup(vm_offset_t vaddr) > } > > /* > - * Remove blacklisted pages from the physical memory allocator. > + * Remove excludelisted pages from the physical memory allocator. > */ > - TAILQ_INIT(&blacklist_head); > - vm_page_blacklist_load(&list, &listend); > - vm_page_blacklist_check(list, listend); > + TAILQ_INIT(&excludelist_head); > + vm_page_excludelist_load(&list, &listend); > + vm_page_excludelist_check(list, listend); > > - list = kern_getenv("vm.blacklist"); > - vm_page_blacklist_check(list, NULL); > + list = kern_getenv("vm.excludelist"); > + vm_page_excludelist_check(list, NULL); > > freeenv(list); > #if VM_NRESERVLEVEL > 0 > > Modified: head/sys/vm/vm_page.h > ============================================================ > ================== > --- head/sys/vm/vm_page.h Tue Jul 7 19:09:38 2020 (r362997) > +++ head/sys/vm/vm_page.h Tue Jul 7 20:33:11 2020 (r362998) > @@ -613,7 +613,7 @@ vm_page_t vm_page_alloc_contig_domain(vm_object_t obje > vm_page_t vm_page_alloc_freelist(int, int); > vm_page_t vm_page_alloc_freelist_domain(int, int, int); > void vm_page_bits_set(vm_page_t m, vm_page_bits_t *bits, vm_page_bits_t > set); > -bool vm_page_blacklist_add(vm_paddr_t pa, bool verbose); > +bool vm_page_excludelist_add(vm_paddr_t pa, bool verbose); > vm_page_t vm_page_grab(vm_object_t, vm_pindex_t, int); > vm_page_t vm_page_grab_unlocked(vm_object_t, vm_pindex_t, int); > int vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int > allocflags, > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-head@freebsd.org Tue Jul 7 23:28:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 07701350503 for ; Tue, 7 Jul 2020 23:28:52 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic311-25.consmr.mail.gq1.yahoo.com (sonic311-25.consmr.mail.gq1.yahoo.com [98.137.65.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1dtB4Xkqz4Fjd for ; Tue, 7 Jul 2020 23:28:50 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: GaFi4sUVM1mDFsRhsWoeq1tLy7FbpXhm8ksNP0LzJTz8G2ERI34EVnNY4Q9oMs2 xK5zOXoI6ZFCscRUNAoM9CDUrpplYdz.epAF4r.Pb.F1ybway7zWjuxbw1ySSMSLTN4NvIejS13o A2hA.K0O11_gn3KYEn3OnCphKvFp4X9ac83dPGs9kiXNb9thVa0wdBvIjNP32HYixJnk8RSOYJBi xRZY.3sQQiAr77R4UHA0MTLHSuHyfEUeHZ8.RbaWrczcW5JVzJrtSD.BoLZ8oPXlyoQ9WNrnmjkQ wnFlHGBuRt.OOhuW3lwD_VLxV2wykic8q3GgAOyTJvkEhZhjtKpOVR.P296wr_IjA9eRjbPbjtRG DO0PYeuAGjYhAdntdu3Uq30PRM5SKa3pt5WGWazma0WVfGH17OycBzTyyBTnboAzlPO4By4Q1Ni3 DC3b.iS1jyDRfhgu6cNT.PTLa3OlCQjji4CG6RpAbeqr6Zz7PXgFLeS7etw0Dxwl6weF1ScBKJJH DPJ.90CTPu5vyscKGbVdTKK04dSmMmXSmHinAUHtBjn5PIf4NkucmkZfhXOJcj5A2FCVW3dYGBw. dkjUfDuI8C_uFKoPiaSQ1XVyaX3Ji28wIWMc6c.xuMyRQYAuUhj_sXt9r69c_zQe7NwsUftg_twM _0vgqp4DyMuM8lrtlXbSA..LP18Wm_qdjlkCfQUQwowepg2Nguy2Vq3rJmn5gxZ_3bAm8bFif52v qhg.b6PsEqzAHnAmv0hM6mgmYuRc30dTXNTYKTYZ1jyAPCg_a_8MyGcLcA7b0NPbJ0gYFIgnNVM5 D0WlOlm1lPIoO9Ngx0skZHTdlcAhX2kBNoPiZ2szDMX9l0x.ZiME4ybRHYYOjZNw5lzHCVTvNhVQ aFUGeTUFR9FQSgbuaoaonZeUfOvJEIpQlmZjKR_eR7xq.vwpYPw7cuVPdpdRbBmbQkt.pUIqhgzk MK8utldftwmITT7bVxiAzcvJskDhu90duZ_V0ExP4lR6zdwH1b36faDQoBiI_.8N1GOwktfXlVMO 8GacEIarbLjBdy9GubYFzvXkYgm3Ij_Sou.zXdJY1YD9X.KCvBZ0ssBuj3cGB_zK3fSWDmXc0BOJ gCHAtPMGcD1HfQzJZGb990WJByKgQ3djS9Eysk.sYT2l7KT1FxhN7OtvBOpHYIHy7R0qvmN1zqlv Cj98jP_fipCFCuPnX4o4B8wQAUJ5CN9QmpRYkjLO_tzxUVk39u79QFTrZUKn6MYKtuUPzn44gYEv SbsHb269kA92ztmxDCjKv2wgqhtOH3Y.1gRUOKo2G3GIiYkEGkYlWqlEHE8vRWyfM7Oxy.mWSjth unwTisfyMry8CkTom4Jrg78cpYhbZSDrGY5FulVh01SOyYzgiEojIZqH2uZpUIHLgJ1PWM_HHy6S SUi6Rs9qTnvMhjVQybySgesYlT_db Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.gq1.yahoo.com with HTTP; Tue, 7 Jul 2020 23:28:49 +0000 Received: by smtp417.mail.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 85cfe761db5601a2509f5e64842010db; Tue, 07 Jul 2020 23:28:44 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: svn commit: r362998 - in head: stand/defaults sys/amd64/amd64 sys/powerpc/aim sys/vm Message-Id: Date: Tue, 7 Jul 2020 16:28:43 -0700 To: " scottl@freebsd.org " , svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3608.80.23.2.2) References: X-Rspamd-Queue-Id: 4B1dtB4Xkqz4Fjd X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.38 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.65.206:from]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; NEURAL_HAM_LONG(-1.02)[-1.018]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; NEURAL_HAM_MEDIUM(-1.03)[-1.034]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.206:from]; NEURAL_HAM_SHORT(-0.83)[-0.832]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 23:28:52 -0000 Beyond being a breaking change for existing /boot/blacklist.txt files, there is the non-operation issue: . . . +ram_excludelist_type="ram_excludelist" # Required for the kernel to find # the blacklist module . . . In other words, it is still using the term blacklist in one place (and not explicitly as a reference to the prior naming convention to help avoid any potential confusions). === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Wed Jul 8 01:47:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2F9B6352CEF; Wed, 8 Jul 2020 01:47:21 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1hy10PbWz4LYX; Wed, 8 Jul 2020 01:47:21 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E491F18A4E; Wed, 8 Jul 2020 01:47:20 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0681lKIF019409; Wed, 8 Jul 2020 01:47:20 GMT (envelope-from grog@FreeBSD.org) Received: (from grog@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0681lKtQ019408; Wed, 8 Jul 2020 01:47:20 GMT (envelope-from grog@FreeBSD.org) Message-Id: <202007080147.0681lKtQ019408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grog set sender to grog@FreeBSD.org using -f From: Greg Lehey Date: Wed, 8 Jul 2020 01:47:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363000 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: grog X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 363000 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 01:47:21 -0000 Author: grog Date: Wed Jul 8 01:47:20 2020 New Revision: 363000 URL: https://svnweb.freebsd.org/changeset/base/363000 Log: Be more precise about Percy Grainger's place of birth. Modified: head/usr.bin/calendar/calendars/calendar.music Modified: head/usr.bin/calendar/calendars/calendar.music ============================================================================== --- head/usr.bin/calendar/calendars/calendar.music Tue Jul 7 20:42:35 2020 (r362999) +++ head/usr.bin/calendar/calendars/calendar.music Wed Jul 8 01:47:20 2020 (r363000) @@ -287,7 +287,7 @@ 07/06 The Jefferson Airplane is formed in San Francisco, 1965 07/07 Ringo Starr (Richard Starkey) born in Liverpool, England, 1940 07/07 Leo Sowerby dies in Port Clinton, Ohio, 1968 -07/08 Percy Grainger is born near Melbourne, Australia, 1882 +07/08 Percy Grainger is born in Brighton, Victoria, Australia, 1882 07/08 Hans Leo Hassler is born in Nuremberg, Germany, 1564 07/09 Ottorino Respighi is born in Bologna, Italy, 1879 07/09 Randall Thompson dies, 1984 From owner-svn-src-head@freebsd.org Wed Jul 8 02:28:09 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 249BB35367E; Wed, 8 Jul 2020 02:28:09 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1js46Bg5z4N34; Wed, 8 Jul 2020 02:28:08 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B7E5F19560; Wed, 8 Jul 2020 02:28:08 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0682S8Ph043719; Wed, 8 Jul 2020 02:28:08 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0682S8J5043718; Wed, 8 Jul 2020 02:28:08 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202007080228.0682S8J5043718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 8 Jul 2020 02:28:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363001 - head/sys/fs/nfsclient X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfsclient X-SVN-Commit-Revision: 363001 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 02:28:09 -0000 Author: rmacklem Date: Wed Jul 8 02:28:08 2020 New Revision: 363001 URL: https://svnweb.freebsd.org/changeset/base/363001 Log: Add support for ext_pgs mbufs to nfsm_uiombuf(). This patch uses a slightly different algorithm for the non-ext_pgs case, where a variable called "mcp" is maintained, pointing to the current location that mbuf data can be filled into. This avoids use of mtod(mp, char *) + mp->m_len to calculate the location, since this does not work for ext_pgs mbufs and I think it makes the algorithm more readable. This change should not result in semantic changes for the non-ext_pgs case. This is another in the series of commits that add support to the NFS client and server for building RPC messages in ext_pgs mbufs with anonymous pages. This is useful so that the entire mbuf list does not need to be copied before calling sosend() when NFS over TLS is enabled. Since ND_EXTPG is never set yet, there is no semantic change at this time. Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clcomsubs.c Wed Jul 8 01:47:20 2020 (r363000) +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Wed Jul 8 02:28:08 2020 (r363001) @@ -62,7 +62,7 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *ui struct mbuf *mp, *mp2; int xfer, left, mlen; int uiosiz, clflg, rem; - char *cp, *tcp; + char *mcp, *tcp; KASSERT(uiop->uio_iovcnt == 1, ("nfsm_uiotombuf: iovcnt != 1")); @@ -72,41 +72,52 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *ui clflg = 0; rem = NFSM_RNDUP(siz) - siz; mp = mp2 = nd->nd_mb; + mcp = nd->nd_bpos; while (siz > 0) { + KASSERT((nd->nd_flag & ND_EXTPG) != 0 || mcp == + mtod(mp, char *) + mp->m_len, ("nfsm_uiombuf: mcp wrong")); left = uiop->uio_iov->iov_len; uiocp = uiop->uio_iov->iov_base; if (left > siz) left = siz; uiosiz = left; while (left > 0) { - mlen = M_TRAILINGSPACE(mp); - if (mlen == 0) { - if (clflg) - NFSMCLGET(mp, M_WAITOK); - else - NFSMGET(mp); - mp->m_len = 0; - mp2->m_next = mp; - mp2 = mp; + if ((nd->nd_flag & ND_EXTPG) != 0) + mlen = nd->nd_bextpgsiz; + else mlen = M_TRAILINGSPACE(mp); + if (mlen == 0) { + if ((nd->nd_flag & ND_EXTPG) != 0) { + mp = nfsm_add_ext_pgs(mp, + nd->nd_maxextsiz, &nd->nd_bextpg); + mcp = (char *)(void *)PHYS_TO_DMAP( + mp->m_epg_pa[nd->nd_bextpg]); + nd->nd_bextpgsiz = PAGE_SIZE; + } else { + if (clflg) + NFSMCLGET(mp, M_WAITOK); + else + NFSMGET(mp); + mp->m_len = 0; + mlen = M_TRAILINGSPACE(mp); + mcp = mtod(mp, char *); + mp2->m_next = mp; + mp2 = mp; + } } xfer = (left > mlen) ? mlen : left; -#ifdef notdef - /* Not Yet.. */ - if (uiop->uio_iov->iov_op != NULL) - (*(uiop->uio_iov->iov_op)) - (uiocp, mtod(mp, caddr_t) + mp->m_len, - xfer); - else -#endif if (uiop->uio_segflg == UIO_SYSSPACE) - NFSBCOPY(uiocp, mtod(mp, caddr_t) + mp->m_len, - xfer); + NFSBCOPY(uiocp, mcp, xfer); else - copyin(uiocp, mtod(mp, caddr_t) + mp->m_len, xfer); + copyin(uiocp, mcp, xfer); mp->m_len += xfer; left -= xfer; uiocp += xfer; + mcp += xfer; + if ((nd->nd_flag & ND_EXTPG) != 0) { + nd->nd_bextpgsiz -= xfer; + mp->m_epg_last_len += xfer; + } uiop->uio_offset += xfer; uiop->uio_resid -= xfer; } @@ -117,18 +128,30 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *ui siz -= uiosiz; } if (rem > 0) { - if (rem > M_TRAILINGSPACE(mp)) { + if ((nd->nd_flag & ND_EXTPG) == 0 && rem > + M_TRAILINGSPACE(mp)) { NFSMGET(mp); mp->m_len = 0; mp2->m_next = mp; + mcp = mtod(mp, char *); + } else if ((nd->nd_flag & ND_EXTPG) != 0 && rem > + nd->nd_bextpgsiz) { + mp = nfsm_add_ext_pgs(mp, nd->nd_maxextsiz, + &nd->nd_bextpg); + mcp = (char *)(void *) + PHYS_TO_DMAP(mp->m_epg_pa[nd->nd_bextpg]); + nd->nd_bextpgsiz = PAGE_SIZE; } - cp = mtod(mp, caddr_t) + mp->m_len; for (left = 0; left < rem; left++) - *cp++ = '\0'; + *mcp++ = '\0'; mp->m_len += rem; - nd->nd_bpos = cp; + nd->nd_bpos = mcp; + if ((nd->nd_flag & ND_EXTPG) != 0) { + nd->nd_bextpgsiz -= rem; + mp->m_epg_last_len += rem; + } } else - nd->nd_bpos = mtod(mp, caddr_t) + mp->m_len; + nd->nd_bpos = mcp; nd->nd_mb = mp; } From owner-svn-src-head@freebsd.org Wed Jul 8 03:57:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2668E355275; Wed, 8 Jul 2020 03:57:48 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1lrX0Crfz4SRh; Wed, 8 Jul 2020 03:57:48 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DE1F91A70A; Wed, 8 Jul 2020 03:57:47 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0683vldG000596; Wed, 8 Jul 2020 03:57:47 GMT (envelope-from takawata@FreeBSD.org) Received: (from takawata@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0683vlm5000595; Wed, 8 Jul 2020 03:57:47 GMT (envelope-from takawata@FreeBSD.org) Message-Id: <202007080357.0683vlm5000595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: takawata set sender to takawata@FreeBSD.org using -f From: Takanori Watanabe Date: Wed, 8 Jul 2020 03:57:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363002 - head/usr.sbin/bluetooth/hccontrol X-SVN-Group: head X-SVN-Commit-Author: takawata X-SVN-Commit-Paths: head/usr.sbin/bluetooth/hccontrol X-SVN-Commit-Revision: 363002 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 03:57:48 -0000 Author: takawata Date: Wed Jul 8 03:57:47 2020 New Revision: 363002 URL: https://svnweb.freebsd.org/changeset/base/363002 Log: Add le_rand command. PR: 247808 Submitted by: Marc Veldman Modified: head/usr.sbin/bluetooth/hccontrol/hccontrol.8 head/usr.sbin/bluetooth/hccontrol/le.c Modified: head/usr.sbin/bluetooth/hccontrol/hccontrol.8 ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/hccontrol.8 Wed Jul 8 02:28:08 2020 (r363001) +++ head/usr.sbin/bluetooth/hccontrol/hccontrol.8 Wed Jul 8 03:57:47 2020 (r363002) @@ -164,6 +164,7 @@ are: .It Cm LE_Connect .It Cm LE_Read_Channel_Map .It Cm LE_Read_Remote_Features +.It Cm LE_Rand .El .Pp The currently supported node commands in Modified: head/usr.sbin/bluetooth/hccontrol/le.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/le.c Wed Jul 8 02:28:08 2020 (r363001) +++ head/usr.sbin/bluetooth/hccontrol/le.c Wed Jul 8 03:57:47 2020 (r363002) @@ -71,6 +71,7 @@ static int le_connect(int s, int argc, char *argv[]); static void handle_le_connection_event(ng_hci_event_pkt_t* e, bool verbose); static int le_read_channel_map(int s, int argc, char *argv[]); static void handle_le_remote_features_event(ng_hci_event_pkt_t* e); +static int le_rand(int s, int argc, char *argv[]); static int le_set_scan_param(int s, int argc, char *argv[]) @@ -1211,8 +1212,33 @@ static void handle_le_remote_features_event(ng_hci_eve return; } /* handle_le_remote_features_event */ +static int le_rand(int s, int argc, char *argv[]) +{ + ng_hci_le_rand_rp rp; + int n; + n = sizeof(rp); + if (hci_simple_request(s, NG_HCI_OPCODE(NG_HCI_OGF_LE, + NG_HCI_OCF_LE_RAND), + (void *)&rp, &n) == ERROR) + return (ERROR); + + if (rp.status != 0x00) { + fprintf(stdout, "Status: %s [%#02x]\n", + hci_status2str(rp.status), rp.status); + return (FAILED); + } + + fprintf(stdout, + "Random number : %08llx\n", + (unsigned long long)le64toh(rp.random_number)); + + return (OK); +} + + + struct hci_command le_commands[] = { { "le_enable", @@ -1335,5 +1361,11 @@ struct hci_command le_commands[] = { "Read supported features for the device\n" "identified by the connection handle", &le_read_remote_features + }, + { + "le_rand", + "le_rand\n" + "Generate 64 bits of random data", + &le_rand }, }; From owner-svn-src-head@freebsd.org Wed Jul 8 04:55:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 50CBC356571; Wed, 8 Jul 2020 04:55:54 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1n7Z1Nkcz4VPs; Wed, 8 Jul 2020 04:55:54 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 125D11EF06; Wed, 8 Jul 2020 04:55:54 +0000 (UTC) Date: Wed, 8 Jul 2020 04:55:54 +0000 From: Alexey Dokuchaev To: Scott Long Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362998 - in head: stand/defaults sys/amd64/amd64 sys/powerpc/aim sys/vm Message-ID: <20200708045554.GA54912@FreeBSD.org> References: <202007072033.067KXC9V029714@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202007072033.067KXC9V029714@repo.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 04:55:54 -0000 On Tue, Jul 07, 2020 at 08:33:12PM +0000, Scott Long wrote: > New Revision: 362998 > URL: https://svnweb.freebsd.org/changeset/base/362998 > > Log: > Migrate the feature of excluding RAM pages to use "excludelist" > as its nomenclature. Did I miss any prior discussion of this change? Commit references no DR or something. I thought we had agreed that this black/master type of commits should not just go in like one pleases. To me this change is pessimization, it is technically less accurate. ./danfe From owner-svn-src-head@freebsd.org Wed Jul 8 06:33:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7E792358B1A; Wed, 8 Jul 2020 06:33:08 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1qHm2nqZz4bBk; Wed, 8 Jul 2020 06:33:08 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43E601C2B0; Wed, 8 Jul 2020 06:33:08 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0686X8j4097782; Wed, 8 Jul 2020 06:33:08 GMT (envelope-from takawata@FreeBSD.org) Received: (from takawata@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0686X8dl097781; Wed, 8 Jul 2020 06:33:08 GMT (envelope-from takawata@FreeBSD.org) Message-Id: <202007080633.0686X8dl097781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: takawata set sender to takawata@FreeBSD.org using -f From: Takanori Watanabe Date: Wed, 8 Jul 2020 06:33:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363003 - head/sys/netgraph/bluetooth/include X-SVN-Group: head X-SVN-Commit-Author: takawata X-SVN-Commit-Paths: head/sys/netgraph/bluetooth/include X-SVN-Commit-Revision: 363003 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 06:33:08 -0000 Author: takawata Date: Wed Jul 8 06:33:07 2020 New Revision: 363003 URL: https://svnweb.freebsd.org/changeset/base/363003 Log: Add support for [read|write] supported data length commands. Fix ng_hci_le_long_term_key_request_negative_reply_cp struct while here. PR: 247809 Submitted by: Marc Veldman Modified: head/sys/netgraph/bluetooth/include/ng_hci.h Modified: head/sys/netgraph/bluetooth/include/ng_hci.h ============================================================================== --- head/sys/netgraph/bluetooth/include/ng_hci.h Wed Jul 8 03:57:47 2020 (r363002) +++ head/sys/netgraph/bluetooth/include/ng_hci.h Wed Jul 8 06:33:07 2020 (r363003) @@ -1730,11 +1730,26 @@ typedef struct { #define NG_HCI_OCF_LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY 0x001b typedef struct{ u_int16_t connection_handle; -}ng_hci_le_long_term_key_request_negative_reply_cp; +}__attribute__((packed)) ng_hci_le_long_term_key_request_negative_reply_cp; typedef struct { u_int8_t status; u_int16_t connection_handle; }__attribute__ ((packed)) ng_hci_le_long_term_key_request_negative_reply_rp; + +#define NG_HCI_OCF_LE_READ_SUGGESTED_DATA_LENGTH 0x0023 +/*No command parameter*/ +typedef struct { + u_int8_t status; + u_int16_t suggested_max_tx_octets; + u_int16_t suggested_max_tx_time; +}__attribute__ ((packed)) ng_hci_le_read_suggested_data_length_rp; + +#define NG_HCI_OCF_LE_WRITE_SUGGESTED_DATA_LENGTH 0x0024 +typedef struct { + u_int16_t suggested_max_tx_octets; + u_int16_t suggested_max_tx_time; +}__attribute__ ((packed)) ng_hci_le_write_suggested_data_length_cp; +typedef ng_hci_status_rp ng_hci_le_write_suggested_data_length_rp; #define NG_HCI_OCF_LE_READ_BUFFER_SIZE_V2 0x0060 /*No command parameter */ From owner-svn-src-head@freebsd.org Wed Jul 8 07:02:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C88E4358E51 for ; Wed, 8 Jul 2020 07:02:06 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic315-8.consmr.mail.gq1.yahoo.com (sonic315-8.consmr.mail.gq1.yahoo.com [98.137.65.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1qx94CFcz4cRH for ; Wed, 8 Jul 2020 07:02:05 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: i1Dm1UUVM1k_I4W0Lzi_jpsb7iuY3CRt9of.FYkPQdh5372_7mpEFIa7ER.GZtx K2jlMBNyJ68tjrqR.9nAd.7SCgiDTjQFNTtQ8PsCzPTkbZrUV88wMJ7ZQ.EZDqY64pqkTVPz512b KL35iqqvOsz0a15qP4iNBHKq1FiP9nQTN_8GRoUNz.BQPR7nPsLoe7xDagnLDrM0jFF4QNlTsw6S 28w6YsaoBNfOgvR5KkXFuNWDHlkD74qrtFLTJvrGh7jUwLQLeO7WrYkVHBUHNpGNvEmvOJ2VVJ2x wi7_FoGy2FpqVkJzyXTYmEkGHTIePktA4dHeG9gG36sf6OBMQLZAXKtirs_S1JlvpFhP7BtMtAoG 18GyAqSn0z39STXkjqFecr7DEx2JDCyAqsKv13rKBcOYW0rk0jol2H01slJ8wym0Bci6aN4Zeq3q Y2zT3gA2EBnAyURP.ZdcBEQ10r0SDv55vW_yLxOThPzJT6LJb8vtnWiQqE5al3c3sqbn5qPjl.DF x4j34p7XjnMny9KlhyqftqrqxfkYMdNHjPDv3uJe1ClKPw9baX_3CtX7LB3fnS3gVRGXDWuiILu8 TYzIJbBieDKd1jwjQ6bvlRt1cOnuwYV_smQk3OfYikHKyyV7PP0ZEWoACSjIu4Soh2VVb8Wxzkav XinC_6Ya9jHkXpEd4l1Ud6UHKRNg1RKl2zc2ol4EqjOC75rkiOiRWSCmDN5yFUYNh8pmXDgr5FXk 1Q3vjmoatX.nTGOU0AFkj1f1Y1nIgeD5XJvHAZyvXxExqVHfqYVPaLlsMVMKbVGFKAtDeQXEFLPz 9Q1I_zHGsjgvpQdwtxdO2Ytrrj2XKOFTkBxQVa2IOYvaf73ZQJ5BUS549Cr_PK7ykzL4be0HAQFH jKh6chQfEu.W.bw4We0EtIZ9ZXnJ1dmTohND.n4L3BGpnwcEDjvBhv5BEwkTHAzfzgBU15IUO.Al q2.0WSopY0v92HdGjPdC.02Q5jlwDR1UI96t9N7z5FWi3BN560Zy.HIEREhtyPkDnJhnJPB8eNeW 5Kq_Jz7uJOCzZkcpQTG4SXJbStAlzFsI_kEZUmmnP2C47wIHY8JPIc52L7Hhc3a2i7MNv6pbTYrN 0r8sG0trlAHPy.HfK.RuIMf4gac1EtJ9EKgwxVZVrjxPmFHWmhjjRsJqBTyTWw7mp8qlhTP7_pFw 6ryPnoSv0vHReH1EOZ1LidnMwIY0fBXwjTRXeUj0fg9S6YKnkRrldF71rQKezgVi.CB5Qvg1Wb0M dSZ6cD87sdfYZueDjauzrNKWTr6NelbfIswHdVMJwwjIygt1kYkgUr1QzeKuAfFn2cRxTMznwWBP QH0Eav2hc84_tv4pzRtPFoOQ6umvKJUU47nPr_Q8S8XWjSiaUWaxqGWTtNPdOON7D0FrtztWz0Op PBWCi63QbfaDsNuYepo7cAAJxccr20og_xJMBwg-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.gq1.yahoo.com with HTTP; Wed, 8 Jul 2020 07:02:03 +0000 Received: by smtp418.mail.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID d6b30cfc02d2258eb2f799b8f957fbed; Wed, 08 Jul 2020 07:01:59 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: svn commit: r362987 - in head: contrib/bc usr.bin/gh-bc Message-Id: <64523602-7EFC-4A97-90EA-C776BF2A0AF7@yahoo.com> Date: Wed, 8 Jul 2020 00:01:58 -0700 Cc: FreeBSD Toolchain , freebsd-ppc To: =?utf-8?Q?Stefan_E=C3=9Fer?= , svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3608.80.23.2.2) References: <64523602-7EFC-4A97-90EA-C776BF2A0AF7.ref@yahoo.com> X-Rspamd-Queue-Id: 4B1qx94CFcz4cRH X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.49 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.65.32:from]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; NEURAL_HAM_LONG(-0.99)[-0.992]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.32:from]; NEURAL_HAM_SHORT(-1.02)[-1.019]; NEURAL_HAM_MEDIUM(-0.98)[-0.981]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 07:02:06 -0000 The following is more informational than anything as far as I'm concerned. But there may be implications that I'm unaware of. (I sometimes experiment with toolchain use to see what the current status is for such use.) I attempted to build a system for 32-bit powerpc using clang and binutils, building head -r363000 ( from -r363000 ). (This was a cross build, amd64 -> powerpc.) It got a new type of failure, compared to my past experience: --- gh-bc.full --- /usr/local/powerpc-unknown-freebsd13.0/bin/ld: = /usr/bin/../lib/LLVMgold.so: error loading plugin: Cannot open = "/usr/bin/../lib/LLVMgold.so" cc: error: linker command failed with exit code 1 (use -v to see = invocation) *** [gh-bc.full] Error code 1 Yep: /usr/lib/LLVMgold.so when = -B/usr/local/powerpc-unknown-freebsd13.0/bin/ was in use. I turns out that the link of gh-bc used -flto : make[4]: stopped in /usr/src/usr.bin/gh-bc .ERROR_TARGET=3D'gh-bc.full' = .ERROR_META_FILE=3D'/usr/obj/powerpcvtsc_clang_altbinutils/powerpc.powerpc= /usr/src/powerpc.powerpc/usr.bin/gh-bc/gh-bc.full.meta' .MAKE.LEVEL=3D'4' MAKEFILE=3D'' .MAKE.MODE=3D'meta missing-filemon=3Dyes missing-meta=3Dyes silent=3Dyes = verbose' _ERROR_CMD=3D'cc -target powerpc-unknown-freebsd13.0 = --sysroot=3D/usr/obj/powerpcvtsc_clang_altbinutils/powerpc.powerpc/usr/src= /powerpc.powerpc/tmp -B/usr/local/powerpc-unknown-freebsd13.0/bin/ -O2 = -pipe -fno-common -B/usr/local/powerpc-unknown-freebsd13.0/bin/ = -DMAINEXEC=3Dbc -DNLSPATH=3D/usr/share/nls/%L/%N.cat -DBC_ENABLED = -DBC_ENABLE_PROMPT -DBC_ENABLE_LONG_OPTIONS -DBC_ENABLE_EXTRA_MATH = -DBC_ENABLE_HISTORY -DBC_ENABLE_RAND -DDC_ENABLED -DNDEBUG = -DVERSION=3D3.1.1 -I/usr/src/contrib/bc/include -DBC_ENABLE_NLS=3D1 = -flto -g -std=3Dgnu99 -Wno-format-zero-length -fstack-protector-strong = -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter = -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type = -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter = -Wcast-align -Wchar-subscripts -Winline -Wnested-externs = -Wredundant-decls -Wold-style-definition -Wno-pointer-sign = -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body = -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments = -Wl,--secure-plt -o gh-bc.full args.o data.o file.o lang.o lex.o main.o = num.o parse.o program.o read.o vector.o vm.o bc/bc.o bc/lex.o bc/parse.o = dc/dc.o dc/lex.o dc/parse.o history/history.o bc_help.o dc_help.o lib.o = lib2.o opt.o rand/rand.o ;' .CURDIR=3D'/usr/src/usr.bin/gh-bc' .MAKE=3D'make' = .OBJDIR=3D'/usr/obj/powerpcvtsc_clang_altbinutils/powerpc.powerpc/usr/src/= powerpc.powerpc/usr.bin/gh-bc' .TARGETS=3D'all' = DESTDIR=3D'/usr/obj/powerpcvtsc_clang_altbinutils/powerpc.powerpc/usr/src/= powerpc.powerpc/tmp' LD_LIBRARY_PATH=3D'' MACHINE=3D'powerpc' MACHINE_ARCH=3D'powerpc' MAKEOBJDIRPREFIX=3D'' MAKESYSPATH=3D'/usr/src/share/mk' MAKE_VERSION=3D'20200606' = PATH=3D'/usr/obj/powerpcvtsc_clang_altbinutils/powerpc.powerpc/usr/src/pow= erpc.powerpc/tmp/usr/sbin:/usr/obj/powerpcvtsc_clang_altbinutils/powerpc.p= owerpc/usr/src/powerpc.powerpc/tmp/usr/bin:/usr/obj/powerpcvtsc_clang_altb= inutils/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/legacy/usr/sbin:/usr/o= bj/powerpcvtsc_clang_altbinutils/powerpc.powerpc/usr/src/powerpc.powerpc/t= mp/legacy/usr/bin:/usr/obj/powerpcvtsc_clang_altbinutils/powerpc.powerpc/u= sr/src/powerpc.powerpc/tmp/legacy/bin:/usr/obj/powerpcvtsc_clang_altbinuti= ls/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/legacy/usr/libexec::/sbin:/= bin:/usr/sbin:/usr/bin' SRCTOP=3D'/usr/src' = OBJTOP=3D'/usr/obj/powerpcvtsc_clang_altbinutils/powerpc.powerpc/usr/src/p= owerpc.powerpc' .MAKE.MAKEFILES=3D'/usr/src/share/mk/sys.mk = /usr/src/share/mk/local.sys.env.mk /usr/src/share/mk/src.sys.env.mk = /root/src.configs/src.conf.powerpc-clang_altbinutils-bootstrap.amd64-host = /usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/src.sys.obj.mk = /usr/src/share/mk/auto.obj.mk /usr/src/share/mk/bsd.suffixes.mk = /root/src.configs/make.conf /usr/src/share/mk/local.sys.mk = /usr/src/share/mk/src.sys.mk /dev/null /usr/src/usr.bin/gh-bc/Makefile = /usr/src/share/mk/src.opts.mk /usr/src/share/mk/bsd.own.mk = /usr/src/share/mk/bsd.opts.mk /usr/src/share/mk/bsd.cpu.mk = /usr/src/share/mk/bsd.compiler.mk /usr/src/share/mk/bsd.linker.mk = /usr/src/share/mk/bsd.prog.mk /usr/src/share/mk/bsd.init.mk = /usr/src/share/mk/local.init.mk /usr/src/share/mk/src.init.mk = /usr/src/usr.bin/gh-bc/../Makefile.inc /usr/src/share/mk/bsd.libnames.mk = /usr/src/share/mk/src.libnames.mk /usr/src/share/mk/bsd.nls.mk = /usr/src/share/mk/bsd.confs.mk /usr/src/share/mk/bsd.files.mk = /usr/src/share/mk/bsd.dirs.mk /usr/src/share/mk/bsd.incs.mk = /usr/src/share/mk/bsd.links.mk /usr/src/share/mk/bsd.man.mk = /usr/src/share/mk/bsd.dep.mk /usr/src/share/mk/bsd.clang-analyze.mk = /usr/src/share/mk/bsd.obj.mk /usr/src/share/mk/bsd.subdir.mk = /usr/src/share/mk/bsd.sys.mk' .PATH=3D'. /usr/src/usr.bin/gh-bc /usr/src/contrib/bc/src = /usr/src/contrib/bc/gen /usr/src/contrib/bc/manuals = /usr/obj/powerpcvtsc_clang_altbinutils/powerpc.powerpc/usr/src/powerpc.pow= erpc/usr.bin/gh-bc' 1 error =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Wed Jul 8 08:28:56 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C54A635ABC6; Wed, 8 Jul 2020 08:28:56 +0000 (UTC) (envelope-from se@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4B1ssN4bGlz3TBX; Wed, 8 Jul 2020 08:28:56 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f0bb9000d9c4c4e7ca494ea.dip0.t-ipconnect.de [IPv6:2003:cd:5f0b:b900:d9c:4c4e:7ca4:94ea]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id B1EB015AC0; Wed, 8 Jul 2020 08:28:55 +0000 (UTC) (envelope-from se@freebsd.org) Subject: Introduce WITH(OUT)_LTO? (was: Re: svn commit: r362987 - in head: contrib/bc usr.bin/gh-bc) To: Mark Millard , svn-src-head@freebsd.org Cc: FreeBSD Toolchain , freebsd-ppc References: <64523602-7EFC-4A97-90EA-C776BF2A0AF7.ref@yahoo.com> <64523602-7EFC-4A97-90EA-C776BF2A0AF7@yahoo.com> From: =?UTF-8?Q?Stefan_E=c3=9fer?= Autocrypt: addr=se@freebsd.org; keydata= mQENBFVxiRIBCADOLNOZBsqlplHUQ3tG782FNtVT33rQli9EjNt2fhFERHIo4NxHlWBpHLnU b0s4L/eItx7au0i7Gegv01A9LUMwOnAc9EFAm4EW3Wmoa6MYrcP7xDClohg/Y69f7SNpEs3x YATBy+L6NzWZbJjZXD4vqPgZSDuMcLU7BEdJf0f+6h1BJPnGuwHpsSdnnMrZeIM8xQ8PPUVQ L0GZkVojHgNUngJH6e21qDrud0BkdiBcij0M3TCP4GQrJ/YMdurfc8mhueLpwGR2U1W8TYB7 4UY+NLw0McThOCLCxXflIeF/Y7jSB0zxzvb/H3LWkodUTkV57yX9IbUAGA5RKRg9zsUtABEB AAG0J1N0ZWZhbiBFw59lciAoRnJlZUJTRCkgPHNlQGZyZWVic2Qub3JnPokBVAQTAQoAPgIb AwULCQgHAwUVCgkICwUWAwIBAAIeAQIXgBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+q BQkLJQETAAoJEEfrte9a/fVEOeMH/icmdK1eZQvB3U8quJo9VMaZsaTuCMbUE4NThyfsIvIm MCd+rb/yULmMYwqNfjyKB1x4ikR4x+94l+yJoz7K0Usks+eNKDmMGJM6pWWssTigaJubFdVd hVVC+C1QJi7JshYSib08uONoPmO4lv5Az0TDYGtsMzsES2sIlc62c9go5WPGYhQFRbX3Lk6y V6m8OHh+G9XGSj3oPO4UteRwu+SzTdOLunZBWG1wu34+IeZm663D+2gOppQLWpLa2qaTerqw THu377ayZ2B2LPJ5JkvkZeHYPkwDQ+b5PGn0UhfkxPnDVYki5F7qKxvQ5uq1/q9YaCX7mmOl H2yO7tgVsrW5AQ0EVXGJEgEIALEj9qCXMZVucjpcd3QxM/TlUr98m5viEd1z4tCnPUyRWcIC EVtj2h5xMH+2iB0q1+KWhq+NsWtvScmEmfHnsr7dJ1K677OdpDhKVaJk61eeRulFY1R4yb6C 1MMxK+WgYB+vvpG0UeyR0M4uBewcPvRsq4yGUHFQKtLAbMdoPTSryJA+ElnmK1vdY+rPcHgi OIMBZM7ahsPXC0C9K4e5SP9clGyIoMpbfHXdx9q+Rp3zVtlbhyk3BS/xccu/+9pk9ICXL6GR js2sNnJ0wxdU1DsAlC59a5MnSruwiZFwRnkQhr3x6wk97Lg7sLS9jjTnCN7LGlVmSmpOEMy6 uq1AWfUAEQEAAYkBPAQYAQoAJgIbDBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+rBQkL JQEZAAoJEEfrte9a/fVEuesH/2DNxGWnHvWwMyiyhlQtafvDKwEn/wAgR8gHJFodB7emf8rA TnukH7MVttCoHtjN5lvv9RSBHjNTZls5wR/ANlwdRuPQHd8ZGxLe3S6IuUB3zDSwFltLGurO N2kOMhs5mTGyypSa+uw3rtQbUAVYf1oPbiR4FLtiM8FLyEvE95hX5fPq9Qvx9FmN79kmCIEw jDKPqDaUf/OR2fEF0LSIbXHEk4tNqCEwx5DIJ0fp5/z5UzICUAmwxyRs5O/Hre1jzPsMVyud Ml9t7UTOJGKVWwRory1PMnOFxN+iz5/d4FhYSKXF7kfMiFgol4LuWaxJRwbBrr71VGBrRy2a L1nw6Bc= Message-ID: Date: Wed, 8 Jul 2020 10:28:51 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <64523602-7EFC-4A97-90EA-C776BF2A0AF7@yahoo.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: base64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 08:28:56 -0000 QW0gMDguMDcuMjAgdW0gMDk6MDEgc2NocmllYiBNYXJrIE1pbGxhcmQ6DQo+IFRoZSBmb2xs b3dpbmcgaXMgbW9yZSBpbmZvcm1hdGlvbmFsIHRoYW4gYW55dGhpbmcgYXMgZmFyDQo+IGFz IEknbSBjb25jZXJuZWQuIEJ1dCB0aGVyZSBtYXkgYmUgaW1wbGljYXRpb25zIHRoYXQgSSdt DQo+IHVuYXdhcmUgb2YuIChJIHNvbWV0aW1lcyBleHBlcmltZW50IHdpdGggdG9vbGNoYWlu IHVzZQ0KPiB0byBzZWUgd2hhdCB0aGUgY3VycmVudCBzdGF0dXMgaXMgZm9yIHN1Y2ggdXNl LikNCj4gDQo+IEkgYXR0ZW1wdGVkIHRvIGJ1aWxkIGEgc3lzdGVtIGZvciAzMi1iaXQgcG93 ZXJwYyB1c2luZyBjbGFuZw0KPiBhbmQgYmludXRpbHMsIGJ1aWxkaW5nIGhlYWQgLXIzNjMw MDAgKCBmcm9tIC1yMzYzMDAwICkuIChUaGlzDQo+IHdhcyBhIGNyb3NzIGJ1aWxkLCBhbWQ2 NCAtPiBwb3dlcnBjLikgSXQgZ290IGEgbmV3IHR5cGUgb2YNCj4gZmFpbHVyZSwgY29tcGFy ZWQgdG8gbXkgcGFzdCBleHBlcmllbmNlOg0KDQpIaSBNYXJrLA0KDQp0aGFuayB5b3UgZm9y IHRoZSByZXBvcnQuIEkgaGF2ZSB0ZXN0ZWQgd2l0aCAibWFrZSB1bml2ZXJzZSIgKHdpdGgN CmRlZmF1bHQgc2V0dGluZ3MpIHRoYXQgdGhpcyB2ZXJzaW9uIGJ1aWxkcyBvbiBhbGwgYXJj aGl0ZWN0dXJlcywNCmJ1dCBFZCBNYXN0ZSBoYXMgYWxyZWFkeSBkaXNhYmxlZCAtZmx0byBm b3IgcG93ZXJwYzY0LCBkdWUgdG8gcnVuDQp0aW1lIGlzc3VlcyAoZmxvYXRpbmcgcG9pbnQg ZXhjZXB0aW9uLCBJSVJDKS4NCg0KSSBrbm93IHRoYXQgeW91IGFyZSBhY3RpdmVseSB3b3Jr aW5nIG9uIFBvd2VyUEMgYW5kIEknZCBhcHByZWNpYXRlLA0KaWYgeW91IGNvdWxkIHByb3Zp ZGUgbWUgd2l0aCBpbmZvcm1hdGlvbiBvbiB3aGljaCBwYXJhbWV0ZXJzIGNhdXNlDQpicmVh a2FnZSBhbmQgd2hpY2ggd29yayBmb3IgeW91LiBUaGUgY29tYmluYXRpb24gb2YgQ0xBTkcg d2l0aCBMVE8NCmFuZCBHTlUgYmludXRpbHMgY2Fubm90IHdvcmsgLSBDTEFORyBhbmQgR0ND IHVzZSBpbmNvbXBhdGlibGUgZmlsZQ0KZm9ybWF0cyB0byByZXByZXNlbnQgdGhlIGludGVy bWVkaWF0ZSBvYmplY3QgZmlsZXMuDQoNClRoaXMgdmVyc2lvbiBvZiBiYyB1c2VzIGFkdmFu Y2VkIGFsZ29yaXRobXMgKGNvbXBhcmVkIHRvIHRoZSBvbmUNCml0IHJlcGxhY2VkKSBmb3Ig bXVjaCByZWR1Y2VkIHRpbWUgY29tcGxleGl0eSAoYSBmYWN0b3Igb2YgbW9yZQ0KdGhhbiAx MDAgZm9yIGxhcmdlIG51bWJlcnMgaGFzIGJlZW4gb2JzZXJ2ZWQpLiBJdCB1c2VzIGxheWVy aW5nDQpmb3IgY29ycmVjdG5lc3MsIGUuZy4gYSBzZXQgb2YgInZlY3RvciIgbWFuYWdlbWVu dCBmdW5jdGlvbnMsIHRoYXQNCmFyZSBidWlsdCBhcyBhIHNlcGFyYXRlIGNvbXBpbGUgdW5p dC4gQ29tcGlsaW5nIHdpdGggLWZsdG8gbGV0cyB0aGUNCmxpbmtlciByZXBsYWNlIG1hbnkg ZnVuY3Rpb24gY2FsbHMgd2l0aCBjb25zdGFudCBwYXJhbWV0ZXJzIHdpdGgNCm11Y2ggbW9y ZSBlZmZpY2llbnQgaW5saW5lIGluc3RydWN0aW9ucywgcmVzdWx0aW5nIGluIDMwJSBoaWdo ZXINCnBlcmZvcm1hbmNlLiBUaGUgY29kZSBjb3VsZCBiZSByZS1hcnJhbmdlZCB0byB1c2Ug aW5saW5lIGZ1bmN0aW9ucw0KaW5zdGVhZCBvZiByZWx5aW5nIG9uIC1mbHRvLCBidXQgdGhp cyB3b3VsZCBiZSBhIGxvdCBvZiBlZmZvcnQgYW5kDQptaWdodCBtYWtlIHRoZSBjb2RlIG11 Y2ggaGFyZGVyIHRvIG1haW50YWluLg0KDQpJZiB0aGVyZSBpcyBhIGNvbmRpdGlvbiB0aGF0 IGNvdWxkIGJlIGFkZGVkIHRvIHRoZSBNYWtlZmlsZSB0byBub3QNCmVuYWJsZSBMVE8gaWYg Q0xBTkcrYmludXRpbHMgb3IgR0NDK0xMRCBhcmUgbWl4ZWQsIHRoZW4gSSdtIHdpbGxpbmcN CnRvIGFkZCBpdC4gSWYgbW9yZSBwcm9ncmFtcyB3ZXJlIHRvIGJlIGJ1aWx0IHdpdGggTFRP IGZvciBwZXJmb3JtYW5jZQ0KcmVhc29ucywgdGhlbiBpdCBtaWdodCBiZSBhIGdvb2QgaWRl YSB0byBoYXZlIGEgZ2xvYmFsIHBhcmFtZXRlciB0aGF0DQpjb250cm9scyB3aGV0aGVyIGxU TyBtYXkgYmUgdXNlZCwgdGhvdWdoLg0KDQoNClRMO0RSDQoNClBlcmhhcHMgd2UgY291bGQg YWRkIGEgV0lUSChPVVQpX0xUTyBvcHRpb24gdGhhdCBvbmx5IGFmZmVjdHMgc3BlY2lmaWMN CnByb2dyYW1zIHRoYXQgZ2V0IGEgc2lnbmlmaWNhbnQgcGVyZm9ybWFuY2UgYm9vc3QgZnJv bSBidWlsZGluZyB3aXRoDQpMVE8uIElNSE8sIHVzaW5nIExUTyBpcyBwcmVmZXJhYmxlIHRv IHRoZSBpbnRyb2R1Y3Rpb24gb2YgaW5saW5lDQpmdW5jdGlvbnMgaW4gc291cmNlIGZpbGVz IHRoYXQgZmFsbCBpbnRvIHRoYXQgY2F0ZWdvcnkuDQoNCldJVEhPVVRfTFRPIGNvdWxkIGJl IGltcGxpZWQgb24gcGxhdGZvcm1zIHRoYXQgYXJlIGtub3duIHRvIG5vdCBmdWxseQ0Kc3Vw cG9ydCAtZmx0byB3aXRoIGRlZmF1bHQgdGhlaXIgY29tcGlsZXIgYW5kIGxpbmtlci4gQW5k IGl0IGNvdWxkIGJlDQpzZXQgYnkgdGhlIHVzZXIgd2hlbiBub24tZGVmYXVsdCBidWlsZCB0 b29scyBhcmUgdXNlZC4NCg0KVGhpcyB3b3VsZCBhbGxvdyB0byB1c2UgLWZsdG8gZm9yIHNw ZWNpZmljIHByb2dyYW1zIHdpdGhvdXQgdGhlIG5lZWQNCnRvIG1ha2UgdGhpcyBvcHRpbWl6 YXRpb24gY29uZGl0aW9uYWwgb24gY29tcGlsZXJzIG9yIGFyY2hpdGVjdHVyZXMuDQoNCkJl c3QgcmVnYXJkcywgU1RlZmFuDQoNCj4gLS0tIGdoLWJjLmZ1bGwgLS0tDQo+IC91c3IvbG9j YWwvcG93ZXJwYy11bmtub3duLWZyZWVic2QxMy4wL2Jpbi9sZDogL3Vzci9iaW4vLi4vbGli L0xMVk1nb2xkLnNvOiBlcnJvciBsb2FkaW5nIHBsdWdpbjogQ2Fubm90IG9wZW4gIi91c3Iv YmluLy4uL2xpYi9MTFZNZ29sZC5zbyINCj4gY2M6IGVycm9yOiBsaW5rZXIgY29tbWFuZCBm YWlsZWQgd2l0aCBleGl0IGNvZGUgMSAodXNlIC12IHRvIHNlZSBpbnZvY2F0aW9uKQ0KPiAq KiogW2doLWJjLmZ1bGxdIEVycm9yIGNvZGUgMQ0KPiANCj4gWWVwOiAvdXNyL2xpYi9MTFZN Z29sZC5zbyB3aGVuIC1CL3Vzci9sb2NhbC9wb3dlcnBjLXVua25vd24tZnJlZWJzZDEzLjAv YmluLw0KPiB3YXMgaW4gdXNlLg0KPiANCj4gSSB0dXJucyBvdXQgdGhhdCB0aGUgbGluayBv ZiBnaC1iYyB1c2VkIC1mbHRvIDoNCj4gDQo+IG1ha2VbNF06IHN0b3BwZWQgaW4gL3Vzci9z cmMvdXNyLmJpbi9naC1iYw0KPiAuRVJST1JfVEFSR0VUPSdnaC1iYy5mdWxsJw0KPiAuRVJS T1JfTUVUQV9GSUxFPScvdXNyL29iai9wb3dlcnBjdnRzY19jbGFuZ19hbHRiaW51dGlscy9w b3dlcnBjLnBvd2VycGMvdXNyL3NyYy9wb3dlcnBjLnBvd2VycGMvdXNyLmJpbi9naC1iYy9n aC1iYy5mdWxsLm1ldGEnDQo+IC5NQUtFLkxFVkVMPSc0Jw0KPiBNQUtFRklMRT0nJw0KPiAu TUFLRS5NT0RFPSdtZXRhIG1pc3NpbmctZmlsZW1vbj15ZXMgbWlzc2luZy1tZXRhPXllcyBz aWxlbnQ9eWVzIHZlcmJvc2UnDQo+IF9FUlJPUl9DTUQ9J2NjIC10YXJnZXQgcG93ZXJwYy11 bmtub3duLWZyZWVic2QxMy4wIC0tc3lzcm9vdD0vdXNyL29iai9wb3dlcnBjdnRzY19jbGFu Z19hbHRiaW51dGlscy9wb3dlcnBjLnBvd2VycGMvdXNyL3NyYy9wb3dlcnBjLnBvd2VycGMv dG1wIC1CL3Vzci9sb2NhbC9wb3dlcnBjLXVua25vd24tZnJlZWJzZDEzLjAvYmluLyAtTzIg LXBpcGUgLWZuby1jb21tb24gLUIvdXNyL2xvY2FsL3Bvd2VycGMtdW5rbm93bi1mcmVlYnNk MTMuMC9iaW4vIC1ETUFJTkVYRUM9YmMgLUROTFNQQVRIPS91c3Ivc2hhcmUvbmxzLyVMLyVO LmNhdCAtREJDX0VOQUJMRUQgLURCQ19FTkFCTEVfUFJPTVBUIC1EQkNfRU5BQkxFX0xPTkdf T1BUSU9OUyAtREJDX0VOQUJMRV9FWFRSQV9NQVRIIC1EQkNfRU5BQkxFX0hJU1RPUlkgLURC Q19FTkFCTEVfUkFORCAtRERDX0VOQUJMRUQgLUROREVCVUcgLURWRVJTSU9OPTMuMS4xIC1J L3Vzci9zcmMvY29udHJpYi9iYy9pbmNsdWRlIC1EQkNfRU5BQkxFX05MUz0xIC1mbHRvIC1n IC1zdGQ9Z251OTkgLVduby1mb3JtYXQtemVyby1sZW5ndGggLWZzdGFjay1wcm90ZWN0b3It c3Ryb25nIC1Xc3lzdGVtLWhlYWRlcnMgLVdhbGwgLVduby1mb3JtYXQteTJrIC1XIC1Xbm8t dW51c2VkLXBhcmFtZXRlciAtV3N0cmljdC1wcm90b3R5cGVzIC1XbWlzc2luZy1wcm90b3R5 cGVzIC1XcG9pbnRlci1hcml0aCAtV3JldHVybi10eXBlIC1XY2FzdC1xdWFsIC1Xd3JpdGUt c3RyaW5ncyAtV3N3aXRjaCAtV3NoYWRvdyAtV3VudXNlZC1wYXJhbWV0ZXIgLVdjYXN0LWFs aWduIC1XY2hhci1zdWJzY3JpcHRzIC1XaW5saW5lIC1XbmVzdGVkLWV4dGVybnMgLVdyZWR1 bmRhbnQtZGVjbHMgLVdvbGQtc3R5bGUtZGVmaW5pdGlvbiAtV25vLXBvaW50ZXItc2lnbiAt V21pc3NpbmctdmFyaWFibGUtZGVjbGFyYXRpb25zIC1XdGhyZWFkLXNhZmV0eSAtV25vLWVt cHR5LWJvZHkgLVduby1zdHJpbmctcGx1cy1pbnQgLVduby11bnVzZWQtY29uc3QtdmFyaWFi bGUgLVF1bnVzZWQtYXJndW1lbnRzICAtV2wsLS1zZWN1cmUtcGx0ICAtbyBnaC1iYy5mdWxs IGFyZ3MubyBkYXRhLm8gZmlsZS5vIGxhbmcubyBsZXgubyBtYWluLm8gbnVtLm8gcGFyc2Uu byBwcm9ncmFtLm8gcmVhZC5vIHZlY3Rvci5vIHZtLm8gYmMvYmMubyBiYy9sZXgubyBiYy9w YXJzZS5vIGRjL2RjLm8gZGMvbGV4Lm8gZGMvcGFyc2UubyBoaXN0b3J5L2hpc3RvcnkubyBi Y19oZWxwLm8gZGNfaGVscC5vIGxpYi5vIGxpYjIubyBvcHQubyByYW5kL3JhbmQubyAgOycN Cj4gLkNVUkRJUj0nL3Vzci9zcmMvdXNyLmJpbi9naC1iYycNCj4gLk1BS0U9J21ha2UnDQo+ IC5PQkpESVI9Jy91c3Ivb2JqL3Bvd2VycGN2dHNjX2NsYW5nX2FsdGJpbnV0aWxzL3Bvd2Vy cGMucG93ZXJwYy91c3Ivc3JjL3Bvd2VycGMucG93ZXJwYy91c3IuYmluL2doLWJjJw0KPiAu VEFSR0VUUz0nYWxsJw0KPiBERVNURElSPScvdXNyL29iai9wb3dlcnBjdnRzY19jbGFuZ19h bHRiaW51dGlscy9wb3dlcnBjLnBvd2VycGMvdXNyL3NyYy9wb3dlcnBjLnBvd2VycGMvdG1w Jw0KPiBMRF9MSUJSQVJZX1BBVEg9JycNCj4gTUFDSElORT0ncG93ZXJwYycNCj4gTUFDSElO RV9BUkNIPSdwb3dlcnBjJw0KPiBNQUtFT0JKRElSUFJFRklYPScnDQo+IE1BS0VTWVNQQVRI PScvdXNyL3NyYy9zaGFyZS9taycNCj4gTUFLRV9WRVJTSU9OPScyMDIwMDYwNicNCj4gUEFU SD0nL3Vzci9vYmovcG93ZXJwY3Z0c2NfY2xhbmdfYWx0YmludXRpbHMvcG93ZXJwYy5wb3dl cnBjL3Vzci9zcmMvcG93ZXJwYy5wb3dlcnBjL3RtcC91c3Ivc2JpbjovdXNyL29iai9wb3dl cnBjdnRzY19jbGFuZ19hbHRiaW51dGlscy9wb3dlcnBjLnBvd2VycGMvdXNyL3NyYy9wb3dl cnBjLnBvd2VycGMvdG1wL3Vzci9iaW46L3Vzci9vYmovcG93ZXJwY3Z0c2NfY2xhbmdfYWx0 YmludXRpbHMvcG93ZXJwYy5wb3dlcnBjL3Vzci9zcmMvcG93ZXJwYy5wb3dlcnBjL3RtcC9s ZWdhY3kvdXNyL3NiaW46L3Vzci9vYmovcG93ZXJwY3Z0c2NfY2xhbmdfYWx0YmludXRpbHMv cG93ZXJwYy5wb3dlcnBjL3Vzci9zcmMvcG93ZXJwYy5wb3dlcnBjL3RtcC9sZWdhY3kvdXNy L2JpbjovdXNyL29iai9wb3dlcnBjdnRzY19jbGFuZ19hbHRiaW51dGlscy9wb3dlcnBjLnBv d2VycGMvdXNyL3NyYy9wb3dlcnBjLnBvd2VycGMvdG1wL2xlZ2FjeS9iaW46L3Vzci9vYmov cG93ZXJwY3Z0c2NfY2xhbmdfYWx0YmludXRpbHMvcG93ZXJwYy5wb3dlcnBjL3Vzci9zcmMv cG93ZXJwYy5wb3dlcnBjL3RtcC9sZWdhY3kvdXNyL2xpYmV4ZWM6Oi9zYmluOi9iaW46L3Vz ci9zYmluOi91c3IvYmluJw0KPiBTUkNUT1A9Jy91c3Ivc3JjJw0KPiBPQkpUT1A9Jy91c3Iv b2JqL3Bvd2VycGN2dHNjX2NsYW5nX2FsdGJpbnV0aWxzL3Bvd2VycGMucG93ZXJwYy91c3Iv c3JjL3Bvd2VycGMucG93ZXJwYycNCj4gLk1BS0UuTUFLRUZJTEVTPScvdXNyL3NyYy9zaGFy ZS9tay9zeXMubWsgL3Vzci9zcmMvc2hhcmUvbWsvbG9jYWwuc3lzLmVudi5tayAvdXNyL3Ny Yy9zaGFyZS9tay9zcmMuc3lzLmVudi5tayAvcm9vdC9zcmMuY29uZmlncy9zcmMuY29uZi5w b3dlcnBjLWNsYW5nX2FsdGJpbnV0aWxzLWJvb3RzdHJhcC5hbWQ2NC1ob3N0IC91c3Ivc3Jj L3NoYXJlL21rL2JzZC5ta29wdC5tayAvdXNyL3NyYy9zaGFyZS9tay9zcmMuc3lzLm9iai5t ayAvdXNyL3NyYy9zaGFyZS9tay9hdXRvLm9iai5tayAvdXNyL3NyYy9zaGFyZS9tay9ic2Qu c3VmZml4ZXMubWsgL3Jvb3Qvc3JjLmNvbmZpZ3MvbWFrZS5jb25mIC91c3Ivc3JjL3NoYXJl L21rL2xvY2FsLnN5cy5tayAvdXNyL3NyYy9zaGFyZS9tay9zcmMuc3lzLm1rIC9kZXYvbnVs bCAvdXNyL3NyYy91c3IuYmluL2doLWJjL01ha2VmaWxlIC91c3Ivc3JjL3NoYXJlL21rL3Ny Yy5vcHRzLm1rIC91c3Ivc3JjL3NoYXJlL21rL2JzZC5vd24ubWsgL3Vzci9zcmMvc2hhcmUv bWsvYnNkLm9wdHMubWsgL3Vzci9zcmMvc2hhcmUvbWsvYnNkLmNwdS5tayAvdXNyL3NyYy9z aGFyZS9tay9ic2QuY29tcGlsZXIubWsgL3Vzci9zcmMvc2hhcmUvbWsvYnNkLmxpbmtlci5t ayAvdXNyL3NyYy9zaGFyZS9tay9ic2QucHJvZy5tayAvdXNyL3NyYy9zaGFyZS9tay9ic2Qu aW5pdC5tayAvdXNyL3NyYy9zaGFyZS9tay9sb2NhbC5pbml0Lm1rIC91c3Ivc3JjL3NoYXJl L21rL3NyYy5pbml0Lm1rIC91c3Ivc3JjL3Vzci5iaW4vZ2gtYmMvLi4vTWFrZWZpbGUuaW5j IC91c3Ivc3JjL3NoYXJlL21rL2JzZC5saWJuYW1lcy5tayAvdXNyL3NyYy9zaGFyZS9tay9z cmMubGlibmFtZXMubWsgL3Vzci9zcmMvc2hhcmUvbWsvYnNkLm5scy5tayAvdXNyL3NyYy9z aGFyZS9tay9ic2QuY29uZnMubWsgL3Vzci9zcmMvc2hhcmUvbWsvYnNkLmZpbGVzLm1rIC91 c3Ivc3JjL3NoYXJlL21rL2JzZC5kaXJzLm1rIC91c3Ivc3JjL3NoYXJlL21rL2JzZC5pbmNz Lm1rIC91c3Ivc3JjL3NoYXJlL21rL2JzZC5saW5rcy5tayAvdXNyL3NyYy9zaGFyZS9tay9i c2QubWFuLm1rIC91c3Ivc3JjL3NoYXJlL21rL2JzZC5kZXAubWsgL3Vzci9zcmMvc2hhcmUv bWsvYnNkLmNsYW5nLWFuYWx5emUubWsgL3Vzci9zcmMvc2hhcmUvbWsvYnNkLm9iai5tayAv dXNyL3NyYy9zaGFyZS9tay9ic2Quc3ViZGlyLm1rIC91c3Ivc3JjL3NoYXJlL21rL2JzZC5z eXMubWsnDQo+IC5QQVRIPScuIC91c3Ivc3JjL3Vzci5iaW4vZ2gtYmMgL3Vzci9zcmMvY29u dHJpYi9iYy9zcmMgL3Vzci9zcmMvY29udHJpYi9iYy9nZW4gL3Vzci9zcmMvY29udHJpYi9i Yy9tYW51YWxzIC91c3Ivb2JqL3Bvd2VycGN2dHNjX2NsYW5nX2FsdGJpbnV0aWxzL3Bvd2Vy cGMucG93ZXJwYy91c3Ivc3JjL3Bvd2VycGMucG93ZXJwYy91c3IuYmluL2doLWJjJw0KPiAx IGVycm9yDQo+IA0KPiA9PT0NCj4gTWFyayBNaWxsYXJkDQo+IG1hcmtsbWkgYXQgeWFob28u Y29tDQo+ICggZHNsLW9ubHkubmV0IHdlbnQNCj4gYXdheSBpbiBlYXJseSAyMDE4LU1hcikN Cj4gDQo= From owner-svn-src-head@freebsd.org Wed Jul 8 10:10:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 06D5635E2C2 for ; Wed, 8 Jul 2020 10:10:51 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic306-19.consmr.mail.gq1.yahoo.com (sonic306-19.consmr.mail.gq1.yahoo.com [98.137.68.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1w6x2g01z3bXy for ; Wed, 8 Jul 2020 10:10:49 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: ckeBaDwVM1lIgK6kdl9pS.9oBaRMJfe7T_113xJ8.o7A5W.LFDliN9J2YVrhFdY O.ruUyGGgqaZNdGjm8u4NiwSM1AtU3NP62wERreBeN67_ovb121VSTLfy8tolHiL14ZGxq.fTeGK KASfxmEBsVSuHNI6sNHmuPZhOLtK33dovvs8IWfKZnM42qBHk.qDlXjTfM_1zzf2ZAb13B4Kuxv4 g5NCqIrwk1X71_bl06iBAOuoJyl6Havi6WTwqsq6mZmtmUc.D_RQXSXoXnQgCgGgd_oL7DCZR2aw BV3Kwv3bp30_BcJBbW.MxS6DzqfA8TT9ky9mnBeyx7rYbgHCXL81cTjeKvBw8selZjoAvxZdEzoq vAlRTEOn4Q3xXhXj4.LFUjwnypTFJkm8iIKY1fArpoCkfp_6GdgmsATZQNNZKnUawLi6IgkMRgZD 5dQoQPfStUi0BbPk6A7qPzRlbLohaEkjaX3ars22WH5OKb2P0i.vyt13ywsgcLdus4c7.fK1arYK TWAL39UJar3lJT5BHYRafn2sxII_74vSAfa88.qtA4ByRat8e2IbI8sYkXcPFGgV2OG8guNfx6f9 tOKrHjQoM8TdTpdB7Fl7HCMYfQU1k6ErI0Djmehgr3GpxMkc8obCQMed5D5OCNStXBmC05x4r9Gz izcCMz8zlbOW.KPIjqVK.RXzI8_vfbzHg.JEjDwcJNVk03UbG_VM4UwDTMJAWII86yQY1GEClYtU LQyo_99J5DIYyG9.n8z_Fzo_9GCD2KbsOnaBNbpf5AWbo_oT15gNajVOMWEdJLnoPiha061o39lA do6DngFqC9RCEUiJVrp872mvFG01s_APbqpIrDRllvar37maIwBjlgCO7WxvBwEo345IwR4yWM9l 7CyjV8jX7o90E8bZ6Uq0kxFNsCvp1iYWdPVtpnRtRHfBb0b8rNT639onmautEGAXWi.Y2paJSTd. fYz7WpmRErnkat151.fhq96YDeSZg_8NRYIy5u4.TP.owr60RyaHD6Em8KQOziZrPAm3JxZvX6Sq PoCdSCLb9VDLtu0eLe2KkHKLLnrFZQj5MkJu9wzUpjpYlSeE77GcLlp0vYfqM6bEcTRhl8jjoOrR KY2uHp6nq7NNcYmtWa_q4OiHtAgaxlDmVgM18o0kyRE1uHM8MDFRdnH1u4ZKg1E7ckobkDHBA2O4 a8cXpDTCRECV2blJuMr_7Kq_DV6hxVL6n3AFbhO8EPerbqxMOqkXeIYVQD5SlKydX1X4O3Q8ZZuJ 6Hmsxi.Da6GSjc_8YhDpUU9BeXyJp.zD4rmn6rMkNBpuunl9ao3Ljisnmiv8m0DZIrLKmx92vcph eJO6Avl26WZJ.9UV4O4kRdknm784oeF8uWRYZLNweZn8oF482q5mbC0I_.MLQKeljo0POnsXoCaD 1WgtjcbX6TTTweLxEwmkq225k_b_meA-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.gq1.yahoo.com with HTTP; Wed, 8 Jul 2020 10:10:47 +0000 Received: by smtp404.mail.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID d518534d9e200e8d3d68197590e1386b; Wed, 08 Jul 2020 10:10:46 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: Introduce WITH(OUT)_LTO? (was: Re: svn commit: r362987 - in head: contrib/bc usr.bin/gh-bc) From: Mark Millard In-Reply-To: Date: Wed, 8 Jul 2020 03:10:44 -0700 Cc: svn-src-head@freebsd.org, FreeBSD Toolchain , freebsd-ppc Content-Transfer-Encoding: quoted-printable Message-Id: References: <64523602-7EFC-4A97-90EA-C776BF2A0AF7.ref@yahoo.com> <64523602-7EFC-4A97-90EA-C776BF2A0AF7@yahoo.com> To: =?utf-8?Q?Stefan_E=C3=9Fer?= X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 4B1w6x2g01z3bXy X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.51 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-1.02)[-1.021]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; SUBJECT_HAS_QUESTION(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.993]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCPT_COUNT_THREE(0.00)[4]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-0.99)[-0.992]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.82:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.68.82:from]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 10:10:51 -0000 On 2020-Jul-8, at 01:28, Stefan E=C3=9Fer wrote: > Am 08.07.20 um 09:01 schrieb Mark Millard: >> The following is more informational than anything as far >> as I'm concerned. But there may be implications that I'm >> unaware of. (I sometimes experiment with toolchain use >> to see what the current status is for such use.) >>=20 >> I attempted to build a system for 32-bit powerpc using clang >> and binutils, building head -r363000 ( from -r363000 ). (This >> was a cross build, amd64 -> powerpc.) It got a new type of >> failure, compared to my past experience: >=20 > Hi Mark, >=20 > thank you for the report. I have tested with "make universe" (with > default settings) that this version builds on all architectures, > but Ed Maste has already disabled -flto for powerpc64, due to run > time issues (floating point exception, IIRC). The builds I actually run are based on pure-llvm, not such odd mixes --nor even gcc+binutils. Also, I've not even tried a build since updating to head -r360311 --until now trying to update things to head -r363000 (or so). It is not obvious to me that FreeBSD intends for gcc based builds or binutils based buildworld buildkernel to be supported, even without mixing in LLVM. The ci.freebsd.org builds via gcc6 for amd64 have not completed in a very long time. My standard build procedure historically builds combinations like clang-with-binutils that used to completely build. (Not that the result worked to boot and operate an old PowerMac in recent times.) So I noticed this just by the build procedure failing. There are other combinations that failed some time ago that I turned off in my build procedure after sending a notice to the lists. As of the official switch to llvm-based for powerpc64 and powerpc, I've not been able to boot and operate anything but pure-llvm based builds, even for other types of builds that did "complete". That includes not being able to build and operate system based on modern gcc+binutils without LLVM. It appears to me that it would be a fair sized effort to get gcc+binutils working for powerpc64 or powerpc. My history with odd combinations derived from experimenting with more modern toolchains for powerpc64 and powerpc back in the gcc 4.2.1 days when no llvm based linker was affectively available. Although, I do like the idea of having code pass through and the result operate based on multiple toolchains, not just one, say, modern gcc+binutils as an alternate. Still, if FreeBSD declared "gcc not supported" and "binutils not supported" and "gcc+binutils not supported" for building FreeBSD, I'd just stick to llvm based. > I know that you are actively working on PowerPC and I'd appreciate, > if you could provide me with information on which parameters cause > breakage and which work for you. I think that the answer is: only pure llvm-based has worked for booting and operating since the switch away from gcc 4.2.1 for powerpc64 and powerpc. Everything else either stops the build early or does not operate correctly (as I remember anyway). Apparently, more combinations are landing in the "stops the build early" category over time. > The combination of CLANG with LTO > and GNU binutils cannot work - CLANG and GCC use incompatible file > formats to represent the intermediate object files. To my knowledge, a modern gcc+binutils does not work as the basis for a FreeBSD build for powerpc64 or powerpc. No need to have a mixed toolchain involved or -flto involved to have blocking issues. > This version of bc uses advanced algorithms (compared to the one > it replaced) for much reduced time complexity (a factor of more > than 100 for large numbers has been observed). It uses layering > for correctness, e.g. a set of "vector" management functions, that > are built as a separate compile unit. Compiling with -flto lets the > linker replace many function calls with constant parameters with > much more efficient inline instructions, resulting in 30% higher > performance. The code could be re-arranged to use inline functions > instead of relying on -flto, but this would be a lot of effort and > might make the code much harder to maintain. I'm not objecting to -flto use, even if it constrains what can be used as a basis for building and operating FreeBSD. There are issues that well predate -flto use that block other toolchains for powerpc64 and powerpc. If more than llvm-based is to be supported, I'd just suggest modern gcc+binutils, avoiding claiming support for mixes such as llvm+binutils. > If there is a condition that could be added to the Makefile to not > enable LTO if CLANG+binutils or GCC+LLD are mixed, then I'm willing > to add it. If it happened that -flto use vs. not needs to be configurable for other reasons and it happens to end up that turning it off allows the mixes, that would be fine. (But there could be more issues before any mixes would work.) This would not be the same as targeting being sure that some specific mix(es) would work (all issues handled for the mix). > If more programs were to be built with LTO for performance > reasons, then it might be a good idea to have a global parameter that > controls whether lTO may be used, though. Yep. It avoids needing to find and adjust each individually. > TL;DR >=20 > Perhaps we could add a WITH(OUT)_LTO option that only affects specific > programs that get a significant performance boost from building with > LTO. IMHO, using LTO is preferable to the introduction of inline > functions in source files that fall into that category. >=20 > WITHOUT_LTO could be implied on platforms that are known to not fully > support -flto with default their compiler and linker. And it could be > set by the user when non-default build tools are used. I've no clue if there are platforms for which -flto needs to be avoided in general, even without mixed toolchains getting involved. > This would allow to use -flto for specific programs without the need > to make this optimization conditional on compilers or architectures. FYI: I have disabled attempting to build the failing combination in my environment. There are new non-flto issues also causing more examples of disabled build attempts. But I do not expect that anything disabled was able to boot and operate okay for powerpc64 or for powerpc. > Best regards, STefan >=20 >> --- gh-bc.full --- >> /usr/local/powerpc-unknown-freebsd13.0/bin/ld: = /usr/bin/../lib/LLVMgold.so: error loading plugin: Cannot open = "/usr/bin/../lib/LLVMgold.so" >> cc: error: linker command failed with exit code 1 (use -v to see = invocation) >> *** [gh-bc.full] Error code 1 >>=20 >> Yep: /usr/lib/LLVMgold.so when = -B/usr/local/powerpc-unknown-freebsd13.0/bin/ >> was in use. >>=20 >> I turns out that the link of gh-bc used -flto : >>=20 >> make[4]: stopped in /usr/src/usr.bin/gh-bc >> .ERROR_TARGET=3D'gh-bc.full' >> = .ERROR_META_FILE=3D'/usr/obj/powerpcvtsc_clang_altbinutils/powerpc.powerpc= /usr/src/powerpc.powerpc/usr.bin/gh-bc/gh-bc.full.meta' >> .MAKE.LEVEL=3D'4' >> MAKEFILE=3D'' >> .MAKE.MODE=3D'meta missing-filemon=3Dyes missing-meta=3Dyes = silent=3Dyes verbose' >> _ERROR_CMD=3D'cc -target powerpc-unknown-freebsd13.0 = --sysroot=3D/usr/obj/powerpcvtsc_clang_altbinutils/powerpc.powerpc/usr/src= /powerpc.powerpc/tmp -B/usr/local/powerpc-unknown-freebsd13.0/bin/ -O2 = -pipe -fno-common -B/usr/local/powerpc-unknown-freebsd13.0/bin/ = -DMAINEXEC=3Dbc -DNLSPATH=3D/usr/share/nls/%L/%N.cat -DBC_ENABLED = -DBC_ENABLE_PROMPT -DBC_ENABLE_LONG_OPTIONS -DBC_ENABLE_EXTRA_MATH = -DBC_ENABLE_HISTORY -DBC_ENABLE_RAND -DDC_ENABLED -DNDEBUG = -DVERSION=3D3.1.1 -I/usr/src/contrib/bc/include -DBC_ENABLE_NLS=3D1 = -flto -g -std=3Dgnu99 -Wno-format-zero-length -fstack-protector-strong = -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter = -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type = -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter = -Wcast-align -Wchar-subscripts -Winline -Wnested-externs = -Wredundant-decls -Wold-style-definition -Wno-pointer-sign = -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body = -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments = -Wl,--secure-plt -o gh-bc.full args.o data.o file.o lang.o lex.o main.o = num.o parse.o program.o read.o vector.o vm.o bc/bc.o bc/lex.o bc/parse.o = dc/dc.o dc/lex.o dc/parse.o history/history.o bc_help.o dc_help.o lib.o = lib2.o opt.o rand/rand.o ;' >> .CURDIR=3D'/usr/src/usr.bin/gh-bc' >> .MAKE=3D'make' >> = .OBJDIR=3D'/usr/obj/powerpcvtsc_clang_altbinutils/powerpc.powerpc/usr/src/= powerpc.powerpc/usr.bin/gh-bc' >> .TARGETS=3D'all' >> = DESTDIR=3D'/usr/obj/powerpcvtsc_clang_altbinutils/powerpc.powerpc/usr/src/= powerpc.powerpc/tmp' >> LD_LIBRARY_PATH=3D'' >> MACHINE=3D'powerpc' >> MACHINE_ARCH=3D'powerpc' >> MAKEOBJDIRPREFIX=3D'' >> MAKESYSPATH=3D'/usr/src/share/mk' >> MAKE_VERSION=3D'20200606' >> = PATH=3D'/usr/obj/powerpcvtsc_clang_altbinutils/powerpc.powerpc/usr/src/pow= erpc.powerpc/tmp/usr/sbin:/usr/obj/powerpcvtsc_clang_altbinutils/powerpc.p= owerpc/usr/src/powerpc.powerpc/tmp/usr/bin:/usr/obj/powerpcvtsc_clang_altb= inutils/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/legacy/usr/sbin:/usr/o= bj/powerpcvtsc_clang_altbinutils/powerpc.powerpc/usr/src/powerpc.powerpc/t= mp/legacy/usr/bin:/usr/obj/powerpcvtsc_clang_altbinutils/powerpc.powerpc/u= sr/src/powerpc.powerpc/tmp/legacy/bin:/usr/obj/powerpcvtsc_clang_altbinuti= ls/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/legacy/usr/libexec::/sbin:/= bin:/usr/sbin:/usr/bin' >> SRCTOP=3D'/usr/src' >> = OBJTOP=3D'/usr/obj/powerpcvtsc_clang_altbinutils/powerpc.powerpc/usr/src/p= owerpc.powerpc' >> .MAKE.MAKEFILES=3D'/usr/src/share/mk/sys.mk = /usr/src/share/mk/local.sys.env.mk /usr/src/share/mk/src.sys.env.mk = /root/src.configs/src.conf.powerpc-clang_altbinutils-bootstrap.amd64-host = /usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/src.sys.obj.mk = /usr/src/share/mk/auto.obj.mk /usr/src/share/mk/bsd.suffixes.mk = /root/src.configs/make.conf /usr/src/share/mk/local.sys.mk = /usr/src/share/mk/src.sys.mk /dev/null /usr/src/usr.bin/gh-bc/Makefile = /usr/src/share/mk/src.opts.mk /usr/src/share/mk/bsd.own.mk = /usr/src/share/mk/bsd.opts.mk /usr/src/share/mk/bsd.cpu.mk = /usr/src/share/mk/bsd.compiler.mk /usr/src/share/mk/bsd.linker.mk = /usr/src/share/mk/bsd.prog.mk /usr/src/share/mk/bsd.init.mk = /usr/src/share/mk/local.init.mk /usr/src/share/mk/src.init.mk = /usr/src/usr.bin/gh-bc/../Makefile.inc /usr/src/share/mk/bsd.libnames.mk = /usr/src/share/mk/src.libnames.mk /usr/src/share/mk/bsd.nls.mk = /usr/src/share/mk/bsd.confs.mk /usr/src/share/mk/bsd.files.mk = /usr/src/share/mk/bsd.dirs.mk /usr/src/share/mk/bsd.incs.mk = /usr/src/share/mk/bsd.links.mk /usr/src/share/mk/bsd.man.mk = /usr/src/share/mk/bsd.dep.mk /usr/src/share/mk/bsd.clang-analyze.mk = /usr/src/share/mk/bsd.obj.mk /usr/src/share/mk/bsd.subdir.mk = /usr/src/share/mk/bsd.sys.mk' >> .PATH=3D'. /usr/src/usr.bin/gh-bc /usr/src/contrib/bc/src = /usr/src/contrib/bc/gen /usr/src/contrib/bc/manuals = /usr/obj/powerpcvtsc_clang_altbinutils/powerpc.powerpc/usr/src/powerpc.pow= erpc/usr.bin/gh-bc' >> 1 error >=20 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Wed Jul 8 12:25:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D0E52361D1D; Wed, 8 Jul 2020 12:25:19 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1z675B1wz41nd; Wed, 8 Jul 2020 12:25:19 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 96097200F7; Wed, 8 Jul 2020 12:25:19 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 068CPJSC014832; Wed, 8 Jul 2020 12:25:19 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 068CPJr9014831; Wed, 8 Jul 2020 12:25:19 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007081225.068CPJr9014831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 8 Jul 2020 12:25:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363008 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 363008 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 12:25:19 -0000 Author: tuexen Date: Wed Jul 8 12:25:19 2020 New Revision: 363008 URL: https://svnweb.freebsd.org/changeset/base/363008 Log: Improve handling of PKTDROP chunks. This includes the input validation to address two issues found by ossfuzz testing the userland stack: * https://oss-fuzz.com/testcase-detail/5387560242380800 * https://oss-fuzz.com/testcase-detail/4887954068865024 and adding support for I-DATA chunks in addition to DATA chunks. Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Wed Jul 8 10:04:51 2020 (r363007) +++ head/sys/netinet/sctp_input.c Wed Jul 8 12:25:19 2020 (r363008) @@ -3046,7 +3046,8 @@ process_chunk_drop(struct sctp_tcb *stcb, struct sctp_ { switch (desc->chunk_type) { case SCTP_DATA: - /* find the tsn to resend (possibly */ + case SCTP_IDATA: + /* find the tsn to resend (possibly) */ { uint32_t tsn; struct sctp_tmit_chunk *tp1; @@ -3080,8 +3081,6 @@ process_chunk_drop(struct sctp_tcb *stcb, struct sctp_ SCTP_STAT_INCR(sctps_pdrptsnnf); } if ((tp1) && (tp1->sent < SCTP_DATAGRAM_ACKED)) { - uint8_t *ddp; - if (((flg & SCTP_BADCRC) == 0) && ((flg & SCTP_FROM_MIDDLE_BOX) == 0)) { return (0); @@ -3096,20 +3095,18 @@ process_chunk_drop(struct sctp_tcb *stcb, struct sctp_ SCTP_STAT_INCR(sctps_pdrpdizrw); return (0); } - ddp = (uint8_t *)(mtod(tp1->data, caddr_t)+ - sizeof(struct sctp_data_chunk)); - { - unsigned int iii; - - for (iii = 0; iii < sizeof(desc->data_bytes); - iii++) { - if (ddp[iii] != desc->data_bytes[iii]) { - SCTP_STAT_INCR(sctps_pdrpbadd); - return (-1); - } - } + if ((uint32_t)SCTP_BUF_LEN(tp1->data) < + SCTP_DATA_CHUNK_OVERHEAD(stcb) + SCTP_NUM_DB_TO_VERIFY) { + /* Payload not matching. */ + SCTP_STAT_INCR(sctps_pdrpbadd); + return (-1); } - + if (memcmp(mtod(tp1->data, caddr_t)+SCTP_DATA_CHUNK_OVERHEAD(stcb), + desc->data_bytes, SCTP_NUM_DB_TO_VERIFY) != 0) { + /* Payload not matching. */ + SCTP_STAT_INCR(sctps_pdrpbadd); + return (-1); + } if (tp1->do_rtt) { /* * this guy had a RTO calculation @@ -4135,104 +4132,126 @@ static void sctp_handle_packet_dropped(struct sctp_pktdrop_chunk *cp, struct sctp_tcb *stcb, struct sctp_nets *net, uint32_t limit) { + struct sctp_chunk_desc desc; + struct sctp_chunkhdr *chk_hdr; + struct sctp_data_chunk *data_chunk; + struct sctp_idata_chunk *idata_chunk; uint32_t bottle_bw, on_queue; + uint32_t offset, chk_len; uint16_t trunc_len; - unsigned int chlen; - unsigned int at; - struct sctp_chunk_desc desc; - struct sctp_chunkhdr *ch; + uint16_t pktdrp_len; + uint8_t pktdrp_flags; - chlen = ntohs(cp->ch.chunk_length); - chlen -= sizeof(struct sctp_pktdrop_chunk); - /* XXX possible chlen underflow */ - if (chlen == 0) { - ch = NULL; - if (cp->ch.chunk_flags & SCTP_FROM_MIDDLE_BOX) + KASSERT(sizeof(struct sctp_pktdrop_chunk) <= limit, + ("PKTDROP chunk too small")); + pktdrp_flags = cp->ch.chunk_flags; + pktdrp_len = ntohs(cp->ch.chunk_length); + KASSERT(limit <= pktdrp_len, ("Inconsistent limit")); + if (pktdrp_flags & SCTP_PACKET_TRUNCATED) { + trunc_len = ntohs(cp->trunc_len); + if (trunc_len <= pktdrp_len - sizeof(struct sctp_pktdrop_chunk)) { + /* The peer plays games with us. */ + return; + } + } else { + trunc_len = 0; + } + limit -= sizeof(struct sctp_pktdrop_chunk); + offset = 0; + if (offset == limit) { + if (pktdrp_flags & SCTP_FROM_MIDDLE_BOX) { SCTP_STAT_INCR(sctps_pdrpbwrpt); + } + } else if (offset + sizeof(struct sctphdr) > limit) { + /* Only a partial SCTP common header. */ + SCTP_STAT_INCR(sctps_pdrpcrupt); + offset = limit; } else { - ch = (struct sctp_chunkhdr *)(cp->data + sizeof(struct sctphdr)); - chlen -= sizeof(struct sctphdr); - /* XXX possible chlen underflow */ - memset(&desc, 0, sizeof(desc)); + /* XXX: Check embedded SCTP common header. */ + offset += sizeof(struct sctphdr); } - trunc_len = (uint16_t)ntohs(cp->trunc_len); - if (trunc_len > limit) { - trunc_len = limit; - } - - /* now the chunks themselves */ - while ((ch != NULL) && (chlen >= sizeof(struct sctp_chunkhdr))) { - desc.chunk_type = ch->chunk_type; - /* get amount we need to move */ - at = ntohs(ch->chunk_length); - if (at < sizeof(struct sctp_chunkhdr)) { - /* corrupt chunk, maybe at the end? */ + /* Now parse through the chunks themselves. */ + while (offset < limit) { + if (offset + sizeof(struct sctp_chunkhdr) > limit) { SCTP_STAT_INCR(sctps_pdrpcrupt); break; } - if (trunc_len == 0) { - /* we are supposed to have all of it */ - if (at > chlen) { - /* corrupt skip it */ - SCTP_STAT_INCR(sctps_pdrpcrupt); + chk_hdr = (struct sctp_chunkhdr *)(cp->data + offset); + desc.chunk_type = chk_hdr->chunk_type; + /* get amount we need to move */ + chk_len = (uint32_t)ntohs(chk_hdr->chunk_length); + if (chk_len < sizeof(struct sctp_chunkhdr)) { + /* Someone is lying... */ + break; + } + if (desc.chunk_type == SCTP_DATA) { + if (stcb->asoc.idata_supported) { + /* Some is playing games with us. */ break; } - } else { - /* is there enough of it left ? */ - if (desc.chunk_type == SCTP_DATA) { - if (chlen < (sizeof(struct sctp_data_chunk) + - sizeof(desc.data_bytes))) { - break; - } - } else { - if (chlen < sizeof(struct sctp_chunkhdr)) { - break; - } + if (chk_len <= sizeof(struct sctp_data_chunk)) { + /* Some is playing games with us. */ + break; } - } - if (desc.chunk_type == SCTP_DATA) { - /* can we get out the tsn? */ - if ((cp->ch.chunk_flags & SCTP_FROM_MIDDLE_BOX)) + if (chk_len < sizeof(struct sctp_data_chunk) + SCTP_NUM_DB_TO_VERIFY) { + /* + * Not enough data bytes available in the + * chunk. + */ + SCTP_STAT_INCR(sctps_pdrpnedat); + goto next_chunk; + } + if (offset + sizeof(struct sctp_data_chunk) + SCTP_NUM_DB_TO_VERIFY > limit) { + /* Not enough data in buffer. */ + break; + } + data_chunk = (struct sctp_data_chunk *)(cp->data + offset); + memcpy(desc.data_bytes, data_chunk + 1, SCTP_NUM_DB_TO_VERIFY); + desc.tsn_ifany = data_chunk->dp.tsn; + if (pktdrp_flags & SCTP_FROM_MIDDLE_BOX) { SCTP_STAT_INCR(sctps_pdrpmbda); - - if (chlen >= (sizeof(struct sctp_data_chunk) + sizeof(uint32_t))) { - /* yep */ - struct sctp_data_chunk *dcp; - uint8_t *ddp; - unsigned int iii; - - dcp = (struct sctp_data_chunk *)ch; - ddp = (uint8_t *)(dcp + 1); - for (iii = 0; iii < sizeof(desc.data_bytes); iii++) { - desc.data_bytes[iii] = ddp[iii]; - } - desc.tsn_ifany = dcp->dp.tsn; - } else { - /* nope we are done. */ + } + } else if (desc.chunk_type == SCTP_IDATA) { + if (!stcb->asoc.idata_supported) { + /* Some is playing games with us. */ + break; + } + if (chk_len <= sizeof(struct sctp_idata_chunk)) { + /* Some is playing games with us. */ + break; + } + if (chk_len < sizeof(struct sctp_idata_chunk) + SCTP_NUM_DB_TO_VERIFY) { + /* + * Not enough data bytes available in the + * chunk. + */ SCTP_STAT_INCR(sctps_pdrpnedat); + goto next_chunk; + } + if (offset + sizeof(struct sctp_idata_chunk) + SCTP_NUM_DB_TO_VERIFY > limit) { + /* Not enough data in buffer. */ break; } + idata_chunk = (struct sctp_idata_chunk *)(cp->data + offset); + memcpy(desc.data_bytes, idata_chunk + 1, SCTP_NUM_DB_TO_VERIFY); + desc.tsn_ifany = idata_chunk->dp.tsn; + if (pktdrp_flags & SCTP_FROM_MIDDLE_BOX) { + SCTP_STAT_INCR(sctps_pdrpmbda); + } } else { - if ((cp->ch.chunk_flags & SCTP_FROM_MIDDLE_BOX)) + if (pktdrp_flags & SCTP_FROM_MIDDLE_BOX) { SCTP_STAT_INCR(sctps_pdrpmbct); + } } - - if (process_chunk_drop(stcb, &desc, net, cp->ch.chunk_flags)) { + if (process_chunk_drop(stcb, &desc, net, pktdrp_flags)) { SCTP_STAT_INCR(sctps_pdrppdbrk); break; } - if (SCTP_SIZE32(at) > chlen) { - break; - } - chlen -= SCTP_SIZE32(at); - if (chlen < sizeof(struct sctp_chunkhdr)) { - /* done, none left */ - break; - } - ch = (struct sctp_chunkhdr *)((caddr_t)ch + SCTP_SIZE32(at)); +next_chunk: + offset += SCTP_SIZE32(chk_len); } /* Now update any rwnd --- possibly */ - if ((cp->ch.chunk_flags & SCTP_FROM_MIDDLE_BOX) == 0) { + if ((pktdrp_flags & SCTP_FROM_MIDDLE_BOX) == 0) { /* From a peer, we get a rwnd report */ uint32_t a_rwnd; @@ -4268,7 +4287,7 @@ sctp_handle_packet_dropped(struct sctp_pktdrop_chunk * } /* now middle boxes in sat networks get a cwnd bump */ - if ((cp->ch.chunk_flags & SCTP_FROM_MIDDLE_BOX) && + if ((pktdrp_flags & SCTP_FROM_MIDDLE_BOX) && (stcb->asoc.sat_t3_loss_recovery == 0) && (stcb->asoc.sat_network)) { /* From owner-svn-src-head@freebsd.org Wed Jul 8 15:49:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C0DA6365CDA; Wed, 8 Jul 2020 15:49:30 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B23dk4lRPz4DDn; Wed, 8 Jul 2020 15:49:30 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 85A2B226F4; Wed, 8 Jul 2020 15:49:30 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 068FnU4t038308; Wed, 8 Jul 2020 15:49:30 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 068FnUIn038307; Wed, 8 Jul 2020 15:49:30 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007081549.068FnUIn038307@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 8 Jul 2020 15:49:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363010 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 363010 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 15:49:30 -0000 Author: tuexen Date: Wed Jul 8 15:49:30 2020 New Revision: 363010 URL: https://svnweb.freebsd.org/changeset/base/363010 Log: Don't accept FORWARD-TSN chunks when I-FORWARD-TSN was negotiated and vice versa. MFC after: 1 week Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Wed Jul 8 13:40:27 2020 (r363009) +++ head/sys/netinet/sctp_input.c Wed Jul 8 15:49:30 2020 (r363010) @@ -5089,7 +5089,8 @@ process_control_chunks: break; case SCTP_FORWARD_CUM_TSN: case SCTP_IFORWARD_CUM_TSN: - SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_FWD_TSN\n"); + SCTPDBG(SCTP_DEBUG_INPUT3, "%s\n", + ch->chunk_type == SCTP_FORWARD_CUM_TSN ? "FORWARD_TSN" : "I_FORWARD_TSN"); if (chk_length < sizeof(struct sctp_forward_tsn_chunk)) { /* Its not ours */ *offset = length; @@ -5101,6 +5102,18 @@ process_control_chunks: if (stcb->asoc.prsctp_supported == 0) { goto unknown_chunk; + } + if (((asoc->idata_supported == 1) && (ch->chunk_type == SCTP_FORWARD_CUM_TSN)) || + ((asoc->idata_supported == 0) && (ch->chunk_type == SCTP_IFORWARD_CUM_TSN))) { + if (ch->chunk_type == SCTP_FORWARD_CUM_TSN) { + SCTP_SNPRINTF(msg, sizeof(msg), "%s", "FORWARD-TSN chunk received when I-FORWARD-TSN was negotiated"); + } else { + SCTP_SNPRINTF(msg, sizeof(msg), "%s", "I-FORWARD-TSN chunk received when FORWARD-TSN was negotiated"); + } + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); + sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); + *offset = length; + return (NULL); } *fwd_tsn_seen = 1; if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { From owner-svn-src-head@freebsd.org Wed Jul 8 16:04:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D7F6A3664DE; Wed, 8 Jul 2020 16:04:06 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B23yZ5NPrz4F5x; Wed, 8 Jul 2020 16:04:06 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9BD8C22E94; Wed, 8 Jul 2020 16:04:06 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 068G46M3050656; Wed, 8 Jul 2020 16:04:06 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 068G46Me050655; Wed, 8 Jul 2020 16:04:06 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007081604.068G46Me050655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 8 Jul 2020 16:04:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363011 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 363011 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 16:04:06 -0000 Author: tuexen Date: Wed Jul 8 16:04:06 2020 New Revision: 363011 URL: https://svnweb.freebsd.org/changeset/base/363011 Log: Fix error description. MFC after: 1 week Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Wed Jul 8 15:49:30 2020 (r363010) +++ head/sys/netinet/sctp_indata.c Wed Jul 8 16:04:06 2020 (r363011) @@ -2745,7 +2745,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o struct mbuf *op_err; char msg[SCTP_DIAG_INFO_LEN]; - SCTP_SNPRINTF(msg, sizeof(msg), "%s", "I-DATA chunk received when DATA was negotiated"); + SCTP_SNPRINTF(msg, sizeof(msg), "%s", "DATA chunk received when I-DATA was negotiated"); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_20; sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); @@ -2756,7 +2756,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o struct mbuf *op_err; char msg[SCTP_DIAG_INFO_LEN]; - SCTP_SNPRINTF(msg, sizeof(msg), "%s", "DATA chunk received when I-DATA was negotiated"); + SCTP_SNPRINTF(msg, sizeof(msg), "%s", "I-DATA chunk received when DATA was negotiated"); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_21; sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); From owner-svn-src-head@freebsd.org Wed Jul 8 16:23:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC3A3366BAE; Wed, 8 Jul 2020 16:23:40 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B24P85Vyhz4GQG; Wed, 8 Jul 2020 16:23:40 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A06502312D; Wed, 8 Jul 2020 16:23:40 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 068GNemL062652; Wed, 8 Jul 2020 16:23:40 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 068GNe05062651; Wed, 8 Jul 2020 16:23:40 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007081623.068GNe05062651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 8 Jul 2020 16:23:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363012 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 363012 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 16:23:40 -0000 Author: tuexen Date: Wed Jul 8 16:23:40 2020 New Revision: 363012 URL: https://svnweb.freebsd.org/changeset/base/363012 Log: Improve consistency. MFC after: 1 week Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Wed Jul 8 16:04:06 2020 (r363011) +++ head/sys/netinet/sctp_input.c Wed Jul 8 16:23:40 2020 (r363012) @@ -5103,8 +5103,8 @@ process_control_chunks: if (stcb->asoc.prsctp_supported == 0) { goto unknown_chunk; } - if (((asoc->idata_supported == 1) && (ch->chunk_type == SCTP_FORWARD_CUM_TSN)) || - ((asoc->idata_supported == 0) && (ch->chunk_type == SCTP_IFORWARD_CUM_TSN))) { + if (((stcb->asoc.idata_supported == 1) && (ch->chunk_type == SCTP_FORWARD_CUM_TSN)) || + ((stcb->asoc.idata_supported == 0) && (ch->chunk_type == SCTP_IFORWARD_CUM_TSN))) { if (ch->chunk_type == SCTP_FORWARD_CUM_TSN) { SCTP_SNPRINTF(msg, sizeof(msg), "%s", "FORWARD-TSN chunk received when I-FORWARD-TSN was negotiated"); } else { From owner-svn-src-head@freebsd.org Wed Jul 8 16:50:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B420E3675FA; Wed, 8 Jul 2020 16:50:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B250S48szz4J1s; Wed, 8 Jul 2020 16:50:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5993C23701; Wed, 8 Jul 2020 16:50:48 +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 068Gomhp078186; Wed, 8 Jul 2020 16:50:48 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 068GolhP078184; Wed, 8 Jul 2020 16:50:47 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202007081650.068GolhP078184@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 8 Jul 2020 16:50:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363013 - head/contrib/llvm-project/clang/lib/Sema X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/llvm-project/clang/lib/Sema X-SVN-Commit-Revision: 363013 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 16:50:48 -0000 Author: dim Date: Wed Jul 8 16:50:47 2020 New Revision: 363013 URL: https://svnweb.freebsd.org/changeset/base/363013 Log: Merge commit 065fc1eafe7c from llvm git (by Richard Smith): PR45521: Preserve the value kind when performing a standard conversion sequence on a glvalue expression. If the sequence is supposed to perform an lvalue-to-rvalue conversion, then one will be specified as the first conversion in the sequence. Otherwise, one should not be invented. This should fix clang crashing with "can't implicitly cast lvalue to rvalue with this cast kind", followed by "UNREACHABLE executed at /usr/src/contrib/llvm-project/clang/lib/Sema/Sema.cpp:538!", when building recent versions of Ceph, and the CPAN module SYBER/Date-5.2.0. Reported by: Willem Jan Withagen , eserte12@yahoo.de PR: 245530, 247812 MFC after: 3 days Modified: head/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp head/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp Modified: head/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp Wed Jul 8 16:23:40 2020 (r363012) +++ head/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp Wed Jul 8 16:50:47 2020 (r363013) @@ -4063,8 +4063,8 @@ Sema::PerformImplicitConversion(Expr *From, QualType T break; case ICK_Compatible_Conversion: - From = ImpCastExprToType(From, ToType, CK_NoOp, - VK_RValue, /*BasePath=*/nullptr, CCK).get(); + From = ImpCastExprToType(From, ToType, CK_NoOp, From->getValueKind(), + /*BasePath=*/nullptr, CCK).get(); break; case ICK_Writeback_Conversion: @@ -4303,11 +4303,7 @@ Sema::PerformImplicitConversion(Expr *From, QualType T break; case ICK_Qualification: { - // The qualification keeps the category of the inner expression, unless the - // target type isn't a reference. - ExprValueKind VK = - ToType->isReferenceType() ? From->getValueKind() : VK_RValue; - + ExprValueKind VK = From->getValueKind(); CastKind CK = CK_NoOp; if (ToType->isReferenceType() && Modified: head/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp Wed Jul 8 16:23:40 2020 (r363012) +++ head/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp Wed Jul 8 16:50:47 2020 (r363013) @@ -4693,7 +4693,7 @@ TryReferenceInit(Sema &S, Expr *Init, QualType DeclTyp Sema::ReferenceConversions::NestedQualification) ? ICK_Qualification : ICK_Identity; - ICS.Standard.FromTypePtr = T2.getAsOpaquePtr(); + ICS.Standard.setFromType(T2); ICS.Standard.setToType(0, T2); ICS.Standard.setToType(1, T1); ICS.Standard.setToType(2, T1); From owner-svn-src-head@freebsd.org Wed Jul 8 17:12:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4D6973683A8; Wed, 8 Jul 2020 17:12:13 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B25T91PVjz4KPH; Wed, 8 Jul 2020 17:12:13 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1383023B84; Wed, 8 Jul 2020 17:12:13 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 068HCCJF090456; Wed, 8 Jul 2020 17:12:12 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 068HCCUV090453; Wed, 8 Jul 2020 17:12:12 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202007081712.068HCCUV090453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 8 Jul 2020 17:12:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363014 - in head: sys/geom/eli tests/sys/geom/class/eli X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head: sys/geom/eli tests/sys/geom/class/eli X-SVN-Commit-Revision: 363014 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 17:12:13 -0000 Author: asomers Date: Wed Jul 8 17:12:12 2020 New Revision: 363014 URL: https://svnweb.freebsd.org/changeset/base/363014 Log: geli: enable direct dispatch geli does all of its crypto operations in a separate thread pool, so g_eli_start, g_eli_read_done, and g_eli_write_done don't actually do very much work. Enabling direct dispatch eliminates the g_up/g_down bottlenecks, doubling IOPs on my system. This change does not affect the thread pool. Reviewed by: markj MFC after: 2 weeks Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D25587 Added: head/tests/sys/geom/class/eli/reentrancy_test.sh (contents, props changed) Modified: head/sys/geom/eli/g_eli.c head/tests/sys/geom/class/eli/Makefile Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Wed Jul 8 16:50:47 2020 (r363013) +++ head/sys/geom/eli/g_eli.c Wed Jul 8 17:12:12 2020 (r363014) @@ -734,6 +734,7 @@ g_eli_read_metadata_offset(struct g_class *mp, struct gp->orphan = g_eli_orphan_spoil_assert; gp->spoiled = g_eli_orphan_spoil_assert; cp = g_new_consumer(gp); + cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE; error = g_attach(cp, pp); if (error != 0) goto end; @@ -882,6 +883,7 @@ g_eli_create(struct gctl_req *req, struct g_class *mp, pp = NULL; cp = g_new_consumer(gp); + cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE; error = g_attach(cp, bpp); if (error != 0) { if (req != NULL) { @@ -969,6 +971,7 @@ g_eli_create(struct gctl_req *req, struct g_class *mp, * Create decrypted provider. */ pp = g_new_providerf(gp, "%s%s", bpp->name, G_ELI_SUFFIX); + pp->flags |= G_PF_DIRECT_SEND | G_PF_DIRECT_RECEIVE; pp->mediasize = sc->sc_mediasize; pp->sectorsize = sc->sc_sectorsize; LIST_FOREACH(gap, &bpp->aliases, ga_next) Modified: head/tests/sys/geom/class/eli/Makefile ============================================================================== --- head/tests/sys/geom/class/eli/Makefile Wed Jul 8 16:50:47 2020 (r363013) +++ head/tests/sys/geom/class/eli/Makefile Wed Jul 8 17:12:12 2020 (r363014) @@ -17,6 +17,7 @@ ATF_TESTS_SH+= kill_test ATF_TESTS_SH+= misc_test ATF_TESTS_SH+= onetime_test ATF_TESTS_SH+= online_resize_test +ATF_TESTS_SH+= reentrancy_test ATF_TESTS_SH+= resize_test ATF_TESTS_SH+= setkey_test Added: head/tests/sys/geom/class/eli/reentrancy_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/geom/class/eli/reentrancy_test.sh Wed Jul 8 17:12:12 2020 (r363014) @@ -0,0 +1,69 @@ +# $FreeBSD$ + +# Test various operations for geli-on-geli providers, to ensure that geli is +# reentrant. + +. $(atf_get_srcdir)/conf.sh + +init_test() +{ + cipher=$1 + aalgo=$2 + secsize=$3 + ealgo=${cipher%%:*} + keylen=${cipher##*:} + + atf_check dd if=/dev/random of=testdata bs=$secsize count=1 status=none + atf_check dd if=/dev/random of=keyfile bs=$secsize count=16 status=none + + # Create the lower geli device + atf_check -s exit:0 -e ignore \ + geli init -B none -a $aalgo -e $ealgo -l $keylen -P -K keyfile \ + -s $secsize ${md} + atf_check geli attach -p -k keyfile ${md} + # Create the upper geli device + atf_check -s exit:0 -e ignore \ + geli init -B none -a $aalgo -e $ealgo -l $keylen -P -K keyfile \ + -s $secsize ${md}.eli + atf_check geli attach -p -k keyfile ${md}.eli + echo ${md} > layered_md_device + + # Ensure we can read and write. + atf_check dd if=testdata of=/dev/${md}.eli.eli bs=$secsize count=1 \ + status=none + atf_check dd if=/dev/${md}.eli.eli of=cmpdata bs=$secsize count=1 \ + status=none + atf_check cmp -s testdata cmpdata + + geli detach ${md}.eli 2>/dev/null +} + +atf_test_case init cleanup +init_head() +{ + atf_set "descr" "Initialize a geli provider on top of another" + atf_set "require.user" "root" + atf_set "timeout" 600 +} +init_body() +{ + sectors=2 + geli_test_setup + + for_each_geli_config init_test +} +init_cleanup() +{ + if [ -f layered_md_device ]; then + while read provider; do + [ -c /dev/${md}.eli.eli ] && \ + geli detach $md.eli.eli 2>/dev/null + done < layered_md_device + fi + geli_test_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case init +} From owner-svn-src-head@freebsd.org Wed Jul 8 17:14:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 86DAB3684F3; Wed, 8 Jul 2020 17:14:45 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B25X536f7z4KTY; Wed, 8 Jul 2020 17:14:45 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D97223760; Wed, 8 Jul 2020 17:14:45 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 068HEjZX094099; Wed, 8 Jul 2020 17:14:45 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 068HEjkK094098; Wed, 8 Jul 2020 17:14:45 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202007081714.068HEjkK094098@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 8 Jul 2020 17:14:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363015 - head/sys/dev/extres/syscon X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dev/extres/syscon X-SVN-Commit-Revision: 363015 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 17:14:45 -0000 Author: manu Date: Wed Jul 8 17:14:44 2020 New Revision: 363015 URL: https://svnweb.freebsd.org/changeset/base/363015 Log: extres/syscon_generic: Make device quiet if not in boot verbose On some boards there is a lot of of syscon node that are unused as more specific drivers is probed before, no need to flood the console for the mostly-unused generic ones. MFC after: 1 week Modified: head/sys/dev/extres/syscon/syscon_generic.c Modified: head/sys/dev/extres/syscon/syscon_generic.c ============================================================================== --- head/sys/dev/extres/syscon/syscon_generic.c Wed Jul 8 17:12:12 2020 (r363014) +++ head/sys/dev/extres/syscon/syscon_generic.c Wed Jul 8 17:14:44 2020 (r363015) @@ -142,6 +142,9 @@ syscon_generic_probe(device_t dev) return (ENXIO); device_set_desc(dev, "syscon"); + if (!bootverbose) + device_quiet(dev); + return (BUS_PROBE_GENERIC); } From owner-svn-src-head@freebsd.org Wed Jul 8 18:58:47 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 287D136AA8A; Wed, 8 Jul 2020 18:58:47 +0000 (UTC) (envelope-from alfredo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B27r55QCGz4TwY; Wed, 8 Jul 2020 18:58:45 +0000 (UTC) (envelope-from alfredo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C7C2F249C1; Wed, 8 Jul 2020 18:58:44 +0000 (UTC) (envelope-from alfredo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 068IwiNb061773; Wed, 8 Jul 2020 18:58:44 GMT (envelope-from alfredo@FreeBSD.org) Received: (from alfredo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 068IwiMI061772; Wed, 8 Jul 2020 18:58:44 GMT (envelope-from alfredo@FreeBSD.org) Message-Id: <202007081858.068IwiMI061772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alfredo set sender to alfredo@FreeBSD.org using -f From: "Alfredo Dal'Ava Junior" Date: Wed, 8 Jul 2020 18:58:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363020 - head/lib/libkvm/tests X-SVN-Group: head X-SVN-Commit-Author: alfredo X-SVN-Commit-Paths: head/lib/libkvm/tests X-SVN-Commit-Revision: 363020 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 18:58:48 -0000 Author: alfredo Date: Wed Jul 8 18:58:44 2020 New Revision: 363020 URL: https://svnweb.freebsd.org/changeset/base/363020 Log: test: add libkvm read test This test checks if value received from kvm_read is sane, based on value returned by sysctl interface. This should catch regression on bug fixed by r359160 Reviewed by: jhb Approved by: jhibbits (mentor) MFC after: 1 week Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D23783 Added: head/lib/libkvm/tests/kvm_read_test.c (contents, props changed) Modified: head/lib/libkvm/tests/Makefile Modified: head/lib/libkvm/tests/Makefile ============================================================================== --- head/lib/libkvm/tests/Makefile Wed Jul 8 18:32:25 2020 (r363019) +++ head/lib/libkvm/tests/Makefile Wed Jul 8 18:58:44 2020 (r363020) @@ -6,8 +6,10 @@ ATF_TESTS_C+= kvm_close_test ATF_TESTS_C+= kvm_geterr_test ATF_TESTS_C+= kvm_open_test ATF_TESTS_C+= kvm_open2_test +ATF_TESTS_C+= kvm_read_test CFLAGS.kvm_geterr_test+= -I${.CURDIR:H} +CFLAGS.kvm_read_test+= -I${.CURDIR:H} LIBADD+= kvm @@ -15,7 +17,7 @@ WARNS?= 6 BINDIR= ${TESTSDIR} -.for t in kvm_geterr_test kvm_open_test kvm_open2_test +.for t in kvm_geterr_test kvm_open_test kvm_open2_test kvm_read_test SRCS.$t= $t.c kvm_test_common.c .endfor Added: head/lib/libkvm/tests/kvm_read_test.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libkvm/tests/kvm_read_test.c Wed Jul 8 18:58:44 2020 (r363020) @@ -0,0 +1,98 @@ +/*- + * Copyright (c) 2020 Alfredo Dal'Ava Junior + * Copyright (c) 2017 Enji Cooper + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * From: FreeBSD: src/lib/libkvm/tests/kvm_geterr_test.c + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "kvm_test_common.h" + +ATF_TC(kvm_read_positive_test_no_error); +ATF_TC_HEAD(kvm_read_positive_test_no_error, tc) +{ + + atf_tc_set_md_var(tc, "descr", + "test that kvm_read returns a sane value"); + atf_tc_set_md_var(tc, "require.user", "root"); +} + +ATF_TC_BODY(kvm_read_positive_test_no_error, tc) +{ + kvm_t *kd; + struct nlist nl[] = { +#define SYMNAME "_mp_maxcpus" +#define X_MAXCPUS 0 + { SYMNAME, 0, 0, 0, 0 }, + { NULL, 0, 0, 0, 0 }, + }; + ssize_t rc; + int sysctl_maxcpus, mp_maxcpus, retcode; + size_t len = sizeof(sysctl_maxcpus); + + errbuf_clear(); + kd = kvm_open(NULL, NULL, NULL, O_RDONLY, errbuf); + ATF_CHECK(!errbuf_has_error(errbuf)); + ATF_REQUIRE_MSG(kd != NULL, "kvm_open failed: %s", errbuf); + retcode = kvm_nlist(kd, nl); + ATF_REQUIRE_MSG(retcode != -1, + "kvm_nlist failed (returned %d): %s", retcode, kvm_geterr(kd)); + if (nl[X_MAXCPUS].n_type == 0) + atf_tc_skip("symbol (\"%s\") couldn't be found", SYMNAME); + + rc = kvm_read(kd, nl[X_MAXCPUS].n_value, &mp_maxcpus, + sizeof(mp_maxcpus)); + + ATF_REQUIRE_MSG(rc != -1, "kvm_read failed: %s", kvm_geterr(kd)); + ATF_REQUIRE_MSG(kvm_close(kd) == 0, "kvm_close failed: %s", + strerror(errno)); + + /* Check if value read from kvm_read is sane */ + retcode = sysctlbyname("kern.smp.maxcpus", &sysctl_maxcpus, &len, NULL, 0); + ATF_REQUIRE_MSG(retcode == 0, "sysctl read failed : %d", retcode); + ATF_REQUIRE_EQ_MSG(mp_maxcpus, sysctl_maxcpus, + "failed: kvm_read of mp_maxcpus returned %d but sysctl maxcpus returned %d", + mp_maxcpus, sysctl_maxcpus); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, kvm_read_positive_test_no_error); + return (atf_no_error()); +} From owner-svn-src-head@freebsd.org Wed Jul 8 19:14:49 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EF63936C6C7; Wed, 8 Jul 2020 19:14:48 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B28Bb0fj8z3VHj; Wed, 8 Jul 2020 19:14:46 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 96580250CA; Wed, 8 Jul 2020 19:14:44 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 068JEi9H090415; Wed, 8 Jul 2020 19:14:44 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 068JEiBq090414; Wed, 8 Jul 2020 19:14:44 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202007081914.068JEiBq090414@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 8 Jul 2020 19:14:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363021 - head/sys/dev/iicbus/twsi X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dev/iicbus/twsi X-SVN-Commit-Revision: 363021 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 19:14:49 -0000 Author: manu Date: Wed Jul 8 19:14:44 2020 New Revision: 363021 URL: https://svnweb.freebsd.org/changeset/base/363021 Log: twsi: Fix for > Allwinner A20 Every revision of twsi after the A20 have a bug where we need to write again the control register after each interrupts. We also need to add some delay before writing to this register, a simple read of the same register does the job so do that. Also fix the case when we have finish sending all the bytes, it only worked for 1 byte transfer (the same kind that we do for talking to the PMIC on A20 boards). While here add more debug messages and rework some of them. This was tested by talking to a AT23C32 eeprom and a DS3231 RTC from an H3 and A20 board. PR: 247576 Reported by: Manuel Stühn (freebsd@justmail.de) MFC after: 1 week Modified: head/sys/dev/iicbus/twsi/twsi.c Modified: head/sys/dev/iicbus/twsi/twsi.c ============================================================================== --- head/sys/dev/iicbus/twsi/twsi.c Wed Jul 8 18:58:44 2020 (r363020) +++ head/sys/dev/iicbus/twsi/twsi.c Wed Jul 8 19:14:44 2020 (r363021) @@ -499,6 +499,10 @@ twsi_transfer(device_t dev, struct iic_msg *msgs, uint sc->msg_idx = 0; sc->transfer = 1; +#ifdef TWSI_DEBUG + for (int i = 0; i < nmsgs; i++) + debugf(sc->dev, "msg %d is %d bytes long\n", i, msgs[i].len); +#endif /* Send start and re-enable interrupts */ sc->control_val = TWSI_CONTROL_TWSIEN | TWSI_CONTROL_INTEN | TWSI_CONTROL_ACK; @@ -535,13 +539,13 @@ twsi_intr(void *arg) debugf(sc->dev, "Got interrupt Current msg=%x\n", sc->msg_idx); status = TWSI_READ(sc, sc->reg_status); - debugf(sc->dev, "initial status=%x\n", status); + debugf(sc->dev, "reg control=%x\n", TWSI_READ(sc, sc->reg_control)); switch (status) { case TWSI_STATUS_START: case TWSI_STATUS_RPTD_START: /* Transmit the address */ - debugf(sc->dev, "Send the address\n"); + debugf(sc->dev, "Send the address (%x)", sc->msgs[sc->msg_idx].slave); if (sc->msgs[sc->msg_idx].flags & IIC_M_RD) TWSI_WRITE(sc, sc->reg_data, @@ -555,8 +559,10 @@ twsi_intr(void *arg) case TWSI_STATUS_ADDR_W_ACK: debugf(sc->dev, "Ack received after transmitting the address (write)\n"); /* Directly send the first byte */ - sc->sent_bytes = 0; - debugf(sc->dev, "Sending byte 0 = %x\n", sc->msgs[sc->msg_idx].buf[0]); + sc->sent_bytes = 1; + debugf(sc->dev, "Sending byte 0 (of %d) = %x\n", + sc->msgs[sc->msg_idx].len, + sc->msgs[sc->msg_idx].buf[0]); TWSI_WRITE(sc, sc->reg_data, sc->msgs[sc->msg_idx].buf[0]); TWSI_WRITE(sc, sc->reg_control, sc->control_val); @@ -580,7 +586,7 @@ twsi_intr(void *arg) case TWSI_STATUS_DATA_WR_ACK: debugf(sc->dev, "Ack received after transmitting data\n"); - if (sc->sent_bytes++ == (sc->msgs[sc->msg_idx].len - 1)) { + if (sc->sent_bytes == sc->msgs[sc->msg_idx].len) { debugf(sc->dev, "Done sending all the bytes for msg %d\n", sc->msg_idx); /* Send stop, no interrupts on stop */ if (!(sc->msgs[sc->msg_idx].flags & IIC_M_NOSTOP)) { @@ -595,30 +601,40 @@ twsi_intr(void *arg) if (sc->msg_idx == sc->nmsgs) { debugf(sc->dev, "transfer_done=1\n"); transfer_done = 1; + sc->error = 0; + } else { + debugf(sc->dev, "Send repeated start\n"); + TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_START); } } else { - debugf(sc->dev, "Sending byte %d = %x\n", + debugf(sc->dev, "Sending byte %d (of %d) = %x\n", sc->sent_bytes, + sc->msgs[sc->msg_idx].len, sc->msgs[sc->msg_idx].buf[sc->sent_bytes]); TWSI_WRITE(sc, sc->reg_data, sc->msgs[sc->msg_idx].buf[sc->sent_bytes]); TWSI_WRITE(sc, sc->reg_control, sc->control_val); + sc->sent_bytes++; } break; case TWSI_STATUS_DATA_RD_ACK: debugf(sc->dev, "Ack received after receiving data\n"); - debugf(sc->dev, "msg_len=%d recv_bytes=%d\n", sc->msgs[sc->msg_idx].len, sc->recv_bytes); sc->msgs[sc->msg_idx].buf[sc->recv_bytes++] = TWSI_READ(sc, sc->reg_data); + debugf(sc->dev, "msg_len=%d recv_bytes=%d\n", sc->msgs[sc->msg_idx].len, sc->recv_bytes); /* If we only have one byte left, disable ACK */ if (sc->msgs[sc->msg_idx].len - sc->recv_bytes == 1) sc->control_val &= ~TWSI_CONTROL_ACK; - if (sc->msgs[sc->msg_idx].len - sc->recv_bytes) { + if (sc->msgs[sc->msg_idx].len == sc->recv_bytes) { + debugf(sc->dev, "Done with msg %d\n", sc->msg_idx); sc->msg_idx++; - if (sc->msg_idx == sc->nmsgs - 1) + if (sc->msg_idx == sc->nmsgs - 1) { + debugf(sc->dev, "No more msgs\n"); transfer_done = 1; + sc->error = 0; + } } TWSI_WRITE(sc, sc->reg_control, sc->control_val); break; @@ -631,12 +647,14 @@ twsi_intr(void *arg) TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_STOP); } else { - debugf(sc->dev, "No ack when receiving data\n"); - sc->error = ENXIO; - sc->control_val = 0; + debugf(sc->dev, "No ack when receiving data, sending stop anyway\n"); + if (!(sc->msgs[sc->msg_idx].flags & IIC_M_NOSTOP)) + TWSI_WRITE(sc, sc->reg_control, + sc->control_val | TWSI_CONTROL_STOP); } sc->transfer = 0; transfer_done = 1; + sc->error = 0; break; default: @@ -647,6 +665,15 @@ twsi_intr(void *arg) wakeup(sc); break; } + debugf(sc->dev, "Refresh reg_control\n"); + + /* + * Fix silicon bug on > Allwinner A20 by doing a read and writing + * again to the control register + */ + status = TWSI_READ(sc, sc->reg_status); + TWSI_WRITE(sc, sc->reg_control, + sc->control_val | TWSI_CONTROL_IFLG); debugf(sc->dev, "Done with interrupts\n\n"); if (transfer_done == 1) { From owner-svn-src-head@freebsd.org Wed Jul 8 21:20:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 98DA13549EB; Wed, 8 Jul 2020 21:20:14 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2BzL3w8rz457k; Wed, 8 Jul 2020 21:20:14 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 695842685D; Wed, 8 Jul 2020 21:20:14 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 068LKEFt067914; Wed, 8 Jul 2020 21:20:14 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 068LKCeN067904; Wed, 8 Jul 2020 21:20:12 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <202007082120.068LKCeN067904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Wed, 8 Jul 2020 21:20:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363031 - in head: contrib/bmake contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake X-SVN-Group: head X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: in head: contrib/bmake contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake X-SVN-Commit-Revision: 363031 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 21:20:14 -0000 Author: sjg Date: Wed Jul 8 21:20:12 2020 New Revision: 363031 URL: https://svnweb.freebsd.org/changeset/base/363031 Log: Update to bmake-20200704 Key changes include reduced noise at end of failed build log and avoid evaluation of unnecessary terms in conditionals. MFC after: 1 week Added: head/contrib/bmake/LICENSE - copied unchanged from r363019, vendor/NetBSD/bmake/dist/LICENSE head/contrib/bmake/unit-tests/cond-short.exp - copied unchanged from r363019, vendor/NetBSD/bmake/dist/unit-tests/cond-short.exp head/contrib/bmake/unit-tests/cond-short.mk - copied unchanged from r363019, vendor/NetBSD/bmake/dist/unit-tests/cond-short.mk Modified: head/contrib/bmake/ChangeLog head/contrib/bmake/FILES head/contrib/bmake/VERSION head/contrib/bmake/arch.c head/contrib/bmake/buf.c head/contrib/bmake/compat.c head/contrib/bmake/cond.c head/contrib/bmake/dir.c head/contrib/bmake/for.c head/contrib/bmake/hash.c head/contrib/bmake/hash.h head/contrib/bmake/job.c head/contrib/bmake/job.h head/contrib/bmake/lst.lib/lstAppend.c head/contrib/bmake/lst.lib/lstAtEnd.c head/contrib/bmake/lst.lib/lstAtFront.c head/contrib/bmake/lst.lib/lstClose.c head/contrib/bmake/lst.lib/lstConcat.c head/contrib/bmake/lst.lib/lstDatum.c head/contrib/bmake/lst.lib/lstDeQueue.c head/contrib/bmake/lst.lib/lstDupl.c head/contrib/bmake/lst.lib/lstEnQueue.c head/contrib/bmake/lst.lib/lstFind.c head/contrib/bmake/lst.lib/lstFindFrom.c head/contrib/bmake/lst.lib/lstFirst.c head/contrib/bmake/lst.lib/lstForEach.c head/contrib/bmake/lst.lib/lstForEachFrom.c head/contrib/bmake/lst.lib/lstInit.c head/contrib/bmake/lst.lib/lstInsert.c head/contrib/bmake/lst.lib/lstIsAtEnd.c head/contrib/bmake/lst.lib/lstIsEmpty.c head/contrib/bmake/lst.lib/lstLast.c head/contrib/bmake/lst.lib/lstNext.c head/contrib/bmake/lst.lib/lstOpen.c head/contrib/bmake/lst.lib/lstPrev.c head/contrib/bmake/lst.lib/lstRemove.c head/contrib/bmake/lst.lib/lstReplace.c head/contrib/bmake/lst.lib/lstSucc.c head/contrib/bmake/main.c head/contrib/bmake/make.c head/contrib/bmake/make.h head/contrib/bmake/make_malloc.c head/contrib/bmake/meta.c head/contrib/bmake/meta.h head/contrib/bmake/mk/ChangeLog head/contrib/bmake/mk/FILES head/contrib/bmake/mk/gendirdeps.mk head/contrib/bmake/mk/install-mk head/contrib/bmake/mk/mkopt.sh head/contrib/bmake/mk/sys/AIX.mk head/contrib/bmake/mk/sys/Darwin.mk head/contrib/bmake/mk/sys/Generic.mk head/contrib/bmake/mk/sys/HP-UX.mk head/contrib/bmake/mk/sys/IRIX.mk head/contrib/bmake/mk/sys/Linux.mk head/contrib/bmake/mk/sys/NetBSD.mk head/contrib/bmake/mk/sys/OSF1.mk head/contrib/bmake/mk/sys/OpenBSD.mk head/contrib/bmake/mk/sys/SunOS.mk head/contrib/bmake/mk/sys/UnixWare.mk head/contrib/bmake/nonints.h head/contrib/bmake/parse.c head/contrib/bmake/str.c head/contrib/bmake/suff.c head/contrib/bmake/targ.c head/contrib/bmake/trace.c head/contrib/bmake/unit-tests/Makefile head/contrib/bmake/unit-tests/modmatch.mk head/contrib/bmake/unit-tests/modmisc.exp head/contrib/bmake/unit-tests/modmisc.mk head/contrib/bmake/unit-tests/modorder.exp head/contrib/bmake/unit-tests/modorder.mk head/contrib/bmake/unit-tests/sysv.exp head/contrib/bmake/unit-tests/sysv.mk head/contrib/bmake/unit-tests/varmisc.exp head/contrib/bmake/unit-tests/varmisc.mk head/contrib/bmake/util.c head/contrib/bmake/var.c head/usr.bin/bmake/Makefile.config Directory Properties: head/contrib/bmake/ (props changed) Modified: head/contrib/bmake/ChangeLog ============================================================================== --- head/contrib/bmake/ChangeLog Wed Jul 8 20:26:19 2020 (r363030) +++ head/contrib/bmake/ChangeLog Wed Jul 8 21:20:12 2020 (r363031) @@ -1,3 +1,81 @@ +2020-07-04 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200704 + Merge with NetBSD make, pick up + (most of this by rillig@) + o lots of style and white-space cleanup + o lots more unit tests for variable modifiers + o simplified description of some functions + o str.c: refactor Str_Match + o var.c: debugging output for :@ + constify VarModify parameter + fix :hash modifier on 16-bit platforms + remove unnecessary forward declarations + refactor ApplyModifier_SysV to have less indentation + simplify code for :E and :R + clean up code for :H and :T + refactor ApplyModifiers + + * var.c: we need stdint.h on some platforms to get uint32_t + * unit-test/Makefile: we need to supress the specific error + for RE substitution error in modmisc, since it varies accross + different OS. + +2020-07-02 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200702 + Merge with NetBSD make, pick up + o var.c: more improvements to avoiding unnecessary evaluation + use enums for flags + o remove flags arg to Var_Set which outside of var.c is always 0 + +2020-07-01 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200701 + Merge with NetBSD make, pick up + o var.c: with change to cond.c; ensure that nested variables + within a variable name are expanded. + o unit-tests/varmisc.mk: test for nested varname + +2020-06-29 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200629 + Merge with NetBSD make, pick up + o cond.c: do not eval unnecessary terms of conditionals. + +2020-06-25 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200625 + Merge with NetBSD make, pick up + o meta.c: report error if lseek in filemon_read fails + +2020-06-22 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200622 + Merge with NetBSD make, pick up + o dieQuietly: ignore OP_SUBMAKE as too aggressive + +2020-06-19 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200619 + Merge with NetBSD make, pick up + o str.c: performance improvement for Str_Match for multiple '*' + o dieQuietly: supress the failure output from make + when failing node is a sub-make or a sibling failed. + This cuts down greatly on unhelpful noise at the end of + build log. Disabled by -dj or .MAKE.DIE_QUIETLY=no + +2020-06-10 Simon J Gerraty + + * FILES: add LICENSE to appease some packagers. + This is an attempt to fairly represent the license on almost + 200 files, which are almost all BSD-3-Clause + The few exceptions being more liberal. + + * VERSION (_MAKE_VERSION): 20200610 + Merge with NetBSD make, pick up + o unit test for :Or + 2020-06-06 Simon J Gerraty * VERSION (_MAKE_VERSION): 20200606 Modified: head/contrib/bmake/FILES ============================================================================== --- head/contrib/bmake/FILES Wed Jul 8 20:26:19 2020 (r363030) +++ head/contrib/bmake/FILES Wed Jul 8 21:20:12 2020 (r363031) @@ -1,5 +1,6 @@ ChangeLog FILES +LICENSE Makefile Makefile.config.in PSD.doc/Makefile @@ -107,6 +108,8 @@ unit-tests/cond2.exp unit-tests/cond2.mk unit-tests/cond-late.mk unit-tests/cond-late.exp +unit-tests/cond-short.mk +unit-tests/cond-short.exp unit-tests/dollar.exp unit-tests/dollar.mk unit-tests/doterror.exp Copied: head/contrib/bmake/LICENSE (from r363019, vendor/NetBSD/bmake/dist/LICENSE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/bmake/LICENSE Wed Jul 8 21:20:12 2020 (r363031, copy of r363019, vendor/NetBSD/bmake/dist/LICENSE) @@ -0,0 +1,59 @@ +The individual files in this distribution are copyright their +original contributors or assignees. +Including: + + Copyright (c) 1993-2020, Simon J Gerraty + Copyright (c) 2009-2016, Juniper Networks, Inc. + Copyright (c) 2009, John Birrell. + Copyright (c) 1997-2020 The NetBSD Foundation, Inc. + Copyright (c) 1998 Todd C. Miller + Copyright (c) 1989 by Berkeley Softworks + Copyright (c) 1988, 1989, 1990, 1992, 1993 + The Regents of the University of California. + Copyright (c) 1988, 1989 by Adam de Boor + +With the exception of the GNU configure script, which states: + + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. + # + # This configure script is free software; the Free Software Foundation + # gives unlimited permission to copy, distribute and modify it. + +The license for this distribution is considered to be: + + SPDX-License-Identifier: BSD-3-Clause + +example (from https://opensource.org/licenses/BSD-3-Clause): + + Copyright + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + Modified: head/contrib/bmake/VERSION ============================================================================== --- head/contrib/bmake/VERSION Wed Jul 8 20:26:19 2020 (r363030) +++ head/contrib/bmake/VERSION Wed Jul 8 21:20:12 2020 (r363031) @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20200606 +_MAKE_VERSION=20200704 Modified: head/contrib/bmake/arch.c ============================================================================== --- head/contrib/bmake/arch.c Wed Jul 8 20:26:19 2020 (r363030) +++ head/contrib/bmake/arch.c Wed Jul 8 21:20:12 2020 (r363031) @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.71 2019/10/05 23:35:57 mrg Exp $ */ +/* $NetBSD: arch.c,v 1.73 2020/07/03 08:02:55 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: arch.c,v 1.71 2019/10/05 23:35:57 mrg Exp $"; +static char rcsid[] = "$NetBSD: arch.c,v 1.73 2020/07/03 08:02:55 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: arch.c,v 1.71 2019/10/05 23:35:57 mrg Exp $"); +__RCSID("$NetBSD: arch.c,v 1.73 2020/07/03 08:02:55 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -312,7 +312,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * free(freeIt); if (result == var_Error) { - return(FAILURE); + return FAILURE; } else { subLibName = TRUE; } @@ -354,7 +354,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * free(freeIt); if (result == var_Error) { - return(FAILURE); + return FAILURE; } else { doSubst = TRUE; } @@ -372,7 +372,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * */ if (*cp == '\0') { printf("No closing parenthesis in archive specification\n"); - return (FAILURE); + return FAILURE; } /* @@ -426,7 +426,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * if (gn == NULL) { free(buf); - return(FAILURE); + return FAILURE; } else { gn->type |= OP_ARCHV; (void)Lst_AtEnd(nodeLst, gn); @@ -437,7 +437,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * * ourselves. */ free(buf); - return(FAILURE); + return FAILURE; } /* * Free buffer and continue with our work. @@ -461,7 +461,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * gn = Targ_FindNode(nameBuf, TARG_CREATE); if (gn == NULL) { free(nameBuf); - return (FAILURE); + return FAILURE; } else { /* * We've found the node, but have to make sure the rest of @@ -483,7 +483,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * gn = Targ_FindNode(nameBuf, TARG_CREATE); free(nameBuf); if (gn == NULL) { - return (FAILURE); + return FAILURE; } else { /* * We've found the node, but have to make sure the rest of the @@ -520,7 +520,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * } while (*cp != '\0' && isspace ((unsigned char)*cp)); *linePtr = cp; - return (SUCCESS); + return SUCCESS; } /*- @@ -544,7 +544,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * static int ArchFindArchive(const void *ar, const void *archName) { - return (strcmp(archName, ((const Arch *)ar)->name)); + return strcmp(archName, ((const Arch *)ar)->name); } /*- @@ -602,7 +602,7 @@ ArchStatMember(char *archive, char *member, Boolean ha he = Hash_FindEntry(&ar->members, member); if (he != NULL) { - return ((struct ar_hdr *)Hash_GetValue(he)); + return (struct ar_hdr *)Hash_GetValue(he); } else { /* Try truncated name */ char copy[AR_MAX_NAME_LEN+1]; @@ -614,7 +614,7 @@ ArchStatMember(char *archive, char *member, Boolean ha copy[AR_MAX_NAME_LEN] = '\0'; } if ((he = Hash_FindEntry(&ar->members, copy)) != NULL) - return ((struct ar_hdr *)Hash_GetValue(he)); + return (struct ar_hdr *)Hash_GetValue(he); return NULL; } } @@ -635,7 +635,7 @@ ArchStatMember(char *archive, char *member, Boolean ha return NULL; } else { fclose(arch); - return (&sarh); + return &sarh; } } @@ -753,7 +753,7 @@ ArchStatMember(char *archive, char *member, Boolean ha he = Hash_FindEntry(&ar->members, member); if (he != NULL) { - return ((struct ar_hdr *)Hash_GetValue(he)); + return (struct ar_hdr *)Hash_GetValue(he); } else { return NULL; } @@ -962,7 +962,7 @@ ArchFindMember(char *archive, char *member, struct ar_ fclose(arch); return NULL; } - return (arch); + return arch; } } else #ifdef AR_EFMT1 @@ -996,7 +996,7 @@ ArchFindMember(char *archive, char *member, struct ar_ fclose(arch); return NULL; } - return (arch); + return arch; } if (fseek(arch, -elen, SEEK_CUR) != 0) { fclose(arch); @@ -1152,7 +1152,7 @@ Arch_MTime(GNode *gn) } gn->mtime = modTime; - return (modTime); + return modTime; } /*- @@ -1179,7 +1179,7 @@ Arch_MemMTime(GNode *gn) if (Lst_Open(gn->parents) != SUCCESS) { gn->mtime = 0; - return (0); + return 0; } while ((ln = Lst_Next(gn->parents)) != NULL) { pgn = (GNode *)Lst_Datum(ln); @@ -1211,7 +1211,7 @@ Arch_MemMTime(GNode *gn) Lst_Close(gn->parents); - return (gn->mtime); + return gn->mtime; } /*- @@ -1252,9 +1252,9 @@ Arch_FindLib(GNode *gn, Lst path) free(libName); #ifdef LIBRARIES - Var_Set(TARGET, gn->name, gn, 0); + Var_Set(TARGET, gn->name, gn); #else - Var_Set(TARGET, gn->path == NULL ? gn->name : gn->path, gn, 0); + Var_Set(TARGET, gn->path == NULL ? gn->name : gn->path, gn); #endif /* LIBRARIES */ } @@ -1337,7 +1337,7 @@ Arch_LibOODate(GNode *gn) oodate = FALSE; #endif } - return (oodate); + return oodate; } /*- Modified: head/contrib/bmake/buf.c ============================================================================== --- head/contrib/bmake/buf.c Wed Jul 8 20:26:19 2020 (r363030) +++ head/contrib/bmake/buf.c Wed Jul 8 21:20:12 2020 (r363031) @@ -1,4 +1,4 @@ -/* $NetBSD: buf.c,v 1.25 2012/04/24 20:26:58 sjg Exp $ */ +/* $NetBSD: buf.c,v 1.26 2020/07/03 08:02:55 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: buf.c,v 1.25 2012/04/24 20:26:58 sjg Exp $"; +static char rcsid[] = "$NetBSD: buf.c,v 1.26 2020/07/03 08:02:55 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)buf.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: buf.c,v 1.25 2012/04/24 20:26:58 sjg Exp $"); +__RCSID("$NetBSD: buf.c,v 1.26 2020/07/03 08:02:55 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -160,7 +160,7 @@ Buf_GetAll(Buffer *bp, int *numBytesPtr) if (numBytesPtr != NULL) *numBytesPtr = bp->count; - return (bp->buffer); + return bp->buffer; } /*- Modified: head/contrib/bmake/compat.c ============================================================================== --- head/contrib/bmake/compat.c Wed Jul 8 20:26:19 2020 (r363030) +++ head/contrib/bmake/compat.c Wed Jul 8 21:20:12 2020 (r363031) @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.110 2020/01/19 19:42:32 riastradh Exp $ */ +/* $NetBSD: compat.c,v 1.113 2020/07/03 08:13:23 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: compat.c,v 1.110 2020/01/19 19:42:32 riastradh Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.113 2020/07/03 08:13:23 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: compat.c,v 1.110 2020/01/19 19:42:32 riastradh Exp $"); +__RCSID("$NetBSD: compat.c,v 1.113 2020/07/03 08:13:23 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -236,7 +236,7 @@ CompatRunCommand(void *cmdp, void *gnp) silent = gn->type & OP_SILENT; errCheck = !(gn->type & OP_IGNORE); doIt = FALSE; - + cmdNode = Lst_Member(gn->commands, cmd); cmdStart = Var_Subst(NULL, cmd, gn, VARF_WANTRES); @@ -249,18 +249,18 @@ CompatRunCommand(void *cmdp, void *gnp) if (*cmdStart == '\0') { free(cmdStart); - return(0); + return 0; } cmd = cmdStart; Lst_Replace(cmdNode, cmdStart); if ((gn->type & OP_SAVE_CMDS) && (gn != ENDNode)) { (void)Lst_AtEnd(ENDNode->commands, cmdStart); - return(0); + return 0; } if (strcmp(cmdStart, "...") == 0) { gn->type |= OP_SAVE_CMDS; - return(0); + return 0; } while ((*cmd == '@') || (*cmd == '-') || (*cmd == '+')) { @@ -287,7 +287,7 @@ CompatRunCommand(void *cmdp, void *gnp) * If we did not end up with a command, just skip it. */ if (!*cmd) - return (0); + return 0; #if !defined(MAKE_NATIVE) /* @@ -307,7 +307,7 @@ CompatRunCommand(void *cmdp, void *gnp) * go to the shell. Therefore treat '=' and ':' like shell * meta characters as documented in make(1). */ - + useShell = needshell(cmd, FALSE); #endif @@ -325,7 +325,7 @@ CompatRunCommand(void *cmdp, void *gnp) * we go... */ if (!doIt && NoExecute(gn)) { - return (0); + return 0; } if (DEBUG(JOB)) fprintf(debug_file, "Execute: '%s'\n", cmd); @@ -377,7 +377,7 @@ again: meta_compat_start(); } #endif - + /* * Fork and execute the single command. If the fork fails, we abort. */ @@ -499,8 +499,8 @@ again: bmake_signal(compatSigno, SIG_DFL); kill(myPid, compatSigno); } - - return (status); + + return status; } /*- @@ -550,7 +550,7 @@ Compat_Make(void *gnp, void *pgnp) if (Lst_Member(gn->iParents, pgn) != NULL) { char *p1; - Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), pgn, 0); + Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), pgn); free(p1); } @@ -654,7 +654,7 @@ Compat_Make(void *gnp, void *pgnp) } else { if (Lst_Member(gn->iParents, pgn) != NULL) { char *p1; - Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), pgn, 0); + Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), pgn); free(p1); } switch(gn->made) { @@ -681,7 +681,7 @@ Compat_Make(void *gnp, void *pgnp) cohorts: Lst_ForEach(gn->cohorts, Compat_Make, pgnp); - return (0); + return 0; } /*- Modified: head/contrib/bmake/cond.c ============================================================================== --- head/contrib/bmake/cond.c Wed Jul 8 20:26:19 2020 (r363030) +++ head/contrib/bmake/cond.c Wed Jul 8 21:20:12 2020 (r363031) @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.75 2017/04/16 20:59:04 riastradh Exp $ */ +/* $NetBSD: cond.c,v 1.78 2020/07/03 08:13:23 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: cond.c,v 1.75 2017/04/16 20:59:04 riastradh Exp $"; +static char rcsid[] = "$NetBSD: cond.c,v 1.78 2020/07/03 08:13:23 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: cond.c,v 1.75 2017/04/16 20:59:04 riastradh Exp $"); +__RCSID("$NetBSD: cond.c,v 1.78 2020/07/03 08:13:23 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -146,7 +146,7 @@ typedef enum { * last two fields are stored in condInvert and condDefProc, respectively. */ static void CondPushBack(Token); -static int CondGetArg(char **, char **, const char *); +static int CondGetArg(Boolean, char **, char **, const char *); static Boolean CondDoDefined(int, const char *); static int CondStrMatch(const void *, const void *); static Boolean CondDoMake(int, const char *); @@ -186,7 +186,7 @@ static unsigned int cond_min_depth = 0; /* depth at * Indicate when we should be strict about lhs of comparisons. * TRUE when Cond_EvalExpression is called from Cond_Eval (.if etc) * FALSE when Cond_EvalExpression is called from var.c:ApplyModifiers - * since lhs is already expanded and we cannot tell if + * since lhs is already expanded and we cannot tell if * it was a variable reference or not. */ static Boolean lhsStrict; @@ -225,9 +225,6 @@ CondPushBack(Token t) * CondGetArg -- * Find the argument of a built-in function. * - * Input: - * parens TRUE if arg should be bounded by parens - * * Results: * The length of the argument and the address of the argument. * @@ -238,7 +235,7 @@ CondPushBack(Token t) *----------------------------------------------------------------------- */ static int -CondGetArg(char **linePtr, char **argPtr, const char *func) +CondGetArg(Boolean doEval, char **linePtr, char **argPtr, const char *func) { char *cp; int argLen; @@ -259,7 +256,7 @@ CondGetArg(char **linePtr, char **argPtr, const char * * the word 'make' or 'defined' at the beginning of a symbol... */ *argPtr = NULL; - return (0); + return 0; } while (*cp == ' ' || *cp == '\t') { @@ -290,7 +287,8 @@ CondGetArg(char **linePtr, char **argPtr, const char * int len; void *freeIt; - cp2 = Var_Parse(cp, VAR_CMD, VARF_UNDEFERR|VARF_WANTRES, + cp2 = Var_Parse(cp, VAR_CMD, VARF_UNDEFERR| + (doEval ? VARF_WANTRES : 0), &len, &freeIt); Buf_AddBytes(&buf, strlen(cp2), cp2); free(freeIt); @@ -316,11 +314,11 @@ CondGetArg(char **linePtr, char **argPtr, const char * if (func != NULL && *cp++ != ')') { Parse_Error(PARSE_WARNING, "Missing closing parenthesis for %s()", func); - return (0); + return 0; } *linePtr = cp; - return (argLen); + return argLen; } /*- @@ -349,7 +347,7 @@ CondDoDefined(int argLen MAKE_ATTR_UNUSED, const char } free(p1); - return (result); + return result; } /*- @@ -369,7 +367,7 @@ CondDoDefined(int argLen MAKE_ATTR_UNUSED, const char static int CondStrMatch(const void *string, const void *pattern) { - return(!Str_Match(string, pattern)); + return !Str_Match(string, pattern); } /*- @@ -414,14 +412,14 @@ CondDoExists(int argLen MAKE_ATTR_UNUSED, const char * if (DEBUG(COND)) { fprintf(debug_file, "exists(%s) result is \"%s\"\n", arg, path ? path : ""); - } + } if (path != NULL) { result = TRUE; free(path); } else { result = FALSE; } - return (result); + return result; } /*- @@ -443,7 +441,7 @@ CondDoTarget(int argLen MAKE_ATTR_UNUSED, const char * GNode *gn; gn = Targ_FindNode(arg, TARG_NOCREATE); - return (gn != NULL) && !OP_NOP(gn->type); + return gn != NULL && !OP_NOP(gn->type); } /*- @@ -467,7 +465,7 @@ CondDoCommands(int argLen MAKE_ATTR_UNUSED, const char GNode *gn; gn = Targ_FindNode(arg, TARG_NOCREATE); - return (gn != NULL) && !OP_NOP(gn->type) && !Lst_IsEmpty(gn->commands); + return gn != NULL && !OP_NOP(gn->type) && !Lst_IsEmpty(gn->commands); } /*- @@ -577,7 +575,7 @@ CondGetString(Boolean doEval, Boolean *quoted, void ** /* if we are in quotes, then an undefined variable is ok */ str = Var_Parse(condExpr, VAR_CMD, ((!qt && doEval) ? VARF_UNDEFERR : 0) | - VARF_WANTRES, &len, freeIt); + (doEval ? VARF_WANTRES : 0), &len, freeIt); if (str == var_Error) { if (*freeIt) { free(*freeIt); @@ -668,7 +666,7 @@ compare_expression(Boolean doEval) rhs = NULL; lhsFree = rhsFree = FALSE; lhsQuoted = rhsQuoted = FALSE; - + /* * Parse the variable spec and skip over it, saving its * value in lhs. @@ -711,7 +709,7 @@ compare_expression(Boolean doEval) goto done; } /* For .ifxxx compare against zero */ - if (CondCvtArg(lhs, &left)) { + if (CondCvtArg(lhs, &left)) { t = left != 0.0; goto done; } @@ -764,7 +762,7 @@ do_string_compare: * rhs is either a float or an integer. Convert both the * lhs and the rhs to a double and compare the two. */ - + if (!CondCvtArg(lhs, &left) || !CondCvtArg(rhs, &right)) goto do_string_compare; @@ -813,7 +811,7 @@ done: } static int -get_mpt_arg(char **linePtr, char **argPtr, const char *func MAKE_ATTR_UNUSED) +get_mpt_arg(Boolean doEval, char **linePtr, char **argPtr, const char *func MAKE_ATTR_UNUSED) { /* * Use Var_Parse to parse the spec in parens and return @@ -827,7 +825,7 @@ get_mpt_arg(char **linePtr, char **argPtr, const char /* We do all the work here and return the result as the length */ *argPtr = NULL; - val = Var_Parse(cp - 1, VAR_CMD, VARF_WANTRES, &length, &freeIt); + val = Var_Parse(cp - 1, VAR_CMD, doEval ? VARF_WANTRES : 0, &length, &freeIt); /* * Advance *linePtr to beyond the closing ). Note that * we subtract one because 'length' is calculated from 'cp - 1'. @@ -864,7 +862,7 @@ compare_function(Boolean doEval) static const struct fn_def { const char *fn_name; int fn_name_len; - int (*fn_getarg)(char **, char **, const char *); + int (*fn_getarg)(Boolean, char **, char **, const char *); Boolean (*fn_proc)(int, const char *); } fn_defs[] = { { "defined", 7, CondGetArg, CondDoDefined }, @@ -892,7 +890,7 @@ compare_function(Boolean doEval) if (*cp != '(') break; - arglen = fn_def->fn_getarg(&cp, &arg, fn_def->fn_name); + arglen = fn_def->fn_getarg(doEval, &cp, &arg, fn_def->fn_name); if (arglen <= 0) { condExpr = cp; return arglen < 0 ? TOK_ERROR : TOK_FALSE; @@ -917,7 +915,7 @@ compare_function(Boolean doEval) * would be invalid if we did "defined(a)" - so instead treat as an * expression. */ - arglen = CondGetArg(&cp, &arg, NULL); + arglen = CondGetArg(doEval, &cp, &arg, NULL); for (cp1 = cp; isspace(*(unsigned char *)cp1); cp1++) continue; if (*cp1 == '=' || *cp1 == '!') @@ -1040,7 +1038,7 @@ CondT(Boolean doEval) t = TOK_TRUE; } } - return (t); + return t; } /*- @@ -1086,7 +1084,7 @@ CondF(Boolean doEval) CondPushBack(o); } } - return (l); + return l; } /*- @@ -1133,7 +1131,7 @@ CondE(Boolean doEval) CondPushBack(o); } } - return (l); + return l; } /*- Modified: head/contrib/bmake/dir.c ============================================================================== --- head/contrib/bmake/dir.c Wed Jul 8 20:26:19 2020 (r363030) +++ head/contrib/bmake/dir.c Wed Jul 8 21:20:12 2020 (r363031) @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.74 2020/06/05 18:03:59 sjg Exp $ */ +/* $NetBSD: dir.c,v 1.76 2020/07/03 08:13:23 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: dir.c,v 1.74 2020/06/05 18:03:59 sjg Exp $"; +static char rcsid[] = "$NetBSD: dir.c,v 1.76 2020/07/03 08:13:23 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: dir.c,v 1.74 2020/06/05 18:03:59 sjg Exp $"); +__RCSID("$NetBSD: dir.c,v 1.76 2020/07/03 08:13:23 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -112,7 +112,7 @@ __RCSID("$NetBSD: dir.c,v 1.74 2020/06/05 18:03:59 sjg * Dir_FindHereOrAbove Search for a path in the current directory and * then all the directories above it in turn until * the path is found or we reach the root ("/"). - * + * * Dir_MTime Return the modification time of a node. The file * is searched for along the default search path. * The path and mtime fields of the node are filled @@ -377,7 +377,7 @@ void Dir_InitCur(const char *cdname) { Path *p; - + if (cdname != NULL) { /* * Our build directory is not the same as our source directory. @@ -480,7 +480,7 @@ Dir_SetPATH(void) Boolean hasLastDot = FALSE; /* true we should search dot last */ Var_Delete(".PATH", VAR_GLOBAL); - + if (Lst_Open(dirSearchPath) == SUCCESS) { if ((ln = Lst_First(dirSearchPath)) != NULL) { p = (Path *)Lst_Datum(ln); @@ -537,7 +537,7 @@ Dir_SetPATH(void) static int DirFindName(const void *p, const void *dname) { - return (strcmp(((const Path *)p)->name, dname)); + return strcmp(((const Path *)p)->name, dname); } /*- @@ -545,7 +545,7 @@ DirFindName(const void *p, const void *dname) * Dir_HasWildcards -- * see if the given name has any wildcard characters in it * be careful not to expand unmatching brackets or braces. - * XXX: This code is not 100% correct. ([^]] fails etc.) + * XXX: This code is not 100% correct. ([^]] fails etc.) * I really don't think that make(1) should be expanding * patterns, because then you have to set a mechanism for * escaping the expansion! @@ -644,7 +644,7 @@ DirMatchFiles(const char *pattern, Path *p, Lst expans STR_ADDSLASH))); } } - return (0); + return 0; } /*- @@ -947,7 +947,7 @@ Dir_Expand(const char *word, Lst path, Lst expansions) *----------------------------------------------------------------------- */ static char * -DirLookup(Path *p, const char *name MAKE_ATTR_UNUSED, const char *cp, +DirLookup(Path *p, const char *name MAKE_ATTR_UNUSED, const char *cp, Boolean hasSlash MAKE_ATTR_UNUSED) { char *file; /* the current filename to check */ @@ -1004,7 +1004,7 @@ DirLookupSubdir(Path *p, const char *name) if (cached_stat(file, &stb) == 0) { nearmisses += 1; - return (file); + return file; } free(file); return NULL; @@ -1061,7 +1061,7 @@ DirLookupAbs(Path *p, const char *name, const char *cp if (DEBUG(DIR)) { fprintf(debug_file, " returning %s\n", name); } - return (bmake_strdup(name)); + return bmake_strdup(name); } /*- @@ -1087,7 +1087,7 @@ DirFindDot(Boolean hasSlash MAKE_ATTR_UNUSED, const ch } hits += 1; dot->hits += 1; - return (bmake_strdup(name)); + return bmake_strdup(name); } if (cur && Hash_FindEntry(&cur->files, cp) != NULL) { @@ -1185,7 +1185,7 @@ Dir_FindFile(const char *name, Lst path) * is found, we concatenate the directory name and the final * component and return the resulting string. If we don't find any * such thing, we go on to phase two... - * + * * No matter what, we always look for the file in the current * directory before anywhere else (unless we found the magic * DOTLAST path, in which case we search it last) and we *do not* @@ -1384,7 +1384,7 @@ Dir_FindFile(const char *name, Lst path) } if (Hash_FindEntry(&p->files, cp) != NULL) { - return (bmake_strdup(name)); + return bmake_strdup(name); } else { return NULL; } @@ -1395,7 +1395,7 @@ Dir_FindFile(const char *name, Lst path) bigmisses += 1; if (cached_stat(name, &stb) == 0) { - return (bmake_strdup(name)); + return bmake_strdup(name); } if (DEBUG(DIR)) { @@ -1409,14 +1409,14 @@ Dir_FindFile(const char *name, Lst path) /*- *----------------------------------------------------------------------- * Dir_FindHereOrAbove -- - * search for a path starting at a given directory and then working + * search for a path starting at a given directory and then working * our way up towards the root. * * Input: * here starting directory * search_path the path we are looking for * result the result of a successful search is placed here - * rlen the length of the result buffer + * rlen the length of the result buffer * (typically MAXPATHLEN + 1) * * Results: @@ -1426,7 +1426,7 @@ Dir_FindFile(const char *name, Lst path) * Side Effects: *----------------------------------------------------------------------- */ -int +int Dir_FindHereOrAbove(char *here, char *search_path, char *result, int rlen) { struct stat st; @@ -1451,7 +1451,7 @@ Dir_FindHereOrAbove(char *here, char *search_path, cha try_end = try + strlen(try); while (try_end > try && *try_end != '/') try_end--; - if (try_end > try) + if (try_end > try) *try_end = 0; /* chop! */ } @@ -1459,10 +1459,10 @@ Dir_FindHereOrAbove(char *here, char *search_path, cha * done! */ snprintf(result, rlen, "%s", try); - return(1); + return 1; } - /* + /* * nope, we didn't find it. if we used up dirbase we've * reached the root and failed. */ @@ -1479,9 +1479,9 @@ Dir_FindHereOrAbove(char *here, char *search_path, cha } /* while (1) */ /* - * we failed... + * we failed... */ - return(0); + return 0; } /*- *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Jul 8 21:40:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BB127355EA6; Wed, 8 Jul 2020 21:40:28 +0000 (UTC) (envelope-from olivier@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2CQh4DLwz46gn; Wed, 8 Jul 2020 21:40:28 +0000 (UTC) (envelope-from olivier@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 74BF22655D; Wed, 8 Jul 2020 21:40:28 +0000 (UTC) (envelope-from olivier@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 068LeSMQ080358; Wed, 8 Jul 2020 21:40:28 GMT (envelope-from olivier@FreeBSD.org) Received: (from olivier@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 068LeSRi080356; Wed, 8 Jul 2020 21:40:28 GMT (envelope-from olivier@FreeBSD.org) Message-Id: <202007082140.068LeSRi080356@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: olivier set sender to olivier@FreeBSD.org using -f From: Olivier Cochard Date: Wed, 8 Jul 2020 21:40:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363032 - in head: etc/mtree include X-SVN-Group: head X-SVN-Commit-Author: olivier X-SVN-Commit-Paths: in head: etc/mtree include X-SVN-Commit-Revision: 363032 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 21:40:28 -0000 Author: olivier (ports committer) Date: Wed Jul 8 21:40:27 2020 New Revision: 363032 URL: https://svnweb.freebsd.org/changeset/base/363032 Log: Install extra TCP stack header files: They are needed to compile a userland component of TCP Blackbox Recorder as example. Approved by: rrs Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D25584 Modified: head/etc/mtree/BSD.include.dist head/include/Makefile Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Wed Jul 8 21:20:12 2020 (r363031) +++ head/etc/mtree/BSD.include.dist Wed Jul 8 21:40:27 2020 (r363032) @@ -228,6 +228,8 @@ .. netdump .. + tcp_stacks + .. .. netinet6 .. Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Wed Jul 8 21:20:12 2020 (r363031) +++ head/include/Makefile Wed Jul 8 21:40:27 2020 (r363032) @@ -57,6 +57,7 @@ LSUBDIRS= cam/ata cam/mmc cam/nvme cam/scsi \ netgraph/atm netgraph/netflow \ netinet/cc \ netinet/netdump \ + netinet/tcp_stacks \ security/audit \ security/mac_biba security/mac_bsdextended security/mac_lomac \ security/mac_mls security/mac_partition \ From owner-svn-src-head@freebsd.org Thu Jul 9 01:39:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DA26135BEDA for ; Thu, 9 Jul 2020 01:39:01 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic303-25.consmr.mail.gq1.yahoo.com (sonic303-25.consmr.mail.gq1.yahoo.com [98.137.64.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2Jjw4T3pz4Ky2 for ; Thu, 9 Jul 2020 01:39:00 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 8w5gWicVM1mpWSJ8flKEU0_AFVBXzSrF6Qc7skPyWahraZKjWWTFhbdkhP7qX5u net7cGjeET1Tc6sUB2PPc34UEangJFeWG0EpcjFgIPgIxMpy.JCqGwlC_7FtU.zqxP9bB6cmZXHk ab99Gwd7yXwHSRGqY02dpVLRlmSWMNQu3n5JVr2bvqGc9nBf0N0twpntf0GzUwoZsMJ4V4SNX1YI dEEH6oqgEe8IfT3p16Vm69jFuejGif5_OippJjmltptXtDnW9B.OWJPK7i.YjpL3xhRgaO47.5ky zFXJzlovKTlYnFUldAJKkTa2cPkvn6jarabxFtOg4Nktzc19F3NE1EZKZXx8is8euJfFRilyjXEB 43HI6h6cnD_Eq.D.ozd0X_yKPA57EoB3_LkkEzgKoYnJIRDDj_UKY6vCBSY7MWNFnQxHHfInUDSm rfKAbpuaiS9K6u3yjFnPthSiOS.1zKDpFuNJ4XrDCU0HiFQQwzWhqeZLTmnYl905ubtV6DvxMiEB qTKaE_SwM3X5ibvzLH95F8NzcNFQllFNpVg9Dp9T1SE6eSE9AxGQ7DJ6k5oJghPKGglTLAyWOL2X kouoFrfPmuQUkexknTq2xJFaKQGtOiOg43PaGLTWHk5joLEHjLHtrr9bwCiQPlYnFGeC0C7bgWS3 92F5ZjHrEyTJiypO2C92MW618sfhw5A9VskVFkoBSdRqoKkXluNoNxipBxGtz.8AdgmEEZDbnYiF 6jl8p2FNzbjtqSsbYRohgmTG6eIb8TqtaXQ.GcYSDw8YG2mNVsAuoYx.39mH9S8bnVedm79Ob9oC 0RG54P7qyjP5Fk2gocXNB4aRxYXzDuij59MnNq8npTtO9iedQ2zf0lBLCBQo5bcIPe1QztQdVvVc idlu5FEnGL6HgsJ6_EpzJUs5HJo3ZuVd3w2ZoqbUlFVGcICM1kSNz3txD47tCjSv70iQNHiEr_QP R.kSUfD3H1ByeJW4JxghTYqrFhyOiVv5DBZ_KXLackKfHMHXsCOffmZQc3uLR4sBAh8G7cH5CWQa A1EKFRD6CoRhoUnLfF8KJEuRJoTdlzwX3.ptsMp.FBR4WGwOoFdoYR5NP5NrDC00bMNVlqqDfReW 4qMifQCcwSqzFdvYHchxGff2LDSkP3ctBf74TxQdW5CwkOpkxniRi8MbhRheT9OZWhg.D3uvwQgs gr4AN.4OhK4Vp1D2L3U4CdvmWXQkAtvNNSw3NPWNlWnJNgTbT7qnYVpIanA7ggItVCp8S17.TtzE LUo0w6BJ1ljkJRhMD1FiIVPIAwUFDmEh.sqkowj5ci6rNK.kUMh7F8apqkc.NZRR6yf4OJjSmJtU 5X4C4vxbIHRLKm_H2r5Sdhq9FM75e4E2h3NaEsRAYadgUYmZqvUk.mLsbJcUTP5RQWHc.r3icEB6 Vlz5rTvqQ49h.rwepGlEcWPxp5oRHDHoUrE.KoQ-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.gq1.yahoo.com with HTTP; Thu, 9 Jul 2020 01:38:58 +0000 Received: by smtp425.mail.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID c6b9767bd5222dbf66b562497110810d; Thu, 09 Jul 2020 01:38:54 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: svn commit: r363031 - in head: contrib/bmake contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake (make now broken) Message-Id: Date: Wed, 8 Jul 2020 18:38:53 -0700 Cc: FreeBSD Toolchain , FreeBSD Current To: "sjg@freebsd.org " , svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3608.80.23.2.2) References: X-Rspamd-Queue-Id: 4B2Jjw4T3pz4Ky2 X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.46 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.98)[-0.984]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.972]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-0.999]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.206:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.206:from]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 01:39:01 -0000 This seems to have broken doing buildworld buildkernel and other things using make: make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: String = comparison operator should be either =3D=3D or !=3D make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: String = comparison operator should be either =3D=3D or !=3D . . . make[3]: "/usr/src/share/mk/bsd.sys.mk" line 100: warning: String = comparison operator should be either =3D=3D or !=3D . . . make[3]: "/usr/src/share/mk/bsd.sys.mk" line 81: warning: String = comparison operator should be either =3D=3D or !=3D . . . Using -d c shows the likes of: . . . lhs =3D "clang", rhs =3D "clang", op =3D =3D=3D lhs =3D "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs =3D = "gcc", op =3D =3D=3D make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: String = comparison operator should be either =3D=3D or !=3D lhs =3D "clang", rhs =3D "clang", op =3D =3D=3D lhs =3D "LD", rhs =3D "LD", op =3D =3D=3D . . . left =3D 6.000000, right =3D 2.000000, op =3D <=3D left =3D 6.000000, right =3D 1.000000, op =3D <=3D lhs =3D "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs =3D = "clang", op =3D =3D=3D make[3]: "/usr/src/share/mk/bsd.sys.mk" line 100: warning: String = comparison operator should be either =3D=3D or !=3D lhs =3D "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs =3D = "gcc", op =3D =3D=3D lhs =3D "clang", rhs =3D "gcc", op =3D =3D=3D . . . left =3D 0.000000, right =3D 6.000000, op =3D <=3D left =3D 0.000000, right =3D 3.000000, op =3D <=3D lhs =3D "clang", rhs =3D "gcc", op =3D =3D=3D make[3]: "/usr/src/share/mk/bsd.sys.mk" line 81: warning: String = comparison operator should be either =3D=3D or !=3D lhs =3D "clang", rhs =3D "clang", op =3D =3D=3D left =3D 100001.000000, right =3D 70000.000000, op =3D >=3D lhs =3D "amd64", rhs =3D "arm", op =3D =3D=3D (Now I just need to figure out how to get back to a working context.) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Thu Jul 9 02:52:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 81AF635D3EF; Thu, 9 Jul 2020 02:52:44 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2LM03GCJz4PMd; Thu, 9 Jul 2020 02:52:44 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 527E2A6BA; Thu, 9 Jul 2020 02:52:44 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0692qihZ075755; Thu, 9 Jul 2020 02:52:44 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0692qdFF075730; Thu, 9 Jul 2020 02:52:39 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202007090252.0692qdFF075730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 9 Jul 2020 02:52:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363034 - in head/sys/geom: . cache concat eli journal label mirror mountver multipath nop part raid raid3 stripe vinum virstor X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in head/sys/geom: . cache concat eli journal label mirror mountver multipath nop part raid raid3 stripe vinum virstor X-SVN-Commit-Revision: 363034 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 02:52:44 -0000 Author: delphij Date: Thu Jul 9 02:52:39 2020 New Revision: 363034 URL: https://svnweb.freebsd.org/changeset/base/363034 Log: sys/geom: consistently use _PATH_DEV instead of hardcoding "/dev/". Reviewed by: cem MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25565 Modified: head/sys/geom/cache/g_cache.c head/sys/geom/concat/g_concat.c head/sys/geom/eli/g_eli_ctl.c head/sys/geom/geom.h head/sys/geom/geom_dev.c head/sys/geom/geom_subr.c head/sys/geom/journal/g_journal.c head/sys/geom/label/g_label.c head/sys/geom/mirror/g_mirror_ctl.c head/sys/geom/mountver/g_mountver.c head/sys/geom/multipath/g_multipath.c head/sys/geom/nop/g_nop.c head/sys/geom/part/g_part.c head/sys/geom/raid/g_raid.c head/sys/geom/raid/md_ddf.c head/sys/geom/raid/md_intel.c head/sys/geom/raid/md_jmicron.c head/sys/geom/raid/md_nvidia.c head/sys/geom/raid/md_promise.c head/sys/geom/raid/md_sii.c head/sys/geom/raid3/g_raid3_ctl.c head/sys/geom/stripe/g_stripe.c head/sys/geom/vinum/geom_vinum_share.c head/sys/geom/virstor/g_virstor.h Modified: head/sys/geom/cache/g_cache.c ============================================================================== --- head/sys/geom/cache/g_cache.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/cache/g_cache.c Thu Jul 9 02:52:39 2020 (r363034) @@ -762,8 +762,8 @@ g_cache_ctl_create(struct gctl_req *req, struct g_clas gctl_error(req, "No 'arg1' argument"); return; } - if (strncmp(name, "/dev/", strlen("/dev/")) == 0) - name += strlen("/dev/"); + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); pp = g_provider_by_name(name); if (pp == NULL) { G_CACHE_DEBUG(1, "Provider %s is invalid.", name); Modified: head/sys/geom/concat/g_concat.c ============================================================================== --- head/sys/geom/concat/g_concat.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/concat/g_concat.c Thu Jul 9 02:52:39 2020 (r363034) @@ -845,8 +845,8 @@ g_concat_ctl_create(struct gctl_req *req, struct g_cla gctl_error(req, "No 'arg%u' argument.", no); return; } - if (strncmp(name, "/dev/", strlen("/dev/")) == 0) - name += strlen("/dev/"); + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); pp = g_provider_by_name(name); if (pp == NULL) { G_CONCAT_DEBUG(1, "Disk %s is invalid.", name); @@ -871,8 +871,8 @@ g_concat_ctl_create(struct gctl_req *req, struct g_cla gctl_error(req, "No 'arg%d' argument.", no); return; } - if (strncmp(name, "/dev/", strlen("/dev/")) == 0) - name += strlen("/dev/"); + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); pp = g_provider_by_name(name); KASSERT(pp != NULL, ("Provider %s disappear?!", name)); if (g_concat_add_disk(sc, pp, no - 1) != 0) { Modified: head/sys/geom/eli/g_eli_ctl.c ============================================================================== --- head/sys/geom/eli/g_eli_ctl.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/eli/g_eli_ctl.c Thu Jul 9 02:52:39 2020 (r363034) @@ -120,8 +120,8 @@ g_eli_ctl_attach(struct gctl_req *req, struct g_class gctl_error(req, "No 'arg%u' argument.", 0); return; } - if (strncmp(name, "/dev/", strlen("/dev/")) == 0) - name += strlen("/dev/"); + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); pp = g_provider_by_name(name); if (pp == NULL) { gctl_error(req, "Provider %s is invalid.", name); @@ -186,8 +186,8 @@ g_eli_find_device(struct g_class *mp, const char *prov struct g_provider *pp; struct g_consumer *cp; - if (strncmp(prov, "/dev/", strlen("/dev/")) == 0) - prov += strlen("/dev/"); + if (strncmp(prov, _PATH_DEV, strlen(_PATH_DEV)) == 0) + prov += strlen(_PATH_DEV); LIST_FOREACH(gp, &mp->geom, geom) { sc = gp->softc; if (sc == NULL) @@ -373,8 +373,8 @@ g_eli_ctl_onetime(struct gctl_req *req, struct g_class gctl_error(req, "No 'arg%u' argument.", 0); return; } - if (strncmp(name, "/dev/", strlen("/dev/")) == 0) - name += strlen("/dev/"); + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); pp = g_provider_by_name(name); if (pp == NULL) { gctl_error(req, "Provider %s is invalid.", name); Modified: head/sys/geom/geom.h ============================================================================== --- head/sys/geom/geom.h Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/geom.h Thu Jul 9 02:52:39 2020 (r363034) @@ -419,6 +419,10 @@ g_free(void *ptr) int g_is_geom_thread(struct thread *td); +#ifndef _PATH_DEV +#define _PATH_DEV "/dev/" +#endif + #endif /* _KERNEL */ /* geom_ctl.c */ Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/geom_dev.c Thu Jul 9 02:52:39 2020 (r363034) @@ -166,7 +166,7 @@ init_dumpdev(struct cdev *dev) { struct diocskerneldump_arg kda; struct g_consumer *cp; - const char *devprefix = "/dev/", *devname; + const char *devprefix = _PATH_DEV, *devname; int error; size_t len; Modified: head/sys/geom/geom_subr.c ============================================================================== --- head/sys/geom/geom_subr.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/geom_subr.c Thu Jul 9 02:52:39 2020 (r363034) @@ -760,10 +760,6 @@ g_resize_provider(struct g_provider *pp, off_t size) g_post_event(g_resize_provider_event, hh, M_WAITOK, NULL); } -#ifndef _PATH_DEV -#define _PATH_DEV "/dev/" -#endif - struct g_provider * g_provider_by_name(char const *arg) { Modified: head/sys/geom/journal/g_journal.c ============================================================================== --- head/sys/geom/journal/g_journal.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/journal/g_journal.c Thu Jul 9 02:52:39 2020 (r363034) @@ -2511,7 +2511,7 @@ g_journal_find_device(struct g_class *mp, const char * struct g_geom *gp; struct g_provider *pp; - if (strncmp(name, "/dev/", 5) == 0) + if (strncmp(name, _PATH_DEV, 5) == 0) name += 5; LIST_FOREACH(gp, &mp->geom, geom) { sc = gp->softc; Modified: head/sys/geom/label/g_label.c ============================================================================== --- head/sys/geom/label/g_label.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/label/g_label.c Thu Jul 9 02:52:39 2020 (r363034) @@ -442,8 +442,8 @@ g_label_ctl_create(struct gctl_req *req, struct g_clas gctl_error(req, "No 'arg%d' argument", 1); return; } - if (strncmp(name, "/dev/", strlen("/dev/")) == 0) - name += strlen("/dev/"); + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); pp = g_provider_by_name(name); if (pp == NULL) { G_LABEL_DEBUG(1, "Provider %s is invalid.", name); @@ -467,8 +467,8 @@ g_label_skip_dir(const char *name) char path[64]; u_int i; - if (strncmp(name, "/dev/", strlen("/dev/")) == 0) - name += strlen("/dev/"); + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); if (strncmp(name, G_LABEL_DIR "/", strlen(G_LABEL_DIR "/")) == 0) name += strlen(G_LABEL_DIR "/"); for (i = 0; g_labels[i] != NULL; i++) { Modified: head/sys/geom/mirror/g_mirror_ctl.c ============================================================================== --- head/sys/geom/mirror/g_mirror_ctl.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/mirror/g_mirror_ctl.c Thu Jul 9 02:52:39 2020 (r363034) @@ -131,7 +131,7 @@ g_mirror_find_disk(struct g_mirror_softc *sc, const ch struct g_mirror_disk *disk; sx_assert(&sc->sc_lock, SX_XLOCKED); - if (strncmp(name, "/dev/", 5) == 0) + if (strncmp(name, _PATH_DEV, 5) == 0) name += 5; LIST_FOREACH(disk, &sc->sc_disks, d_next) { if (disk->d_consumer == NULL) @@ -450,8 +450,8 @@ err: g_topology_unlock(); return; } - if (strncmp(name, "/dev/", strlen("/dev/")) == 0) - name += strlen("/dev/"); + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); pp = g_provider_by_name(name); if (pp == NULL) { G_MIRROR_DEBUG(1, "Disk %s is invalid.", name); @@ -501,8 +501,8 @@ err2: for (attached = 0, no = 1; no < *nargs; no++) { snprintf(param, sizeof(param), "arg%u", no); name = gctl_get_asciiparam(req, param); - if (strncmp(name, "/dev/", strlen("/dev/")) == 0) - name += strlen("/dev/"); + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); pp = g_provider_by_name(name); if (pp == NULL) { G_MIRROR_DEBUG(1, "Provider %s disappear?!", name); @@ -686,7 +686,7 @@ g_mirror_ctl_insert(struct gctl_req *req, struct g_cla gctl_error(req, "Provider %s already inserted.", name); continue; } - if (strncmp(name, "/dev/", 5) == 0) + if (strncmp(name, _PATH_DEV, 5) == 0) name += 5; pp = g_provider_by_name(name); if (pp == NULL) { Modified: head/sys/geom/mountver/g_mountver.c ============================================================================== --- head/sys/geom/mountver/g_mountver.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/mountver/g_mountver.c Thu Jul 9 02:52:39 2020 (r363034) @@ -426,8 +426,8 @@ g_mountver_ctl_create(struct gctl_req *req, struct g_c gctl_error(req, "No 'arg%d' argument", i); return; } - if (strncmp(name, "/dev/", strlen("/dev/")) == 0) - name += strlen("/dev/"); + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); pp = g_provider_by_name(name); if (pp == NULL) { G_MOUNTVER_DEBUG(1, "Provider %s is invalid.", name); @@ -483,8 +483,8 @@ g_mountver_ctl_destroy(struct gctl_req *req, struct g_ gctl_error(req, "No 'arg%d' argument", i); return; } - if (strncmp(name, "/dev/", strlen("/dev/")) == 0) - name += strlen("/dev/"); + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); gp = g_mountver_find_geom(mp, name); if (gp == NULL) { G_MOUNTVER_DEBUG(1, "Device %s is invalid.", name); Modified: head/sys/geom/multipath/g_multipath.c ============================================================================== --- head/sys/geom/multipath/g_multipath.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/multipath/g_multipath.c Thu Jul 9 02:52:39 2020 (r363034) @@ -944,7 +944,7 @@ g_multipath_ctl_add_name(struct gctl_req *req, struct struct g_consumer *cp; struct g_provider *pp; const char *mpname; - static const char devpf[6] = "/dev/"; + static const char devpf[6] = _PATH_DEV; int error; g_topology_assert(); @@ -1007,7 +1007,7 @@ g_multipath_ctl_prefer(struct gctl_req *req, struct g_ struct g_multipath_softc *sc; struct g_consumer *cp; const char *name, *mpname; - static const char devpf[6] = "/dev/"; + static const char devpf[6] = _PATH_DEV; int *nargs; g_topology_assert(); Modified: head/sys/geom/nop/g_nop.c ============================================================================== --- head/sys/geom/nop/g_nop.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/nop/g_nop.c Thu Jul 9 02:52:39 2020 (r363034) @@ -676,8 +676,8 @@ g_nop_ctl_create(struct gctl_req *req, struct g_class gctl_error(req, "No 'arg%d' argument", i); return; } - if (strncmp(name, "/dev/", strlen("/dev/")) == 0) - name += strlen("/dev/"); + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); pp = g_provider_by_name(name); if (pp == NULL) { G_NOP_DEBUG(1, "Provider %s is invalid.", name); @@ -787,8 +787,8 @@ g_nop_ctl_configure(struct gctl_req *req, struct g_cla gctl_error(req, "No 'arg%d' argument", i); return; } - if (strncmp(name, "/dev/", strlen("/dev/")) == 0) - name += strlen("/dev/"); + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); pp = g_provider_by_name(name); if (pp == NULL || pp->geom->class != mp) { G_NOP_DEBUG(1, "Provider %s is invalid.", name); @@ -857,8 +857,8 @@ g_nop_ctl_destroy(struct gctl_req *req, struct g_class gctl_error(req, "No 'arg%d' argument", i); return; } - if (strncmp(name, "/dev/", strlen("/dev/")) == 0) - name += strlen("/dev/"); + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); gp = g_nop_find_geom(mp, name); if (gp == NULL) { G_NOP_DEBUG(1, "Device %s is invalid.", name); @@ -902,8 +902,8 @@ g_nop_ctl_reset(struct gctl_req *req, struct g_class * gctl_error(req, "No 'arg%d' argument", i); return; } - if (strncmp(name, "/dev/", strlen("/dev/")) == 0) - name += strlen("/dev/"); + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); pp = g_provider_by_name(name); if (pp == NULL || pp->geom->class != mp) { G_NOP_DEBUG(1, "Provider %s is invalid.", name); Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/part/g_part.c Thu Jul 9 02:52:39 2020 (r363034) @@ -50,10 +50,6 @@ __FBSDID("$FreeBSD$"); #include "g_part_if.h" -#ifndef _PATH_DEV -#define _PATH_DEV "/dev/" -#endif - static kobj_method_t g_part_null_methods[] = { { 0, 0 } }; Modified: head/sys/geom/raid/g_raid.c ============================================================================== --- head/sys/geom/raid/g_raid.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/raid/g_raid.c Thu Jul 9 02:52:39 2020 (r363034) @@ -775,7 +775,7 @@ g_raid_open_consumer(struct g_raid_softc *sc, const ch g_topology_assert(); - if (strncmp(name, "/dev/", 5) == 0) + if (strncmp(name, _PATH_DEV, 5) == 0) name += 5; pp = g_provider_by_name(name); if (pp == NULL) Modified: head/sys/geom/raid/md_ddf.c ============================================================================== --- head/sys/geom/raid/md_ddf.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/raid/md_ddf.c Thu Jul 9 02:52:39 2020 (r363034) @@ -2618,7 +2618,7 @@ g_raid_md_ctl_ddf(struct g_raid_md_object *md, error = -2; break; } - if (strncmp(diskname, "/dev/", 5) == 0) + if (strncmp(diskname, _PATH_DEV, 5) == 0) diskname += 5; TAILQ_FOREACH(disk, &sc->sc_disks, d_next) { Modified: head/sys/geom/raid/md_intel.c ============================================================================== --- head/sys/geom/raid/md_intel.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/raid/md_intel.c Thu Jul 9 02:52:39 2020 (r363034) @@ -2208,7 +2208,7 @@ g_raid_md_ctl_intel(struct g_raid_md_object *md, error = -2; break; } - if (strncmp(diskname, "/dev/", 5) == 0) + if (strncmp(diskname, _PATH_DEV, 5) == 0) diskname += 5; TAILQ_FOREACH(disk, &sc->sc_disks, d_next) { Modified: head/sys/geom/raid/md_jmicron.c ============================================================================== --- head/sys/geom/raid/md_jmicron.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/raid/md_jmicron.c Thu Jul 9 02:52:39 2020 (r363034) @@ -1268,7 +1268,7 @@ g_raid_md_ctl_jmicron(struct g_raid_md_object *md, error = -2; break; } - if (strncmp(diskname, "/dev/", 5) == 0) + if (strncmp(diskname, _PATH_DEV, 5) == 0) diskname += 5; TAILQ_FOREACH(disk, &sc->sc_disks, d_next) { Modified: head/sys/geom/raid/md_nvidia.c ============================================================================== --- head/sys/geom/raid/md_nvidia.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/raid/md_nvidia.c Thu Jul 9 02:52:39 2020 (r363034) @@ -1273,7 +1273,7 @@ g_raid_md_ctl_nvidia(struct g_raid_md_object *md, error = -2; break; } - if (strncmp(diskname, "/dev/", 5) == 0) + if (strncmp(diskname, _PATH_DEV, 5) == 0) diskname += 5; TAILQ_FOREACH(disk, &sc->sc_disks, d_next) { Modified: head/sys/geom/raid/md_promise.c ============================================================================== --- head/sys/geom/raid/md_promise.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/raid/md_promise.c Thu Jul 9 02:52:39 2020 (r363034) @@ -1609,7 +1609,7 @@ g_raid_md_ctl_promise(struct g_raid_md_object *md, error = -2; break; } - if (strncmp(diskname, "/dev/", 5) == 0) + if (strncmp(diskname, _PATH_DEV, 5) == 0) diskname += 5; TAILQ_FOREACH(disk, &sc->sc_disks, d_next) { Modified: head/sys/geom/raid/md_sii.c ============================================================================== --- head/sys/geom/raid/md_sii.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/raid/md_sii.c Thu Jul 9 02:52:39 2020 (r363034) @@ -1355,7 +1355,7 @@ g_raid_md_ctl_sii(struct g_raid_md_object *md, error = -2; break; } - if (strncmp(diskname, "/dev/", 5) == 0) + if (strncmp(diskname, _PATH_DEV, 5) == 0) diskname += 5; TAILQ_FOREACH(disk, &sc->sc_disks, d_next) { Modified: head/sys/geom/raid3/g_raid3_ctl.c ============================================================================== --- head/sys/geom/raid3/g_raid3_ctl.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/raid3/g_raid3_ctl.c Thu Jul 9 02:52:39 2020 (r363034) @@ -78,7 +78,7 @@ g_raid3_find_disk(struct g_raid3_softc *sc, const char u_int n; sx_assert(&sc->sc_lock, SX_XLOCKED); - if (strncmp(name, "/dev/", 5) == 0) + if (strncmp(name, _PATH_DEV, 5) == 0) name += 5; for (n = 0; n < sc->sc_ndisks; n++) { disk = &sc->sc_disks[n]; @@ -431,7 +431,7 @@ g_raid3_ctl_insert(struct gctl_req *req, struct g_clas no = gctl_get_paraml(req, "number", sizeof(*no)); else no = NULL; - if (strncmp(name, "/dev/", 5) == 0) + if (strncmp(name, _PATH_DEV, 5) == 0) name += 5; g_topology_lock(); pp = g_provider_by_name(name); Modified: head/sys/geom/stripe/g_stripe.c ============================================================================== --- head/sys/geom/stripe/g_stripe.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/stripe/g_stripe.c Thu Jul 9 02:52:39 2020 (r363034) @@ -1096,8 +1096,8 @@ g_stripe_ctl_create(struct gctl_req *req, struct g_cla gctl_error(req, "No 'arg%u' argument.", no); return; } - if (strncmp(name, "/dev/", strlen("/dev/")) == 0) - name += strlen("/dev/"); + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); pp = g_provider_by_name(name); if (pp == NULL) { G_STRIPE_DEBUG(1, "Disk %s is invalid.", name); @@ -1122,8 +1122,8 @@ g_stripe_ctl_create(struct gctl_req *req, struct g_cla gctl_error(req, "No 'arg%u' argument.", no); continue; } - if (strncmp(name, "/dev/", strlen("/dev/")) == 0) - name += strlen("/dev/"); + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); pp = g_provider_by_name(name); KASSERT(pp != NULL, ("Provider %s disappear?!", name)); if (g_stripe_add_disk(sc, pp, no - 1) != 0) { Modified: head/sys/geom/vinum/geom_vinum_share.c ============================================================================== --- head/sys/geom/vinum/geom_vinum_share.c Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/vinum/geom_vinum_share.c Thu Jul 9 02:52:39 2020 (r363034) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #define iswhite(c) (((c) == ' ') || ((c) == '\t')) #else #include +#include #include #include #include @@ -466,7 +467,7 @@ gv_new_drive(int max, char *token[]) } ptr = token[j]; - if (strncmp(ptr, "/dev/", 5) == 0) + if (strncmp(ptr, _PATH_DEV, 5) == 0) ptr += 5; strlcpy(d->device, ptr, sizeof(d->device)); } else { Modified: head/sys/geom/virstor/g_virstor.h ============================================================================== --- head/sys/geom/virstor/g_virstor.h Thu Jul 9 00:34:07 2020 (r363033) +++ head/sys/geom/virstor/g_virstor.h Thu Jul 9 02:52:39 2020 (r363034) @@ -112,8 +112,4 @@ struct g_virstor_bio_q { #endif /* _KERNEL */ -#ifndef _PATH_DEV -#define _PATH_DEV "/dev/" -#endif - #endif /* !_G_VIRSTOR_H_ */ From owner-svn-src-head@freebsd.org Thu Jul 9 03:28:31 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 61F2C35E104; Thu, 9 Jul 2020 03:28:31 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2M8G35WGz4R29; Thu, 9 Jul 2020 03:28:29 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id tNEXjFDsyYYpxtNEZj8Vxa; Wed, 08 Jul 2020 21:28:28 -0600 X-Authority-Analysis: v=2.3 cv=OubUNx3t c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=_RQrkK6FrEwA:10 a=6I5d2MoRAAAA:8 a=_ctWjzdLAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=ivertL0OXLirZ6vrQHoA:9 a=gX0obxj2ZQlfiga1:21 a=Btts8oRErTxtH1W5:21 a=zzhV4YzyAdNZmCBt:21 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=WoGCsytTnHKj16XvecxK:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id CDFD21C5; Wed, 8 Jul 2020 20:28:24 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 0693SNC4028245; Wed, 8 Jul 2020 20:28:23 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id 0693SNo4028242; Wed, 8 Jul 2020 20:28:23 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202007090328.0693SNo4028242@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: "Simon J. Gerraty" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r363031 - in head: contrib/bmake contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake In-reply-to: <202007082120.068LKCeN067904@repo.freebsd.org> References: <202007082120.068LKCeN067904@repo.freebsd.org> Comments: In-reply-to "Simon J. Gerraty" message dated "Wed, 08 Jul 2020 21:20:12 -0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 08 Jul 2020 20:28:23 -0700 X-CMAE-Envelope: MS4wfAr2uIADS2VI8NBlMinPG5LriOuNG8EfTCwj3/t/CLhcVjLa3OrMNNW+ALEizpT1govXEM1nYrRNHRtijM2DBKkM9wEnk/uzz/QngYKJCsnsbHWrv8xK FjgJ8W/mh53eY/7yfS//c4t0/qNZrcA3DscrksoZDcU+MuwH5/U7a/IaQg7TQQByHJNAlgxt4r/+UCYOQun6IOLjqMuaElHwUKsnHO/Z8WLQQmOmld0GxFNA FN08yKkyKBC1A1kar8vFzenw4L2zn6kxPLU2kuMajJLoaCoMO/5/gm0L4PW8fJ+E X-Rspamd-Queue-Id: 4B2M8G35WGz4R29 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 03:28:31 -0000 In message <202007082120.068LKCeN067904@repo.freebsd.org>, "Simon J. Gerraty" w rites: > Author: sjg > Date: Wed Jul 8 21:20:12 2020 > New Revision: 363031 > URL: https://svnweb.freebsd.org/changeset/base/363031 > > Log: > Update to bmake-20200704 > > Key changes include reduced noise at end of failed build log > and avoid evaluation of unnecessary terms in conditionals. > > MFC after: 1 week > > Added: > head/contrib/bmake/LICENSE > - copied unchanged from r363019, vendor/NetBSD/bmake/dist/LICENSE > head/contrib/bmake/unit-tests/cond-short.exp > - copied unchanged from r363019, vendor/NetBSD/bmake/dist/unit-tests/con > d-short.exp > head/contrib/bmake/unit-tests/cond-short.mk > - copied unchanged from r363019, vendor/NetBSD/bmake/dist/unit-tests/con > d-short.mk > Modified: > head/contrib/bmake/ChangeLog > head/contrib/bmake/FILES > head/contrib/bmake/VERSION > head/contrib/bmake/arch.c > head/contrib/bmake/buf.c > head/contrib/bmake/compat.c > head/contrib/bmake/cond.c > head/contrib/bmake/dir.c > head/contrib/bmake/for.c > head/contrib/bmake/hash.c > head/contrib/bmake/hash.h > head/contrib/bmake/job.c > head/contrib/bmake/job.h > head/contrib/bmake/lst.lib/lstAppend.c > head/contrib/bmake/lst.lib/lstAtEnd.c > head/contrib/bmake/lst.lib/lstAtFront.c > head/contrib/bmake/lst.lib/lstClose.c > head/contrib/bmake/lst.lib/lstConcat.c > head/contrib/bmake/lst.lib/lstDatum.c > head/contrib/bmake/lst.lib/lstDeQueue.c > head/contrib/bmake/lst.lib/lstDupl.c > head/contrib/bmake/lst.lib/lstEnQueue.c > head/contrib/bmake/lst.lib/lstFind.c > head/contrib/bmake/lst.lib/lstFindFrom.c > head/contrib/bmake/lst.lib/lstFirst.c > head/contrib/bmake/lst.lib/lstForEach.c > head/contrib/bmake/lst.lib/lstForEachFrom.c > head/contrib/bmake/lst.lib/lstInit.c > head/contrib/bmake/lst.lib/lstInsert.c > head/contrib/bmake/lst.lib/lstIsAtEnd.c > head/contrib/bmake/lst.lib/lstIsEmpty.c > head/contrib/bmake/lst.lib/lstLast.c > head/contrib/bmake/lst.lib/lstNext.c > head/contrib/bmake/lst.lib/lstOpen.c > head/contrib/bmake/lst.lib/lstPrev.c > head/contrib/bmake/lst.lib/lstRemove.c > head/contrib/bmake/lst.lib/lstReplace.c > head/contrib/bmake/lst.lib/lstSucc.c > head/contrib/bmake/main.c > head/contrib/bmake/make.c > head/contrib/bmake/make.h > head/contrib/bmake/make_malloc.c > head/contrib/bmake/meta.c > head/contrib/bmake/meta.h > head/contrib/bmake/mk/ChangeLog > head/contrib/bmake/mk/FILES > head/contrib/bmake/mk/gendirdeps.mk > head/contrib/bmake/mk/install-mk > head/contrib/bmake/mk/mkopt.sh > head/contrib/bmake/mk/sys/AIX.mk > head/contrib/bmake/mk/sys/Darwin.mk > head/contrib/bmake/mk/sys/Generic.mk > head/contrib/bmake/mk/sys/HP-UX.mk > head/contrib/bmake/mk/sys/IRIX.mk > head/contrib/bmake/mk/sys/Linux.mk > head/contrib/bmake/mk/sys/NetBSD.mk > head/contrib/bmake/mk/sys/OSF1.mk > head/contrib/bmake/mk/sys/OpenBSD.mk > head/contrib/bmake/mk/sys/SunOS.mk > head/contrib/bmake/mk/sys/UnixWare.mk > head/contrib/bmake/nonints.h > head/contrib/bmake/parse.c > head/contrib/bmake/str.c > head/contrib/bmake/suff.c > head/contrib/bmake/targ.c > head/contrib/bmake/trace.c > head/contrib/bmake/unit-tests/Makefile > head/contrib/bmake/unit-tests/modmatch.mk > head/contrib/bmake/unit-tests/modmisc.exp > head/contrib/bmake/unit-tests/modmisc.mk > head/contrib/bmake/unit-tests/modorder.exp > head/contrib/bmake/unit-tests/modorder.mk > head/contrib/bmake/unit-tests/sysv.exp > head/contrib/bmake/unit-tests/sysv.mk > head/contrib/bmake/unit-tests/varmisc.exp > head/contrib/bmake/unit-tests/varmisc.mk > head/contrib/bmake/util.c > head/contrib/bmake/var.c > head/usr.bin/bmake/Makefile.config > Directory Properties: > head/contrib/bmake/ (props changed) > This broke ports. cwsys# make checksum make: "/usr/ports/Mk/Uses/python.mk" line 367: warning: String comparison operator should be either == or != make: "/usr/ports/Mk/Uses/python.mk" line 367: Malformed conditional (!defined(_PYTHON_VERSION) && !(!empty(_PYTHON_VERSION_MINIMUM) && ( ${__VER} < ${_PYTHON_VERSION_MINIMUM})) && !(!empty(_PYTHON_VERSION_MAXIMUM ) && ( ${__VER} > ${_PYTHON_VERSION_MAXIMUM}))) make: "/usr/ports/Mk/Uses/python.mk" line 367: warning: String comparison operator should be either == or != make: "/usr/ports/Mk/Uses/python.mk" line 367: Malformed conditional (!defined(_PYTHON_VERSION) && !(!empty(_PYTHON_VERSION_MINIMUM) && ( ${__VER} < ${_PYTHON_VERSION_MINIMUM})) && !(!empty(_PYTHON_VERSION_MAXIMUM ) && ( ${__VER} > ${_PYTHON_VERSION_MAXIMUM}))) make: "/usr/ports/Mk/Uses/python.mk" line 367: warning: String comparison operator should be either == or != make: "/usr/ports/Mk/Uses/python.mk" line 367: Malformed conditional (!defined(_PYTHON_VERSION) && !(!empty(_PYTHON_VERSION_MINIMUM) && ( ${__VER} < ${_PYTHON_VERSION_MINIMUM})) && !(!empty(_PYTHON_VERSION_MAXIMUM ) && ( ${__VER} > ${_PYTHON_VERSION_MAXIMUM}))) make: "/usr/ports/Mk/Uses/python.mk" line 367: warning: String comparison operator should be either == or != make: "/usr/ports/Mk/Uses/python.mk" line 367: Malformed conditional (!defined(_PYTHON_VERSION) && !(!empty(_PYTHON_VERSION_MINIMUM) && ( ${__VER} < ${_PYTHON_VERSION_MINIMUM})) && !(!empty(_PYTHON_VERSION_MAXIMUM ) && ( ${__VER} > ${_PYTHON_VERSION_MAXIMUM}))) make: "/usr/ports/Mk/Uses/python.mk" line 367: warning: String comparison operator should be either == or != make: "/usr/ports/Mk/Uses/python.mk" line 367: Malformed conditional (!defined(_PYTHON_VERSION) && !(!empty(_PYTHON_VERSION_MINIMUM) && ( ${__VER} < ${_PYTHON_VERSION_MINIMUM})) && !(!empty(_PYTHON_VERSION_MAXIMUM ) && ( ${__VER} > ${_PYTHON_VERSION_MAXIMUM}))) make: "/usr/ports/Mk/Uses/python.mk" line 367: warning: String comparison operator should be either == or != make: "/usr/ports/Mk/Uses/python.mk" line 367: Malformed conditional (!defined(_PYTHON_VERSION) && !(!empty(_PYTHON_VERSION_MINIMUM) && ( ${__VER} < ${_PYTHON_VERSION_MINIMUM})) && !(!empty(_PYTHON_VERSION_MAXIMUM ) && ( ${__VER} > ${_PYTHON_VERSION_MAXIMUM}))) make: "/usr/ports/Mk/bsd.port.mk" line 2096: warning: String comparison operator should be either == or != make: "/usr/ports/Mk/bsd.port.mk" line 2096: Malformed conditional (defined(MAKE_JOBS_NUMBER_LIMIT) && ( ${MAKE_JOBS_NUMBER_LIMIT} < ${_MAKE_JOBS_NUMBER} )) make: Fatal errors encountered -- cannot continue make: stopped in /usr/ports/www/firefox cwsys# The same errors occur during buildworld. Simply reverting just contrib/bmake/cond.c resolves this issue. The cause of this issue is NetBSD cond.c r1.76, therefore it is safe to revert just the one file without reverting the complete upgrade. http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.bin/make/cond.c?rev=1.76&content-type=text/x-cvsweb-markup&only_with_tag=MAIN -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Thu Jul 9 03:36:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 28F9335E2F8; Thu, 9 Jul 2020 03:36:04 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2MJz2tpVz4RwY; Thu, 9 Jul 2020 03:36:03 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id B4EC75805EF; Wed, 8 Jul 2020 23:36:02 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 08 Jul 2020 23:36:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.dev; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=v qdj5ebDjjTCHvFmvZMR3qhg64Eyc+oQMVoLfVlYgD4=; b=sXh9KjQjDJp+3HCUi IfWm5RWmgefj9pohLugLICBH1DQ9kfgv683gdw04MAtMsEDEhaT4ufapb77og+LC YTjnVsoy7QLtrMrnq9C0K6vw82OAnlmLM1H9enIWlDdl0UEL+kk9YdnVbPcM1DHE LJUmc5fBqC/+gEr6VL9HcriemXFbxVHZkiZU0hE7IQEfwmBhfrSgq4Qq1RRE0pkK fDIz8w2TQ0kiMPB6vT0pTehgYVIM1D+ksxIIo4XTVtiQmaXnRVN1HMt4F6+wN1kY VS52gPwD2dcBIzKzmf6/vaCZGLMbfSqLSTkgytPQHrViTtOBchHVipZkikUK6u51 7PIPw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=vqdj5ebDjjTCHvFmvZMR3qhg64Eyc+oQMVoLfVlYg D4=; b=msQi3F2oUlX8IGv3ExV4Nn8wemy+oJqEPzieUS8Q1rj1+PI0zKb/4kDSq GY9QzaSq0LFSXzWEpN03jB027ZdaL0//xNzGQlrL4ei9HlLapa4LdynhIUVkXdmM TNOa/XK8xPEOrOTksNzqLpoHnfQjohTRinTIPB+C3T45uaeSJMkN+7vWPFb6WkGi /SYLea0Ian3BNu+XHKKN+rzML4Ye3AU18FiP+p8r+nWRzyy+WTMHzh72H8NbGIKc 1cYPPtTwMNbxXBX0TxIzI0J8C2xZSNlQdbp3R6/DPOcB36DlcKSctCUWTaHkFsW9 WHS7bdW7DfiY1ExbL12uJ1FKXETKw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudekgdejhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpegjuhhrihcu rfgrnhhkohhvuceohihurhhiphhvseihuhhrihhpvhdruggvvheqnecuggftrfgrthhtvg hrnhephfelveehgfeujeefhfeluddtiedttdeuffdvfeehjeeitddvudefkeehgfejiedu necuffhomhgrihhnpegtohhmphhilhgvrhdrmhhkpdhshihsrdhmkhdpphhorhhtrdhmkh enucfkphepledurddvgedtrdduvdegrddufeejnecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehmrghilhhfrhhomhephihurhhiphhvseihuhhrihhpvhdruggvvh X-ME-Proxy: Received: from [192.168.1.6] (unknown [91.240.124.137]) by mail.messagingengine.com (Postfix) with ESMTPA id 413233280063; Wed, 8 Jul 2020 23:36:01 -0400 (EDT) Subject: Re: svn commit: r363031 - in head: contrib/bmake contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake (make now broken) To: Mark Millard , "sjg@freebsd.org" , svn-src-head@freebsd.org Cc: FreeBSD Toolchain , FreeBSD Current References: From: Yuri Pankov Message-ID: <25afe2ff-e805-8415-ddd9-430cfa271e16@yuripv.dev> Date: Thu, 9 Jul 2020 06:35:58 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4B2MJz2tpVz4RwY X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yuripv.dev header.s=fm1 header.b=sXh9KjQj; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=msQi3F2o; dmarc=none; spf=pass (mx1.freebsd.org: domain of yuripv@yuripv.dev designates 66.111.4.229 as permitted sender) smtp.mailfrom=yuripv@yuripv.dev X-Spamd-Result: default: False [-3.40 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[yuripv.dev:s=fm1,messagingengine.com:s=fm3]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.229]; NEURAL_HAM_LONG(-0.97)[-0.972]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[yuripv.dev]; NEURAL_HAM_MEDIUM(-0.99)[-0.987]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[yuripv.dev:+,messagingengine.com:+]; NEURAL_HAM_SHORT(-0.84)[-0.844]; FREEMAIL_TO(0.00)[yahoo.com,FreeBSD.org,freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_VERYGOOD(0.00)[66.111.4.229:from]; RCVD_IN_DNSWL_LOW(-0.10)[66.111.4.229:from] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 03:36:04 -0000 Mark Millard wrote: > This seems to have broken doing buildworld buildkernel and > other things using make: > > make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: String comparison operator should be either == or != > make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: String comparison operator should be either == or != > . . . > make[3]: "/usr/src/share/mk/bsd.sys.mk" line 100: warning: String comparison operator should be either == or != > . . . > make[3]: "/usr/src/share/mk/bsd.sys.mk" line 81: warning: String comparison operator should be either == or != > . . . > > Using -d c shows the likes of: > > . . . > lhs = "clang", rhs = "clang", op = == > lhs = "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs = "gcc", op = == > make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: String comparison operator should be either == or != > lhs = "clang", rhs = "clang", op = == > lhs = "LD", rhs = "LD", op = == > . . . > left = 6.000000, right = 2.000000, op = <= > left = 6.000000, right = 1.000000, op = <= > lhs = "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs = "clang", op = == > make[3]: "/usr/src/share/mk/bsd.sys.mk" line 100: warning: String comparison operator should be either == or != > lhs = "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs = "gcc", op = == > lhs = "clang", rhs = "gcc", op = == > . . . > left = 0.000000, right = 6.000000, op = <= > left = 0.000000, right = 3.000000, op = <= > lhs = "clang", rhs = "gcc", op = == > make[3]: "/usr/src/share/mk/bsd.sys.mk" line 81: warning: String comparison operator should be either == or != > lhs = "clang", rhs = "clang", op = == > left = 100001.000000, right = 70000.000000, op = >= > lhs = "amd64", rhs = "arm", op = == > > (Now I just need to figure out how to get back to a working context.) For me, buildworld/buildkernel produced only warnings, though the one in ports is real issue: $ make config make: "/usr/ports/Mk/bsd.port.mk" line 2096: warning: String comparison operator should be either == or != make: "/usr/ports/Mk/bsd.port.mk" line 2096: Malformed conditional (defined(MAKE_JOBS_NUMBER_LIMIT) && ( ${MAKE_JOBS_NUMBER_LIMIT} < ${_MAKE_JOBS_NUMBER} )) make: Fatal errors encountered -- cannot continue make: stopped in /usr/ports/devel/subversion From owner-svn-src-head@freebsd.org Thu Jul 9 03:46:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 560ED35EC17; Thu, 9 Jul 2020 03:46:10 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2MXf0P4hz4SPp; Thu, 9 Jul 2020 03:46:10 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C8ABBB131; Thu, 9 Jul 2020 03:46:09 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0693k9I2007839; Thu, 9 Jul 2020 03:46:09 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0693k81j007829; Thu, 9 Jul 2020 03:46:08 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <202007090346.0693k81j007829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Thu, 9 Jul 2020 03:46:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363035 - in head: contrib/bmake contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake X-SVN-Group: head X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: in head: contrib/bmake contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake X-SVN-Commit-Revision: 363035 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 03:46:10 -0000 Author: sjg Date: Thu Jul 9 03:46:07 2020 New Revision: 363035 URL: https://svnweb.freebsd.org/changeset/base/363035 Log: Revert r363031 Modified: head/contrib/bmake/ChangeLog head/contrib/bmake/FILES head/contrib/bmake/LICENSE head/contrib/bmake/VERSION head/contrib/bmake/arch.c head/contrib/bmake/buf.c head/contrib/bmake/compat.c head/contrib/bmake/cond.c head/contrib/bmake/dir.c head/contrib/bmake/for.c head/contrib/bmake/hash.c head/contrib/bmake/hash.h head/contrib/bmake/job.c head/contrib/bmake/job.h head/contrib/bmake/lst.lib/lstAppend.c head/contrib/bmake/lst.lib/lstAtEnd.c head/contrib/bmake/lst.lib/lstAtFront.c head/contrib/bmake/lst.lib/lstClose.c head/contrib/bmake/lst.lib/lstConcat.c head/contrib/bmake/lst.lib/lstDatum.c head/contrib/bmake/lst.lib/lstDeQueue.c head/contrib/bmake/lst.lib/lstDupl.c head/contrib/bmake/lst.lib/lstEnQueue.c head/contrib/bmake/lst.lib/lstFind.c head/contrib/bmake/lst.lib/lstFindFrom.c head/contrib/bmake/lst.lib/lstFirst.c head/contrib/bmake/lst.lib/lstForEach.c head/contrib/bmake/lst.lib/lstForEachFrom.c head/contrib/bmake/lst.lib/lstInit.c head/contrib/bmake/lst.lib/lstInsert.c head/contrib/bmake/lst.lib/lstIsAtEnd.c head/contrib/bmake/lst.lib/lstIsEmpty.c head/contrib/bmake/lst.lib/lstLast.c head/contrib/bmake/lst.lib/lstNext.c head/contrib/bmake/lst.lib/lstOpen.c head/contrib/bmake/lst.lib/lstPrev.c head/contrib/bmake/lst.lib/lstRemove.c head/contrib/bmake/lst.lib/lstReplace.c head/contrib/bmake/lst.lib/lstSucc.c head/contrib/bmake/main.c head/contrib/bmake/make.c head/contrib/bmake/make.h head/contrib/bmake/make_malloc.c head/contrib/bmake/meta.c head/contrib/bmake/meta.h head/contrib/bmake/mk/ChangeLog head/contrib/bmake/mk/FILES head/contrib/bmake/mk/gendirdeps.mk head/contrib/bmake/mk/install-mk head/contrib/bmake/mk/mkopt.sh head/contrib/bmake/mk/sys/AIX.mk head/contrib/bmake/mk/sys/Darwin.mk head/contrib/bmake/mk/sys/Generic.mk head/contrib/bmake/mk/sys/HP-UX.mk head/contrib/bmake/mk/sys/IRIX.mk head/contrib/bmake/mk/sys/Linux.mk head/contrib/bmake/mk/sys/NetBSD.mk head/contrib/bmake/mk/sys/OSF1.mk head/contrib/bmake/mk/sys/OpenBSD.mk head/contrib/bmake/mk/sys/SunOS.mk head/contrib/bmake/mk/sys/UnixWare.mk head/contrib/bmake/nonints.h head/contrib/bmake/parse.c head/contrib/bmake/str.c head/contrib/bmake/suff.c head/contrib/bmake/targ.c head/contrib/bmake/trace.c head/contrib/bmake/unit-tests/Makefile head/contrib/bmake/unit-tests/cond-short.exp head/contrib/bmake/unit-tests/cond-short.mk head/contrib/bmake/unit-tests/modmatch.mk head/contrib/bmake/unit-tests/modmisc.exp head/contrib/bmake/unit-tests/modmisc.mk head/contrib/bmake/unit-tests/modorder.exp head/contrib/bmake/unit-tests/modorder.mk head/contrib/bmake/unit-tests/sysv.exp head/contrib/bmake/unit-tests/sysv.mk head/contrib/bmake/unit-tests/varmisc.exp head/contrib/bmake/unit-tests/varmisc.mk head/contrib/bmake/util.c head/contrib/bmake/var.c head/usr.bin/bmake/Makefile.config Modified: head/contrib/bmake/ChangeLog ============================================================================== --- head/contrib/bmake/ChangeLog Thu Jul 9 02:52:39 2020 (r363034) +++ head/contrib/bmake/ChangeLog Thu Jul 9 03:46:07 2020 (r363035) @@ -1,81 +1,3 @@ -2020-07-04 Simon J Gerraty - - * VERSION (_MAKE_VERSION): 20200704 - Merge with NetBSD make, pick up - (most of this by rillig@) - o lots of style and white-space cleanup - o lots more unit tests for variable modifiers - o simplified description of some functions - o str.c: refactor Str_Match - o var.c: debugging output for :@ - constify VarModify parameter - fix :hash modifier on 16-bit platforms - remove unnecessary forward declarations - refactor ApplyModifier_SysV to have less indentation - simplify code for :E and :R - clean up code for :H and :T - refactor ApplyModifiers - - * var.c: we need stdint.h on some platforms to get uint32_t - * unit-test/Makefile: we need to supress the specific error - for RE substitution error in modmisc, since it varies accross - different OS. - -2020-07-02 Simon J Gerraty - - * VERSION (_MAKE_VERSION): 20200702 - Merge with NetBSD make, pick up - o var.c: more improvements to avoiding unnecessary evaluation - use enums for flags - o remove flags arg to Var_Set which outside of var.c is always 0 - -2020-07-01 Simon J Gerraty - - * VERSION (_MAKE_VERSION): 20200701 - Merge with NetBSD make, pick up - o var.c: with change to cond.c; ensure that nested variables - within a variable name are expanded. - o unit-tests/varmisc.mk: test for nested varname - -2020-06-29 Simon J Gerraty - - * VERSION (_MAKE_VERSION): 20200629 - Merge with NetBSD make, pick up - o cond.c: do not eval unnecessary terms of conditionals. - -2020-06-25 Simon J Gerraty - - * VERSION (_MAKE_VERSION): 20200625 - Merge with NetBSD make, pick up - o meta.c: report error if lseek in filemon_read fails - -2020-06-22 Simon J Gerraty - - * VERSION (_MAKE_VERSION): 20200622 - Merge with NetBSD make, pick up - o dieQuietly: ignore OP_SUBMAKE as too aggressive - -2020-06-19 Simon J Gerraty - - * VERSION (_MAKE_VERSION): 20200619 - Merge with NetBSD make, pick up - o str.c: performance improvement for Str_Match for multiple '*' - o dieQuietly: supress the failure output from make - when failing node is a sub-make or a sibling failed. - This cuts down greatly on unhelpful noise at the end of - build log. Disabled by -dj or .MAKE.DIE_QUIETLY=no - -2020-06-10 Simon J Gerraty - - * FILES: add LICENSE to appease some packagers. - This is an attempt to fairly represent the license on almost - 200 files, which are almost all BSD-3-Clause - The few exceptions being more liberal. - - * VERSION (_MAKE_VERSION): 20200610 - Merge with NetBSD make, pick up - o unit test for :Or - 2020-06-06 Simon J Gerraty * VERSION (_MAKE_VERSION): 20200606 Modified: head/contrib/bmake/FILES ============================================================================== --- head/contrib/bmake/FILES Thu Jul 9 02:52:39 2020 (r363034) +++ head/contrib/bmake/FILES Thu Jul 9 03:46:07 2020 (r363035) @@ -1,6 +1,5 @@ ChangeLog FILES -LICENSE Makefile Makefile.config.in PSD.doc/Makefile @@ -108,8 +107,6 @@ unit-tests/cond2.exp unit-tests/cond2.mk unit-tests/cond-late.mk unit-tests/cond-late.exp -unit-tests/cond-short.mk -unit-tests/cond-short.exp unit-tests/dollar.exp unit-tests/dollar.mk unit-tests/doterror.exp Modified: head/contrib/bmake/LICENSE ============================================================================== --- head/contrib/bmake/LICENSE Thu Jul 9 02:52:39 2020 (r363034) +++ head/contrib/bmake/LICENSE Thu Jul 9 03:46:07 2020 (r363035) @@ -1,59 +0,0 @@ -The individual files in this distribution are copyright their -original contributors or assignees. -Including: - - Copyright (c) 1993-2020, Simon J Gerraty - Copyright (c) 2009-2016, Juniper Networks, Inc. - Copyright (c) 2009, John Birrell. - Copyright (c) 1997-2020 The NetBSD Foundation, Inc. - Copyright (c) 1998 Todd C. Miller - Copyright (c) 1989 by Berkeley Softworks - Copyright (c) 1988, 1989, 1990, 1992, 1993 - The Regents of the University of California. - Copyright (c) 1988, 1989 by Adam de Boor - -With the exception of the GNU configure script, which states: - - # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. - # - # This configure script is free software; the Free Software Foundation - # gives unlimited permission to copy, distribute and modify it. - -The license for this distribution is considered to be: - - SPDX-License-Identifier: BSD-3-Clause - -example (from https://opensource.org/licenses/BSD-3-Clause): - - Copyright - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - 3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - Modified: head/contrib/bmake/VERSION ============================================================================== --- head/contrib/bmake/VERSION Thu Jul 9 02:52:39 2020 (r363034) +++ head/contrib/bmake/VERSION Thu Jul 9 03:46:07 2020 (r363035) @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20200704 +_MAKE_VERSION=20200606 Modified: head/contrib/bmake/arch.c ============================================================================== --- head/contrib/bmake/arch.c Thu Jul 9 02:52:39 2020 (r363034) +++ head/contrib/bmake/arch.c Thu Jul 9 03:46:07 2020 (r363035) @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.73 2020/07/03 08:02:55 rillig Exp $ */ +/* $NetBSD: arch.c,v 1.71 2019/10/05 23:35:57 mrg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: arch.c,v 1.73 2020/07/03 08:02:55 rillig Exp $"; +static char rcsid[] = "$NetBSD: arch.c,v 1.71 2019/10/05 23:35:57 mrg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: arch.c,v 1.73 2020/07/03 08:02:55 rillig Exp $"); +__RCSID("$NetBSD: arch.c,v 1.71 2019/10/05 23:35:57 mrg Exp $"); #endif #endif /* not lint */ #endif @@ -312,7 +312,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * free(freeIt); if (result == var_Error) { - return FAILURE; + return(FAILURE); } else { subLibName = TRUE; } @@ -354,7 +354,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * free(freeIt); if (result == var_Error) { - return FAILURE; + return(FAILURE); } else { doSubst = TRUE; } @@ -372,7 +372,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * */ if (*cp == '\0') { printf("No closing parenthesis in archive specification\n"); - return FAILURE; + return (FAILURE); } /* @@ -426,7 +426,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * if (gn == NULL) { free(buf); - return FAILURE; + return(FAILURE); } else { gn->type |= OP_ARCHV; (void)Lst_AtEnd(nodeLst, gn); @@ -437,7 +437,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * * ourselves. */ free(buf); - return FAILURE; + return(FAILURE); } /* * Free buffer and continue with our work. @@ -461,7 +461,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * gn = Targ_FindNode(nameBuf, TARG_CREATE); if (gn == NULL) { free(nameBuf); - return FAILURE; + return (FAILURE); } else { /* * We've found the node, but have to make sure the rest of @@ -483,7 +483,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * gn = Targ_FindNode(nameBuf, TARG_CREATE); free(nameBuf); if (gn == NULL) { - return FAILURE; + return (FAILURE); } else { /* * We've found the node, but have to make sure the rest of the @@ -520,7 +520,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * } while (*cp != '\0' && isspace ((unsigned char)*cp)); *linePtr = cp; - return SUCCESS; + return (SUCCESS); } /*- @@ -544,7 +544,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * static int ArchFindArchive(const void *ar, const void *archName) { - return strcmp(archName, ((const Arch *)ar)->name); + return (strcmp(archName, ((const Arch *)ar)->name)); } /*- @@ -602,7 +602,7 @@ ArchStatMember(char *archive, char *member, Boolean ha he = Hash_FindEntry(&ar->members, member); if (he != NULL) { - return (struct ar_hdr *)Hash_GetValue(he); + return ((struct ar_hdr *)Hash_GetValue(he)); } else { /* Try truncated name */ char copy[AR_MAX_NAME_LEN+1]; @@ -614,7 +614,7 @@ ArchStatMember(char *archive, char *member, Boolean ha copy[AR_MAX_NAME_LEN] = '\0'; } if ((he = Hash_FindEntry(&ar->members, copy)) != NULL) - return (struct ar_hdr *)Hash_GetValue(he); + return ((struct ar_hdr *)Hash_GetValue(he)); return NULL; } } @@ -635,7 +635,7 @@ ArchStatMember(char *archive, char *member, Boolean ha return NULL; } else { fclose(arch); - return &sarh; + return (&sarh); } } @@ -753,7 +753,7 @@ ArchStatMember(char *archive, char *member, Boolean ha he = Hash_FindEntry(&ar->members, member); if (he != NULL) { - return (struct ar_hdr *)Hash_GetValue(he); + return ((struct ar_hdr *)Hash_GetValue(he)); } else { return NULL; } @@ -962,7 +962,7 @@ ArchFindMember(char *archive, char *member, struct ar_ fclose(arch); return NULL; } - return arch; + return (arch); } } else #ifdef AR_EFMT1 @@ -996,7 +996,7 @@ ArchFindMember(char *archive, char *member, struct ar_ fclose(arch); return NULL; } - return arch; + return (arch); } if (fseek(arch, -elen, SEEK_CUR) != 0) { fclose(arch); @@ -1152,7 +1152,7 @@ Arch_MTime(GNode *gn) } gn->mtime = modTime; - return modTime; + return (modTime); } /*- @@ -1179,7 +1179,7 @@ Arch_MemMTime(GNode *gn) if (Lst_Open(gn->parents) != SUCCESS) { gn->mtime = 0; - return 0; + return (0); } while ((ln = Lst_Next(gn->parents)) != NULL) { pgn = (GNode *)Lst_Datum(ln); @@ -1211,7 +1211,7 @@ Arch_MemMTime(GNode *gn) Lst_Close(gn->parents); - return gn->mtime; + return (gn->mtime); } /*- @@ -1252,9 +1252,9 @@ Arch_FindLib(GNode *gn, Lst path) free(libName); #ifdef LIBRARIES - Var_Set(TARGET, gn->name, gn); + Var_Set(TARGET, gn->name, gn, 0); #else - Var_Set(TARGET, gn->path == NULL ? gn->name : gn->path, gn); + Var_Set(TARGET, gn->path == NULL ? gn->name : gn->path, gn, 0); #endif /* LIBRARIES */ } @@ -1337,7 +1337,7 @@ Arch_LibOODate(GNode *gn) oodate = FALSE; #endif } - return oodate; + return (oodate); } /*- Modified: head/contrib/bmake/buf.c ============================================================================== --- head/contrib/bmake/buf.c Thu Jul 9 02:52:39 2020 (r363034) +++ head/contrib/bmake/buf.c Thu Jul 9 03:46:07 2020 (r363035) @@ -1,4 +1,4 @@ -/* $NetBSD: buf.c,v 1.26 2020/07/03 08:02:55 rillig Exp $ */ +/* $NetBSD: buf.c,v 1.25 2012/04/24 20:26:58 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: buf.c,v 1.26 2020/07/03 08:02:55 rillig Exp $"; +static char rcsid[] = "$NetBSD: buf.c,v 1.25 2012/04/24 20:26:58 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)buf.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: buf.c,v 1.26 2020/07/03 08:02:55 rillig Exp $"); +__RCSID("$NetBSD: buf.c,v 1.25 2012/04/24 20:26:58 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -160,7 +160,7 @@ Buf_GetAll(Buffer *bp, int *numBytesPtr) if (numBytesPtr != NULL) *numBytesPtr = bp->count; - return bp->buffer; + return (bp->buffer); } /*- Modified: head/contrib/bmake/compat.c ============================================================================== --- head/contrib/bmake/compat.c Thu Jul 9 02:52:39 2020 (r363034) +++ head/contrib/bmake/compat.c Thu Jul 9 03:46:07 2020 (r363035) @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.113 2020/07/03 08:13:23 rillig Exp $ */ +/* $NetBSD: compat.c,v 1.110 2020/01/19 19:42:32 riastradh Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: compat.c,v 1.113 2020/07/03 08:13:23 rillig Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.110 2020/01/19 19:42:32 riastradh Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: compat.c,v 1.113 2020/07/03 08:13:23 rillig Exp $"); +__RCSID("$NetBSD: compat.c,v 1.110 2020/01/19 19:42:32 riastradh Exp $"); #endif #endif /* not lint */ #endif @@ -236,7 +236,7 @@ CompatRunCommand(void *cmdp, void *gnp) silent = gn->type & OP_SILENT; errCheck = !(gn->type & OP_IGNORE); doIt = FALSE; - + cmdNode = Lst_Member(gn->commands, cmd); cmdStart = Var_Subst(NULL, cmd, gn, VARF_WANTRES); @@ -249,18 +249,18 @@ CompatRunCommand(void *cmdp, void *gnp) if (*cmdStart == '\0') { free(cmdStart); - return 0; + return(0); } cmd = cmdStart; Lst_Replace(cmdNode, cmdStart); if ((gn->type & OP_SAVE_CMDS) && (gn != ENDNode)) { (void)Lst_AtEnd(ENDNode->commands, cmdStart); - return 0; + return(0); } if (strcmp(cmdStart, "...") == 0) { gn->type |= OP_SAVE_CMDS; - return 0; + return(0); } while ((*cmd == '@') || (*cmd == '-') || (*cmd == '+')) { @@ -287,7 +287,7 @@ CompatRunCommand(void *cmdp, void *gnp) * If we did not end up with a command, just skip it. */ if (!*cmd) - return 0; + return (0); #if !defined(MAKE_NATIVE) /* @@ -307,7 +307,7 @@ CompatRunCommand(void *cmdp, void *gnp) * go to the shell. Therefore treat '=' and ':' like shell * meta characters as documented in make(1). */ - + useShell = needshell(cmd, FALSE); #endif @@ -325,7 +325,7 @@ CompatRunCommand(void *cmdp, void *gnp) * we go... */ if (!doIt && NoExecute(gn)) { - return 0; + return (0); } if (DEBUG(JOB)) fprintf(debug_file, "Execute: '%s'\n", cmd); @@ -377,7 +377,7 @@ again: meta_compat_start(); } #endif - + /* * Fork and execute the single command. If the fork fails, we abort. */ @@ -499,8 +499,8 @@ again: bmake_signal(compatSigno, SIG_DFL); kill(myPid, compatSigno); } - - return status; + + return (status); } /*- @@ -550,7 +550,7 @@ Compat_Make(void *gnp, void *pgnp) if (Lst_Member(gn->iParents, pgn) != NULL) { char *p1; - Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), pgn); + Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), pgn, 0); free(p1); } @@ -654,7 +654,7 @@ Compat_Make(void *gnp, void *pgnp) } else { if (Lst_Member(gn->iParents, pgn) != NULL) { char *p1; - Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), pgn); + Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), pgn, 0); free(p1); } switch(gn->made) { @@ -681,7 +681,7 @@ Compat_Make(void *gnp, void *pgnp) cohorts: Lst_ForEach(gn->cohorts, Compat_Make, pgnp); - return 0; + return (0); } /*- Modified: head/contrib/bmake/cond.c ============================================================================== --- head/contrib/bmake/cond.c Thu Jul 9 02:52:39 2020 (r363034) +++ head/contrib/bmake/cond.c Thu Jul 9 03:46:07 2020 (r363035) @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.78 2020/07/03 08:13:23 rillig Exp $ */ +/* $NetBSD: cond.c,v 1.75 2017/04/16 20:59:04 riastradh Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: cond.c,v 1.78 2020/07/03 08:13:23 rillig Exp $"; +static char rcsid[] = "$NetBSD: cond.c,v 1.75 2017/04/16 20:59:04 riastradh Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: cond.c,v 1.78 2020/07/03 08:13:23 rillig Exp $"); +__RCSID("$NetBSD: cond.c,v 1.75 2017/04/16 20:59:04 riastradh Exp $"); #endif #endif /* not lint */ #endif @@ -146,7 +146,7 @@ typedef enum { * last two fields are stored in condInvert and condDefProc, respectively. */ static void CondPushBack(Token); -static int CondGetArg(Boolean, char **, char **, const char *); +static int CondGetArg(char **, char **, const char *); static Boolean CondDoDefined(int, const char *); static int CondStrMatch(const void *, const void *); static Boolean CondDoMake(int, const char *); @@ -186,7 +186,7 @@ static unsigned int cond_min_depth = 0; /* depth at * Indicate when we should be strict about lhs of comparisons. * TRUE when Cond_EvalExpression is called from Cond_Eval (.if etc) * FALSE when Cond_EvalExpression is called from var.c:ApplyModifiers - * since lhs is already expanded and we cannot tell if + * since lhs is already expanded and we cannot tell if * it was a variable reference or not. */ static Boolean lhsStrict; @@ -225,6 +225,9 @@ CondPushBack(Token t) * CondGetArg -- * Find the argument of a built-in function. * + * Input: + * parens TRUE if arg should be bounded by parens + * * Results: * The length of the argument and the address of the argument. * @@ -235,7 +238,7 @@ CondPushBack(Token t) *----------------------------------------------------------------------- */ static int -CondGetArg(Boolean doEval, char **linePtr, char **argPtr, const char *func) +CondGetArg(char **linePtr, char **argPtr, const char *func) { char *cp; int argLen; @@ -256,7 +259,7 @@ CondGetArg(Boolean doEval, char **linePtr, char **argP * the word 'make' or 'defined' at the beginning of a symbol... */ *argPtr = NULL; - return 0; + return (0); } while (*cp == ' ' || *cp == '\t') { @@ -287,8 +290,7 @@ CondGetArg(Boolean doEval, char **linePtr, char **argP int len; void *freeIt; - cp2 = Var_Parse(cp, VAR_CMD, VARF_UNDEFERR| - (doEval ? VARF_WANTRES : 0), + cp2 = Var_Parse(cp, VAR_CMD, VARF_UNDEFERR|VARF_WANTRES, &len, &freeIt); Buf_AddBytes(&buf, strlen(cp2), cp2); free(freeIt); @@ -314,11 +316,11 @@ CondGetArg(Boolean doEval, char **linePtr, char **argP if (func != NULL && *cp++ != ')') { Parse_Error(PARSE_WARNING, "Missing closing parenthesis for %s()", func); - return 0; + return (0); } *linePtr = cp; - return argLen; + return (argLen); } /*- @@ -347,7 +349,7 @@ CondDoDefined(int argLen MAKE_ATTR_UNUSED, const char } free(p1); - return result; + return (result); } /*- @@ -367,7 +369,7 @@ CondDoDefined(int argLen MAKE_ATTR_UNUSED, const char static int CondStrMatch(const void *string, const void *pattern) { - return !Str_Match(string, pattern); + return(!Str_Match(string, pattern)); } /*- @@ -412,14 +414,14 @@ CondDoExists(int argLen MAKE_ATTR_UNUSED, const char * if (DEBUG(COND)) { fprintf(debug_file, "exists(%s) result is \"%s\"\n", arg, path ? path : ""); - } + } if (path != NULL) { result = TRUE; free(path); } else { result = FALSE; } - return result; + return (result); } /*- @@ -441,7 +443,7 @@ CondDoTarget(int argLen MAKE_ATTR_UNUSED, const char * GNode *gn; gn = Targ_FindNode(arg, TARG_NOCREATE); - return gn != NULL && !OP_NOP(gn->type); + return (gn != NULL) && !OP_NOP(gn->type); } /*- @@ -465,7 +467,7 @@ CondDoCommands(int argLen MAKE_ATTR_UNUSED, const char GNode *gn; gn = Targ_FindNode(arg, TARG_NOCREATE); - return gn != NULL && !OP_NOP(gn->type) && !Lst_IsEmpty(gn->commands); + return (gn != NULL) && !OP_NOP(gn->type) && !Lst_IsEmpty(gn->commands); } /*- @@ -575,7 +577,7 @@ CondGetString(Boolean doEval, Boolean *quoted, void ** /* if we are in quotes, then an undefined variable is ok */ str = Var_Parse(condExpr, VAR_CMD, ((!qt && doEval) ? VARF_UNDEFERR : 0) | - (doEval ? VARF_WANTRES : 0), &len, freeIt); + VARF_WANTRES, &len, freeIt); if (str == var_Error) { if (*freeIt) { free(*freeIt); @@ -666,7 +668,7 @@ compare_expression(Boolean doEval) rhs = NULL; lhsFree = rhsFree = FALSE; lhsQuoted = rhsQuoted = FALSE; - + /* * Parse the variable spec and skip over it, saving its * value in lhs. @@ -709,7 +711,7 @@ compare_expression(Boolean doEval) goto done; } /* For .ifxxx compare against zero */ - if (CondCvtArg(lhs, &left)) { + if (CondCvtArg(lhs, &left)) { t = left != 0.0; goto done; } @@ -762,7 +764,7 @@ do_string_compare: * rhs is either a float or an integer. Convert both the * lhs and the rhs to a double and compare the two. */ - + if (!CondCvtArg(lhs, &left) || !CondCvtArg(rhs, &right)) goto do_string_compare; @@ -811,7 +813,7 @@ done: } static int -get_mpt_arg(Boolean doEval, char **linePtr, char **argPtr, const char *func MAKE_ATTR_UNUSED) +get_mpt_arg(char **linePtr, char **argPtr, const char *func MAKE_ATTR_UNUSED) { /* * Use Var_Parse to parse the spec in parens and return @@ -825,7 +827,7 @@ get_mpt_arg(Boolean doEval, char **linePtr, char **arg /* We do all the work here and return the result as the length */ *argPtr = NULL; - val = Var_Parse(cp - 1, VAR_CMD, doEval ? VARF_WANTRES : 0, &length, &freeIt); + val = Var_Parse(cp - 1, VAR_CMD, VARF_WANTRES, &length, &freeIt); /* * Advance *linePtr to beyond the closing ). Note that * we subtract one because 'length' is calculated from 'cp - 1'. @@ -862,7 +864,7 @@ compare_function(Boolean doEval) static const struct fn_def { const char *fn_name; int fn_name_len; - int (*fn_getarg)(Boolean, char **, char **, const char *); + int (*fn_getarg)(char **, char **, const char *); Boolean (*fn_proc)(int, const char *); } fn_defs[] = { { "defined", 7, CondGetArg, CondDoDefined }, @@ -890,7 +892,7 @@ compare_function(Boolean doEval) if (*cp != '(') break; - arglen = fn_def->fn_getarg(doEval, &cp, &arg, fn_def->fn_name); + arglen = fn_def->fn_getarg(&cp, &arg, fn_def->fn_name); if (arglen <= 0) { condExpr = cp; return arglen < 0 ? TOK_ERROR : TOK_FALSE; @@ -915,7 +917,7 @@ compare_function(Boolean doEval) * would be invalid if we did "defined(a)" - so instead treat as an * expression. */ - arglen = CondGetArg(doEval, &cp, &arg, NULL); + arglen = CondGetArg(&cp, &arg, NULL); for (cp1 = cp; isspace(*(unsigned char *)cp1); cp1++) continue; if (*cp1 == '=' || *cp1 == '!') @@ -1038,7 +1040,7 @@ CondT(Boolean doEval) t = TOK_TRUE; } } - return t; + return (t); } /*- @@ -1084,7 +1086,7 @@ CondF(Boolean doEval) CondPushBack(o); } } - return l; + return (l); } /*- @@ -1131,7 +1133,7 @@ CondE(Boolean doEval) CondPushBack(o); } } - return l; + return (l); } /*- Modified: head/contrib/bmake/dir.c ============================================================================== --- head/contrib/bmake/dir.c Thu Jul 9 02:52:39 2020 (r363034) +++ head/contrib/bmake/dir.c Thu Jul 9 03:46:07 2020 (r363035) @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.76 2020/07/03 08:13:23 rillig Exp $ */ +/* $NetBSD: dir.c,v 1.74 2020/06/05 18:03:59 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: dir.c,v 1.76 2020/07/03 08:13:23 rillig Exp $"; +static char rcsid[] = "$NetBSD: dir.c,v 1.74 2020/06/05 18:03:59 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: dir.c,v 1.76 2020/07/03 08:13:23 rillig Exp $"); +__RCSID("$NetBSD: dir.c,v 1.74 2020/06/05 18:03:59 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -112,7 +112,7 @@ __RCSID("$NetBSD: dir.c,v 1.76 2020/07/03 08:13:23 ril * Dir_FindHereOrAbove Search for a path in the current directory and * then all the directories above it in turn until * the path is found or we reach the root ("/"). - * + * * Dir_MTime Return the modification time of a node. The file * is searched for along the default search path. * The path and mtime fields of the node are filled @@ -377,7 +377,7 @@ void Dir_InitCur(const char *cdname) { Path *p; - + if (cdname != NULL) { /* * Our build directory is not the same as our source directory. @@ -480,7 +480,7 @@ Dir_SetPATH(void) Boolean hasLastDot = FALSE; /* true we should search dot last */ Var_Delete(".PATH", VAR_GLOBAL); - + if (Lst_Open(dirSearchPath) == SUCCESS) { if ((ln = Lst_First(dirSearchPath)) != NULL) { p = (Path *)Lst_Datum(ln); @@ -537,7 +537,7 @@ Dir_SetPATH(void) static int DirFindName(const void *p, const void *dname) { - return strcmp(((const Path *)p)->name, dname); + return (strcmp(((const Path *)p)->name, dname)); } /*- @@ -545,7 +545,7 @@ DirFindName(const void *p, const void *dname) * Dir_HasWildcards -- * see if the given name has any wildcard characters in it * be careful not to expand unmatching brackets or braces. - * XXX: This code is not 100% correct. ([^]] fails etc.) + * XXX: This code is not 100% correct. ([^]] fails etc.) * I really don't think that make(1) should be expanding * patterns, because then you have to set a mechanism for * escaping the expansion! @@ -644,7 +644,7 @@ DirMatchFiles(const char *pattern, Path *p, Lst expans STR_ADDSLASH))); } } - return 0; + return (0); } /*- @@ -947,7 +947,7 @@ Dir_Expand(const char *word, Lst path, Lst expansions) *----------------------------------------------------------------------- */ static char * -DirLookup(Path *p, const char *name MAKE_ATTR_UNUSED, const char *cp, +DirLookup(Path *p, const char *name MAKE_ATTR_UNUSED, const char *cp, Boolean hasSlash MAKE_ATTR_UNUSED) { char *file; /* the current filename to check */ @@ -1004,7 +1004,7 @@ DirLookupSubdir(Path *p, const char *name) if (cached_stat(file, &stb) == 0) { nearmisses += 1; - return file; + return (file); } free(file); return NULL; @@ -1061,7 +1061,7 @@ DirLookupAbs(Path *p, const char *name, const char *cp if (DEBUG(DIR)) { fprintf(debug_file, " returning %s\n", name); } - return bmake_strdup(name); + return (bmake_strdup(name)); } /*- @@ -1087,7 +1087,7 @@ DirFindDot(Boolean hasSlash MAKE_ATTR_UNUSED, const ch } hits += 1; dot->hits += 1; - return bmake_strdup(name); + return (bmake_strdup(name)); } if (cur && Hash_FindEntry(&cur->files, cp) != NULL) { @@ -1185,7 +1185,7 @@ Dir_FindFile(const char *name, Lst path) * is found, we concatenate the directory name and the final * component and return the resulting string. If we don't find any * such thing, we go on to phase two... - * + * * No matter what, we always look for the file in the current * directory before anywhere else (unless we found the magic * DOTLAST path, in which case we search it last) and we *do not* @@ -1384,7 +1384,7 @@ Dir_FindFile(const char *name, Lst path) } if (Hash_FindEntry(&p->files, cp) != NULL) { - return bmake_strdup(name); + return (bmake_strdup(name)); } else { return NULL; } @@ -1395,7 +1395,7 @@ Dir_FindFile(const char *name, Lst path) bigmisses += 1; if (cached_stat(name, &stb) == 0) { - return bmake_strdup(name); + return (bmake_strdup(name)); } if (DEBUG(DIR)) { @@ -1409,14 +1409,14 @@ Dir_FindFile(const char *name, Lst path) /*- *----------------------------------------------------------------------- * Dir_FindHereOrAbove -- - * search for a path starting at a given directory and then working + * search for a path starting at a given directory and then working * our way up towards the root. * * Input: * here starting directory * search_path the path we are looking for * result the result of a successful search is placed here - * rlen the length of the result buffer + * rlen the length of the result buffer * (typically MAXPATHLEN + 1) * * Results: @@ -1426,7 +1426,7 @@ Dir_FindFile(const char *name, Lst path) * Side Effects: *----------------------------------------------------------------------- */ -int +int Dir_FindHereOrAbove(char *here, char *search_path, char *result, int rlen) { struct stat st; @@ -1451,7 +1451,7 @@ Dir_FindHereOrAbove(char *here, char *search_path, cha try_end = try + strlen(try); while (try_end > try && *try_end != '/') try_end--; - if (try_end > try) + if (try_end > try) *try_end = 0; /* chop! */ } @@ -1459,10 +1459,10 @@ Dir_FindHereOrAbove(char *here, char *search_path, cha * done! */ snprintf(result, rlen, "%s", try); - return 1; + return(1); } - /* + /* * nope, we didn't find it. if we used up dirbase we've * reached the root and failed. */ @@ -1479,9 +1479,9 @@ Dir_FindHereOrAbove(char *here, char *search_path, cha } /* while (1) */ /* - * we failed... + * we failed... */ - return 0; + return(0); } /*- *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Jul 9 03:50:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9020535EC8B; Thu, 9 Jul 2020 03:50:28 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0b-00273201.pphosted.com (mx0b-00273201.pphosted.com [67.231.152.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2MdT4pDFz4SmD; Thu, 9 Jul 2020 03:50:18 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from pps.filterd (m0108163.ppops.net [127.0.0.1]) by mx0b-00273201.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0693h5GM026051; Wed, 8 Jul 2020 20:50:13 -0700 Received: from nam02-bl2-obe.outbound.protection.outlook.com (mail-bl2nam02lp2058.outbound.protection.outlook.com [104.47.38.58]) by mx0b-00273201.pphosted.com with ESMTP id 325k32rsjp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jul 2020 20:50:13 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jPTtf0h8qmsuAlhUx9u5joKP1LoZgUjsqgfty9CETJ3xGZgy6jvM0+jqqV1uRon+ISeOi4O6E0OhxoXz5JyuTpN09WunP7f2DXj1RFWghLJY+TNfVFZMPTYCsSnI7RjhnN9G8z+1HJA4v2CiWR3mkpcOOt4IldrtWmdfI2xtF3odPjVNKn9tr2v3svpsSmBWbbGJrPIdE67s9auWMYlWY80mMh2XzyIJEqQ8DTju6mmIjmKl2qCW3lKaGG0iGmx2VWil4tPVm1NYYHLAYc7D96LnuwKkH78iQNffjQEo5lTILtlXotza+E3dly3mDtJZWEhsF+04O/Iykpce7gVgHg== 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=6ikgzKfLyB6/On5E3H+rZBeFSX0vqDCBj+ZeWyIXHKE=; b=PPbCdMG9QlmUt6nqki1hU7H6PADI/73w4ADxuhi5RHBYsRTGEXVlPncKZQ+ayPLGSWUNQvES0x8+EibNUEYmAV8gOJJA7K+K2hoRhLAg84o7QNmnm/XrlEaFLvl+vIb1oSUM0wtBNXB8yB97SC+svzirOW+ttOHvBXnf8R4UhpFH62uVdofyMrZnY/+cqPNDQ8v+FHTnEJ/XCjXLECPAI/Z9Wsk7dVHEfhM7pWF5ZxkUhSK1KTrf6LQHXVeJH5yO/Ky29tR/WI+TUQuSx0Sqe7wQ79bxFnUG5Yuf9GyD49GBwlJ6O3nM32JJV2iOEN4wQ78SjImzOyJ7F2vNXsGBvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.12) smtp.rcpttodomain=freebsd.org smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none Received: from DM5PR07CA0150.namprd07.prod.outlook.com (2603:10b6:3:ee::16) by SN6PR05MB5677.namprd05.prod.outlook.com (2603:10b6:805:bb::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.8; Thu, 9 Jul 2020 03:50:11 +0000 Received: from DM3NAM05FT058.eop-nam05.prod.protection.outlook.com (2603:10b6:3:ee:cafe::a1) by DM5PR07CA0150.outlook.office365.com (2603:10b6:3:ee::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21 via Frontend Transport; Thu, 9 Jul 2020 03:50:11 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.239.12) smtp.mailfrom=juniper.net; FreeBSD.org; dkim=none (message not signed) header.d=none;FreeBSD.org; dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.12 as permitted sender) Received: from P-EXFEND-EQX-01.jnpr.net (66.129.239.12) by DM3NAM05FT058.mail.protection.outlook.com (10.152.98.174) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.3195.9 via Frontend Transport; Thu, 9 Jul 2020 03:50:10 +0000 Received: from P-EXBEND-EQX-01.jnpr.net (10.104.8.52) by P-EXFEND-EQX-01.jnpr.net (10.104.8.54) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 8 Jul 2020 20:47:13 -0700 Received: from p-mailhub01.juniper.net (10.104.20.6) by P-EXBEND-EQX-01.jnpr.net (10.104.8.52) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Wed, 8 Jul 2020 20:47:13 -0700 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.255.254]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 0693lCso024067; Wed, 8 Jul 2020 20:47:13 -0700 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id D51C56DE22; Wed, 8 Jul 2020 20:47:12 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id D49026DE21; Wed, 8 Jul 2020 20:47:12 -0700 (PDT) To: Cy Schubert CC: , , , Subject: Re: svn commit: r363031 - in head: contrib/bmake contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake In-Reply-To: <202007090328.0693SNo4028242@slippy.cwsent.com> References: <202007082120.068LKCeN067904@repo.freebsd.org> <202007090328.0693SNo4028242@slippy.cwsent.com> Comments: In-reply-to: Cy Schubert message dated "Wed, 08 Jul 2020 20:28:23 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 26.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <45244.1594266432.1@kaos.jnpr.net> Content-Transfer-Encoding: quoted-printable Date: Wed, 8 Jul 2020 20:47:12 -0700 Message-ID: <45359.1594266432@kaos.jnpr.net> X-EXCLAIMER-MD-CONFIG: e3cb0ff2-54e7-4646-8a04-0dae4ac7b136 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:66.129.239.12; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:P-EXFEND-EQX-01.jnpr.net; PTR:InfoDomainNonexistent; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(396003)(136003)(346002)(376002)(46966005)(83380400001)(4326008)(8936002)(82310400002)(356005)(81166007)(316002)(86362001)(6266002)(186003)(5660300002)(8676002)(55016002)(9686003)(2906002)(966005)(70586007)(82740400003)(70206006)(107886003)(6916009)(478600001)(54906003)(26005)(7696005)(336012)(7126003)(47076004); DIR:OUT; SFP:1102; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2711955b-423f-4fbd-c492-08d823bb2dfc X-MS-TrafficTypeDiagnostic: SN6PR05MB5677: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ir3qdeice/0LFLfWuzXG9L6ryUeocQQ+GWzGwwQU3qpmT9DeD/ma1+KHNo3cgJti9kW5R8la78IQvyldJbDoas5wk4jRlRx06p9rA5xIEo4A9k1pq8ubrQMLHe0KCrWTkX7DotGDlBljCL5tPpmwosrTOcjJ9U/JGX6pMwZpyqgNF7ORMXMCKrYuhtvWjXU3mlALEwPBU9KDMWD5toCupw8nVTvsRIpCZxsM59IJpa0pp6phiq7nluVWmKisVoIPiqyjrBCgIMOFiYG7HD1uBqV3FrnbqMWWORAqlvlkWEDtCFPyeWa3BVtMx1fH45/wvmM14Rzy/3pELGs4V3gPeb+r8m/yzGFD7TctJ+yiX2lW1fQ9MRvsZdOu72hGCqVYNih/YWuZLKosFczkEiO/NImx+0sVFam5cKCyLoq1l/aS0Cmj8hgcFbq6j43zctEm97j8mgXAvbZ1tpUq8gqm/8oxyJxynEDinFWSFqi00KU= X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2020 03:50:10.8962 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2711955b-423f-4fbd-c492-08d823bb2dfc X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.12]; Helo=[P-EXFEND-EQX-01.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: DM3NAM05FT058.eop-nam05.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR05MB5677 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-08_19:2020-07-08, 2020-07-08 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 lowpriorityscore=0 mlxlogscore=670 impostorscore=0 bulkscore=0 adultscore=0 priorityscore=1501 phishscore=0 suspectscore=0 malwarescore=0 spamscore=0 mlxscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007090027 X-Rspamd-Queue-Id: 4B2MdT4pDFz4SmD X-Spamd-Bar: ----- X-Spamd-Result: default: False [-5.67 / 15.00]; NEURAL_HAM_MEDIUM(-0.98)[-0.983]; R_DKIM_ALLOW(-0.20)[juniper.net:s=PPS1017,juniper.net:s=selector1]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:67.231.152.164]; NEURAL_HAM_LONG(-0.98)[-0.979]; MIME_GOOD(-0.10)[text/plain]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[juniper.net:+]; DMARC_POLICY_ALLOW(-0.50)[juniper.net,reject]; NEURAL_HAM_SHORT(-1.61)[-1.606]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22843, ipnet:67.231.152.0/24, country:US]; RCVD_COUNT_SEVEN(0.00)[10]; RCVD_IN_DNSWL_LOW(-0.10)[67.231.152.164:from] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 03:50:28 -0000 Cy Schubert wrote: > This broke ports. I've reverted the change. Let me know if you still see issue. > = > cwsys# make checksum > make: "/usr/ports/Mk/Uses/python.mk" line 367: warning: String compariso= n > operator should be either =3D=3D or !=3D > make: "/usr/ports/Mk/Uses/python.mk" line 367: Malformed conditional > (!defined(_PYTHON_VERSION) && !(!empty(_PYTHON_VERSION_MINIMUM) && ( > ${__VER} < ${_PYTHON_VERSION_MINIMUM})) && !(!empty(_PYTHON_VERSION_MAX= IMUM > ) && ( ${__VER} > ${_PYTHON_VERSION_MAXIMUM}))) > make: "/usr/ports/Mk/Uses/python.mk" line 367: warning: String compariso= n > operator should be either =3D=3D or !=3D > make: "/usr/ports/Mk/Uses/python.mk" line 367: Malformed conditional > (!defined(_PYTHON_VERSION) && !(!empty(_PYTHON_VERSION_MINIMUM) && ( > ${__VER} < ${_PYTHON_VERSION_MINIMUM})) && !(!empty(_PYTHON_VERSION_MAX= IMUM > ) && ( ${__VER} > ${_PYTHON_VERSION_MAXIMUM}))) > make: "/usr/ports/Mk/Uses/python.mk" line 367: warning: String compariso= n > operator should be either =3D=3D or !=3D > make: "/usr/ports/Mk/Uses/python.mk" line 367: Malformed conditional > (!defined(_PYTHON_VERSION) && !(!empty(_PYTHON_VERSION_MINIMUM) && ( > ${__VER} < ${_PYTHON_VERSION_MINIMUM})) && !(!empty(_PYTHON_VERSION_MAX= IMUM > ) && ( ${__VER} > ${_PYTHON_VERSION_MAXIMUM}))) > make: "/usr/ports/Mk/Uses/python.mk" line 367: warning: String compariso= n > operator should be either =3D=3D or !=3D > make: "/usr/ports/Mk/Uses/python.mk" line 367: Malformed conditional > (!defined(_PYTHON_VERSION) && !(!empty(_PYTHON_VERSION_MINIMUM) && ( > ${__VER} < ${_PYTHON_VERSION_MINIMUM})) && !(!empty(_PYTHON_VERSION_MAX= IMUM > ) && ( ${__VER} > ${_PYTHON_VERSION_MAXIMUM}))) > make: "/usr/ports/Mk/Uses/python.mk" line 367: warning: String compariso= n > operator should be either =3D=3D or !=3D > make: "/usr/ports/Mk/Uses/python.mk" line 367: Malformed conditional > (!defined(_PYTHON_VERSION) && !(!empty(_PYTHON_VERSION_MINIMUM) && ( > ${__VER} < ${_PYTHON_VERSION_MINIMUM})) && !(!empty(_PYTHON_VERSION_MAX= IMUM > ) && ( ${__VER} > ${_PYTHON_VERSION_MAXIMUM}))) > make: "/usr/ports/Mk/Uses/python.mk" line 367: warning: String compariso= n > operator should be either =3D=3D or !=3D > make: "/usr/ports/Mk/Uses/python.mk" line 367: Malformed conditional > (!defined(_PYTHON_VERSION) && !(!empty(_PYTHON_VERSION_MINIMUM) && ( > ${__VER} < ${_PYTHON_VERSION_MINIMUM})) && !(!empty(_PYTHON_VERSION_MAX= IMUM > ) && ( ${__VER} > ${_PYTHON_VERSION_MAXIMUM}))) > make: "/usr/ports/Mk/bsd.port.mk" line 2096: warning: String comparison > operator should be either =3D=3D or !=3D > make: "/usr/ports/Mk/bsd.port.mk" line 2096: Malformed conditional > (defined(MAKE_JOBS_NUMBER_LIMIT) && ( ${MAKE_JOBS_NUMBER_LIMIT} < > ${_MAKE_JOBS_NUMBER} )) > make: Fatal errors encountered -- cannot continue > make: stopped in /usr/ports/www/firefox > cwsys# > = > The same errors occur during buildworld. > = > Simply reverting just contrib/bmake/cond.c resolves this issue. The caus= e of > this issue is NetBSD cond.c r1.76, therefore it is safe to revert just t= he > one file without reverting the complete upgrade. > = > https://urldefense.com/v3/__http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.= bin/make/cond.c?rev=3D1.76&content-type=3Dtext*x-cvsweb-markup&only_with_t= ag=3DMAIN__;Lw!!NEt6yMaO-gk!VltPNuPO6XKkx3hxHjCA98ZeFCqyVtHYuLQi8D1AE6HcNI= FdwIRm80hIxRvmDA$ > = > = > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://urldefense.com/v3/__http= s://FreeBSD.org__;!!NEt6yMaO-gk!VltPNuPO6XKkx3hxHjCA98ZeFCqyVtHYuLQi8D1AE6= HcNIFdwIRm80gLfK9-dg$ > NTP: Web: https://urldefense.com/v3/__http= s://nwtime.org__;!!NEt6yMaO-gk!VltPNuPO6XKkx3hxHjCA98ZeFCqyVtHYuLQi8D1AE6H= cNIFdwIRm80gVslaffA$ > = > The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Thu Jul 9 03:51:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ECE5335ED97; Thu, 9 Jul 2020 03:51:28 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0b-00273201.pphosted.com (mx0b-00273201.pphosted.com [67.231.152.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2Mfm24jdz4Shg; Thu, 9 Jul 2020 03:51:27 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from pps.filterd (m0108163.ppops.net [127.0.0.1]) by mx0b-00273201.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0692gDGM006242; Wed, 8 Jul 2020 19:45:15 -0700 Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2168.outbound.protection.outlook.com [104.47.58.168]) by mx0b-00273201.pphosted.com with ESMTP id 325k32rq3w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jul 2020 19:45:15 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mNZN5sdOeELMQpsYh3rPE6fXZgic2daYRHBeHONHy5a6pvnxcUznwfmbQiybXH3WiO6bDuNuuB17j+q8RRWmBrH0VorvHg9TDTmfqMesBpnVjDPa0vrGZG31Ii1Ezih46OvR66i7sx8Ad2kXZkTommpDHO85SOBCVu0mG/EQX45i1H/WTOg6UhQBUBW3CIYO9XHhvYQ/lPNNvsWAHmKU8Ocxj6D4ygYmfUScGchMlwGjIWPl4hJIqiLBWTIcwoInEblri3EFp1GKwbH5TJzxEZFnvw712P3X5WKtgX/F0HeZdv+SNKs2AbUaAhb9jfP9JH0Ibsqw+UWPVftzxkfTsg== 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=lrFPc3rE8Pw3sZEZIgOfxw5fA6m0imv4ow9ReFo19lM=; b=Bc/pPCWpVMt++/0odnlewyBE0XgHNRA9qa0C+qeNPSoFmR6B09o6Le4LH1j/pv5KaYihaC1VEqOvGaBZav7Un9J2qGMeGfYBfWoAJFItQEbar+9i5861Q90s8+zQc6ITS3vAVgTEHdCGrrVZvi7XewVdUwjCW33LLaoJPCto/A34LUBwy7cDSWZR1HVfMliBanskPFEEqfj/zlvkIpJcG72CU6PeJypsgrwkPaSifPlABQXZ4QD+FgNj7uV8uzw3bBF5jU9aADdBWKS4v4wft9J0qkIKNxAb2oXqD+pDfeOPlFvRzhclffKn8OF0UATR/Mw9qPua2Idmlil4DKdauA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.13) smtp.rcpttodomain=yahoo.com smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none Received: from DM6PR13CA0050.namprd13.prod.outlook.com (2603:10b6:5:134::27) by DM6PR05MB6313.namprd05.prod.outlook.com (2603:10b6:5:10f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.12; Thu, 9 Jul 2020 02:45:13 +0000 Received: from DM3NAM05FT038.eop-nam05.prod.protection.outlook.com (2603:10b6:5:134:cafe::85) by DM6PR13CA0050.outlook.office365.com (2603:10b6:5:134::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.9 via Frontend Transport; Thu, 9 Jul 2020 02:45:13 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.239.13) smtp.mailfrom=juniper.net; yahoo.com; dkim=none (message not signed) header.d=none;yahoo.com; dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.13 as permitted sender) Received: from P-EXFEND-EQX-02.jnpr.net (66.129.239.13) by DM3NAM05FT038.mail.protection.outlook.com (10.152.98.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.3174.9 via Frontend Transport; Thu, 9 Jul 2020 02:45:13 +0000 Received: from P-EXBEND-EQX-03.jnpr.net (10.104.8.56) by P-EXFEND-EQX-02.jnpr.net (10.104.8.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 8 Jul 2020 19:45:10 -0700 Received: from P-EXBEND-EQX-01.jnpr.net (10.104.8.52) by P-EXBEND-EQX-03.jnpr.net (10.104.8.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 8 Jul 2020 19:45:10 -0700 Received: from p-mailhub01.juniper.net (10.104.20.6) by P-EXBEND-EQX-01.jnpr.net (10.104.8.52) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Wed, 8 Jul 2020 19:45:09 -0700 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.255.254]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 0692j9Rs016096; Wed, 8 Jul 2020 19:45:09 -0700 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id 342706DD73; Wed, 8 Jul 2020 19:45:09 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id 327D96DD72; Wed, 8 Jul 2020 19:45:09 -0700 (PDT) To: Mark Millard CC: , FreeBSD Toolchain , FreeBSD Current , Subject: Re: svn commit: r363031 - in head: contrib/bmake contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake (make now broken) In-Reply-To: References: Comments: In-reply-to: Mark Millard message dated "Wed, 08 Jul 2020 18:38:53 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 26.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <84347.1594262709.1@kaos.jnpr.net> Content-Transfer-Encoding: quoted-printable Date: Wed, 8 Jul 2020 19:45:09 -0700 Message-ID: <89044.1594262709@kaos.jnpr.net> X-EXCLAIMER-MD-CONFIG: e3cb0ff2-54e7-4646-8a04-0dae4ac7b136 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:66.129.239.13; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:P-EXFEND-EQX-02.jnpr.net; PTR:InfoDomainNonexistent; CAT:NONE; SFTY:; SFS:(4636009)(396003)(136003)(346002)(376002)(39860400002)(46966005)(82310400002)(186003)(9686003)(6266002)(4326008)(5660300002)(26005)(107886003)(6916009)(8936002)(478600001)(8676002)(336012)(7126003)(7696005)(2906002)(55016002)(86362001)(83380400001)(356005)(54906003)(82740400003)(70206006)(81166007)(47076004)(316002)(70586007); DIR:OUT; SFP:1102; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 210346ba-80eb-44bf-559f-08d823b21b09 X-MS-TrafficTypeDiagnostic: DM6PR05MB6313: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4502; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eatA4l70mmCiPSkuF6/czLqDVJmAE8uMVbBQ1m+CzcY+SZvm/YZvrhBChj9h/7yd4LZOV8U8hRmug47yaEk3NM3Zews+MKqTIgh6oW34hfuUT3dh6cu6EM5aGLu7yyQe10NphkfSkoPY1lu4pPT4ZhuS/gwqC+M0EpalQ2CF7pByThsEV3i+8uzcpDiy56OXv6qILJEAFtWoB3xYSeBDvxwCB0jkmGhDG//fm2hKqmidXa+Z7FKw32g8pRsjFx08iw6iZ0w4Bpcb4rtVacflFhdYcI4mvCjJ0S8DaHsVpIodDiZaNu/rkfb0uwiPbawrwTzfmOWUVAy7dt1S58uFcq5P94/9u3yawuuLDS6eGD99GfQTLVHkjnGKJHp1EhUiT5/G71xYHVGW93WrMhJk5w== X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2020 02:45:13.6223 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 210346ba-80eb-44bf-559f-08d823b21b09 X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.13]; Helo=[P-EXFEND-EQX-02.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: DM3NAM05FT038.eop-nam05.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR05MB6313 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-08_19:2020-07-08, 2020-07-08 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 lowpriorityscore=0 mlxlogscore=656 impostorscore=0 bulkscore=0 adultscore=0 priorityscore=1501 phishscore=0 suspectscore=0 malwarescore=0 spamscore=0 mlxscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007090020 X-Rspamd-Queue-Id: 4B2Mfm24jdz4Shg X-Spamd-Bar: ++ X-Spamd-Result: default: False [2.79 / 15.00]; GREYLIST(0.00)[pass,body]; RECEIVED_SPAMHAUS_XBL(5.00)[66.129.239.13:received]; R_DKIM_ALLOW(0.00)[juniper.net:s=PPS1017,juniper.net:s=selector1]; NEURAL_HAM_MEDIUM(-0.86)[-0.856]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:67.231.152.164]; NEURAL_HAM_LONG(-0.76)[-0.756]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_FIVE(0.00)[5]; BAD_REP_POLICIES(0.10)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[juniper.net:+]; DMARC_POLICY_ALLOW(0.00)[juniper.net,reject]; NEURAL_HAM_SHORT(-0.50)[-0.501]; FREEMAIL_TO(0.00)[yahoo.com]; RCVD_IN_DNSWL_LOW(-0.10)[67.231.152.164:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:22843, ipnet:67.231.152.0/24, country:US]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_SEVEN(0.00)[11]; ARC_ALLOW(0.00)[microsoft.com:s=arcselector9901:i=1] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 03:51:29 -0000 Mark Millard wrote: > [External Email. Be cautious of content] > = > = > This seems to have broken doing buildworld buildkernel and > other things using make: Ouch sorry I saw this at one point but couldn't reproduce while trying to work out what it was complaining about. The line numbers did/do not appear correct. Will revert if I cannot work it out. > = > make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: String c= omparison operator should be either =3D=3D or !=3D > make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: String c= omparison operator should be either =3D=3D or !=3D > . . . > make[3]: "/usr/src/share/mk/bsd.sys.mk" line 100: warning: String compar= ison operator should be either =3D=3D or !=3D > . . . > make[3]: "/usr/src/share/mk/bsd.sys.mk" line 81: warning: String compari= son operator should be either =3D=3D or !=3D > . . . > = > Using -d c shows the likes of: > = > . . . > lhs =3D "clang", rhs =3D "clang", op =3D =3D=3D > lhs =3D "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs =3D= "gcc", op =3D =3D=3D > make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: String c= omparison operator should be either =3D=3D or !=3D > lhs =3D "clang", rhs =3D "clang", op =3D =3D=3D > lhs =3D "LD", rhs =3D "LD", op =3D =3D=3D > . . . > left =3D 6.000000, right =3D 2.000000, op =3D <=3D > left =3D 6.000000, right =3D 1.000000, op =3D <=3D > lhs =3D "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs =3D= "clang", op =3D =3D=3D > make[3]: "/usr/src/share/mk/bsd.sys.mk" line 100: warning: String compar= ison operator should be either =3D=3D or !=3D > lhs =3D "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs =3D= "gcc", op =3D =3D=3D > lhs =3D "clang", rhs =3D "gcc", op =3D =3D=3D > . . . > left =3D 0.000000, right =3D 6.000000, op =3D <=3D > left =3D 0.000000, right =3D 3.000000, op =3D <=3D > lhs =3D "clang", rhs =3D "gcc", op =3D =3D=3D > make[3]: "/usr/src/share/mk/bsd.sys.mk" line 81: warning: String compari= son operator should be either =3D=3D or !=3D > lhs =3D "clang", rhs =3D "clang", op =3D =3D=3D > left =3D 100001.000000, right =3D 70000.000000, op =3D >=3D > lhs =3D "amd64", rhs =3D "arm", op =3D =3D=3D > = > (Now I just need to figure out how to get back to a working context.) > = > =3D=3D=3D > Mark Millard > marklmi at yahoo.com > ( dsl-only.net went > away in early 2018-Mar) From owner-svn-src-head@freebsd.org Thu Jul 9 04:02:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 00F1135F32E; Thu, 9 Jul 2020 04:02:58 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2Mw04jHtz4TCW; Thu, 9 Jul 2020 04:02:56 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id tNlsjaULE62brtNltjrTDC; Wed, 08 Jul 2020 22:02:54 -0600 X-Authority-Analysis: v=2.3 cv=LKf9vKe9 c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=_RQrkK6FrEwA:10 a=ymjG5ZiqAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=oHSs8KqiQKmy-OUkTyQA:9 a=CjuIK1q_8ugA:10 a=UJ0tAi3fqDAA:10 a=9NY4Jsdw3mG8vwb630s1:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id C0E27260; Wed, 8 Jul 2020 21:02:50 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 06942njm017054; Wed, 8 Jul 2020 21:02:49 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id 06942mVr015813; Wed, 8 Jul 2020 21:02:49 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202007090402.06942mVr015813@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: "Simon J. Gerraty" cc: Cy Schubert , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r363031 - in head: contrib/bmake contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake In-reply-to: <45359.1594266432@kaos.jnpr.net> References: <202007082120.068LKCeN067904@repo.freebsd.org> <202007090328.0693SNo4028242@slippy.cwsent.com> <45359.1594266432@kaos.jnpr.net> Comments: In-reply-to "Simon J. Gerraty" message dated "Wed, 08 Jul 2020 20:47:12 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 08 Jul 2020 21:02:45 -0700 X-CMAE-Envelope: MS4wfERkGL4G5lPID3qbe1504H16XhZWe1ZI0O58Su/Gx1DEUriz15QSaankAmsV6Np9OtHAvXD6l67MnxScS8KszTMZ6uLVYNDyDKUyonDROEZYBh0UNYie D4mH1Q01aOO+vcEwDHgmj/wtCp5Bydvdp2n6WWdppPXR00Xq3GrO+6Qhe+xTJ5M8H5VvPNvvSjZDrzmv8Cf2Mbd44QFRiXnUc9F/pLSjZXv+OULLOe+m5ubY yI3Ee+HOC8gTeRUVi8Smq3UIg+vA3R0PbNv4MJcHOdybhRdLtyMMQmqtQd8IOG3l X-Rspamd-Queue-Id: 4B2Mw04jHtz4TCW X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.134.9) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-1.33 / 15.00]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; RWL_MAILSPIKE_GOOD(0.00)[64.59.134.9:from]; HAS_XAW(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_SHORT(-0.74)[-0.736]; RECEIVED_SPAMHAUS_PBL(0.00)[70.67.125.17:received]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MIME_TRACE(0.00)[0:+]; RCVD_IN_DNSWL_LOW(-0.10)[64.59.134.9:from]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.95)[-0.953]; RCVD_COUNT_FIVE(0.00)[5]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.95)[-0.946]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; AUTH_NA(1.00)[]; DMARC_NA(0.00)[cschubert.com: no valid DMARC record]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 04:02:58 -0000 In message <45359.1594266432@kaos.jnpr.net>, "Simon J. Gerraty" writes: > Cy Schubert wrote: > > This broke ports. > > I've reverted the change. > > Let me know if you still see issue. As I said in my email, all I did was revert cond.c, and that fixed it. You don't need to revert the whole patch. Just revert cond.c and let NetBSD know. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Thu Jul 9 04:07:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4489E35F13D for ; Thu, 9 Jul 2020 04:07:11 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic312-25.consmr.mail.gq1.yahoo.com (sonic312-25.consmr.mail.gq1.yahoo.com [98.137.69.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2N0s6V5nz4TpY for ; Thu, 9 Jul 2020 04:07:09 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: q3XZu7oVM1km5ImWZqIa1rRMSKh6YhoB85F6MzqoVId0SDvmrBDLXXWRdNfcSxY Axsuh87GacDgWnztMS4dvGYVNbYFcMbESS6yTX7Er8iQQMy0WQF1Hz0eWqLAhufyeUXOzjUXxRzy NkKubiYu3qV0ovvCLiBScnvkprEWpjif3Zn4MTlL1iEbTLKUVnRhlfdlRcDjK0e0iLQk9Gbls4Vm GOn3ALWkI4hH5SdiEWvA_oMs20uCEjztVt8l41U8Is3uGY5DGTja2DH6rUDGVCI1AWzDVDDo_AgW UYz9P69dADS_NAIXGoT_wuf28ODuXbjfIYTjs9GJV0k4NCfdylBQuzPV1Td3Cv9c_flxEuje.wed GYjn3GupNqfbJZY1wLzktU1sVuGN5fwm_SOIllayF9aZuikNWCT6uoHUEjpdlKlXjQq9byJ_1HPP RCmPSl.aTqNIAiZM8j5wsZPT21DnIbLjnIneT4XGr4myJUmW39gxCM1Wn06eQ1tCAWY.r7669kwQ O6_yT7HhmPsttsAPugCnmBfnXWEuJfz00MJu7Px.b5ssxyDOGxGknykyyFzPC7.HqKBUTQTn1.N9 gL9iSyz3Joc7UMozFGKEE7gKeQiTFJdocJu.o.uY.zAY97fI12hlLnmx.FSdWi69ZBekM4dW0esQ 6kSzLtc4NGp9xxrz64zNvEdkUXbsydoHe8e.ZlsBcZUF08InR_x7ZMDuX5jeTkkN2mHYeu7EJauO cvvccVY8LHOSw4CdA_F.eCI3DOyUcbqKJcogcIg_cL.O94f614g6QlSYXDM61Xca3NTD99.RlwRV AhQl7PLbO7gHsFTxlJqNuCf2QOMBshESEgCZDdC1ZYTPopx0zWPoIYgVh0aCJN7WSDY1VVc3D.07 mWSGf3TQ4vJKe72R1f48fjHzIx7xz.PBRejScazUUqV8QzDzYkcJDukyvOFEl3X4BjlP47oGhRJq T7nrJXsRO0iQmdEWzc2iASX7IZYvKvg171T2bHtZUhGIYPQ4YLH2lcy4FJ5Mc4Vi.XUnI0xHTWVR qXI2EYZoiojtRCHfmu5uGGsuEqfeZ2_0kgyySLQqmJq94MOQ0O2xYragtuDZTzyCMD8CLDulm0aP 4fz8_atlFOeyCaEZxzBtdMzfTErhMrpR2UislJdlFd1x_GHcVBFHVgM2NInnbMs1GnDiqt1Km889 YlegsT2UAnML7C5eXQzIjDeEbeG_Wcc5O52FD7Dh6jfiF2_qBMUtbs2tqr8TikLDwMroMBDDYUOP NHZ5MydZ0JQQJvC.IFB1IhW1islr3CWe05JlIKK7ogJrGXTf2R8T9Je0Dk1k7DsaF6sU7DyxN27R MYMxxSo4X4j9uFlIV7cCbk54A25qrkQiJ9Zv0AZBYXx87za3Dsny8_3PGxOb5o8o.NkE1L1he0tB 7Ofhoz8BFO4DrXxBKXMNLxjaV Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.gq1.yahoo.com with HTTP; Thu, 9 Jul 2020 04:07:07 +0000 Received: by smtp409.mail.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 168a0a4eb8cc2107f3fede2b88e6d245; Thu, 09 Jul 2020 04:07:03 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: svn commit: r363031 - in head: contrib/bmake contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake (make now broken) From: Mark Millard In-Reply-To: <25afe2ff-e805-8415-ddd9-430cfa271e16@yuripv.dev> Date: Wed, 8 Jul 2020 21:07:01 -0700 Cc: "sjg@freebsd.org" , svn-src-head@freebsd.org, FreeBSD Toolchain , FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: <8969386C-D964-4597-BE7E-6A2D215D801C@yahoo.com> References: <25afe2ff-e805-8415-ddd9-430cfa271e16@yuripv.dev> To: Yuri Pankov X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 4B2N0s6V5nz4TpY X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.40 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; RCPT_COUNT_FIVE(0.00)[5]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.92)[-0.923]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.976]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.997]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.206:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.69.206:from]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 04:07:11 -0000 On 2020-Jul-8, at 20:35, Yuri Pankov wrote: > Mark Millard wrote: >> This seems to have broken doing buildworld buildkernel and >> other things using make: >> make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: = String comparison operator should be either =3D=3D or !=3D >> make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: = String comparison operator should be either =3D=3D or !=3D >> . . . >> make[3]: "/usr/src/share/mk/bsd.sys.mk" line 100: warning: String = comparison operator should be either =3D=3D or !=3D >> . . . >> make[3]: "/usr/src/share/mk/bsd.sys.mk" line 81: warning: String = comparison operator should be either =3D=3D or !=3D >> . . . >> Using -d c shows the likes of: >> . . . >> lhs =3D "clang", rhs =3D "clang", op =3D =3D=3D >> lhs =3D "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs = =3D "gcc", op =3D =3D=3D >> make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: = String comparison operator should be either =3D=3D or !=3D >> lhs =3D "clang", rhs =3D "clang", op =3D =3D=3D >> lhs =3D "LD", rhs =3D "LD", op =3D =3D=3D >> . . . >> left =3D 6.000000, right =3D 2.000000, op =3D <=3D >> left =3D 6.000000, right =3D 1.000000, op =3D <=3D >> lhs =3D "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs = =3D "clang", op =3D =3D=3D >> make[3]: "/usr/src/share/mk/bsd.sys.mk" line 100: warning: String = comparison operator should be either =3D=3D or !=3D >> lhs =3D "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs = =3D "gcc", op =3D =3D=3D >> lhs =3D "clang", rhs =3D "gcc", op =3D =3D=3D >> . . . >> left =3D 0.000000, right =3D 6.000000, op =3D <=3D >> left =3D 0.000000, right =3D 3.000000, op =3D <=3D >> lhs =3D "clang", rhs =3D "gcc", op =3D =3D=3D >> make[3]: "/usr/src/share/mk/bsd.sys.mk" line 81: warning: String = comparison operator should be either =3D=3D or !=3D >> lhs =3D "clang", rhs =3D "clang", op =3D =3D=3D >> left =3D 100001.000000, right =3D 70000.000000, op =3D >=3D >> lhs =3D "amd64", rhs =3D "arm", op =3D =3D=3D >> (Now I just need to figure out how to get back to a working context.) >=20 > For me, buildworld/buildkernel produced only warnings, But, looking at the code in bmake, the expression is also evaluated differently/incorrectly when it is classified as having the problem of having a incorrect operator. In other words: the behavior in make changes via misevaluated expressions. > though the one in ports is real issue: >=20 > $ make config > make: "/usr/ports/Mk/bsd.port.mk" line 2096: warning: String = comparison operator should be either =3D=3D or !=3D > make: "/usr/ports/Mk/bsd.port.mk" line 2096: Malformed conditional = (defined(MAKE_JOBS_NUMBER_LIMIT) && ( ${MAKE_JOBS_NUMBER_LIMIT} < = ${_MAKE_JOBS_NUMBER} )) > make: Fatal errors encountered -- cannot continue > make: stopped in /usr/ports/devel/subversion Not the only "real issue", I'm afraid. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Thu Jul 9 04:08:20 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4519035F53C; Thu, 9 Jul 2020 04:08:20 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2N2C4DMZz4TvS; Thu, 9 Jul 2020 04:08:19 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id A59085800B0; Thu, 9 Jul 2020 00:08:18 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 09 Jul 2020 00:08:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.dev; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=o S318L/pcAaZLnwGE0w6/DX5AzX0qKmUuAgCZ+Ho59Q=; b=bam2+s2HiyLYUGLHj Z05kYrTNaxuskaNLVTZwmqRJgGxu6t3Wkis6cieODn7UsnDO69rcGhAOVb3wu0xE fG6P8v9m5dZgRxNUbzmE9OHhWnQqfpJmrtSZ3QmCQhugtCa3P8+EVDM9mdVtjYG5 sHe7UjxnQ+eW4cYw2jpkOwybJzjMdxH27EiipVJCQAoCjkBb2CzpLUhJMgchbM3n awUIMEWqW/+eiot69BaYzkaPhhIN6vAG2q+IN9S/D6Zvnux4Z5yudA3OsVDBmSGU PMJ/SO1bc0+HgXNpwWujK/JJ92lQWWodxD3q1B++/e4hTglk0i9VTS9L98u0GrZa gQ/aw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=oS318L/pcAaZLnwGE0w6/DX5AzX0qKmUuAgCZ+Ho5 9Q=; b=HKke1khTqrBkg7aNEOp/zm/cR/itEJx4RqBZ5dFHek8ZsWPJFqJk88nn7 YPWqrPiL5rsWSs10CPY3BzDozMnbuxhzHYiit4NKYYbWpMRMfHTF81GxowaLy4+S /xcYe44zrWq34YnIXViWrl+n4/zXWVQfBJeBS9tXF8bkvokV+hXXXs0h07uuBvXI +J6l87VMYxvByNoPMhFuSxq4bJtqRT/HaVLpLDl0JeGNcST6n0tgVidK0wWsskRb xUzZQoX/ZexL/gV5DXnNLjuAf8Zz38GpzUf8K8QFCzp2KW39XdrsiI1weaZNfeSs AfDPgRJlNcY6SoWJVNpPTJtbABUXw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudekgdekfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpegjuhhrihcu rfgrnhhkohhvuceohihurhhiphhvseihuhhrihhpvhdruggvvheqnecuggftrfgrthhtvg hrnhephfelveehgfeujeefhfeluddtiedttdeuffdvfeehjeeitddvudefkeehgfejiedu necuffhomhgrihhnpegtohhmphhilhgvrhdrmhhkpdhshihsrdhmkhdpphhorhhtrdhmkh enucfkphepledurddvgedtrdduvdegrddufeejnecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehmrghilhhfrhhomhephihurhhiphhvseihuhhrihhpvhdruggvvh X-ME-Proxy: Received: from [192.168.1.6] (unknown [91.240.124.137]) by mail.messagingengine.com (Postfix) with ESMTPA id 609A7328005A; Thu, 9 Jul 2020 00:08:17 -0400 (EDT) Subject: Re: svn commit: r363031 - in head: contrib/bmake contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake (make now broken) To: Mark Millard Cc: "sjg@freebsd.org" , svn-src-head@freebsd.org, FreeBSD Toolchain , FreeBSD Current References: <25afe2ff-e805-8415-ddd9-430cfa271e16@yuripv.dev> <8969386C-D964-4597-BE7E-6A2D215D801C@yahoo.com> From: Yuri Pankov Message-ID: Date: Thu, 9 Jul 2020 07:08:15 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <8969386C-D964-4597-BE7E-6A2D215D801C@yahoo.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4B2N2C4DMZz4TvS X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yuripv.dev header.s=fm1 header.b=bam2+s2H; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=HKke1khT; dmarc=none; spf=pass (mx1.freebsd.org: domain of yuripv@yuripv.dev designates 66.111.4.229 as permitted sender) smtp.mailfrom=yuripv@yuripv.dev X-Spamd-Result: default: False [1.66 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:66.111.4.229:c]; URIBL_RED(3.50)[yuripv.dev:dkim]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[yuripv.dev:+,messagingengine.com:+]; HAS_ANON_DOMAIN(0.10)[]; NEURAL_HAM_SHORT(-0.05)[-0.051]; FREEMAIL_TO(0.00)[yahoo.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[66.111.4.229:from]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.89)[-0.890]; R_DKIM_ALLOW(0.00)[yuripv.dev:s=fm1,messagingengine.com:s=fm3]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.90)[-0.897]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[yuripv.dev]; BAD_REP_POLICIES(0.10)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RWL_MAILSPIKE_VERYGOOD(0.00)[66.111.4.229:from] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 04:08:20 -0000 Mark Millard wrote: > > > On 2020-Jul-8, at 20:35, Yuri Pankov wrote: > >> Mark Millard wrote: >>> This seems to have broken doing buildworld buildkernel and >>> other things using make: >>> make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: String comparison operator should be either == or != >>> make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: String comparison operator should be either == or != >>> . . . >>> make[3]: "/usr/src/share/mk/bsd.sys.mk" line 100: warning: String comparison operator should be either == or != >>> . . . >>> make[3]: "/usr/src/share/mk/bsd.sys.mk" line 81: warning: String comparison operator should be either == or != >>> . . . >>> Using -d c shows the likes of: >>> . . . >>> lhs = "clang", rhs = "clang", op = == >>> lhs = "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs = "gcc", op = == >>> make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 197: warning: String comparison operator should be either == or != >>> lhs = "clang", rhs = "clang", op = == >>> lhs = "LD", rhs = "LD", op = == >>> . . . >>> left = 6.000000, right = 2.000000, op = <= >>> left = 6.000000, right = 1.000000, op = <= >>> lhs = "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs = "clang", op = == >>> make[3]: "/usr/src/share/mk/bsd.sys.mk" line 100: warning: String comparison operator should be either == or != >>> lhs = "${${:UCOMPILER_TYPE}__${${:U${_empty_var_}}_cc_hash}}", rhs = "gcc", op = == >>> lhs = "clang", rhs = "gcc", op = == >>> . . . >>> left = 0.000000, right = 6.000000, op = <= >>> left = 0.000000, right = 3.000000, op = <= >>> lhs = "clang", rhs = "gcc", op = == >>> make[3]: "/usr/src/share/mk/bsd.sys.mk" line 81: warning: String comparison operator should be either == or != >>> lhs = "clang", rhs = "clang", op = == >>> left = 100001.000000, right = 70000.000000, op = >= >>> lhs = "amd64", rhs = "arm", op = == >>> (Now I just need to figure out how to get back to a working context.) >> >> For me, buildworld/buildkernel produced only warnings, > > But, looking at the code in bmake, the expression is also > evaluated differently/incorrectly when it is classified as > having the problem of having a incorrect operator. In other > words: the behavior in make changes via misevaluated > expressions. > > >> though the one in ports is real issue: >> >> $ make config >> make: "/usr/ports/Mk/bsd.port.mk" line 2096: warning: String comparison operator should be either == or != >> make: "/usr/ports/Mk/bsd.port.mk" line 2096: Malformed conditional (defined(MAKE_JOBS_NUMBER_LIMIT) && ( ${MAKE_JOBS_NUMBER_LIMIT} < ${_MAKE_JOBS_NUMBER} )) >> make: Fatal errors encountered -- cannot continue >> make: stopped in /usr/ports/devel/subversion > > Not the only "real issue", I'm afraid. Yeah, sorry, looks like I'm late to the party, and it was already discussed and reverted. From owner-svn-src-head@freebsd.org Thu Jul 9 08:00:47 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2FA67363AD1; Thu, 9 Jul 2020 08:00:47 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2TBR0SWbz4fjM; Thu, 9 Jul 2020 08:00:47 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E78AFDE4D; Thu, 9 Jul 2020 08:00:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06980kv3062062; Thu, 9 Jul 2020 08:00:46 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06980k1K062061; Thu, 9 Jul 2020 08:00:46 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202007090800.06980k1K062061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 9 Jul 2020 08:00:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363036 - head/sys/geom/concat X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sys/geom/concat X-SVN-Commit-Revision: 363036 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 08:00:47 -0000 Author: delphij Date: Thu Jul 9 08:00:46 2020 New Revision: 363036 URL: https://svnweb.freebsd.org/changeset/base/363036 Log: g_concat_find_device: trim /dev/ if it is present, like other GEOM classes. Reviewed by: cem MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25596 Modified: head/sys/geom/concat/g_concat.c Modified: head/sys/geom/concat/g_concat.c ============================================================================== --- head/sys/geom/concat/g_concat.c Thu Jul 9 03:46:07 2020 (r363035) +++ head/sys/geom/concat/g_concat.c Thu Jul 9 08:00:46 2020 (r363036) @@ -897,6 +897,9 @@ g_concat_find_device(struct g_class *mp, const char *n struct g_concat_softc *sc; struct g_geom *gp; + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); + LIST_FOREACH(gp, &mp->geom, geom) { sc = gp->softc; if (sc == NULL) From owner-svn-src-head@freebsd.org Thu Jul 9 10:14:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 29163366148; Thu, 9 Jul 2020 10:14:04 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2X8C3NvYz3Y8s; Thu, 9 Jul 2020 10:14:03 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 20C44260A0D; Thu, 9 Jul 2020 12:13:55 +0200 (CEST) Subject: Re: svn commit: r362962 - head/sys/net To: Mark Johnston , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202007061452.066EqAap025536@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <92dc039d-72a0-4b9d-d907-d7e310d09bc9@selasky.org> Date: Thu, 9 Jul 2020 12:13:33 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <202007061452.066EqAap025536@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4B2X8C3NvYz3Y8s X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-2.18 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; DMARC_NA(0.00)[selasky.org]; NEURAL_SPAM_SHORT(0.08)[0.085]; NEURAL_HAM_LONG(-1.03)[-1.026]; NEURAL_HAM_MEDIUM(-0.94)[-0.943]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 10:14:04 -0000 On 2020-07-06 16:52, Mark Johnston wrote: > Author: markj > Date: Mon Jul 6 14:52:09 2020 > New Revision: 362962 > URL: https://svnweb.freebsd.org/changeset/base/362962 > > Log: > iflib: Fix handling of mbuf cluster allocation failures. > > When refilling an rx freelist, make sure we only update the hardware > producer index if at least one cluster was allocated. Otherwise the > NIC is programmed to write a previously used cluster, typically > resulting in a use-after-free when packet data is written by the > hardware. > > Also make sure that we don't update the fragment index cursor if the > last allocation attempt didn't succeed. For at least Intel drivers, > iflib assumes that the consumer index and fragment index cursor stay in > lockstep, but this assumption was violated in the face of cluster > allocation failures. > Hi Mark, Thanks for working on this. I can confirm the issue Mellanox has seen in this area is solved by your patch. --HPS From owner-svn-src-head@freebsd.org Thu Jul 9 13:19:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7094936AD6F; Thu, 9 Jul 2020 13:19:01 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2cFd2Nv7z42NS; Thu, 9 Jul 2020 13:19:01 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 309C2119AB; Thu, 9 Jul 2020 13:19:01 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 069DJ154056652; Thu, 9 Jul 2020 13:19:01 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 069DJ1fv056651; Thu, 9 Jul 2020 13:19:01 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202007091319.069DJ1fv056651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Thu, 9 Jul 2020 13:19:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363042 - head/stand/libsa/zfs X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/libsa/zfs X-SVN-Commit-Revision: 363042 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 13:19:01 -0000 Author: tsoome Date: Thu Jul 9 13:19:00 2020 New Revision: 363042 URL: https://svnweb.freebsd.org/changeset/base/363042 Log: loader: setting vdev size based on label asize is not working Because we need to read asize from vdev_tree. We also need to consider different vdev type difference. Reviewed by: allanjude Sponsored by: Netflix, Klara Inc. Differential Revision: https://reviews.freebsd.org/D25586 Modified: head/stand/libsa/zfs/zfsimpl.c Modified: head/stand/libsa/zfs/zfsimpl.c ============================================================================== --- head/stand/libsa/zfs/zfsimpl.c Thu Jul 9 11:06:29 2020 (r363041) +++ head/stand/libsa/zfs/zfsimpl.c Thu Jul 9 13:19:00 2020 (r363042) @@ -1586,6 +1586,57 @@ vdev_label_read(vdev_t *vd, int l, void *buf, uint64_t return (vdev_read_phys(vd, &bp, buf, off, size)); } +static uint64_t +vdev_get_label_asize(nvlist_t *nvl) +{ + nvlist_t *vdevs; + uint64_t asize; + const char *type; + int len; + + asize = 0; + /* Get vdev tree */ + if (nvlist_find(nvl, ZPOOL_CONFIG_VDEV_TREE, DATA_TYPE_NVLIST, + NULL, &vdevs, NULL) != 0) + return (asize); + + /* + * Get vdev type. We will calculate asize for raidz, mirror and disk. + * For raidz, the asize is raw size of all children. + */ + if (nvlist_find(vdevs, ZPOOL_CONFIG_TYPE, DATA_TYPE_STRING, + NULL, &type, &len) != 0) + goto done; + + if (memcmp(type, VDEV_TYPE_MIRROR, len) != 0 && + memcmp(type, VDEV_TYPE_DISK, len) != 0 && + memcmp(type, VDEV_TYPE_RAIDZ, len) != 0) + goto done; + + if (nvlist_find(vdevs, ZPOOL_CONFIG_ASIZE, DATA_TYPE_UINT64, + NULL, &asize, NULL) != 0) + goto done; + + if (memcmp(type, VDEV_TYPE_RAIDZ, len) == 0) { + nvlist_t *kids; + int nkids; + + if (nvlist_find(vdevs, ZPOOL_CONFIG_CHILDREN, + DATA_TYPE_NVLIST_ARRAY, &nkids, &kids, NULL) != 0) { + asize = 0; + goto done; + } + + asize /= nkids; + nvlist_destroy(kids); + } + + asize += VDEV_LABEL_START_SIZE + VDEV_LABEL_END_SIZE; +done: + nvlist_destroy(vdevs); + return (asize); +} + static nvlist_t * vdev_label_read_config(vdev_t *vd, uint64_t txg) { @@ -1631,10 +1682,9 @@ vdev_label_read_config(vdev_t *vd, uint64_t txg) * Use asize from pool config. We need this * because we can get bad value from BIOS. */ - if (nvlist_find(nvl, ZPOOL_CONFIG_ASIZE, - DATA_TYPE_UINT64, NULL, &asize, NULL) == 0) { - vd->v_psize = asize + - VDEV_LABEL_START_SIZE + VDEV_LABEL_END_SIZE; + asize = vdev_get_label_asize(nvl); + if (asize != 0) { + vd->v_psize = asize; } } nvlist_destroy(tmp); From owner-svn-src-head@freebsd.org Thu Jul 9 16:18:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A95A36F393; Thu, 9 Jul 2020 16:18:43 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2hDy6sBBz4F70; Thu, 9 Jul 2020 16:18:42 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CEA6013E1D; Thu, 9 Jul 2020 16:18:42 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 069GIgOA067997; Thu, 9 Jul 2020 16:18:42 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 069GIg8o067996; Thu, 9 Jul 2020 16:18:42 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007091618.069GIg8o067996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 9 Jul 2020 16:18:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363046 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 363046 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 16:18:43 -0000 Author: tuexen Date: Thu Jul 9 16:18:42 2020 New Revision: 363046 URL: https://svnweb.freebsd.org/changeset/base/363046 Log: Optimize flushing of receive queues. This addresses an issue found and reported for the userland stack in https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=21243 MFC after: 1 week Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Thu Jul 9 14:42:41 2020 (r363045) +++ head/sys/netinet/sctp_indata.c Thu Jul 9 16:18:42 2020 (r363046) @@ -5411,11 +5411,9 @@ sctp_kick_prsctp_reorder_queue(struct sctp_tcb *stcb, static void sctp_flush_reassm_for_str_seq(struct sctp_tcb *stcb, - struct sctp_association *asoc, - uint16_t stream, uint32_t mid, int ordered, uint32_t cumtsn) + struct sctp_association *asoc, struct sctp_stream_in *strm, + struct sctp_queued_to_read *control, int ordered, uint32_t cumtsn) { - struct sctp_queued_to_read *control; - struct sctp_stream_in *strm; struct sctp_tmit_chunk *chk, *nchk; int cnt_removed = 0; @@ -5427,12 +5425,6 @@ sctp_flush_reassm_for_str_seq(struct sctp_tcb *stcb, * it can be delivered... But for now we just dump everything on the * queue. */ - strm = &asoc->strmin[stream]; - control = sctp_find_reasm_entry(strm, mid, ordered, asoc->idata_supported); - if (control == NULL) { - /* Not found */ - return; - } if (!asoc->idata_supported && !ordered && SCTP_TSN_GT(control->fsn_included, cumtsn)) { return; } @@ -5609,7 +5601,10 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb, /* Flush all the un-ordered data based on cum-tsn */ SCTP_INP_READ_LOCK(stcb->sctp_ep); for (sid = 0; sid < asoc->streamincnt; sid++) { - sctp_flush_reassm_for_str_seq(stcb, asoc, sid, 0, 0, new_cum_tsn); + strm = &asoc->strmin[sid]; + if (!TAILQ_EMPTY(&strm->uno_inqueue)) { + sctp_flush_reassm_for_str_seq(stcb, asoc, strm, TAILQ_FIRST(&strm->uno_inqueue), 0, new_cum_tsn); + } } SCTP_INP_READ_UNLOCK(stcb->sctp_ep); } @@ -5621,7 +5616,7 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb, if (m && fwd_sz) { /* New method. */ unsigned int num_str; - uint32_t mid, cur_mid; + uint32_t mid; uint16_t sid; uint16_t ordered, flags; struct sctp_strseq *stseq, strseqbuf; @@ -5688,8 +5683,24 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb, asoc->fragmented_delivery_inprogress = 0; } strm = &asoc->strmin[sid]; - for (cur_mid = strm->last_mid_delivered; SCTP_MID_GE(asoc->idata_supported, mid, cur_mid); cur_mid++) { - sctp_flush_reassm_for_str_seq(stcb, asoc, sid, cur_mid, ordered, new_cum_tsn); + if (ordered) { + TAILQ_FOREACH(control, &strm->inqueue, next_instrm) { + if (SCTP_MID_GE(asoc->idata_supported, mid, control->mid)) { + sctp_flush_reassm_for_str_seq(stcb, asoc, strm, control, ordered, new_cum_tsn); + } + } + } else { + if (asoc->idata_supported) { + TAILQ_FOREACH(control, &strm->uno_inqueue, next_instrm) { + if (SCTP_MID_GE(asoc->idata_supported, mid, control->mid)) { + sctp_flush_reassm_for_str_seq(stcb, asoc, strm, control, ordered, new_cum_tsn); + } + } + } else { + if (!TAILQ_EMPTY(&strm->uno_inqueue)) { + sctp_flush_reassm_for_str_seq(stcb, asoc, strm, TAILQ_FIRST(&strm->uno_inqueue), ordered, new_cum_tsn); + } + } } TAILQ_FOREACH(control, &stcb->sctp_ep->read_queue, next) { if ((control->sinfo_stream == sid) && From owner-svn-src-head@freebsd.org Thu Jul 9 16:28:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0D3A036F2CC; Thu, 9 Jul 2020 16:28:15 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2hRy6S8Xz4FjL; Thu, 9 Jul 2020 16:28:14 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C0DD51377E; Thu, 9 Jul 2020 16:28:14 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 069GSEkf074380; Thu, 9 Jul 2020 16:28:14 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 069GSDBv074375; Thu, 9 Jul 2020 16:28:13 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202007091628.069GSDBv074375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 9 Jul 2020 16:28:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363047 - in head/sys: arm/broadcom/bcm2835 conf X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys: arm/broadcom/bcm2835 conf X-SVN-Commit-Revision: 363047 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 16:28:15 -0000 Author: andrew Date: Thu Jul 9 16:28:13 2020 New Revision: 363047 URL: https://svnweb.freebsd.org/changeset/base/363047 Log: Add a driver to talk to the Raspberry Pi firmware Communicating with the Raspberry Pi firmware is currently handled by each driver calling into the mbox driver, however the device tree is structured such that they should be calling into a firmware driver. Add a driver for this node with an interface to communicate to the firmware via the mbox interface. There is a sysctl to get the firmware revision. This is a unix date so can be parsed with: root@generic:~ # date -j -f '%s' sysctl -n dev.bcm2835_firmware.0.revision Tue Nov 19 16:40:28 UTC 2019 Reviewed by: manu Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D25572 Added: head/sys/arm/broadcom/bcm2835/bcm2835_firmware.c (contents, props changed) head/sys/arm/broadcom/bcm2835/bcm2835_firmware.h (contents, props changed) Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h head/sys/arm/broadcom/bcm2835/files.bcm283x head/sys/conf/files.arm64 Added: head/sys/arm/broadcom/bcm2835/bcm2835_firmware.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/broadcom/bcm2835/bcm2835_firmware.c Thu Jul 9 16:28:13 2020 (r363047) @@ -0,0 +1,181 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2020 Andrew Turner + * + * This work was supported by Innovate UK project 105694, "Digital Security + * by Design (DSbD) Technology Platform Prototype". + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +struct bcm2835_firmware_softc { + device_t sc_dev; + phandle_t sc_mbox; +}; + +static struct ofw_compat_data compat_data[] = { + {"raspberrypi,bcm2835-firmware", 1}, + {NULL, 0} +}; + +static int sysctl_bcm2835_firmware_get_revision(SYSCTL_HANDLER_ARGS); + +static int +bcm2835_firmware_probe(device_t dev) +{ + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "BCM2835 Firmware"); + return (BUS_PROBE_DEFAULT); +} + +static int +bcm2835_firmware_attach(device_t dev) +{ + struct bcm2835_firmware_softc *sc; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree_node; + struct sysctl_oid_list *tree; + phandle_t node, mbox; + int rv; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + + node = ofw_bus_get_node(dev); + rv = OF_getencprop(node, "mboxes", &mbox, sizeof(mbox)); + if (rv <= 0) { + device_printf(dev, "can't read mboxes property\n"); + return (ENXIO); + } + sc->sc_mbox = mbox; + + OF_device_register_xref(OF_xref_from_node(node), dev); + + ctx = device_get_sysctl_ctx(sc->sc_dev); + tree_node = device_get_sysctl_tree(sc->sc_dev); + tree = SYSCTL_CHILDREN(tree_node); + SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "revision", + CTLTYPE_UINT | CTLFLAG_RD, sc, sizeof(*sc), + sysctl_bcm2835_firmware_get_revision, "IU", + "Firmware revision"); + return (0); +} + +int +bcm2835_firmware_property(device_t dev, uint32_t prop, void *data, size_t len) +{ + struct { + struct bcm2835_mbox_hdr hdr; + struct bcm2835_mbox_tag_hdr tag_hdr; + uint32_t data[]; + } *msg_hdr; + size_t msg_len; + int err; + + /* + * The message is processed in 32-bit chunks so must be a multiple + * of 32-bits. + */ + if ((len & (sizeof(uint32_t) - 1)) != 0) + return (EINVAL); + + msg_len = sizeof(*msg_hdr) + len + sizeof(uint32_t); + msg_hdr = malloc(sizeof(*msg_hdr) + msg_len + sizeof(uint32_t), + M_DEVBUF, M_WAITOK | M_ZERO); + + msg_hdr->hdr.buf_size = msg_len; + msg_hdr->hdr.code = BCM2835_MBOX_CODE_REQ; + msg_hdr->tag_hdr.tag = prop; + msg_hdr->tag_hdr.val_buf_size = len; + memcpy(msg_hdr->data, data, len); + msg_hdr->data[len / sizeof(uint32_t)] = 0; + + err = bcm2835_mbox_property(msg_hdr, msg_len); + if (err == 0) { + memcpy(data, msg_hdr->data, len); + } + + free(msg_hdr, M_DEVBUF); + + return (err); +} + +static int +sysctl_bcm2835_firmware_get_revision(SYSCTL_HANDLER_ARGS) +{ + struct bcm2835_firmware_softc *sc = arg1; + uint32_t rev; + int err; + + if (bcm2835_firmware_property(sc->sc_dev, + BCM2835_MBOX_TAG_FIRMWARE_REVISION, &rev, sizeof(rev)) != 0) + return (ENXIO); + + err = sysctl_handle_int(oidp, &rev, sizeof(rev), req); + if (err || !req->newptr) /* error || read request */ + return (err); + + /* write request */ + return (EINVAL); +} + +static device_method_t bcm2835_firmware_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, bcm2835_firmware_probe), + DEVMETHOD(device_attach, bcm2835_firmware_attach), + + DEVMETHOD_END +}; + +static devclass_t bcm2835_firmware_devclass; +static driver_t bcm2835_firmware_driver = { + "bcm2835_firmware", + bcm2835_firmware_methods, + sizeof(struct bcm2835_firmware_softc), +}; + +DRIVER_MODULE(bcm2835_firmware, simplebus, bcm2835_firmware_driver, + bcm2835_firmware_devclass, 0, 0); Added: head/sys/arm/broadcom/bcm2835/bcm2835_firmware.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/broadcom/bcm2835/bcm2835_firmware.h Thu Jul 9 16:28:13 2020 (r363047) @@ -0,0 +1,38 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2020 Andrew Turner + * + * This work was supported by Innovate UK project 105694, "Digital Security + * by Design (DSbD) Technology Platform Prototype". + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _BCM2835_FIRMWARE_H_ +#define _BCM2835_FIRMWARE_H_ + +int bcm2835_firmware_property(device_t, uint32_t, void *, size_t); + +#endif Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h Thu Jul 9 16:18:42 2020 (r363046) +++ head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h Thu Jul 9 16:28:13 2020 (r363047) @@ -58,6 +58,10 @@ struct bcm2835_mbox_tag_hdr { (tag_)->tag_hdr.val_len = sizeof((tag_)->body.req); \ } while (0) +#define BCM2835_MBOX_TAG_FIRMWARE_REVISION 0x00000001 + + + #define BCM2835_MBOX_POWER_ID_EMMC 0x00000000 #define BCM2835_MBOX_POWER_ID_UART0 0x00000001 #define BCM2835_MBOX_POWER_ID_UART1 0x00000002 Modified: head/sys/arm/broadcom/bcm2835/files.bcm283x ============================================================================== --- head/sys/arm/broadcom/bcm2835/files.bcm283x Thu Jul 9 16:18:42 2020 (r363046) +++ head/sys/arm/broadcom/bcm2835/files.bcm283x Thu Jul 9 16:28:13 2020 (r363047) @@ -5,6 +5,7 @@ arm/broadcom/bcm2835/bcm2835_cpufreq.c standard arm/broadcom/bcm2835/bcm2835_dma.c standard arm/broadcom/bcm2835/bcm2835_fb.c optional sc arm/broadcom/bcm2835/bcm2835_fbd.c optional vt +arm/broadcom/bcm2835/bcm2835_firmware.c standard arm/broadcom/bcm2835/bcm2835_ft5406.c optional evdev bcm2835_ft5406 arm/broadcom/bcm2835/bcm2835_gpio.c optional gpio arm/broadcom/bcm2835/bcm2835_intr.c standard Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Thu Jul 9 16:18:42 2020 (r363046) +++ head/sys/conf/files.arm64 Thu Jul 9 16:28:13 2020 (r363047) @@ -92,6 +92,7 @@ arm/broadcom/bcm2835/bcm2835_clkman.c optional soc_br arm/broadcom/bcm2835/bcm2835_cpufreq.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt arm/broadcom/bcm2835/bcm2835_dma.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt arm/broadcom/bcm2835/bcm2835_fbd.c optional vt soc_brcm_bcm2837 fdt | vt soc_brcm_bcm2838 fdt +arm/broadcom/bcm2835/bcm2835_firmware.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt arm/broadcom/bcm2835/bcm2835_ft5406.c optional evdev bcm2835_ft5406 fdt arm/broadcom/bcm2835/bcm2835_gpio.c optional gpio soc_brcm_bcm2837 fdt | gpio soc_brcm_bcm2838 fdt arm/broadcom/bcm2835/bcm2835_intr.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt From owner-svn-src-head@freebsd.org Thu Jul 9 16:50:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C40CC36F96F; Thu, 9 Jul 2020 16:50:03 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0b-00273201.pphosted.com (mx0b-00273201.pphosted.com [67.231.152.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2hx66hdyz4Gns; Thu, 9 Jul 2020 16:50:02 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from pps.filterd (m0108160.ppops.net [127.0.0.1]) by mx0b-00273201.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 069G8B18026423; Thu, 9 Jul 2020 09:16:43 -0700 Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2170.outbound.protection.outlook.com [104.47.55.170]) by mx0b-00273201.pphosted.com with ESMTP id 325k2y9vsv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 09 Jul 2020 09:16:43 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=baOOlYrxkCmzX0WpfwGRJvSH2jPj4+/p+Vv7Ptapx5VABSdzSLuKMhGoT4u7Q5+YnH7w+AM9Tca0vTKkVz0CQEqbExYX1nUtSQ+OCYhufnsCJkYBOzrXbUUvILvb6SLXviKg9YgsJOhlhK3pux/hXOZvo7fYUTdvUQhFJa9vKsZHqJuYnipNr+TNt1osNDJDUQLuwSdeD2x5Aoxa56n/6JQcTNO0NNOe8bnX55Y+JgdM/mz31C1aLRM9ON1+UjT5MEWO10K48GeOk8HWGGbW7gAbUj0FdIBiFrDJBy0kjgmqLGd0HrEZyW6wjWNjxWrpd2veA69Obf2xKC406TPsTw== 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=QpBQR+xQo+0+c6wEbVTPN6URV2k8MONYJ2yinV0j44M=; b=SAZvk8O0m2Syq8NT5Z2oAZ8II+CsaFuX6DhtPj4r/R0kAyWZNGk0E0x7CmJyK+PlFHyYRshxKgfCM8Q0UdXD4SO3RuYcWIFvFBSC50GlhfUtfdf1CcTM9dyicM3exJVgL1FKZX7ooSxxfkKVhjZ17C/C/f51tgcS5Iu4MRemktKXzhxG2QzgrMdw50REMf3OkhzbeEktXBT+Z6S4zoLocWe/UlUL3mhPExbLAoKzH2jaUuLJrkWEU9VfrPKQ8VvCyykig0zZNPp9GehbpzCHQNXhLNTuZbEaTzZJSN5qm8plssTpjW4H7DAWlAQWn/m62EILgixDMKjvqKKY8ZaMmA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.13) smtp.rcpttodomain=freebsd.org smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none Received: from MWHPR21CA0055.namprd21.prod.outlook.com (2603:10b6:300:db::17) by CY4PR05MB3064.namprd05.prod.outlook.com (2603:10b6:903:fe::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.13; Thu, 9 Jul 2020 16:16:41 +0000 Received: from CO1NAM05FT028.eop-nam05.prod.protection.outlook.com (2603:10b6:300:db:cafe::2b) by MWHPR21CA0055.outlook.office365.com (2603:10b6:300:db::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.4 via Frontend Transport; Thu, 9 Jul 2020 16:16:41 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.239.13) smtp.mailfrom=juniper.net; FreeBSD.org; dkim=none (message not signed) header.d=none;FreeBSD.org; dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.13 as permitted sender) Received: from P-EXFEND-EQX-02.jnpr.net (66.129.239.13) by CO1NAM05FT028.mail.protection.outlook.com (10.152.96.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.3195.9 via Frontend Transport; Thu, 9 Jul 2020 16:16:40 +0000 Received: from P-EXBEND-EQX-02.jnpr.net (10.104.8.53) by P-EXFEND-EQX-02.jnpr.net (10.104.8.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 9 Jul 2020 09:16:39 -0700 Received: from P-EXBEND-EQX-01.jnpr.net (10.104.8.52) by P-EXBEND-EQX-02.jnpr.net (10.104.8.53) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 9 Jul 2020 09:16:39 -0700 Received: from p-mailhub01.juniper.net (10.104.20.6) by P-EXBEND-EQX-01.jnpr.net (10.104.8.52) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Thu, 9 Jul 2020 09:16:39 -0700 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.255.254]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 069GGcCD010220; Thu, 9 Jul 2020 09:16:39 -0700 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id D5EDB6E5F5; Thu, 9 Jul 2020 09:16:38 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id D44226E5F4; Thu, 9 Jul 2020 09:16:38 -0700 (PDT) To: Cy Schubert CC: , , , Subject: Re: svn commit: r363031 - in head: contrib/bmake contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake In-Reply-To: <202007090402.06942mVr015813@slippy.cwsent.com> References: <202007082120.068LKCeN067904@repo.freebsd.org> <202007090328.0693SNo4028242@slippy.cwsent.com> <45359.1594266432@kaos.jnpr.net> <202007090402.06942mVr015813@slippy.cwsent.com> Comments: In-reply-to: Cy Schubert message dated "Wed, 08 Jul 2020 21:02:45 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 26.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22100.1594311398.1@kaos.jnpr.net> Date: Thu, 9 Jul 2020 09:16:38 -0700 Message-ID: <26265.1594311398@kaos.jnpr.net> X-EXCLAIMER-MD-CONFIG: e3cb0ff2-54e7-4646-8a04-0dae4ac7b136 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:66.129.239.13; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:P-EXFEND-EQX-02.jnpr.net; PTR:InfoDomainNonexistent; CAT:NONE; SFTY:; SFS:(4636009)(136003)(376002)(346002)(396003)(39860400002)(46966005)(82740400003)(8676002)(7696005)(55016002)(8936002)(107886003)(86362001)(83380400001)(4326008)(26005)(5660300002)(6266002)(6916009)(356005)(336012)(81166007)(82310400002)(7126003)(54906003)(316002)(47076004)(478600001)(2906002)(9686003)(70586007)(70206006)(186003); DIR:OUT; SFP:1102; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e0c3f14d-db3e-41e0-3b23-08d824237681 X-MS-TrafficTypeDiagnostic: CY4PR05MB3064: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bUJIDcuy33ZcBn+KWdvobMt6Ydp7yzEa9qpya6vcaCVZoTK9rYrkEZkyGDBKAdWyTPwqF3oovb8B5ZifDZVi9mFCpHTUheW709X34T30Bb9CkPDTzIY0V+FPrL8PgG93lFuBJEP1RfHh2cTLnrM68mVSIvfkSVn9420OlUUUhG0NxOsDoaW3MkTtZH0a9akL81FBMdVDZqG0PbVfPVCPmJG9HgJuXIOJitZyKEvY3Zt23wdW1UkvzUYDHWi+fNPuN77JDTYZSKcZuIc80B1DOFAlvSHWuv4wVnL+C8ATvH0XPv/dgx8wJYgu8iXqVG3q3z2CIav409+lDo3IPNFggRDQH7hxHh9TDF9Y5vombtJhlFK3x4DvSQeAE5/UljLvkYtdw/vkyJ+7uNZpJFnxZw== X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2020 16:16:40.2621 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e0c3f14d-db3e-41e0-3b23-08d824237681 X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.13]; Helo=[P-EXFEND-EQX-02.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM05FT028.eop-nam05.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR05MB3064 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-09_08:2020-07-09, 2020-07-09 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=5 bulkscore=0 impostorscore=0 suspectscore=0 adultscore=0 spamscore=5 mlxlogscore=127 clxscore=1015 priorityscore=1501 phishscore=0 mlxscore=5 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007090116 X-Rspamd-Queue-Id: 4B2hx66hdyz4Gns X-Spamd-Bar: ----- X-Spamd-Result: default: False [-5.45 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.005]; R_DKIM_ALLOW(-0.20)[juniper.net:s=PPS1017,juniper.net:s=selector1]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:67.231.152.164]; NEURAL_HAM_LONG(-0.98)[-0.983]; MIME_GOOD(-0.10)[text/plain]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[juniper.net:+]; DMARC_POLICY_ALLOW(-0.50)[juniper.net,reject]; NEURAL_HAM_SHORT(-1.36)[-1.363]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22843, ipnet:67.231.152.0/24, country:US]; RCVD_COUNT_SEVEN(0.00)[11]; RCVD_IN_DNSWL_LOW(-0.10)[67.231.152.164:from] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 16:50:03 -0000 Cy Schubert wrote: > [External Email. Be cautious of content] > > > In message <45359.1594266432@kaos.jnpr.net>, "Simon J. Gerraty" writes: > > Cy Schubert wrote: > > > This broke ports. > > > > I've reverted the change. > > > > Let me know if you still see issue. > > As I said in my email, all I did was revert cond.c, and that fixed it. You > don't need to revert the whole patch. Just revert cond.c and let NetBSD > know. Ah I missed that bit - rats. I think I've a fix for cond.c, but unfortunately I'm so far unable to construct a unit-test that triggers the problem. Even with bsd.compiler.mk I was unable to get it to fail in debugger, so added an abort and looked at the core file. The problem is in something like: .if 1 || ${something-complicated} > 0 the ${something-complicated} isn't resolved because we do not need to evaluate anything after '1', but the comparator check is still applied. Fix should be simple, but in unit-tests the above does not trigger the problem ;-) From owner-svn-src-head@freebsd.org Thu Jul 9 17:26:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0E45B350CF7; Thu, 9 Jul 2020 17:26:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2jlY6T8pz4KTk; Thu, 9 Jul 2020 17:26:49 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD0FE143EC; Thu, 9 Jul 2020 17:26:49 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 069HQnLo011192; Thu, 9 Jul 2020 17:26:49 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 069HQnWU011190; Thu, 9 Jul 2020 17:26:49 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007091726.069HQnWU011190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 9 Jul 2020 17:26:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363051 - in head: lib/libc/sys sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head: lib/libc/sys sys/kern X-SVN-Commit-Revision: 363051 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 17:26:50 -0000 Author: markj Date: Thu Jul 9 17:26:49 2020 New Revision: 363051 URL: https://svnweb.freebsd.org/changeset/base/363051 Log: Avoid copying out kernel pointers from msgctl(IPC_STAT). While this behaviour is harmless, it is really just an artifact of the fact that the msgctl(2) implementation uses a user-visible structure as part of the internal implementation, so it is not deliberate and these pointers are not useful to userspace. Thus, NULL them out before copying out, and remove references to them from the manual page. Reported by: Jeffball Reviewed by: emaste, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25600 Modified: head/lib/libc/sys/msgctl.2 head/sys/kern/sysv_msg.c Modified: head/lib/libc/sys/msgctl.2 ============================================================================== --- head/lib/libc/sys/msgctl.2 Thu Jul 9 17:12:22 2020 (r363050) +++ head/lib/libc/sys/msgctl.2 Thu Jul 9 17:26:49 2020 (r363051) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\"/ -.Dd July 9, 2009 +.Dd July 9, 2020 .Dt MSGCTL 2 .Os .Sh NAME @@ -63,8 +63,6 @@ and contains (amongst others) the following members: .Bd -literal struct msqid_ds { struct ipc_perm msg_perm; /* msg queue permission bits */ - struct msg *__msg_first; /* kernel data, don't use */ - struct msg *__msg_last; /* kernel data, don't use */ msglen_t msg_cbytes; /* number of bytes in use on the queue */ msgqnum_t msg_qnum; /* number of msgs in the queue */ msglen_t msg_qbytes; /* max # of bytes on the queue */ Modified: head/sys/kern/sysv_msg.c ============================================================================== --- head/sys/kern/sysv_msg.c Thu Jul 9 17:12:22 2020 (r363050) +++ head/sys/kern/sysv_msg.c Thu Jul 9 17:26:49 2020 (r363051) @@ -613,6 +613,13 @@ kern_msgctl(struct thread *td, int msqid, int cmd, str *msqbuf = msqkptr->u; if (td->td_ucred->cr_prison != msqkptr->cred->cr_prison) msqbuf->msg_perm.key = IPC_PRIVATE; + + /* + * Try to hide the fact that the structure layout is shared by + * both the kernel and userland. These pointers are not useful + * to userspace. + */ + msqbuf->__msg_first = msqbuf->__msg_last = NULL; break; default: From owner-svn-src-head@freebsd.org Thu Jul 9 17:27:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D936135077A; Thu, 9 Jul 2020 17:27:14 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2jm25S05z4KbQ; Thu, 9 Jul 2020 17:27:14 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E15714AB4; Thu, 9 Jul 2020 17:27:14 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 069HREnn011261; Thu, 9 Jul 2020 17:27:14 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 069HREhk011260; Thu, 9 Jul 2020 17:27:14 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007091727.069HREhk011260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 9 Jul 2020 17:27:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363052 - head/usr.bin/whois X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/usr.bin/whois X-SVN-Commit-Revision: 363052 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 17:27:14 -0000 Author: markj Date: Thu Jul 9 17:27:14 2020 New Revision: 363052 URL: https://svnweb.freebsd.org/changeset/base/363052 Log: whois: Handle referrals to rwhois servers. PR: 243862 Submitted by: ben@desync.com Differential Revision: https://reviews.freebsd.org/D25156 Modified: head/usr.bin/whois/whois.c Modified: head/usr.bin/whois/whois.c ============================================================================== --- head/usr.bin/whois/whois.c Thu Jul 9 17:26:49 2020 (r363051) +++ head/usr.bin/whois/whois.c Thu Jul 9 17:27:14 2020 (r363052) @@ -117,6 +117,7 @@ static struct { WHOIS_REFERRAL("Whois Server:"), WHOIS_REFERRAL("Registrar WHOIS Server:"), /* corporatedomains.com */ WHOIS_REFERRAL("ReferralServer: whois://"), /* ARIN */ + WHOIS_REFERRAL("ReferralServer: rwhois://"), /* ARIN */ WHOIS_REFERRAL("descr: region. Please query"), /* AfriNIC */ { NULL, 0 } }; @@ -156,10 +157,10 @@ reset_rir(void) { static const char *port = DEFAULT_PORT; static const char *choose_server(char *); -static struct addrinfo *gethostinfo(char const *host, int exitnoname); +static struct addrinfo *gethostinfo(const char *, const char *, int); static void s_asprintf(char **ret, const char *format, ...) __printflike(2, 3); static void usage(void); -static void whois(const char *, const char *, int); +static void whois(const char *, const char *, const char *, int); int main(int argc, char *argv[]) @@ -255,11 +256,11 @@ main(int argc, char *argv[]) if (country != NULL) { char *qnichost; s_asprintf(&qnichost, "%s%s", country, QNICHOST_TAIL); - whois(*argv, qnichost, flags); + whois(*argv, qnichost, port, flags); free(qnichost); } else whois(*argv, host != NULL ? host : - choose_server(*argv), flags); + choose_server(*argv), port, flags); reset_rir(); argv++; } @@ -283,7 +284,7 @@ choose_server(char *domain) } static struct addrinfo * -gethostinfo(char const *host, int exit_on_noname) +gethostinfo(const char *host, const char *hport, int exit_on_noname) { struct addrinfo hints, *res; int error; @@ -293,7 +294,7 @@ gethostinfo(char const *host, int exit_on_noname) hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; res = NULL; - error = getaddrinfo(host, port, &hints, &res); + error = getaddrinfo(host, hport, &hints, &res); if (error && (exit_on_noname || error != EAI_NONAME)) err(EX_NOHOST, "%s: %s", host, gai_strerror(error)); return (res); @@ -444,15 +445,15 @@ done: } static void -whois(const char *query, const char *hostname, int flags) +whois(const char *query, const char *hostname, const char *hostport, int flags) { FILE *fp; struct addrinfo *hostres; - char *buf, *host, *nhost, *p; + char *buf, *host, *nhost, *nport, *p; int comment, s, f; size_t len, i; - hostres = gethostinfo(hostname, 1); + hostres = gethostinfo(hostname, hostport, 1); s = connect_to_any_host(hostres); if (s == -1) err(EX_OSERR, "connect()"); @@ -532,14 +533,35 @@ whois(const char *query, const char *hostname, int fla SCAN(p, buf+len, *p == ' '); host = p; SCAN(p, buf+len, ishost(*p)); - if (p > host) + if (p > host) { + char *pstr; + s_asprintf(&nhost, "%.*s", (int)(p - host), host); + + if (*p != ':') { + s_asprintf(&nport, "%s", port); + break; + } + + pstr = ++p; + SCAN(p, buf+len, isdigit(*p)); + if (p > pstr && (p - pstr) < 6) { + s_asprintf(&nport, "%.*s", + (int)(p - pstr), pstr); + break; + } + + /* Invalid port; don't recurse */ + free(nhost); + nhost = NULL; + } break; } for (i = 0; actually_arin[i] != NULL; i++) { if (strncmp(buf, actually_arin[i], len) == 0) { s_asprintf(&nhost, "%s", ANICHOST); + s_asprintf(&nport, "%s", port); break; } } @@ -565,17 +587,19 @@ whois(const char *query, const char *hostname, int fla /* Do we need to find an alternative RIR? */ if (try_rir[i].loop != 0 && nhost != NULL && strcasecmp(try_rir[i].host, nhost) == 0) { - free(nhost); - nhost = NULL; - f = 1; + free(nhost); + nhost = NULL; + free(nport); + nport = NULL; + f = 1; } } if (f) { /* Find a replacement RIR */ for (i = 0; try_rir[i].host != NULL; i++) { if (try_rir[i].loop == 0) { - s_asprintf(&nhost, "%s", - try_rir[i].host); + s_asprintf(&nhost, "%s", try_rir[i].host); + s_asprintf(&nport, "%s", port); break; } } @@ -584,9 +608,10 @@ whois(const char *query, const char *hostname, int fla /* Ignore self-referrals */ if (strcasecmp(hostname, nhost) != 0) { printf("# %s\n\n", nhost); - whois(query, nhost, flags); + whois(query, nhost, nport, flags); } free(nhost); + free(nport); } } From owner-svn-src-head@freebsd.org Thu Jul 9 18:13:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D81CD3526A3; Thu, 9 Jul 2020 18:13:32 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0b-00273201.pphosted.com (mx0b-00273201.pphosted.com [67.231.152.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2knR5PNQz4Rnp; Thu, 9 Jul 2020 18:13:31 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from pps.filterd (m0108163.ppops.net [127.0.0.1]) by mx0b-00273201.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 069GcSgC010344; Thu, 9 Jul 2020 09:56:55 -0700 Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by mx0b-00273201.pphosted.com with ESMTP id 325k32sys0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 09 Jul 2020 09:56:55 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UhrUjeKZcluj3mdTqoUe2tQwUshO8ivMZsRnNzZYBAoOekLoaDMc2rP+XPngbouHKCDJqeziy6Qe27fz7uw9MW8r4CVjRxcvcXzUnTWzjIvJ5/v/pgFQndyq5hyVrlHvPIXxzT76Uo3CcjVwVp1+N12Zcz5qCTAwgMl5Spq5IsltMxtkYqudb2oFJg9sjn4evQDOpg/ZlUGp4kTb9ZWXQnbDjIrS8o8MmTG16dWFuJ0wqKMHacAxmrc7zCuDbZ5Yr+bklXRUHHeZTq+WTI0BqicpafbkB8ewlT9bcu9ViDWi64Dns+UI7tXj2C1cX4O71kj45+DyZaKXjHk8rNA33A== 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=yKBjpL3SeO2drTJPReNusJdnhq/8Kf4C62FBe/d1aRA=; b=UOPHJ2Yd1p0q47crwteJv18f0IJRfI/tas1irufkot3+Bs7ILcOUD32q6AjSixPEt/NHU826dtgoAEleLkBAizg4Xk0bFXP7TT2c+XqZfauWqtPsPUCBOFRP3eHkxH2s8wCFA5pFfmh47H9gTEHKWw8Q6jl1H5MISYE16fCX/vhFQxJxXxgNwYkaV6I5J2KOTqyG1XX69NCSc1eb3iOBiO/XoIl29gArGF8iuVS++itGEUavXL7RZYFrrReYtF+wjXS8LBOWgfV7pu2VgTnRXYRcCqphooeO02EsohQMzerONe3IRYEzM8ulKQjgdFqRahKyKAO/JbdNPYLfNh/e1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.12) smtp.rcpttodomain=freebsd.org smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none Received: from MWHPR12CA0056.namprd12.prod.outlook.com (2603:10b6:300:103::18) by BN7PR05MB4419.namprd05.prod.outlook.com (2603:10b6:406:f8::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.8; Thu, 9 Jul 2020 16:56:53 +0000 Received: from CO1NAM05FT007.eop-nam05.prod.protection.outlook.com (2603:10b6:300:103:cafe::bd) by MWHPR12CA0056.outlook.office365.com (2603:10b6:300:103::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20 via Frontend Transport; Thu, 9 Jul 2020 16:56:52 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.239.12) smtp.mailfrom=juniper.net; FreeBSD.org; dkim=none (message not signed) header.d=none;FreeBSD.org; dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.12 as permitted sender) Received: from P-EXFEND-EQX-01.jnpr.net (66.129.239.12) by CO1NAM05FT007.mail.protection.outlook.com (10.152.96.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.3195.9 via Frontend Transport; Thu, 9 Jul 2020 16:56:52 +0000 Received: from P-EXBEND-EQX-01.jnpr.net (10.104.8.52) by P-EXFEND-EQX-01.jnpr.net (10.104.8.54) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 9 Jul 2020 09:56:51 -0700 Received: from p-mailhub01.juniper.net (10.104.20.6) by P-EXBEND-EQX-01.jnpr.net (10.104.8.52) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Thu, 9 Jul 2020 09:56:51 -0700 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.255.254]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 069Guouq016721; Thu, 9 Jul 2020 09:56:50 -0700 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id 3FA696E66D; Thu, 9 Jul 2020 09:56:50 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id 3D3B26E66C; Thu, 9 Jul 2020 09:56:50 -0700 (PDT) To: Mark Millard CC: Yuri Pankov , , FreeBSD Toolchain , FreeBSD Current , Subject: Re: svn commit: r363031 - in head: contrib/bmake contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake (make now broken) In-Reply-To: <8969386C-D964-4597-BE7E-6A2D215D801C@yahoo.com> References: <25afe2ff-e805-8415-ddd9-430cfa271e16@yuripv.dev> <8969386C-D964-4597-BE7E-6A2D215D801C@yahoo.com> Comments: In-reply-to: Mark Millard message dated "Wed, 08 Jul 2020 21:07:01 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 26.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <66523.1594313810.1@kaos.jnpr.net> Content-Transfer-Encoding: quoted-printable Date: Thu, 9 Jul 2020 09:56:50 -0700 Message-ID: <68939.1594313810@kaos.jnpr.net> X-EXCLAIMER-MD-CONFIG: e3cb0ff2-54e7-4646-8a04-0dae4ac7b136 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:66.129.239.12; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:P-EXFEND-EQX-01.jnpr.net; PTR:InfoDomainNonexistent; CAT:NONE; SFTY:; SFS:(4636009)(346002)(396003)(136003)(39860400002)(376002)(46966005)(2906002)(7696005)(107886003)(4744005)(6266002)(316002)(8936002)(47076004)(54906003)(82740400003)(9686003)(8676002)(70206006)(86362001)(70586007)(55016002)(5660300002)(336012)(26005)(186003)(6916009)(4326008)(7126003)(478600001)(82310400002)(356005)(83380400001)(81166007); DIR:OUT; SFP:1102; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 960a3ec1-c3be-4963-7f02-08d824291412 X-MS-TrafficTypeDiagnostic: BN7PR05MB4419: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CGSH3UVTeq3gma4qcQXt1FHoVB4jRpkwFjHR5SDGEk/CPOAe8paGj3EPPv4Sa2IiGFpZmmgmb5qlJFVVcjJ1cTvSvBl3D9GQZTztsavksSTb7U9pTFF6moJesVI/svZReUkL3LbuZKZM5J0/voUF+Vfrapn6fFA5sTRoUdaa1mxhB5g6zRLDPUK/4v+iMerpqcXE7ReJaUdD2okNr3VljrxCA1oPFzB7jbCA7B50k7vuSu3VHumGcsYVYw+JNffCn2j9v5QSeBaSQDNG8OviSiUDFURdznkUG2fhrQjcObVE6Xm0wJi5dZHzcOeXVBS3DAfyDO07q/UrPjKM1jw+xA4jiXBEaf96WAaJQl8k8wtV8f1GvCL5WZb4tcqV325+A1qNRxMinNDyuXzkf3MCbw== X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2020 16:56:52.0981 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 960a3ec1-c3be-4963-7f02-08d824291412 X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.12]; Helo=[P-EXFEND-EQX-01.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM05FT007.eop-nam05.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR05MB4419 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-09_08:2020-07-09, 2020-07-09 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 lowpriorityscore=0 mlxlogscore=465 impostorscore=0 bulkscore=0 adultscore=0 priorityscore=1501 phishscore=0 suspectscore=0 malwarescore=0 spamscore=0 mlxscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007090120 X-Rspamd-Queue-Id: 4B2knR5PNQz4Rnp X-Spamd-Bar: +++ X-Spamd-Result: default: False [3.41 / 15.00]; GREYLIST(0.00)[pass,body]; RECEIVED_SPAMHAUS_XBL(5.00)[66.129.239.12:received]; R_DKIM_ALLOW(0.00)[juniper.net:s=PPS1017,juniper.net:s=selector1]; NEURAL_HAM_MEDIUM(-0.10)[-0.098]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:67.231.152.164]; NEURAL_HAM_LONG(-0.62)[-0.619]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_FIVE(0.00)[6]; BAD_REP_POLICIES(0.10)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[juniper.net:+]; DMARC_POLICY_ALLOW(0.00)[juniper.net,reject]; NEURAL_HAM_SHORT(-0.78)[-0.777]; FREEMAIL_TO(0.00)[yahoo.com]; RCVD_IN_DNSWL_LOW(-0.10)[67.231.152.164:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:22843, ipnet:67.231.152.0/24, country:US]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_SEVEN(0.00)[10]; ARC_ALLOW(0.00)[microsoft.com:s=arcselector9901:i=1] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 18:13:32 -0000 Mark Millard wrote: > > though the one in ports is real issue: > > > > $ make config > > make: "/usr/ports/Mk/bsd.port.mk" line 2096: warning: String compariso= n operator should be either =3D=3D or !=3D > > make: "/usr/ports/Mk/bsd.port.mk" line 2096: Malformed conditional (de= fined(MAKE_JOBS_NUMBER_LIMIT) && ( ${MAKE_JOBS_NUMBER_LIMIT} < ${_MAKE_JOB= S_NUMBER} )) The above should be equivalent to V42 =3D 42 .if defined(V69) && ( ${V69} < ${V42} ) .endif which in a unit-test works just fine. Same goes for the warnings in bsd.compiler.mk ;-( From owner-svn-src-head@freebsd.org Thu Jul 9 18:34:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 35C5F352C73; Thu, 9 Jul 2020 18:34:55 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2lG70S9cz4TDx; Thu, 9 Jul 2020 18:34:55 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E280D1584B; Thu, 9 Jul 2020 18:34:54 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 069IYsPf059804; Thu, 9 Jul 2020 18:34:54 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 069IYsmL059802; Thu, 9 Jul 2020 18:34:54 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007091834.069IYsmL059802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 9 Jul 2020 18:34:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363055 - in head: lib/libc/sys sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head: lib/libc/sys sys/kern X-SVN-Commit-Revision: 363055 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 18:34:55 -0000 Author: markj Date: Thu Jul 9 18:34:54 2020 New Revision: 363055 URL: https://svnweb.freebsd.org/changeset/base/363055 Log: Apply the logic from r363051 to semctl(2) and __sem_base field. Reported by: Jeffball MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25600 Modified: head/lib/libc/sys/semctl.2 head/sys/kern/sysv_sem.c Modified: head/lib/libc/sys/semctl.2 ============================================================================== --- head/lib/libc/sys/semctl.2 Thu Jul 9 17:43:25 2020 (r363054) +++ head/lib/libc/sys/semctl.2 Thu Jul 9 18:34:54 2020 (r363055) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 23, 2018 +.Dd July 9, 2020 .Dt SEMCTL 2 .Os .Sh NAME @@ -148,7 +148,6 @@ is defined as follows: .Bd -literal struct semid_ds { struct ipc_perm sem_perm; /* operation permission struct */ - struct sem *__sem_base; /* kernel data, don't use */ u_short sem_nsems; /* number of sems in set */ time_t sem_otime; /* last operation time */ time_t sem_ctime; /* last change time */ Modified: head/sys/kern/sysv_sem.c ============================================================================== --- head/sys/kern/sysv_sem.c Thu Jul 9 17:43:25 2020 (r363054) +++ head/sys/kern/sysv_sem.c Thu Jul 9 18:34:54 2020 (r363055) @@ -798,6 +798,13 @@ kern_semctl(struct thread *td, int semid, int semnum, bcopy(&semakptr->u, arg->buf, sizeof(struct semid_ds)); if (cred->cr_prison != semakptr->cred->cr_prison) arg->buf->sem_perm.key = IPC_PRIVATE; + + /* + * Try to hide the fact that the structure layout is shared by + * both the kernel and userland. This pointer is not useful to + * userspace. + */ + arg->buf->__sem_base = NULL; break; case GETNCNT: From owner-svn-src-head@freebsd.org Thu Jul 9 20:53:56 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5675356283; Thu, 9 Jul 2020 20:53:56 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2pLX583xz4cMV; Thu, 9 Jul 2020 20:53:56 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 93F7C171B1; Thu, 9 Jul 2020 20:53:56 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 069KruJj047188; Thu, 9 Jul 2020 20:53:56 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 069KruGl047187; Thu, 9 Jul 2020 20:53:56 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <202007092053.069KruGl047187@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Thu, 9 Jul 2020 20:53:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363057 - head/bin/sh X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: head/bin/sh X-SVN-Commit-Revision: 363057 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 20:53:56 -0000 Author: jilles Date: Thu Jul 9 20:53:56 2020 New Revision: 363057 URL: https://svnweb.freebsd.org/changeset/base/363057 Log: sh: Do not ignore INTOFF during a trap INTOFF postpones SIGINT processing and INTON enables it again. This is important so an interactive shell can return to the top level prompt when Ctrl+C is pressed. Given that INTON is automatically done when a builtin completes, the part where onsig() ignores suppressint when in_dotrap is true is both unnecessary and unsafe. If the trap is for some other signal than SIGINT, arbitrary code could have been interrupted. Historically, INTOFF remained in effect for longer. Reviewed by: bdrewery MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25270 Modified: head/bin/sh/trap.c Modified: head/bin/sh/trap.c ============================================================================== --- head/bin/sh/trap.c Thu Jul 9 19:11:57 2020 (r363056) +++ head/bin/sh/trap.c Thu Jul 9 20:53:56 2020 (r363057) @@ -382,12 +382,7 @@ onsig(int signo) { if (signo == SIGINT && trap[SIGINT] == NULL) { - /* - * The !in_dotrap here is safe. The only way we can arrive - * here with in_dotrap set is that a trap handler set SIGINT to - * SIG_DFL and killed itself. - */ - if (suppressint && !in_dotrap) + if (suppressint) SET_PENDING_INT; else onint(); From owner-svn-src-head@freebsd.org Thu Jul 9 22:38:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 468E93581DF; Thu, 9 Jul 2020 22:38:38 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2rgL16bTz3Vg3; Thu, 9 Jul 2020 22:38:38 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 05DEB18708; Thu, 9 Jul 2020 22:38:38 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 069McbKA014231; Thu, 9 Jul 2020 22:38:37 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 069McbU4014226; Thu, 9 Jul 2020 22:38:37 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <202007092238.069McbU4014226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Thu, 9 Jul 2020 22:38:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363060 - in head: stand/defaults sys/amd64/amd64 sys/powerpc/aim sys/vm X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in head: stand/defaults sys/amd64/amd64 sys/powerpc/aim sys/vm X-SVN-Commit-Revision: 363060 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 22:38:38 -0000 Author: scottl Date: Thu Jul 9 22:38:36 2020 New Revision: 363060 URL: https://svnweb.freebsd.org/changeset/base/363060 Log: Revert r362998, r326999 while a better compatibility strategy is devised. Modified: head/stand/defaults/loader.conf head/sys/amd64/amd64/pmap.c head/sys/powerpc/aim/mmu_radix.c head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/stand/defaults/loader.conf ============================================================================== --- head/stand/defaults/loader.conf Thu Jul 9 20:55:18 2020 (r363059) +++ head/stand/defaults/loader.conf Thu Jul 9 22:38:36 2020 (r363060) @@ -53,7 +53,7 @@ entropy_cache_type="boot_entropy_cache" # Required for ram_excludelist_load="NO" # Set this to YES to load a file # containing a list of addresses to # exclude from the running system. -ram_excludelist_name="/boot/excludelist.txt" # Set this to the name of the file +ram_excludeist_name="/boot/excludelist.txt" # Set this to the name of the file ram_excludelist_type="ram_excludelist" # Required for the kernel to find # the blacklist module Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Thu Jul 9 20:55:18 2020 (r363059) +++ head/sys/amd64/amd64/pmap.c Thu Jul 9 22:38:36 2020 (r363060) @@ -2060,7 +2060,7 @@ pmap_init(void) int error, i, ret, skz63; /* L1TF, reserve page @0 unconditionally */ - vm_page_excludelist_add(0, bootverbose); + vm_page_blacklist_add(0, bootverbose); /* Detect bare-metal Skylake Server and Skylake-X. */ if (vm_guest == VM_GUEST_NO && cpu_vendor_id == CPU_VENDOR_INTEL && @@ -2081,7 +2081,7 @@ pmap_init(void) printf("SKZ63: skipping 4M RAM starting " "at physical 1G\n"); for (i = 0; i < atop(0x400000); i++) { - ret = vm_page_excludelist_add(0x40000000 + + ret = vm_page_blacklist_add(0x40000000 + ptoa(i), FALSE); if (!ret && bootverbose) printf("page at %#lx already used\n", Modified: head/sys/powerpc/aim/mmu_radix.c ============================================================================== --- head/sys/powerpc/aim/mmu_radix.c Thu Jul 9 20:55:18 2020 (r363059) +++ head/sys/powerpc/aim/mmu_radix.c Thu Jul 9 22:38:36 2020 (r363060) @@ -3557,7 +3557,7 @@ mmu_radix_init() int error, i, pv_npg; /* L1TF, reserve page @0 unconditionally */ - vm_page_excludelist_add(0, bootverbose); + vm_page_blacklist_add(0, bootverbose); zone_radix_pgd = uma_zcache_create("radix_pgd_cache", RADIX_PGD_SIZE, NULL, NULL, Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Thu Jul 9 20:55:18 2020 (r363059) +++ head/sys/vm/vm_page.c Thu Jul 9 22:38:36 2020 (r363060) @@ -155,11 +155,10 @@ vm_page_t vm_page_array; long vm_page_array_size; long first_page; -static TAILQ_HEAD(, vm_page) excludelist_head; -static int sysctl_vm_page_excludelist(SYSCTL_HANDLER_ARGS); -SYSCTL_PROC(_vm, OID_AUTO, page_excludelist, CTLTYPE_STRING | CTLFLAG_RD | - CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_page_excludelist, "A", - "Blacklist pages"); +static TAILQ_HEAD(, vm_page) blacklist_head; +static int sysctl_vm_page_blacklist(SYSCTL_HANDLER_ARGS); +SYSCTL_PROC(_vm, OID_AUTO, page_blacklist, CTLTYPE_STRING | CTLFLAG_RD | + CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_page_blacklist, "A", "Blacklist pages"); static uma_zone_t fakepg_zone; @@ -259,16 +258,16 @@ vm_set_page_size(void) } /* - * vm_page_excludelist_next: + * vm_page_blacklist_next: * - * Find the next entry in the provided string of excludelist + * Find the next entry in the provided string of blacklist * addresses. Entries are separated by space, comma, or newline. * If an invalid integer is encountered then the rest of the * string is skipped. Updates the list pointer to the next * character, or NULL if the string is exhausted or invalid. */ static vm_paddr_t -vm_page_excludelist_next(char **list, char *end) +vm_page_blacklist_next(char **list, char *end) { vm_paddr_t bad; char *cp, *pos; @@ -315,13 +314,13 @@ vm_page_excludelist_next(char **list, char *end) *list = cp; return (trunc_page(bad)); } - printf("Garbage in RAM excludelist, skipping\n"); + printf("Garbage in RAM blacklist, skipping\n"); *list = NULL; return (0); } bool -vm_page_excludelist_add(vm_paddr_t pa, bool verbose) +vm_page_blacklist_add(vm_paddr_t pa, bool verbose) { struct vm_domain *vmd; vm_page_t m; @@ -337,7 +336,7 @@ vm_page_excludelist_add(vm_paddr_t pa, bool verbose) vm_domain_free_unlock(vmd); if (ret != 0) { vm_domain_freecnt_inc(vmd, -1); - TAILQ_INSERT_TAIL(&excludelist_head, m, listq); + TAILQ_INSERT_TAIL(&blacklist_head, m, listq); if (verbose) printf("Skipping page with pa 0x%jx\n", (uintmax_t)pa); } @@ -345,35 +344,35 @@ vm_page_excludelist_add(vm_paddr_t pa, bool verbose) } /* - * vm_page_excludelist_check: + * vm_page_blacklist_check: * - * Iterate through the provided string of excludelist addresses, pulling + * Iterate through the provided string of blacklist addresses, pulling * each entry out of the physical allocator free list and putting it - * onto a list for reporting via the vm.page_excludelist sysctl. + * onto a list for reporting via the vm.page_blacklist sysctl. */ static void -vm_page_excludelist_check(char *list, char *end) +vm_page_blacklist_check(char *list, char *end) { vm_paddr_t pa; char *next; next = list; while (next != NULL) { - if ((pa = vm_page_excludelist_next(&next, end)) == 0) + if ((pa = vm_page_blacklist_next(&next, end)) == 0) continue; - vm_page_excludelist_add(pa, bootverbose); + vm_page_blacklist_add(pa, bootverbose); } } /* - * vm_page_excludelist_load: + * vm_page_blacklist_load: * - * Search for a special module named "ram_excludelist". It'll be a + * Search for a special module named "ram_blacklist". It'll be a * plain text file provided by the user via the loader directive * of the same name. */ static void -vm_page_excludelist_load(char **list, char **end) +vm_page_blacklist_load(char **list, char **end) { void *mod; u_char *ptr; @@ -382,7 +381,7 @@ vm_page_excludelist_load(char **list, char **end) mod = NULL; ptr = NULL; - mod = preload_search_by_type("ram_excludelist"); + mod = preload_search_by_type("ram_blacklist"); if (mod != NULL) { ptr = preload_fetch_addr(mod); len = preload_fetch_size(mod); @@ -396,7 +395,7 @@ vm_page_excludelist_load(char **list, char **end) } static int -sysctl_vm_page_excludelist(SYSCTL_HANDLER_ARGS) +sysctl_vm_page_blacklist(SYSCTL_HANDLER_ARGS) { vm_page_t m; struct sbuf sbuf; @@ -407,7 +406,7 @@ sysctl_vm_page_excludelist(SYSCTL_HANDLER_ARGS) if (error != 0) return (error); sbuf_new_for_sysctl(&sbuf, NULL, 128, req); - TAILQ_FOREACH(m, &excludelist_head, listq) { + TAILQ_FOREACH(m, &blacklist_head, listq) { sbuf_printf(&sbuf, "%s%#jx", first ? "" : ",", (uintmax_t)m->phys_addr); first = 0; @@ -794,14 +793,14 @@ vm_page_startup(vm_offset_t vaddr) } /* - * Remove excludelisted pages from the physical memory allocator. + * Remove blacklisted pages from the physical memory allocator. */ - TAILQ_INIT(&excludelist_head); - vm_page_excludelist_load(&list, &listend); - vm_page_excludelist_check(list, listend); + TAILQ_INIT(&blacklist_head); + vm_page_blacklist_load(&list, &listend); + vm_page_blacklist_check(list, listend); - list = kern_getenv("vm.excludelist"); - vm_page_excludelist_check(list, NULL); + list = kern_getenv("vm.blacklist"); + vm_page_blacklist_check(list, NULL); freeenv(list); #if VM_NRESERVLEVEL > 0 Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Thu Jul 9 20:55:18 2020 (r363059) +++ head/sys/vm/vm_page.h Thu Jul 9 22:38:36 2020 (r363060) @@ -613,7 +613,7 @@ vm_page_t vm_page_alloc_contig_domain(vm_object_t obje vm_page_t vm_page_alloc_freelist(int, int); vm_page_t vm_page_alloc_freelist_domain(int, int, int); void vm_page_bits_set(vm_page_t m, vm_page_bits_t *bits, vm_page_bits_t set); -bool vm_page_excludelist_add(vm_paddr_t pa, bool verbose); +bool vm_page_blacklist_add(vm_paddr_t pa, bool verbose); vm_page_t vm_page_grab(vm_object_t, vm_pindex_t, int); vm_page_t vm_page_grab_unlocked(vm_object_t, vm_pindex_t, int); int vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int allocflags, From owner-svn-src-head@freebsd.org Thu Jul 9 22:54:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 39A5435892E; Thu, 9 Jul 2020 22:54:18 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2s1P6K48z3WKF; Thu, 9 Jul 2020 22:54:17 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: by mail-yb1-xb31.google.com with SMTP id 133so1771435ybu.7; Thu, 09 Jul 2020 15:54:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Oim7yTt5GoujOZiP87SE5YHfxZInGp2WTFnAeolgfJ4=; b=tNehUkknyL1jxdcPDSmSgNiOrK+nMaps36M3bdPRt/SZtTuPArM2XQEb75oMrhLMxt pyGLaH49hyWyaaSSCC4cq5szyLZLE/wP5DgiRLD0tkiONP6ySCWa1l/89+HWYG4nhXs3 PYFkP4yCFBTP5mXnwE82uZpxS0UhG+55Z3hceIRrpWBlfZmoYBSAs/AQ5j77eCszXb4Z YfkuAYzBLFKpeEFMgWm0ufBZGAIDNz2NbAsmXKkl6J0drXIwE7+Xu7Cu9I57YouJTB/U D3BMZNSDs5oQbWeglN5tn6trpU8d4rcZrGMoWcBqpDfnYf61uhDZmaL3UJyaIU8T1sDn 5sWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Oim7yTt5GoujOZiP87SE5YHfxZInGp2WTFnAeolgfJ4=; b=rb1F7AepA4BWyHZXzRdWAjqrDzRdx3UZAYRMt033m2N7WgTmrJAf74k8KYQ5tEqX4I ts98PQ+cakE8EVyzxgkWfrAuGfHvW30f/RDxlPqJWt3QIW3uEcJe8YUEyYOJWMXlX6tl jTII3tOVJfX5nG4XsV8uf+OCGkrubCy5CH0WtMgO6iZYq2T0Z+v6ZMQ9DwsSMCcL0Yh6 cwwiusslGJdqJPQ10YNA2J0lkaP8t69Y1ke9ExitvlHlXACY2feGNqFFgipcO2gelw/A 8Hq2bVkYXdCJZgRHt8IJEizQVGNGzdcGVozExK8Qr9ic4W/MegefSa+J5WOAnmO1dsUB SyyA== X-Gm-Message-State: AOAM530O7wod1fiwbhRlHK1vX+RK8bpDnw85+mNRGBJU0zQtZ0QRBBzG z0Ea68QC2Z8UPBBHrRuqJfI0zDHwFn1Et6mEfK7F6w== X-Google-Smtp-Source: ABdhPJxMoOqBctqQJT1cYFo4ZcNXpgp60X2V3utboZEEAemYDXnsNIaN2aiFuaBuh2sHUYPRCVyZDRKPBdgJL5mW9IQ= X-Received: by 2002:a25:d843:: with SMTP id p64mr44987852ybg.68.1594335255868; Thu, 09 Jul 2020 15:54:15 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a5b:30b:0:0:0:0:0 with HTTP; Thu, 9 Jul 2020 15:54:15 -0700 (PDT) In-Reply-To: <202007092238.069McbU4014226@repo.freebsd.org> References: <202007092238.069McbU4014226@repo.freebsd.org> From: Oliver Pinter Date: Fri, 10 Jul 2020 00:54:15 +0200 Message-ID: Subject: Re: svn commit: r363060 - in head: stand/defaults sys/amd64/amd64 sys/powerpc/aim sys/vm To: Scott Long Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Rspamd-Queue-Id: 4B2s1P6K48z3WKF X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 22:54:18 -0000 On Friday, July 10, 2020, Scott Long wrote: > Author: scottl > Date: Thu Jul 9 22:38:36 2020 > New Revision: 363060 > URL: https://svnweb.freebsd.org/changeset/base/363060 > > Log: > Revert r362998, r326999 while a better compatibility strategy is devised. > > Modified: > head/stand/defaults/loader.conf > head/sys/amd64/amd64/pmap.c > head/sys/powerpc/aim/mmu_radix.c > head/sys/vm/vm_page.c > head/sys/vm/vm_page.h > > Modified: head/stand/defaults/loader.conf > ============================================================ > ================== > --- head/stand/defaults/loader.conf Thu Jul 9 20:55:18 2020 > (r363059) > +++ head/stand/defaults/loader.conf Thu Jul 9 22:38:36 2020 > (r363060) > @@ -53,7 +53,7 @@ entropy_cache_type="boot_entropy_cache" # > Required for > ram_excludelist_load="NO" # Set this to YES to load a file > # containing a list of addresses to > # exclude from the running system. > -ram_excludelist_name="/boot/excludelist.txt" # Set this to the name of > the file > +ram_excludeist_name="/boot/excludelist.txt" # Set this to the name of > the file Hi! This part of the revert seems still broken. > ram_excludelist_type="ram_excludelist" # Required for the kernel to find > # the blacklist module > > > Modified: head/sys/amd64/amd64/pmap.c > ============================================================ > ================== > --- head/sys/amd64/amd64/pmap.c Thu Jul 9 20:55:18 2020 (r363059) > +++ head/sys/amd64/amd64/pmap.c Thu Jul 9 22:38:36 2020 (r363060) > @@ -2060,7 +2060,7 @@ pmap_init(void) > int error, i, ret, skz63; > > /* L1TF, reserve page @0 unconditionally */ > - vm_page_excludelist_add(0, bootverbose); > + vm_page_blacklist_add(0, bootverbose); > > /* Detect bare-metal Skylake Server and Skylake-X. */ > if (vm_guest == VM_GUEST_NO && cpu_vendor_id == CPU_VENDOR_INTEL && > @@ -2081,7 +2081,7 @@ pmap_init(void) > printf("SKZ63: skipping 4M RAM starting " > "at physical 1G\n"); > for (i = 0; i < atop(0x400000); i++) { > - ret = vm_page_excludelist_add(0x40000000 + > + ret = vm_page_blacklist_add(0x40000000 + > ptoa(i), FALSE); > if (!ret && bootverbose) > printf("page at %#lx already > used\n", > > Modified: head/sys/powerpc/aim/mmu_radix.c > ============================================================ > ================== > --- head/sys/powerpc/aim/mmu_radix.c Thu Jul 9 20:55:18 2020 > (r363059) > +++ head/sys/powerpc/aim/mmu_radix.c Thu Jul 9 22:38:36 2020 > (r363060) > @@ -3557,7 +3557,7 @@ mmu_radix_init() > int error, i, pv_npg; > > /* L1TF, reserve page @0 unconditionally */ > - vm_page_excludelist_add(0, bootverbose); > + vm_page_blacklist_add(0, bootverbose); > > zone_radix_pgd = uma_zcache_create("radix_pgd_cache", > RADIX_PGD_SIZE, NULL, NULL, > > Modified: head/sys/vm/vm_page.c > ============================================================ > ================== > --- head/sys/vm/vm_page.c Thu Jul 9 20:55:18 2020 (r363059) > +++ head/sys/vm/vm_page.c Thu Jul 9 22:38:36 2020 (r363060) > @@ -155,11 +155,10 @@ vm_page_t vm_page_array; > long vm_page_array_size; > long first_page; > > -static TAILQ_HEAD(, vm_page) excludelist_head; > -static int sysctl_vm_page_excludelist(SYSCTL_HANDLER_ARGS); > -SYSCTL_PROC(_vm, OID_AUTO, page_excludelist, CTLTYPE_STRING | CTLFLAG_RD | > - CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_page_excludelist, "A", > - "Blacklist pages"); > +static TAILQ_HEAD(, vm_page) blacklist_head; > +static int sysctl_vm_page_blacklist(SYSCTL_HANDLER_ARGS); > +SYSCTL_PROC(_vm, OID_AUTO, page_blacklist, CTLTYPE_STRING | CTLFLAG_RD | > + CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_page_blacklist, "A", "Blacklist > pages"); > > static uma_zone_t fakepg_zone; > > @@ -259,16 +258,16 @@ vm_set_page_size(void) > } > > /* > - * vm_page_excludelist_next: > + * vm_page_blacklist_next: > * > - * Find the next entry in the provided string of excludelist > + * Find the next entry in the provided string of blacklist > * addresses. Entries are separated by space, comma, or newline. > * If an invalid integer is encountered then the rest of the > * string is skipped. Updates the list pointer to the next > * character, or NULL if the string is exhausted or invalid. > */ > static vm_paddr_t > -vm_page_excludelist_next(char **list, char *end) > +vm_page_blacklist_next(char **list, char *end) > { > vm_paddr_t bad; > char *cp, *pos; > @@ -315,13 +314,13 @@ vm_page_excludelist_next(char **list, char *end) > *list = cp; > return (trunc_page(bad)); > } > - printf("Garbage in RAM excludelist, skipping\n"); > + printf("Garbage in RAM blacklist, skipping\n"); > *list = NULL; > return (0); > } > > bool > -vm_page_excludelist_add(vm_paddr_t pa, bool verbose) > +vm_page_blacklist_add(vm_paddr_t pa, bool verbose) > { > struct vm_domain *vmd; > vm_page_t m; > @@ -337,7 +336,7 @@ vm_page_excludelist_add(vm_paddr_t pa, bool verbose) > vm_domain_free_unlock(vmd); > if (ret != 0) { > vm_domain_freecnt_inc(vmd, -1); > - TAILQ_INSERT_TAIL(&excludelist_head, m, listq); > + TAILQ_INSERT_TAIL(&blacklist_head, m, listq); > if (verbose) > printf("Skipping page with pa 0x%jx\n", > (uintmax_t)pa); > } > @@ -345,35 +344,35 @@ vm_page_excludelist_add(vm_paddr_t pa, bool verbose) > } > > /* > - * vm_page_excludelist_check: > + * vm_page_blacklist_check: > * > - * Iterate through the provided string of excludelist addresses, > pulling > + * Iterate through the provided string of blacklist addresses, pulling > * each entry out of the physical allocator free list and putting it > - * onto a list for reporting via the vm.page_excludelist sysctl. > + * onto a list for reporting via the vm.page_blacklist sysctl. > */ > static void > -vm_page_excludelist_check(char *list, char *end) > +vm_page_blacklist_check(char *list, char *end) > { > vm_paddr_t pa; > char *next; > > next = list; > while (next != NULL) { > - if ((pa = vm_page_excludelist_next(&next, end)) == 0) > + if ((pa = vm_page_blacklist_next(&next, end)) == 0) > continue; > - vm_page_excludelist_add(pa, bootverbose); > + vm_page_blacklist_add(pa, bootverbose); > } > } > > /* > - * vm_page_excludelist_load: > + * vm_page_blacklist_load: > * > - * Search for a special module named "ram_excludelist". It'll be a > + * Search for a special module named "ram_blacklist". It'll be a > * plain text file provided by the user via the loader directive > * of the same name. > */ > static void > -vm_page_excludelist_load(char **list, char **end) > +vm_page_blacklist_load(char **list, char **end) > { > void *mod; > u_char *ptr; > @@ -382,7 +381,7 @@ vm_page_excludelist_load(char **list, char **end) > mod = NULL; > ptr = NULL; > > - mod = preload_search_by_type("ram_excludelist"); > + mod = preload_search_by_type("ram_blacklist"); > if (mod != NULL) { > ptr = preload_fetch_addr(mod); > len = preload_fetch_size(mod); > @@ -396,7 +395,7 @@ vm_page_excludelist_load(char **list, char **end) > } > > static int > -sysctl_vm_page_excludelist(SYSCTL_HANDLER_ARGS) > +sysctl_vm_page_blacklist(SYSCTL_HANDLER_ARGS) > { > vm_page_t m; > struct sbuf sbuf; > @@ -407,7 +406,7 @@ sysctl_vm_page_excludelist(SYSCTL_HANDLER_ARGS) > if (error != 0) > return (error); > sbuf_new_for_sysctl(&sbuf, NULL, 128, req); > - TAILQ_FOREACH(m, &excludelist_head, listq) { > + TAILQ_FOREACH(m, &blacklist_head, listq) { > sbuf_printf(&sbuf, "%s%#jx", first ? "" : ",", > (uintmax_t)m->phys_addr); > first = 0; > @@ -794,14 +793,14 @@ vm_page_startup(vm_offset_t vaddr) > } > > /* > - * Remove excludelisted pages from the physical memory allocator. > + * Remove blacklisted pages from the physical memory allocator. > */ > - TAILQ_INIT(&excludelist_head); > - vm_page_excludelist_load(&list, &listend); > - vm_page_excludelist_check(list, listend); > + TAILQ_INIT(&blacklist_head); > + vm_page_blacklist_load(&list, &listend); > + vm_page_blacklist_check(list, listend); > > - list = kern_getenv("vm.excludelist"); > - vm_page_excludelist_check(list, NULL); > + list = kern_getenv("vm.blacklist"); > + vm_page_blacklist_check(list, NULL); > > freeenv(list); > #if VM_NRESERVLEVEL > 0 > > Modified: head/sys/vm/vm_page.h > ============================================================ > ================== > --- head/sys/vm/vm_page.h Thu Jul 9 20:55:18 2020 (r363059) > +++ head/sys/vm/vm_page.h Thu Jul 9 22:38:36 2020 (r363060) > @@ -613,7 +613,7 @@ vm_page_t vm_page_alloc_contig_domain(vm_object_t obje > vm_page_t vm_page_alloc_freelist(int, int); > vm_page_t vm_page_alloc_freelist_domain(int, int, int); > void vm_page_bits_set(vm_page_t m, vm_page_bits_t *bits, vm_page_bits_t > set); > -bool vm_page_excludelist_add(vm_paddr_t pa, bool verbose); > +bool vm_page_blacklist_add(vm_paddr_t pa, bool verbose); > vm_page_t vm_page_grab(vm_object_t, vm_pindex_t, int); > vm_page_t vm_page_grab_unlocked(vm_object_t, vm_pindex_t, int); > int vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int > allocflags, > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-head@freebsd.org Thu Jul 9 23:01:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 150D4358E0A; Thu, 9 Jul 2020 23:01:37 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2s9r6wPfz3X0b; Thu, 9 Jul 2020 23:01:36 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D0C0218BF0; Thu, 9 Jul 2020 23:01:36 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 069N1aNM028805; Thu, 9 Jul 2020 23:01:36 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 069N1aof028804; Thu, 9 Jul 2020 23:01:36 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202007092301.069N1aof028804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 9 Jul 2020 23:01:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363061 - in head/usr.sbin/wpa: hostapd wpa_supplicant X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head/usr.sbin/wpa: hostapd wpa_supplicant X-SVN-Commit-Revision: 363061 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 23:01:37 -0000 Author: cy Date: Thu Jul 9 23:01:36 2020 New Revision: 363061 URL: https://svnweb.freebsd.org/changeset/base/363061 Log: Enable support for IEEE 802.11N, 802.11W, 802.11AC and 802.11.AX to hostapd and wpa_supplicant. Submitted by: bz MFC after: 2 weeks Relnotes: yes Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate") Modified: head/usr.sbin/wpa/hostapd/Makefile head/usr.sbin/wpa/wpa_supplicant/Makefile Modified: head/usr.sbin/wpa/hostapd/Makefile ============================================================================== --- head/usr.sbin/wpa/hostapd/Makefile Thu Jul 9 22:38:36 2020 (r363060) +++ head/usr.sbin/wpa/hostapd/Makefile Thu Jul 9 23:01:36 2020 (r363061) @@ -45,11 +45,15 @@ SRCS= accounting.c \ ieee802_11.c \ ieee802_11_auth.c \ ieee802_11_common.c \ + ieee802_11_he.c \ + ieee802_11_ht.c \ ieee802_11_shared.c \ + ieee802_11_vht.c \ ieee802_1x.c \ ip_addr.c \ l2_packet_freebsd.c \ main.c \ + mbo_ap.c \ ms_funcs.c \ neighbor_db.c \ os_unix.c \ @@ -103,6 +107,11 @@ CFLAGS+=-I${.CURDIR:H}/wpa_supplicant \ -DCONFIG_DRIVER_BSD \ -DCONFIG_DRIVER_RADIUS_ACL \ -DCONFIG_HS20 \ + -DCONFIG_MBO \ + -DCONFIG_IEEE80211N \ + -DCONFIG_IEEE80211W \ + -DCONFIG_IEEE80211AC \ + -DCONFIG_IEEE80211AX \ -DCONFIG_INTERWORKING \ -DCONFIG_PEERKEY \ -DCONFIG_RSN_PREAUTH \ Modified: head/usr.sbin/wpa/wpa_supplicant/Makefile ============================================================================== --- head/usr.sbin/wpa/wpa_supplicant/Makefile Thu Jul 9 22:38:36 2020 (r363060) +++ head/usr.sbin/wpa/wpa_supplicant/Makefile Thu Jul 9 23:01:36 2020 (r363061) @@ -42,6 +42,10 @@ CFLAGS+=-DCONFIG_BACKEND_FILE \ -DCONFIG_DRIVER_WIRED \ -DCONFIG_GAS \ -DCONFIG_IEEE80211R \ + -DCONFIG_IEEE80211N \ + -DCONFIG_IEEE80211W \ + -DCONFIG_IEEE80211AC \ + -DCONFIG_IEEE80211AX \ -DCONFIG_PEERKEY \ -DCONFIG_PRIVSEP \ -DCONFIG_SMARTCARD \ From owner-svn-src-head@freebsd.org Fri Jul 10 00:03:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0F71A3595F5; Fri, 10 Jul 2020 00:03:07 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2tXp6dHtz3ZPb; Fri, 10 Jul 2020 00:03:06 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C779F19559; Fri, 10 Jul 2020 00:03:06 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06A036qT068715; Fri, 10 Jul 2020 00:03:06 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06A036D0068714; Fri, 10 Jul 2020 00:03:06 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202007100003.06A036D0068714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 10 Jul 2020 00:03:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363062 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 363062 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 00:03:07 -0000 Author: kevans Date: Fri Jul 10 00:03:06 2020 New Revision: 363062 URL: https://svnweb.freebsd.org/changeset/base/363062 Log: shmfd: make shm_size a vm_ooffset_t On 32-bit platforms, this expands the shm_size to a 64-bit quantity and resolves a mismatch between the shmfd size and underlying vm_object size. The implementation did not account for this kind of mismatch. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25602 Modified: head/sys/sys/mman.h Modified: head/sys/sys/mman.h ============================================================================== --- head/sys/sys/mman.h Thu Jul 9 23:01:36 2020 (r363061) +++ head/sys/sys/mman.h Fri Jul 10 00:03:06 2020 (r363062) @@ -254,7 +254,7 @@ typedef __size_t size_t; struct file; struct shmfd { - size_t shm_size; + vm_ooffset_t shm_size; vm_object_t shm_object; int shm_refs; uid_t shm_uid; From owner-svn-src-head@freebsd.org Fri Jul 10 00:07:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E10D359EDB for ; Fri, 10 Jul 2020 00:07:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2tdJ3QVLz3ZRR for ; Fri, 10 Jul 2020 00:07:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x736.google.com with SMTP id 80so3655114qko.7 for ; Thu, 09 Jul 2020 17:07:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=z7zHzOnnOD1X95u7VZdM5hwkOErUuHtBOIOb4P67EME=; b=cnPTxuPo9VWD5d81Tt/gVzmd7Tafv5+Dm5e6/5/rZNvgYkp0FEyazJDV3ojRk2fUJF 8vuTCbcUXo+OsH0ramkbHiH6+btaACVJuJSk81InCqFZwCM1z9ZEyik+e66kJoXVlhJI uw8wyMns0PX0DenoCsx8qwjdwj0SwIuo6kOjFUmcb/U2PBSJEx57zaFeKgC+zk2HIE/K Q3Z2Z3RLGBy+lz437VhohnTGkEeI7jA7fI4OpdyuKdkrD9JDt2gkSMQtuYnOy+mL6Fbz xV38hm+CwMKSuuom2xy4WsPNstGylLkxU95hGqpmZIhvr1/9oVznw0+5Xsagh/4IKkqz Ng0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=z7zHzOnnOD1X95u7VZdM5hwkOErUuHtBOIOb4P67EME=; b=BO51hWqBfYs6jGDbqQ9aVImUmSMWWs0TCEihQwiLavtjNQWK1QVwAEDaWTzRkg1wyQ bg+xNFKusr88kZQG5q9L1xE5A3334hgmHrJb3sbMVKyOfzOxaRSZ2aghf5fbaX5cwyTJ Lvu+uzcw6pnFuihtVMAbiLHktP5ESgjJl9Qdb64RBslFFwD8fkOCHaIcnIy1VbqxCHdA 8F84caO36nmKwfKguR2XSe3mumYk7e2VpqcIu1QTA5A7+10/uvIl2Ii+eH5pgiRS2JzK oAJcWw8LoSXUqJTo3JdZvu3KTSuiLDQKShWVC4ph67vjmPhA4O0OiSW2/0qPApcvtEiQ 7Ngg== X-Gm-Message-State: AOAM53353AiABIkuMwVS7vgFMK8oinPmHP9V7v3voJeGAZ/nON7SHPwh WWX66CBTb2BVwskSPWXZ3Sv2OkJzdvkkP/UhuDz89g== X-Google-Smtp-Source: ABdhPJwyRWhaHXrSlzMouoPAaSNr0GfNI812WG0SvmmhwKiaDIAU0EytCDfhauMfrKXIX0ua8TaE63d004NNF46yfdM= X-Received: by 2002:a37:4bcd:: with SMTP id y196mr2649186qka.495.1594339619279; Thu, 09 Jul 2020 17:06:59 -0700 (PDT) MIME-Version: 1.0 References: <202007092238.069McbU4014226@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Thu, 9 Jul 2020 18:06:48 -0600 Message-ID: Subject: Re: svn commit: r363060 - in head: stand/defaults sys/amd64/amd64 sys/powerpc/aim sys/vm To: Oliver Pinter Cc: Scott Long , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Rspamd-Queue-Id: 4B2tdJ3QVLz3ZRR X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=cnPTxuPo; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::736) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.23 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-0.88)[-0.876]; NEURAL_HAM_LONG(-0.88)[-0.876]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; RCPT_COUNT_FIVE(0.00)[5]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.48)[-0.479]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::736:from]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 00:07:01 -0000 On Thu, Jul 9, 2020 at 4:54 PM Oliver Pinter wrote: > > > On Friday, July 10, 2020, Scott Long wrote: > >> Author: scottl >> Date: Thu Jul 9 22:38:36 2020 >> New Revision: 363060 >> URL: https://svnweb.freebsd.org/changeset/base/363060 >> >> Log: >> Revert r362998, r326999 while a better compatibility strategy is >> devised. >> >> Modified: >> head/stand/defaults/loader.conf >> head/sys/amd64/amd64/pmap.c >> head/sys/powerpc/aim/mmu_radix.c >> head/sys/vm/vm_page.c >> head/sys/vm/vm_page.h >> >> Modified: head/stand/defaults/loader.conf >> >> ============================================================================== >> --- head/stand/defaults/loader.conf Thu Jul 9 20:55:18 2020 >> (r363059) >> +++ head/stand/defaults/loader.conf Thu Jul 9 22:38:36 2020 >> (r363060) >> @@ -53,7 +53,7 @@ entropy_cache_type="boot_entropy_cache" # >> Required for >> ram_excludelist_load="NO" # Set this to YES to load a file >> # containing a list of addresses >> to >> # exclude from the running system. >> -ram_excludelist_name="/boot/excludelist.txt" # Set this to the name of >> the file >> +ram_excludeist_name="/boot/excludelist.txt" # Set this to the name of >> the file > > > Hi! > > This part of the revert seems still broken. > I think youre correct. Can you look at https://reviews.freebsd.org/D25606 please and let me know if you think that's right? Warner > > >> ram_excludelist_type="ram_excludelist" # Required for the kernel to find >> # the blacklist module >> >> >> Modified: head/sys/amd64/amd64/pmap.c >> >> ============================================================================== >> --- head/sys/amd64/amd64/pmap.c Thu Jul 9 20:55:18 2020 (r363059) >> +++ head/sys/amd64/amd64/pmap.c Thu Jul 9 22:38:36 2020 (r363060) >> @@ -2060,7 +2060,7 @@ pmap_init(void) >> int error, i, ret, skz63; >> >> /* L1TF, reserve page @0 unconditionally */ >> - vm_page_excludelist_add(0, bootverbose); >> + vm_page_blacklist_add(0, bootverbose); >> >> /* Detect bare-metal Skylake Server and Skylake-X. */ >> if (vm_guest == VM_GUEST_NO && cpu_vendor_id == CPU_VENDOR_INTEL >> && >> @@ -2081,7 +2081,7 @@ pmap_init(void) >> printf("SKZ63: skipping 4M RAM starting " >> "at physical 1G\n"); >> for (i = 0; i < atop(0x400000); i++) { >> - ret = vm_page_excludelist_add(0x40000000 + >> + ret = vm_page_blacklist_add(0x40000000 + >> ptoa(i), FALSE); >> if (!ret && bootverbose) >> printf("page at %#lx already >> used\n", >> >> Modified: head/sys/powerpc/aim/mmu_radix.c >> >> ============================================================================== >> --- head/sys/powerpc/aim/mmu_radix.c Thu Jul 9 20:55:18 2020 >> (r363059) >> +++ head/sys/powerpc/aim/mmu_radix.c Thu Jul 9 22:38:36 2020 >> (r363060) >> @@ -3557,7 +3557,7 @@ mmu_radix_init() >> int error, i, pv_npg; >> >> /* L1TF, reserve page @0 unconditionally */ >> - vm_page_excludelist_add(0, bootverbose); >> + vm_page_blacklist_add(0, bootverbose); >> >> zone_radix_pgd = uma_zcache_create("radix_pgd_cache", >> RADIX_PGD_SIZE, NULL, NULL, >> >> Modified: head/sys/vm/vm_page.c >> >> ============================================================================== >> --- head/sys/vm/vm_page.c Thu Jul 9 20:55:18 2020 (r363059) >> +++ head/sys/vm/vm_page.c Thu Jul 9 22:38:36 2020 (r363060) >> @@ -155,11 +155,10 @@ vm_page_t vm_page_array; >> long vm_page_array_size; >> long first_page; >> >> -static TAILQ_HEAD(, vm_page) excludelist_head; >> -static int sysctl_vm_page_excludelist(SYSCTL_HANDLER_ARGS); >> -SYSCTL_PROC(_vm, OID_AUTO, page_excludelist, CTLTYPE_STRING | CTLFLAG_RD >> | >> - CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_page_excludelist, "A", >> - "Blacklist pages"); >> +static TAILQ_HEAD(, vm_page) blacklist_head; >> +static int sysctl_vm_page_blacklist(SYSCTL_HANDLER_ARGS); >> +SYSCTL_PROC(_vm, OID_AUTO, page_blacklist, CTLTYPE_STRING | CTLFLAG_RD | >> + CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_page_blacklist, "A", "Blacklist >> pages"); >> >> static uma_zone_t fakepg_zone; >> >> @@ -259,16 +258,16 @@ vm_set_page_size(void) >> } >> >> /* >> - * vm_page_excludelist_next: >> + * vm_page_blacklist_next: >> * >> - * Find the next entry in the provided string of excludelist >> + * Find the next entry in the provided string of blacklist >> * addresses. Entries are separated by space, comma, or newline. >> * If an invalid integer is encountered then the rest of the >> * string is skipped. Updates the list pointer to the next >> * character, or NULL if the string is exhausted or invalid. >> */ >> static vm_paddr_t >> -vm_page_excludelist_next(char **list, char *end) >> +vm_page_blacklist_next(char **list, char *end) >> { >> vm_paddr_t bad; >> char *cp, *pos; >> @@ -315,13 +314,13 @@ vm_page_excludelist_next(char **list, char *end) >> *list = cp; >> return (trunc_page(bad)); >> } >> - printf("Garbage in RAM excludelist, skipping\n"); >> + printf("Garbage in RAM blacklist, skipping\n"); >> *list = NULL; >> return (0); >> } >> >> bool >> -vm_page_excludelist_add(vm_paddr_t pa, bool verbose) >> +vm_page_blacklist_add(vm_paddr_t pa, bool verbose) >> { >> struct vm_domain *vmd; >> vm_page_t m; >> @@ -337,7 +336,7 @@ vm_page_excludelist_add(vm_paddr_t pa, bool verbose) >> vm_domain_free_unlock(vmd); >> if (ret != 0) { >> vm_domain_freecnt_inc(vmd, -1); >> - TAILQ_INSERT_TAIL(&excludelist_head, m, listq); >> + TAILQ_INSERT_TAIL(&blacklist_head, m, listq); >> if (verbose) >> printf("Skipping page with pa 0x%jx\n", >> (uintmax_t)pa); >> } >> @@ -345,35 +344,35 @@ vm_page_excludelist_add(vm_paddr_t pa, bool verbose) >> } >> >> /* >> - * vm_page_excludelist_check: >> + * vm_page_blacklist_check: >> * >> - * Iterate through the provided string of excludelist addresses, >> pulling >> + * Iterate through the provided string of blacklist addresses, >> pulling >> * each entry out of the physical allocator free list and putting it >> - * onto a list for reporting via the vm.page_excludelist sysctl. >> + * onto a list for reporting via the vm.page_blacklist sysctl. >> */ >> static void >> -vm_page_excludelist_check(char *list, char *end) >> +vm_page_blacklist_check(char *list, char *end) >> { >> vm_paddr_t pa; >> char *next; >> >> next = list; >> while (next != NULL) { >> - if ((pa = vm_page_excludelist_next(&next, end)) == 0) >> + if ((pa = vm_page_blacklist_next(&next, end)) == 0) >> continue; >> - vm_page_excludelist_add(pa, bootverbose); >> + vm_page_blacklist_add(pa, bootverbose); >> } >> } >> >> /* >> - * vm_page_excludelist_load: >> + * vm_page_blacklist_load: >> * >> - * Search for a special module named "ram_excludelist". It'll be a >> + * Search for a special module named "ram_blacklist". It'll be a >> * plain text file provided by the user via the loader directive >> * of the same name. >> */ >> static void >> -vm_page_excludelist_load(char **list, char **end) >> +vm_page_blacklist_load(char **list, char **end) >> { >> void *mod; >> u_char *ptr; >> @@ -382,7 +381,7 @@ vm_page_excludelist_load(char **list, char **end) >> mod = NULL; >> ptr = NULL; >> >> - mod = preload_search_by_type("ram_excludelist"); >> + mod = preload_search_by_type("ram_blacklist"); >> if (mod != NULL) { >> ptr = preload_fetch_addr(mod); >> len = preload_fetch_size(mod); >> @@ -396,7 +395,7 @@ vm_page_excludelist_load(char **list, char **end) >> } >> >> static int >> -sysctl_vm_page_excludelist(SYSCTL_HANDLER_ARGS) >> +sysctl_vm_page_blacklist(SYSCTL_HANDLER_ARGS) >> { >> vm_page_t m; >> struct sbuf sbuf; >> @@ -407,7 +406,7 @@ sysctl_vm_page_excludelist(SYSCTL_HANDLER_ARGS) >> if (error != 0) >> return (error); >> sbuf_new_for_sysctl(&sbuf, NULL, 128, req); >> - TAILQ_FOREACH(m, &excludelist_head, listq) { >> + TAILQ_FOREACH(m, &blacklist_head, listq) { >> sbuf_printf(&sbuf, "%s%#jx", first ? "" : ",", >> (uintmax_t)m->phys_addr); >> first = 0; >> @@ -794,14 +793,14 @@ vm_page_startup(vm_offset_t vaddr) >> } >> >> /* >> - * Remove excludelisted pages from the physical memory allocator. >> + * Remove blacklisted pages from the physical memory allocator. >> */ >> - TAILQ_INIT(&excludelist_head); >> - vm_page_excludelist_load(&list, &listend); >> - vm_page_excludelist_check(list, listend); >> + TAILQ_INIT(&blacklist_head); >> + vm_page_blacklist_load(&list, &listend); >> + vm_page_blacklist_check(list, listend); >> >> - list = kern_getenv("vm.excludelist"); >> - vm_page_excludelist_check(list, NULL); >> + list = kern_getenv("vm.blacklist"); >> + vm_page_blacklist_check(list, NULL); >> >> freeenv(list); >> #if VM_NRESERVLEVEL > 0 >> >> Modified: head/sys/vm/vm_page.h >> >> ============================================================================== >> --- head/sys/vm/vm_page.h Thu Jul 9 20:55:18 2020 (r363059) >> +++ head/sys/vm/vm_page.h Thu Jul 9 22:38:36 2020 (r363060) >> @@ -613,7 +613,7 @@ vm_page_t vm_page_alloc_contig_domain(vm_object_t obje >> vm_page_t vm_page_alloc_freelist(int, int); >> vm_page_t vm_page_alloc_freelist_domain(int, int, int); >> void vm_page_bits_set(vm_page_t m, vm_page_bits_t *bits, vm_page_bits_t >> set); >> -bool vm_page_excludelist_add(vm_paddr_t pa, bool verbose); >> +bool vm_page_blacklist_add(vm_paddr_t pa, bool verbose); >> vm_page_t vm_page_grab(vm_object_t, vm_pindex_t, int); >> vm_page_t vm_page_grab_unlocked(vm_object_t, vm_pindex_t, int); >> int vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int >> allocflags, >> _______________________________________________ >> svn-src-head@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-head >> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" >> > From owner-svn-src-head@freebsd.org Fri Jul 10 00:24:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D8B2835A688; Fri, 10 Jul 2020 00:24:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2v125MXfz3bjS; Fri, 10 Jul 2020 00:24:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C1E51999C; Fri, 10 Jul 2020 00:24:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06A0O6ut081136; Fri, 10 Jul 2020 00:24:06 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06A0O67t081135; Fri, 10 Jul 2020 00:24:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202007100024.06A0O67t081135@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 10 Jul 2020 00:24:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363063 - head/stand/defaults X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/defaults X-SVN-Commit-Revision: 363063 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 00:24:06 -0000 Author: imp Date: Fri Jul 10 00:24:06 2020 New Revision: 363063 URL: https://svnweb.freebsd.org/changeset/base/363063 Log: Properly backout r362998 Correct a small mistake in r363060's backaout of r362998 by reverse-applying r362998 by hand to loader.conf. Differential Revision: https://reviews.freebsd.org/D25606 Modified: head/stand/defaults/loader.conf Modified: head/stand/defaults/loader.conf ============================================================================== --- head/stand/defaults/loader.conf Fri Jul 10 00:03:06 2020 (r363062) +++ head/stand/defaults/loader.conf Fri Jul 10 00:24:06 2020 (r363063) @@ -49,12 +49,12 @@ entropy_cache_type="boot_entropy_cache" # Required for # must not change value even if the # _name above does change! -### RAM Excludelist configuration ############################ -ram_excludelist_load="NO" # Set this to YES to load a file +### RAM Blacklist configuration ############################ +ram_blacklist_load="NO" # Set this to YES to load a file # containing a list of addresses to # exclude from the running system. -ram_excludeist_name="/boot/excludelist.txt" # Set this to the name of the file -ram_excludelist_type="ram_excludelist" # Required for the kernel to find +ram_blacklist_name="/boot/blacklist.txt" # Set this to the name of the file +ram_blacklist_type="ram_blacklist" # Required for the kernel to find # the blacklist module ### Microcode loading configuration ######################## From owner-svn-src-head@freebsd.org Fri Jul 10 00:24:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E92F535A68A; Fri, 10 Jul 2020 00:24:42 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2v1k5wDfz3bVk; Fri, 10 Jul 2020 00:24:42 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AE223196F0; Fri, 10 Jul 2020 00:24:42 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06A0Og1D081216; Fri, 10 Jul 2020 00:24:42 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06A0OgPW081215; Fri, 10 Jul 2020 00:24:42 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202007100024.06A0OgPW081215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Fri, 10 Jul 2020 00:24:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363064 - head/usr.bin/xinstall X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/usr.bin/xinstall X-SVN-Commit-Revision: 363064 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 00:24:43 -0000 Author: eugen Date: Fri Jul 10 00:24:42 2020 New Revision: 363064 URL: https://svnweb.freebsd.org/changeset/base/363064 Log: Optimize install(1) a bit. Currently, "install -s -S" behaviour is inefficient for upgrade. First it finds that destination file already exists and copies source file to temporary file. Then it calls strip(1) with name of temporary file as single agrument and our strip(1) creates another temporary file in the /tmp (or TMPDIR) making another copy that is finally copied to DESTDIR third time. Meantime, strip(1) has an option "-o dst" to specify destination so install(1) is allowed to skip initial copying from obj to DESTDIR. This change makes it do so. Take a look at https://reviews.freebsd.org/D25551 for details and efficiency numbers (in short: upto 32% gained for installword). MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D25551 Modified: head/usr.bin/xinstall/xinstall.c Modified: head/usr.bin/xinstall/xinstall.c ============================================================================== --- head/usr.bin/xinstall/xinstall.c Fri Jul 10 00:24:06 2020 (r363063) +++ head/usr.bin/xinstall/xinstall.c Fri Jul 10 00:24:42 2020 (r363064) @@ -147,7 +147,7 @@ static void install_dir(char *); static void metadata_log(const char *, const char *, struct timespec *, const char *, const char *, off_t); static int parseid(const char *, id_t *); -static void strip(const char *); +static int strip(const char *, const char *, char **); static int trymmap(int); static void usage(void); @@ -767,12 +767,13 @@ install(const char *from_name, const char *to_name, u_ { struct stat from_sb, temp_sb, to_sb; struct timespec tsb[2]; - int devnull, files_match, from_fd, serrno, target; + int devnull, files_match, from_fd, serrno, stripped, target; int tempcopy, temp_fd, to_fd; char backup[MAXPATHLEN], *p, pathbuf[MAXPATHLEN], tempfile[MAXPATHLEN]; char *digestresult; - files_match = 0; + digestresult = NULL; + files_match = stripped = 0; from_fd = -1; to_fd = -1; @@ -858,19 +859,24 @@ install(const char *from_name, const char *to_name, u_ (void)printf("install: %s -> %s\n", from_name, to_name); } - if (!devnull) - digestresult = copy(from_fd, from_name, to_fd, - tempcopy ? tempfile : to_name, from_sb.st_size); - else - digestresult = NULL; + if (!devnull) { + if (dostrip) + stripped = strip(tempcopy ? tempfile : to_name, + from_name, &digestresult); + else + digestresult = copy(from_fd, from_name, to_fd, + tempcopy ? tempfile : to_name, from_sb.st_size); + } } if (dostrip) { - strip(tempcopy ? tempfile : to_name); + if (!stripped) + (void)strip(tempcopy ? tempfile : to_name, NULL, + &digestresult); /* - * Re-open our fd on the target, in case we used a strip - * that does not work in-place -- like GNU binutils strip. + * Re-open our fd on the target, in case + * we did not strip in-place. */ close(to_fd); to_fd = open(tempcopy ? tempfile : to_name, O_RDONLY, 0); @@ -1057,7 +1063,9 @@ install(const char *from_name, const char *to_name, u_ /* * compare -- - * compare two files; non-zero means files differ + * Compare two files; non-zero means files differ. + * Compute digest and return its address in *dresp + * unless it points to pre-computed digest. */ static int compare(int from_fd, const char *from_name __unused, size_t from_len, @@ -1066,15 +1074,17 @@ compare(int from_fd, const char *from_name __unused, s { char *p, *q; int rv; - int done_compare; + int do_digest, done_compare; DIGEST_CTX ctx; rv = 0; if (from_len != to_len) return 1; + do_digest = (digesttype != DIGEST_NONE && dresp != NULL && + *dresp == NULL); if (from_len <= MAX_CMP_SIZE) { - if (dresp != NULL) + if (do_digest) digest_init(&ctx); done_compare = 0; if (trymmap(from_fd) && trymmap(to_fd)) { @@ -1090,7 +1100,7 @@ compare(int from_fd, const char *from_name __unused, s } rv = memcmp(p, q, from_len); - if (dresp != NULL) + if (do_digest) digest_update(&ctx, p, from_len); munmap(p, from_len); munmap(q, from_len); @@ -1117,7 +1127,8 @@ compare(int from_fd, const char *from_name __unused, s rv = 1; /* out of sync */ } else rv = 1; /* read failure */ - digest_update(&ctx, buf1, n1); + if (do_digest) + digest_update(&ctx, buf1, n1); } lseek(from_fd, 0, SEEK_SET); lseek(to_fd, 0, SEEK_SET); @@ -1125,7 +1136,7 @@ compare(int from_fd, const char *from_name __unused, s } else rv = 1; /* don't bother in this case */ - if (dresp != NULL) { + if (do_digest) { if (rv == 0) *dresp = digest_end(&ctx, NULL); else @@ -1298,13 +1309,16 @@ copy(int from_fd, const char *from_name, int to_fd, co /* * strip -- - * use strip(1) to strip the target file + * Use strip(1) to strip the target file. + * Just invoke strip(1) on to_name if from_name is NULL, + * else try to run "strip -o to_name -- from_name" and return 0 on failure. + * Return 1 on success and assign result of digest_file(to_name) to *dresp. */ -static void -strip(const char *to_name) +static int +strip(const char *to_name, const char *from_name, char **dresp) { const char *stripbin; - const char *args[3]; + const char *args[6]; pid_t pid; int error, status; @@ -1312,8 +1326,16 @@ strip(const char *to_name) if (stripbin == NULL) stripbin = "strip"; args[0] = stripbin; - args[1] = to_name; - args[2] = NULL; + if (from_name == NULL) { + args[1] = to_name; + args[2] = NULL; + } else { + args[1] = "-o"; + args[2] = to_name; + args[3] = "--"; + args[4] = from_name; + args[5] = NULL; + } error = posix_spawnp(&pid, stripbin, NULL, NULL, __DECONST(char **, args), environ); if (error != 0) { @@ -1329,9 +1351,14 @@ strip(const char *to_name) } if (status != 0) { (void)unlink(to_name); + if (from_name != NULL) + return (0); errx(EX_SOFTWARE, "strip command %s failed on %s", stripbin, to_name); } + if (dresp != NULL) + *dresp = digest_file(to_name); + return (1); } /* From owner-svn-src-head@freebsd.org Fri Jul 10 00:43:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1AD0535A6D1; Fri, 10 Jul 2020 00:43:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2vRj6zXxz3cPS; Fri, 10 Jul 2020 00:43:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D21F419A48; Fri, 10 Jul 2020 00:43:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06A0hjD9093132; Fri, 10 Jul 2020 00:43:45 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06A0hjo1093130; Fri, 10 Jul 2020 00:43:45 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202007100043.06A0hjo1093130@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 10 Jul 2020 00:43:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363065 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 363065 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 00:43:46 -0000 Author: kevans Date: Fri Jul 10 00:43:45 2020 New Revision: 363065 URL: https://svnweb.freebsd.org/changeset/base/363065 Log: shm_open2: Implement SHM_GROW_ON_WRITE Lack of SHM_GROW_ON_WRITE is actively breaking Python's memfd_create tests, so go ahead and implement it. A future change will make memfd_create always set SHM_GROW_ON_WRITE, to match Linux behavior and unbreak Python's tests on -CURRENT. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D25502 Modified: head/sys/kern/uipc_shm.c head/sys/sys/mman.h Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Fri Jul 10 00:24:42 2020 (r363064) +++ head/sys/kern/uipc_shm.c Fri Jul 10 00:43:45 2020 (r363065) @@ -313,6 +313,7 @@ shm_write(struct file *fp, struct uio *uio, struct ucr struct shmfd *shmfd; void *rl_cookie; int error; + off_t size; shmfd = fp->f_data; #ifdef MAC @@ -321,17 +322,42 @@ shm_write(struct file *fp, struct uio *uio, struct ucr return (error); #endif foffset_lock_uio(fp, uio, flags); + if (uio->uio_resid > OFF_MAX - uio->uio_offset) { + /* + * Overflow is only an error if we're supposed to expand on + * write. Otherwise, we'll just truncate the write to the + * size of the file, which can only grow up to OFF_MAX. + */ + if ((shmfd->shm_flags & SHM_GROW_ON_WRITE) != 0) { + foffset_unlock_uio(fp, uio, flags); + return (EFBIG); + } + + size = shmfd->shm_size; + } else { + size = uio->uio_offset + uio->uio_resid; + } if ((flags & FOF_OFFSET) == 0) { rl_cookie = rangelock_wlock(&shmfd->shm_rl, 0, OFF_MAX, &shmfd->shm_mtx); } else { rl_cookie = rangelock_wlock(&shmfd->shm_rl, uio->uio_offset, - uio->uio_offset + uio->uio_resid, &shmfd->shm_mtx); + size, &shmfd->shm_mtx); } - if ((shmfd->shm_seals & F_SEAL_WRITE) != 0) + if ((shmfd->shm_seals & F_SEAL_WRITE) != 0) { error = EPERM; - else - error = uiomove_object(shmfd->shm_object, shmfd->shm_size, uio); + } else { + error = 0; + if ((shmfd->shm_flags & SHM_GROW_ON_WRITE) != 0 && + size > shmfd->shm_size) { + VM_OBJECT_WLOCK(shmfd->shm_object); + error = shm_dotruncate_locked(shmfd, size, rl_cookie); + VM_OBJECT_WUNLOCK(shmfd->shm_object); + } + if (error == 0) + error = uiomove_object(shmfd->shm_object, + shmfd->shm_size, uio); + } rangelock_unlock(&shmfd->shm_rl, rl_cookie, &shmfd->shm_mtx); foffset_unlock_uio(fp, uio, flags); return (error); @@ -748,7 +774,7 @@ kern_shm_open2(struct thread *td, const char *userpath mode_t cmode; int error, fd, initial_seals; - if ((shmflags & ~SHM_ALLOW_SEALING) != 0) + if ((shmflags & ~(SHM_ALLOW_SEALING | SHM_GROW_ON_WRITE)) != 0) return (EINVAL); initial_seals = F_SEAL_SEAL; @@ -921,6 +947,7 @@ kern_shm_open2(struct thread *td, const char *userpath } } + shmfd->shm_flags = shmflags; finit(fp, FFLAGS(flags & O_ACCMODE), DTYPE_SHM, shmfd, &shm_ops); td->td_retval[0] = fd; Modified: head/sys/sys/mman.h ============================================================================== --- head/sys/sys/mman.h Fri Jul 10 00:24:42 2020 (r363064) +++ head/sys/sys/mman.h Fri Jul 10 00:43:45 2020 (r363065) @@ -190,6 +190,7 @@ * shmflags for shm_open2() */ #define SHM_ALLOW_SEALING 0x00000001 +#define SHM_GROW_ON_WRITE 0x00000002 /* * Flags for memfd_create(). @@ -278,6 +279,7 @@ struct shmfd { struct rangelock shm_rl; struct mtx shm_mtx; + int shm_flags; int shm_seals; }; #endif From owner-svn-src-head@freebsd.org Fri Jul 10 00:45:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DB6C935A6E5; Fri, 10 Jul 2020 00:45:17 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2vTT5SyFz3cjb; Fri, 10 Jul 2020 00:45:17 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 86552199CC; Fri, 10 Jul 2020 00:45:17 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06A0jHNd093280; Fri, 10 Jul 2020 00:45:17 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06A0jGCl093277; Fri, 10 Jul 2020 00:45:16 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202007100045.06A0jGCl093277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 10 Jul 2020 00:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363066 - in head: lib/libc/sys sys/compat/linux tests/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head: lib/libc/sys sys/compat/linux tests/sys/kern X-SVN-Commit-Revision: 363066 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 00:45:17 -0000 Author: kevans Date: Fri Jul 10 00:45:16 2020 New Revision: 363066 URL: https://svnweb.freebsd.org/changeset/base/363066 Log: memfd_create: turn on SHM_GROW_ON_WRITE memfd_create fds will no longer require an ftruncate(2) to set the size; they'll grow (to the extent that it's possible) upon write(2)-like syscalls. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D25502 Modified: head/lib/libc/sys/shm_open.c head/sys/compat/linux/linux_file.c head/tests/sys/kern/memfd_test.c Modified: head/lib/libc/sys/shm_open.c ============================================================================== --- head/lib/libc/sys/shm_open.c Fri Jul 10 00:43:45 2020 (r363065) +++ head/lib/libc/sys/shm_open.c Fri Jul 10 00:45:16 2020 (r363066) @@ -84,7 +84,7 @@ memfd_create(const char *name, unsigned int flags) /* We've already validated that we're sufficiently sized. */ snprintf(memfd_name, NAME_MAX + 1, "%s%s", MEMFD_NAME_PREFIX, name); oflags = O_RDWR; - shmflags = 0; + shmflags = SHM_GROW_ON_WRITE; if ((flags & MFD_CLOEXEC) != 0) oflags |= O_CLOEXEC; if ((flags & MFD_ALLOW_SEALING) != 0) Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Fri Jul 10 00:43:45 2020 (r363065) +++ head/sys/compat/linux/linux_file.c Fri Jul 10 00:45:16 2020 (r363066) @@ -1758,7 +1758,7 @@ linux_memfd_create(struct thread *td, struct linux_mem if ((flags & MFD_HUGETLB) != 0) return (ENOSYS); oflags = O_RDWR; - shmflags = 0; + shmflags = SHM_GROW_ON_WRITE; if ((flags & MFD_CLOEXEC) != 0) oflags |= O_CLOEXEC; if ((flags & MFD_ALLOW_SEALING) != 0) Modified: head/tests/sys/kern/memfd_test.c ============================================================================== --- head/tests/sys/kern/memfd_test.c Fri Jul 10 00:43:45 2020 (r363065) +++ head/tests/sys/kern/memfd_test.c Fri Jul 10 00:45:16 2020 (r363066) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -38,18 +39,26 @@ __FBSDID("$FreeBSD$"); ATF_TC_WITHOUT_HEAD(basic); ATF_TC_BODY(basic, tc) { + struct stat sb; int fd; char buf[8]; ATF_REQUIRE((fd = memfd_create("...", 0)) != -1); - /* File size should be initially 0 */ - ATF_REQUIRE(write(fd, buf, sizeof(buf)) == 0); + /* write(2) should grow us out automatically. */ + ATF_REQUIRE(write(fd, buf, sizeof(buf)) == sizeof(buf)); + ATF_REQUIRE(fstat(fd, &sb) == 0); + ATF_REQUIRE(sb.st_size == sizeof(buf)); /* ftruncate(2) must succeed without seals */ - ATF_REQUIRE(ftruncate(fd, sizeof(buf) - 1) == 0); + ATF_REQUIRE(ftruncate(fd, 2 * (sizeof(buf) - 1)) == 0); - ATF_REQUIRE(write(fd, buf, sizeof(buf)) == sizeof(buf) - 1); + /* write(2) again must not be limited by ftruncate(2) size. */ + ATF_REQUIRE(write(fd, buf, sizeof(buf)) == sizeof(buf)); + + /* Sanity check. */ + ATF_REQUIRE(fstat(fd, &sb) == 0); + ATF_REQUIRE(sb.st_size == 2 * sizeof(buf)); close(fd); } From owner-svn-src-head@freebsd.org Fri Jul 10 00:45:35 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1D85235AAE9; Fri, 10 Jul 2020 00:45:35 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2vTp71kGz3cqc; Fri, 10 Jul 2020 00:45:34 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D5ADA19C3A; Fri, 10 Jul 2020 00:45:34 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06A0jYhI093336; Fri, 10 Jul 2020 00:45:34 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06A0jYIX093335; Fri, 10 Jul 2020 00:45:34 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202007100045.06A0jYIX093335@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Fri, 10 Jul 2020 00:45:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363067 - head/usr.bin/xinstall X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/usr.bin/xinstall X-SVN-Commit-Revision: 363067 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 00:45:35 -0000 Author: eugen Date: Fri Jul 10 00:45:34 2020 New Revision: 363067 URL: https://svnweb.freebsd.org/changeset/base/363067 Log: install(1): correction after r363064 Make it not break if STRIPBIN points to strip version without -o support. In that case, perform extra copy just like before r363064. MFC after: 1 month X-MFC-With: 363064 Modified: head/usr.bin/xinstall/xinstall.c Modified: head/usr.bin/xinstall/xinstall.c ============================================================================== --- head/usr.bin/xinstall/xinstall.c Fri Jul 10 00:45:16 2020 (r363066) +++ head/usr.bin/xinstall/xinstall.c Fri Jul 10 00:45:34 2020 (r363067) @@ -863,7 +863,7 @@ install(const char *from_name, const char *to_name, u_ if (dostrip) stripped = strip(tempcopy ? tempfile : to_name, from_name, &digestresult); - else + if (!stripped) digestresult = copy(from_fd, from_name, to_fd, tempcopy ? tempfile : to_name, from_sb.st_size); } From owner-svn-src-head@freebsd.org Fri Jul 10 06:46:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 042C2360E4E; Fri, 10 Jul 2020 06:46:43 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B33VV68n6z4CMB; Fri, 10 Jul 2020 06:46:42 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B34271DF25; Fri, 10 Jul 2020 06:46:42 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06A6kggJ015297; Fri, 10 Jul 2020 06:46:42 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06A6kgnX015296; Fri, 10 Jul 2020 06:46:42 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007100646.06A6kgnX015296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 10 Jul 2020 06:46:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363068 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 363068 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 06:46:43 -0000 Author: mjg Date: Fri Jul 10 06:46:42 2020 New Revision: 363068 URL: https://svnweb.freebsd.org/changeset/base/363068 Log: vfs: avoid spurious memcpy in vfs_statfs It is quite often called for the very same buffer. Modified: head/sys/kern/vfs_mount.c Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Fri Jul 10 00:45:34 2020 (r363067) +++ head/sys/kern/vfs_mount.c Fri Jul 10 06:46:42 2020 (r363068) @@ -2173,7 +2173,8 @@ __vfs_statfs(struct mount *mp, struct statfs *sbp) * Filesystems only fill in part of the structure for updates, we * have to read the entirety first to get all content. */ - memcpy(sbp, &mp->mnt_stat, sizeof(*sbp)); + if (sbp != &mp->mnt_stat) + memcpy(sbp, &mp->mnt_stat, sizeof(*sbp)); /* * Set these in case the underlying filesystem fails to do so. From owner-svn-src-head@freebsd.org Fri Jul 10 06:47:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 00952361088; Fri, 10 Jul 2020 06:47:59 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B33Wy6FfRz4CPk; Fri, 10 Jul 2020 06:47:58 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B9E001DE38; Fri, 10 Jul 2020 06:47:58 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06A6lwWI015393; Fri, 10 Jul 2020 06:47:58 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06A6lwCE015392; Fri, 10 Jul 2020 06:47:58 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007100647.06A6lwCE015392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 10 Jul 2020 06:47:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363069 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 363069 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 06:47:59 -0000 Author: mjg Date: Fri Jul 10 06:47:58 2020 New Revision: 363069 URL: https://svnweb.freebsd.org/changeset/base/363069 Log: vfs: depessimize getfsstat when only the count is requested This avoids relocking mountlist_mtx for each entry. Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Fri Jul 10 06:46:42 2020 (r363068) +++ head/sys/kern/vfs_syscalls.c Fri Jul 10 06:47:58 2020 (r363069) @@ -441,7 +441,46 @@ restart: tofree = sfsp = *buf = malloc(maxcount * sizeof(struct statfs), M_STATFS, M_WAITOK); } + count = 0; + + /* + * If there is no target buffer they only want the count. + * + * This could be TAILQ_FOREACH but it is open-coded to match the original + * code below. + */ + if (sfsp == NULL) { + mtx_lock(&mountlist_mtx); + for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) { + if (prison_canseemount(td->td_ucred, mp) != 0) { + nmp = TAILQ_NEXT(mp, mnt_list); + continue; + } +#ifdef MAC + if (mac_mount_check_stat(td->td_ucred, mp) != 0) { + nmp = TAILQ_NEXT(mp, mnt_list); + continue; + } +#endif + count++; + nmp = TAILQ_NEXT(mp, mnt_list); + } + mtx_unlock(&mountlist_mtx); + *countp = count; + return (0); + } + + /* + * They want the entire thing. + * + * Short-circuit the corner case of no room for anything, avoids + * relocking below. + */ + if (maxcount < 1) { + goto out; + } + mtx_lock(&mountlist_mtx); for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) { if (prison_canseemount(td->td_ucred, mp) != 0) { @@ -473,53 +512,55 @@ restart: continue; } } - if (sfsp != NULL && count < maxcount) { - sp = &mp->mnt_stat; - /* - * If MNT_NOWAIT is specified, do not refresh - * the fsstat cache. - */ - if (mode != MNT_NOWAIT) { - error = VFS_STATFS(mp, sp); - if (error != 0) { - mtx_lock(&mountlist_mtx); - nmp = TAILQ_NEXT(mp, mnt_list); - vfs_unbusy(mp); - continue; - } + sp = &mp->mnt_stat; + /* + * If MNT_NOWAIT is specified, do not refresh + * the fsstat cache. + */ + if (mode != MNT_NOWAIT) { + error = VFS_STATFS(mp, sp); + if (error != 0) { + mtx_lock(&mountlist_mtx); + nmp = TAILQ_NEXT(mp, mnt_list); + vfs_unbusy(mp); + continue; } - if (priv_check_cred_vfs_generation(td->td_ucred)) { - sptmp = malloc(sizeof(struct statfs), M_STATFS, - M_WAITOK); - *sptmp = *sp; - sptmp->f_fsid.val[0] = sptmp->f_fsid.val[1] = 0; - prison_enforce_statfs(td->td_ucred, mp, sptmp); - sp = sptmp; - } else - sptmp = NULL; - if (bufseg == UIO_SYSSPACE) { - bcopy(sp, sfsp, sizeof(*sp)); - free(sptmp, M_STATFS); - } else /* if (bufseg == UIO_USERSPACE) */ { - error = copyout(sp, sfsp, sizeof(*sp)); - free(sptmp, M_STATFS); - if (error != 0) { - vfs_unbusy(mp); - return (error); - } + } + if (priv_check_cred_vfs_generation(td->td_ucred)) { + sptmp = malloc(sizeof(struct statfs), M_STATFS, + M_WAITOK); + *sptmp = *sp; + sptmp->f_fsid.val[0] = sptmp->f_fsid.val[1] = 0; + prison_enforce_statfs(td->td_ucred, mp, sptmp); + sp = sptmp; + } else + sptmp = NULL; + if (bufseg == UIO_SYSSPACE) { + bcopy(sp, sfsp, sizeof(*sp)); + free(sptmp, M_STATFS); + } else /* if (bufseg == UIO_USERSPACE) */ { + error = copyout(sp, sfsp, sizeof(*sp)); + free(sptmp, M_STATFS); + if (error != 0) { + vfs_unbusy(mp); + return (error); } - sfsp++; } + sfsp++; count++; + + if (count == maxcount) { + vfs_unbusy(mp); + break; + } + mtx_lock(&mountlist_mtx); nmp = TAILQ_NEXT(mp, mnt_list); vfs_unbusy(mp); } mtx_unlock(&mountlist_mtx); - if (sfsp != NULL && count > maxcount) - *countp = maxcount; - else - *countp = count; +out: + *countp = count; return (0); } From owner-svn-src-head@freebsd.org Fri Jul 10 07:26:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F3E44361D13; Fri, 10 Jul 2020 07:26:50 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B34Np6Dnlz4FBq; Fri, 10 Jul 2020 07:26:50 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B4D6C1E2E7; Fri, 10 Jul 2020 07:26:50 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06A7QoOE039621; Fri, 10 Jul 2020 07:26:50 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06A7Qok6039620; Fri, 10 Jul 2020 07:26:50 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <202007100726.06A7Qok6039620@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Fri, 10 Jul 2020 07:26:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363070 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: grehan X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 363070 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 07:26:51 -0000 Author: grehan Date: Fri Jul 10 07:26:50 2020 New Revision: 363070 URL: https://svnweb.freebsd.org/changeset/base/363070 Log: Advertise 64-bit physical-address capability. This fixes a coredump with NetBSD guests when XHCI is configured. On seeing the AC64 flag clear, the NetBSD XHCI driver was only writing to the lower 32-bits of 64-bit physical address registers. The emulation relies on a write to the hi 32-bits to calculate a host virtual address for internal use, and has always supported 64-bit addressing. All other guests were seen to write to both the lo- and hi- address registers, regardless of the AC64 setting. Discussed with: Leon Dang (author) Tested with: Ubuntu 16/18/20, Windows10, OpenBSD UEFI guests. MFC after: 2 weeks. Modified: head/usr.sbin/bhyve/pci_xhci.c Modified: head/usr.sbin/bhyve/pci_xhci.c ============================================================================== --- head/usr.sbin/bhyve/pci_xhci.c Fri Jul 10 06:47:58 2020 (r363069) +++ head/usr.sbin/bhyve/pci_xhci.c Fri Jul 10 07:26:50 2020 (r363070) @@ -2805,7 +2805,8 @@ pci_xhci_init(struct vmctx *ctx, struct pci_devinst *p sc->hcsparams2 = XHCI_SET_HCSP2_ERSTMAX(XHCI_ERST_MAX) | XHCI_SET_HCSP2_IST(0x04); sc->hcsparams3 = 0; /* no latency */ - sc->hccparams1 = XHCI_SET_HCCP1_NSS(1) | /* no 2nd-streams */ + sc->hccparams1 = XHCI_SET_HCCP1_AC64(1) | /* 64-bit addrs */ + XHCI_SET_HCCP1_NSS(1) | /* no 2nd-streams */ XHCI_SET_HCCP1_SPC(1) | /* short packet */ XHCI_SET_HCCP1_MAXPSA(XHCI_STREAMS_MAX); sc->hccparams2 = XHCI_SET_HCCP2_LEC(1) | From owner-svn-src-head@freebsd.org Fri Jul 10 08:25:49 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B4A833637C8; Fri, 10 Jul 2020 08:25:49 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B35hs4LQBz4Jq4; Fri, 10 Jul 2020 08:25:49 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1403) id 8A3E5149E4; Fri, 10 Jul 2020 08:25:49 +0000 (UTC) Date: Fri, 10 Jul 2020 10:25:49 +0200 From: "Piotr P. Stefaniak" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r363068 - head/sys/kern Message-ID: <20200710082549.GC74062@freefall.freebsd.org> References: <202007100646.06A6kgnX015296@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <202007100646.06A6kgnX015296@repo.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 08:25:49 -0000 > */ >- memcpy(sbp, &mp->mnt_stat, sizeof(*sbp)); >+ if (sbp != &mp->mnt_stat) >+ memcpy(sbp, &mp->mnt_stat, sizeof(*sbp)); > Slightly unrelated question: wouldn't it be prudent to incorporate this logic into memcpy? From owner-svn-src-head@freebsd.org Fri Jul 10 08:31:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B73C9363AC9; Fri, 10 Jul 2020 08:31:37 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B35qY2vtXz4K2m; Fri, 10 Jul 2020 08:31:37 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr1-x434.google.com with SMTP id r12so4993123wrj.13; Fri, 10 Jul 2020 01:31:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=lh7bGPU8c9s+eFe9uuMTRa9i2HBwixWoNS04ade9yuk=; b=jJCA0uMF2nfBpcYFT7V/i0jtrtLuNdlWv8CF81hfRgyGHW1E4eIWqRX0RjfGfO4gkr yO9fY0vEvJRdg4V/Ecr+Xj+i1UzquFDzc5wpQcjrTbGkNwYSfk7DzL+ITEF6BTj8jtCB vpIPAkPsSEMthd6wuJgm5oY7CJ5Cj2mOM15FfxFRcRZ8EmMjbRr4fd/mdt/X6/I3+rPp 4j+gV06tAEXYqXurPqnTbe6sO1WTpPzHVryVXYSVborYJ8T2G3a7SdzgwrE4FlBMcAV5 8O9LXmQ+bc25o0l31gO+qUvhEYREzZIKfRjeUfpVmYwHu9mMUVtlaW56gAVWESerCVxM O7NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=lh7bGPU8c9s+eFe9uuMTRa9i2HBwixWoNS04ade9yuk=; b=CgbySZpqXGCB6LcuuAH4siykMAMiOj/MpuFajSKGAuSUO3bmGOqfEdxtI6mA0NgX0M cP5/Rolxt4g6sNdToWW2gYVjE0JE9aAVkr2pOlmrlW48pJxjMVTX/+bmvyqQx56Qb2Eo xpLLg71/NqZ+hIZNBclSI5CDJ0Kh973HXFQs1p1yjS8SDVdCxpmVlJKrIfbTrjof7g1f 46Tv95Yr2ONFmmhVz6qXD/Wk3Bea8lLi7m9dDK9pMcqiWIhjNbtDXgseDfx/X6smJppd FkhL/fHroO6kU3HCEmtz1rdSLRWvgj89MTFHktj/4elv/u9vRE63P48SPyVR3hU+Y5qs B7oQ== X-Gm-Message-State: AOAM532w85z6S4aANzo8GP3krROAsDyw2MlVQ/QgmMVChxMySK/vkIHP pQCs/7djLRg10aU44NPAeBbC2LTigiPnoXE8DhOBLw== X-Google-Smtp-Source: ABdhPJxmEVj79z+ad03JSCmZzdcoPsXgeOBIomFUFB9szWyumTbj/xBHZMz5PfGXa/fbFzew6CeG6ry213gq/QRrJik= X-Received: by 2002:a05:6000:1290:: with SMTP id f16mr41014723wrx.66.1594369895255; Fri, 10 Jul 2020 01:31:35 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:9d84:0:0:0:0:0 with HTTP; Fri, 10 Jul 2020 01:31:34 -0700 (PDT) In-Reply-To: <20200710082549.GC74062@freefall.freebsd.org> References: <202007100646.06A6kgnX015296@repo.freebsd.org> <20200710082549.GC74062@freefall.freebsd.org> From: Mateusz Guzik Date: Fri, 10 Jul 2020 10:31:34 +0200 Message-ID: Subject: Re: svn commit: r363068 - head/sys/kern To: "Piotr P. Stefaniak" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4B35qY2vtXz4K2m X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 08:31:37 -0000 On 7/10/20, Piotr P. Stefaniak wrote: >> */ >>- memcpy(sbp, &mp->mnt_stat, sizeof(*sbp)); >>+ if (sbp != &mp->mnt_stat) >>+ memcpy(sbp, &mp->mnt_stat, sizeof(*sbp)); >> > > Slightly unrelated question: wouldn't it be prudent to incorporate this > logic into memcpy? > Calls like that are just abusing the routine and indicate design problems in the consumer. Adding the branch into the routine would add overhead for everyone. However, now that you mention it, it may be prudent to do something like this: dtrace -n 'fbt::memcpy:entry,fbt::memmove:entry /arg1 == arg2/ { @[stack()] = count(); }' and run your favourite workload. -- Mateusz Guzik From owner-svn-src-head@freebsd.org Fri Jul 10 08:37:35 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DAF9E363CD5; Fri, 10 Jul 2020 08:37:35 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B35yR1Ktpz4Kqb; Fri, 10 Jul 2020 08:37:34 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x342.google.com with SMTP id 17so4982177wmo.1; Fri, 10 Jul 2020 01:37:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=XdmVb1jcH6gmU+aFH0vi4PmV0BL6UmkArM8sU1ZYUAE=; b=n+ebrB3U/dl0ArmWHlSxuSpKWJ9QZ/Ars9AIuriYVrrDssM5ZBRWpyswH5FxL4mIya aMfDes4EKNlT/Qmgnpa7XCmN53prBLgiP5LzS4T97Nns6edwG4HKiJ2nHbCEurpc+k4T QhsKJiPH7c2LI13f/gyTSyps7DsHYlt9WLCm+JjNIwxD2BaQnD3ro2jgdZwdC2/luqNO 1L0U8qvRHdjHO/E9AqJGL221utDt91K9O+0j11tZQi9Gslz3jjw20eVGXIy/pX+4bOUG kPf5sVl6pERFhlUzZ6VSwphP4UfhellRB04lJHwE/Xz2UNDGf3UBd2qjAeACPQcRP2G9 w3Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=XdmVb1jcH6gmU+aFH0vi4PmV0BL6UmkArM8sU1ZYUAE=; b=XtkBsXxb8UnYXTGOw1HUmACwVpnfZ5pE+TphbwjGQY6Uy2uac0aMtsyTbnbINRWx+8 TbGVPgJ++NUfQVYIh13OEvwwc4KBi5cFEqwkA9TA96+8fxXhaDUznrbVkMxdznEBBNqD uKm/2zkRqOpN/+OcBMdDoJxuQbUdvDVKQ7acN3cjN5eQ5ZIjJE8CxZGFz39Ea8+1p7Rq F9T5783c+WUmdRyLopTCLx1ZY1fbDf10levtVmPJLWsVndOEIEW4i+cCe/UDtTVcYh5e zB7yRLt7yc2ymlhTQ35wUE3a/CLAwDyHC9836weWrNo8bQKZTJ38xdUDnyaGuLvoiinH xUXw== X-Gm-Message-State: AOAM533WPTL4QkOh12hgstjw4Qwa4Bdab1vQJf9n/mtOl56iNTiERXjI 5y98DsAZQ+Hp5opXYpIGw31PyF95ZeDTv7uxofywOg== X-Google-Smtp-Source: ABdhPJwdwv37I+WY6Ca6BDDSUGyIx3BFAC/PIas2DmriFUyTBTpeatHuDg5SZudq23YPvETZK6eYOVAyP1AJ/tP+Kj0= X-Received: by 2002:a1c:e90d:: with SMTP id q13mr4163326wmc.187.1594370252787; Fri, 10 Jul 2020 01:37:32 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:9d84:0:0:0:0:0 with HTTP; Fri, 10 Jul 2020 01:37:32 -0700 (PDT) In-Reply-To: References: <202007100646.06A6kgnX015296@repo.freebsd.org> <20200710082549.GC74062@freefall.freebsd.org> From: Mateusz Guzik Date: Fri, 10 Jul 2020 10:37:32 +0200 Message-ID: Subject: Re: svn commit: r363068 - head/sys/kern To: "Piotr P. Stefaniak" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4B35yR1Ktpz4Kqb X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=n+ebrB3U; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2a00:1450:4864:20::342 as permitted sender) smtp.mailfrom=mjguzik@gmail.com X-Spamd-Result: default: False [-3.76 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.001]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; NEURAL_HAM_LONG(-1.04)[-1.037]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::342:from]; NEURAL_HAM_SHORT(-0.73)[-0.726]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 08:37:35 -0000 On 7/10/20, Mateusz Guzik wrote: > On 7/10/20, Piotr P. Stefaniak wrote: >>> */ >>>- memcpy(sbp, &mp->mnt_stat, sizeof(*sbp)); >>>+ if (sbp != &mp->mnt_stat) >>>+ memcpy(sbp, &mp->mnt_stat, sizeof(*sbp)); >>> >> >> Slightly unrelated question: wouldn't it be prudent to incorporate this >> logic into memcpy? >> > > Calls like that are just abusing the routine and indicate design > problems in the consumer. > Adding the branch into the routine would add overhead for everyone. > > However, now that you mention it, it may be prudent to do something like > this: > > dtrace -n 'fbt::memcpy:entry,fbt::memmove:entry /arg1 == arg2/ { > @[stack()] = count(); }' > > and run your favourite workload. > Oops, that should be: dtrace -n 'fbt::memcpy:entry,fbt::memmove:entry /arg0 == arg1/ { @[stack()] = count(); }' You can look for other abuse too, here are 0-sized calls: dtrace -n 'fbt::memcpy:entry,fbt::memmove:entry,fbt::memset:entry /arg2 == 0/ { @[probefunc,stack()] = count(); }' -- Mateusz Guzik From owner-svn-src-head@freebsd.org Fri Jul 10 09:01:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB05B364630; Fri, 10 Jul 2020 09:01:37 +0000 (UTC) (envelope-from pho@holm.cc) Received: from relay05.pair.com (relay05.pair.com [216.92.24.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B36V92JZ5z4LyW; Fri, 10 Jul 2020 09:01:36 +0000 (UTC) (envelope-from pho@holm.cc) Received: from x8.osted.lan (5.186.119.8.cgn.fibianet.dk [5.186.119.8]) by relay05.pair.com (Postfix) with ESMTP id EC04D1A2C43; Fri, 10 Jul 2020 05:01:32 -0400 (EDT) Received: from x8.osted.lan (localhost [127.0.0.1]) by x8.osted.lan (8.15.2/8.15.2) with ESMTPS id 06A91VFF035242 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 10 Jul 2020 11:01:31 +0200 (CEST) (envelope-from pho@x8.osted.lan) Received: (from pho@localhost) by x8.osted.lan (8.15.2/8.15.2/Submit) id 06A91VqJ035241; Fri, 10 Jul 2020 11:01:31 +0200 (CEST) (envelope-from pho) Date: Fri, 10 Jul 2020 11:01:31 +0200 From: Peter Holm To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r363069 - head/sys/kern Message-ID: <20200710090131.GA34716@x8.osted.lan> References: <202007100647.06A6lwCE015392@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202007100647.06A6lwCE015392@repo.freebsd.org> X-Rspamd-Queue-Id: 4B36V92JZ5z4LyW X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:7859, ipnet:216.92.0.0/16, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 09:01:38 -0000 On Fri, Jul 10, 2020 at 06:47:58AM +0000, Mateusz Guzik wrote: > Author: mjg > Date: Fri Jul 10 06:47:58 2020 > New Revision: 363069 > URL: https://svnweb.freebsd.org/changeset/base/363069 > > Log: > vfs: depessimize getfsstat when only the count is requested > > This avoids relocking mountlist_mtx for each entry. > > Modified: > head/sys/kern/vfs_syscalls.c > > Modified: head/sys/kern/vfs_syscalls.c > ============================================================================== > --- head/sys/kern/vfs_syscalls.c Fri Jul 10 06:46:42 2020 (r363068) Could this one be yours? 20200710 09:46:31 all (267/723): procfs.sh panic: lock (sleep mutex) mountlist not locked @ kern/vfs_syscalls.c:561 cpuid = 4 time = 1594367192 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00377a6910 vpanic() at vpanic+0x182/frame 0xfffffe00377a6960 panic() at panic+0x43/frame 0xfffffe00377a69c0 witness_unlock() at witness_unlock+0x147/frame 0xfffffe00377a6a00 __mtx_unlock_flags() at __mtx_unlock_flags+0x4d/frame 0xfffffe00377a6a30 kern_getfsstat() at kern_getfsstat+0x40b/frame 0xfffffe00377a6ab0 sys_getfsstat() at sys_getfsstat+0x22/frame 0xfffffe00377a6ad0 amd64_syscall() at amd64_syscall+0x159/frame 0xfffffe00377a6bf0 fast_syscall_common() at fast_syscall_common+0x101/frame 0xfffffe00377a6bf0 --- syscall (557, FreeBSD ELF64, sys_getfsstat), rip = 0x80032db1a, rsp = 0x7fffffffd738, rbp = 0x7fffffffd790 --- KDB: enter: panic https://people.freebsd.org/~pho/stress/log/mjguzik030.txt - Peter From owner-svn-src-head@freebsd.org Fri Jul 10 09:01:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 87E493642E1; Fri, 10 Jul 2020 09:01:38 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B36VB35kgz4Lny; Fri, 10 Jul 2020 09:01:38 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4EE2A1F829; Fri, 10 Jul 2020 09:01:38 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06A91cYw098736; Fri, 10 Jul 2020 09:01:38 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06A91a4C098726; Fri, 10 Jul 2020 09:01:36 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007100901.06A91a4C098726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 10 Jul 2020 09:01:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363071 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 363071 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 09:01:38 -0000 Author: mjg Date: Fri Jul 10 09:01:36 2020 New Revision: 363071 URL: https://svnweb.freebsd.org/changeset/base/363071 Log: vfs: fix trivial whitespace issues which don't interefere with blame .. even without the -w switch Modified: head/sys/kern/vfs_acl.c head/sys/kern/vfs_bio.c head/sys/kern/vfs_cluster.c head/sys/kern/vfs_export.c head/sys/kern/vfs_hash.c head/sys/kern/vfs_init.c head/sys/kern/vfs_lookup.c head/sys/kern/vfs_mountroot.c head/sys/kern/vfs_subr.c head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_acl.c ============================================================================== --- head/sys/kern/vfs_acl.c Fri Jul 10 07:26:50 2020 (r363070) +++ head/sys/kern/vfs_acl.c Fri Jul 10 09:01:36 2020 (r363071) @@ -89,7 +89,7 @@ acl_copy_oldacl_into_acl(const struct oldacl *source, if (source->acl_cnt < 0 || source->acl_cnt > OLDACL_MAX_ENTRIES) return (EINVAL); - + bzero(dest, sizeof(*dest)); dest->acl_cnt = source->acl_cnt; Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Fri Jul 10 07:26:50 2020 (r363070) +++ head/sys/kern/vfs_bio.c Fri Jul 10 09:01:36 2020 (r363071) @@ -1336,7 +1336,7 @@ bufshutdown(int show_busybufs) int subiter; #endif - /* + /* * Sync filesystems for shutdown */ wdog_kern_pat(WD_LASTVAL); @@ -1662,7 +1662,7 @@ buf_alloc(struct bufdomain *bd) if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL) != 0) panic("getnewbuf_empty: Locked buf %p on free queue.", bp); - + KASSERT(bp->b_vp == NULL, ("bp: %p still has vnode %p.", bp, bp->b_vp)); KASSERT((bp->b_flags & (B_DELWRI | B_NOREUSE)) == 0, @@ -1798,7 +1798,7 @@ buf_recycle(struct bufdomain *bd, bool kva) * bremfree: * * Mark the buffer for removal from the appropriate free list. - * + * */ void bremfree(struct buf *bp) @@ -2473,7 +2473,7 @@ bdirty(struct buf *bp) * * Since the buffer is not on a queue, we do not update the numfreebuffers * count. - * + * * The buffer must be on QUEUE_NONE. */ @@ -2734,7 +2734,7 @@ brelse(struct buf *bp) if (bp->b_vp != NULL) brelvp(bp); } - + /* * If the buffer has junk contents signal it and eventually * clean up B_DELWRI and diassociate the vnode so that gbincore() @@ -3823,7 +3823,7 @@ getblk(struct vnode *vp, daddr_t blkno, int size, int * * getblk() also forces a bwrite() for any B_DELWRI buffer whose * B_CACHE bit is clear. - * + * * What this means, basically, is that the caller should use B_CACHE to * determine whether the buffer is fully valid or not and should clear * B_INVAL prior to issuing a read. If the caller intends to validate @@ -4334,7 +4334,7 @@ biowait(struct bio *bp, const char *wchan) void biofinish(struct bio *bp, struct devstat *stat, int error) { - + if (error) { bp->bio_error = error; bp->bio_flags |= BIO_ERROR; @@ -4660,7 +4660,7 @@ vfs_busy_pages(struct buf *bp, int clear_modify) * b_offset itself may be offset from the beginning of the first * page. */ -void +void vfs_bio_set_valid(struct buf *bp, int base, int size) { int i, n; Modified: head/sys/kern/vfs_cluster.c ============================================================================== --- head/sys/kern/vfs_cluster.c Fri Jul 10 07:26:50 2020 (r363070) +++ head/sys/kern/vfs_cluster.c Fri Jul 10 09:01:36 2020 (r363071) @@ -173,7 +173,7 @@ cluster_read(struct vnode *vp, u_quad_t filesize, dadd LK_EXCLUSIVE | LK_NOWAIT, NULL))) { rbp->b_flags |= B_RAM; BUF_UNLOCK(rbp); - } + } } BO_RUNLOCK(bo); if (i >= maxra) { Modified: head/sys/kern/vfs_export.c ============================================================================== --- head/sys/kern/vfs_export.c Fri Jul 10 07:26:50 2020 (r363070) +++ head/sys/kern/vfs_export.c Fri Jul 10 09:01:36 2020 (r363071) @@ -512,7 +512,7 @@ vfs_export_lookup(struct mount *mp, struct sockaddr *n * Verify that a host should have access to a filesystem. */ -int +int vfs_stdcheckexp(struct mount *mp, struct sockaddr *nam, uint64_t *extflagsp, struct ucred **credanonp, int *numsecflavors, int *secflavors) { Modified: head/sys/kern/vfs_hash.c ============================================================================== --- head/sys/kern/vfs_hash.c Fri Jul 10 07:26:50 2020 (r363070) +++ head/sys/kern/vfs_hash.c Fri Jul 10 09:01:36 2020 (r363071) @@ -179,7 +179,6 @@ vfs_hash_insert(struct vnode *vp, u_int hash, int flag } if (vp2 == NULL) break; - } vp->v_hash = hash; LIST_INSERT_HEAD(vfs_hash_bucket(vp->v_mount, hash), vp, v_hashlist); Modified: head/sys/kern/vfs_init.c ============================================================================== --- head/sys/kern/vfs_init.c Fri Jul 10 07:26:50 2020 (r363070) +++ head/sys/kern/vfs_init.c Fri Jul 10 09:01:36 2020 (r363071) @@ -385,7 +385,7 @@ vfs_register(struct vfsconf *vfc) vattr_null(&va_null); once = 1; } - + if (vfc->vfc_version != VFS_VERSION) { printf("ERROR: filesystem %s, unsupported ABI version %x\n", vfc->vfc_name, vfc->vfc_version); Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Fri Jul 10 07:26:50 2020 (r363070) +++ head/sys/kern/vfs_lookup.c Fri Jul 10 09:01:36 2020 (r363071) @@ -709,7 +709,7 @@ lookup(struct nameidata *ndp) struct componentname *cnp = &ndp->ni_cnd; int lkflags_save; int ni_dvp_unlocked; - + /* * Setup: break out flag bits into variables. */ @@ -1302,7 +1302,7 @@ relookup(struct vnode *dvp, struct vnode **vpp, struct /* ASSERT(dvp == ndp->ni_startdir) */ if (cnp->cn_flags & SAVESTART) VREF(dvp); - + if ((cnp->cn_flags & LOCKLEAF) == 0) VOP_UNLOCK(dp); return (0); Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Fri Jul 10 07:26:50 2020 (r363070) +++ head/sys/kern/vfs_mountroot.c Fri Jul 10 09:01:36 2020 (r363071) @@ -1049,7 +1049,7 @@ vfs_mountroot(void) struct thread *td; time_t timebase; int error; - + mtx_assert(&Giant, MA_NOTOWNED); TSENTER(); Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Jul 10 07:26:50 2020 (r363070) +++ head/sys/kern/vfs_subr.c Fri Jul 10 09:01:36 2020 (r363071) @@ -1482,7 +1482,7 @@ static struct kproc_desc vnlru_kp = { }; SYSINIT(vnlru, SI_SUB_KTHREAD_UPDATE, SI_ORDER_FIRST, kproc_start, &vnlru_kp); - + /* * Routines having to do with the management of the vnode table. */ Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Fri Jul 10 07:26:50 2020 (r363070) +++ head/sys/kern/vfs_vnops.c Fri Jul 10 09:01:36 2020 (r363071) @@ -192,7 +192,7 @@ vn_open(struct nameidata *ndp, int *flagp, int cmode, * Common code for vnode open operations via a name lookup. * Lookup the vnode and invoke VOP_CREATE if needed. * Check permissions, and call the VOP_OPEN or VOP_CREATE routine. - * + * * Note that this does NOT free nameidata for the successful case, * due to the NDINIT being done elsewhere. */ @@ -1552,7 +1552,7 @@ vn_stat(struct vnode *vp, struct stat *sb, struct ucre sb->st_birthtim.tv_sec = vap->va_birthtime.tv_sec; sb->st_birthtim.tv_nsec = vap->va_birthtime.tv_nsec; - /* + /* * According to www.opengroup.org, the meaning of st_blksize is * "a filesystem-specific preferred I/O block size for this * object. In some filesystem types, this may vary from file @@ -1561,7 +1561,7 @@ vn_stat(struct vnode *vp, struct stat *sb, struct ucre */ sb->st_blksize = max(PAGE_SIZE, vap->va_blocksize); - + sb->st_flags = vap->va_flags; if (priv_check_cred_vfs_generation(td->td_ucred)) sb->st_gen = 0; From owner-svn-src-head@freebsd.org Fri Jul 10 09:04:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CC40B3644BB; Fri, 10 Jul 2020 09:04:37 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B36Yd3cJqz4MMm; Fri, 10 Jul 2020 09:04:37 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x343.google.com with SMTP id l2so5099878wmf.0; Fri, 10 Jul 2020 02:04:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Vy5mg3lg8entatbZgPkorP51EQzj6SQKyyQosg8h4fE=; b=I/SJv5+Bi0pTt/c3pbrAUTwa/JSfB2A/1NY14ybFpA2Fnlcl8UVAHzgBbMJYJmlc9H 8FnrfQtg1Ld5MGuYYWu7n8Sh1qjqIoYZkT0dzQOGKiJsdktR/Ird3WlDs2ZCPSUmlXGU /oppClfhJCZgF1xCiL9Wyy5REbTKbyjQxOZPrKdlQTuvZUiLAf/RGwmIoE/AlvN+UIDT hxlXcDYHon/3KVHraJJ86ie9kDPyhNE3+ic/HjD8mtY2ekSv69lA+7fxFByW4iODM3dO Mfrv+foATqcO5ePdtm9Fm/9gGdMWA0DfPnIy7l6nfz9ZbJ6kDkKBf8e53dfwlnaNlpLk on4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Vy5mg3lg8entatbZgPkorP51EQzj6SQKyyQosg8h4fE=; b=lKuSmiqJxrhq8cDIuq0t647RAfsDyz/bXhJBB7dTmktl5lFlCyKf7j5F361M5KpSUe 6vx4KYCmISPG8o9FBnWpZC1f7KinpRXSv0muQkE1IIuh28S3xIKqfUvLa0ZQEPFDH2dC 90qzKmYhSaDkotyycTOeRr/0mxri3VdORVNT1ju1eXcBhHEua9a18sQlLqsy0GQtnlga L8PORkJ7FwR7lE/cvvYe07Zzt32GvHPtBsIqR70Qnu9SKZpPkKvxNet8h5ctzgbmCLq/ ecTSrRxWZifscn4PuOML8vLChLbQmGKnFkt7/J9sJY94YhMO7SSJ/8rK0+a39MBREXGD xXVA== X-Gm-Message-State: AOAM530/w2KrjRxG9nW8YAAzyjEXkhXQH1jph5/LCaIiWU0FmAu1/AF+ /5MmZ+k4HsvwHdo/WnwsfcxkhRIXGcJDZjl0o0ZMiA== X-Google-Smtp-Source: ABdhPJwZNmyt4cPEplyVEvLNFglKbGGaY11n5clLldz13bnSB4LqbxuEKlqB2lRcPWbkCGrBiknPuUzS2hvIxr2g3Vc= X-Received: by 2002:a05:600c:2209:: with SMTP id z9mr4111140wml.178.1594371875214; Fri, 10 Jul 2020 02:04:35 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:9d84:0:0:0:0:0 with HTTP; Fri, 10 Jul 2020 02:04:34 -0700 (PDT) In-Reply-To: <20200710090131.GA34716@x8.osted.lan> References: <202007100647.06A6lwCE015392@repo.freebsd.org> <20200710090131.GA34716@x8.osted.lan> From: Mateusz Guzik Date: Fri, 10 Jul 2020 11:04:34 +0200 Message-ID: Subject: Re: svn commit: r363069 - head/sys/kern To: Peter Holm Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4B36Yd3cJqz4MMm X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 09:04:37 -0000 On 7/10/20, Peter Holm wrote: > On Fri, Jul 10, 2020 at 06:47:58AM +0000, Mateusz Guzik wrote: >> Author: mjg >> Date: Fri Jul 10 06:47:58 2020 >> New Revision: 363069 >> URL: https://svnweb.freebsd.org/changeset/base/363069 >> >> Log: >> vfs: depessimize getfsstat when only the count is requested >> >> This avoids relocking mountlist_mtx for each entry. >> >> Modified: >> head/sys/kern/vfs_syscalls.c >> >> Modified: head/sys/kern/vfs_syscalls.c >> ============================================================================== >> --- head/sys/kern/vfs_syscalls.c Fri Jul 10 06:46:42 2020 (r363068) > > Could this one be yours? > > 20200710 09:46:31 all (267/723): procfs.sh > panic: lock (sleep mutex) mountlist not locked @ kern/vfs_syscalls.c:561 > cpuid = 4 > time = 1594367192 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame > 0xfffffe00377a6910 > vpanic() at vpanic+0x182/frame 0xfffffe00377a6960 > panic() at panic+0x43/frame 0xfffffe00377a69c0 > witness_unlock() at witness_unlock+0x147/frame 0xfffffe00377a6a00 > __mtx_unlock_flags() at __mtx_unlock_flags+0x4d/frame 0xfffffe00377a6a30 > kern_getfsstat() at kern_getfsstat+0x40b/frame 0xfffffe00377a6ab0 > sys_getfsstat() at sys_getfsstat+0x22/frame 0xfffffe00377a6ad0 > amd64_syscall() at amd64_syscall+0x159/frame 0xfffffe00377a6bf0 > fast_syscall_common() at fast_syscall_common+0x101/frame 0xfffffe00377a6bf0 > --- syscall (557, FreeBSD ELF64, sys_getfsstat), rip = 0x80032db1a, rsp = > 0x7fffffffd738, rbp = 0x7fffffffd790 --- > KDB: enter: panic > > https://people.freebsd.org/~pho/stress/log/mjguzik030.txt > Does this fix it for you? diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index f37a54809e24..2caf09f3412c 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -551,7 +551,7 @@ kern_getfsstat(struct thread *td, struct statfs **buf, size_t bufsize, if (count == maxcount) { vfs_unbusy(mp); - break; + goto out; } mtx_lock(&mountlist_mtx); -- Mateusz Guzik From owner-svn-src-head@freebsd.org Fri Jul 10 09:24:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4EE9B3646CD; Fri, 10 Jul 2020 09:24:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B370X18Z3z4NBG; Fri, 10 Jul 2020 09:24:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 063A51FEAA; Fri, 10 Jul 2020 09:24:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06A9ORlT012641; Fri, 10 Jul 2020 09:24:27 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06A9ORpG012640; Fri, 10 Jul 2020 09:24:27 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007100924.06A9ORpG012640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 10 Jul 2020 09:24:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363072 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 363072 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 09:24:28 -0000 Author: mjg Date: Fri Jul 10 09:24:27 2020 New Revision: 363072 URL: https://svnweb.freebsd.org/changeset/base/363072 Log: vfs: fix early termination of kern_getfsstat The kernel would unlock already unlocked mutex if the buffer got filled up before the mount list ended. Reported by: pho Fixes: r363069 ("vfs: depessimize getfsstat when only the count is requested") Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Fri Jul 10 09:01:36 2020 (r363071) +++ head/sys/kern/vfs_syscalls.c Fri Jul 10 09:24:27 2020 (r363072) @@ -551,7 +551,7 @@ restart: if (count == maxcount) { vfs_unbusy(mp); - break; + goto out; } mtx_lock(&mountlist_mtx); From owner-svn-src-head@freebsd.org Fri Jul 10 09:25:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C4FFC3649CA; Fri, 10 Jul 2020 09:25:55 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B372B5dcNz4NLR; Fri, 10 Jul 2020 09:25:54 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr1-x443.google.com with SMTP id a6so5208169wrm.4; Fri, 10 Jul 2020 02:25:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=H52lGY3IEINcovmX9keuh/cjqfM0QZ/kDW0+rBen2d0=; b=B+XF5ldlYX/Day3Rlqj7Vwhjf9FNOw8c20NmeTP9ftDq4xxe+dqHPr3PFE7rzoVaFB i4ZSLE6C/Mw75lQPmCb3gpX3HA63C1VZbSK0bSOXmTJJwuf/GmXDEMgLDayOZasUPS5D OcFuZ+Rt2KuDnhe2ErWWOHmNeqpg1hkLvZPdUsJOYeglSCeOuoKJDZjvAGtNEPMzDdDz j2w5XZECO9kcSk6lW28ItvOARi7VTXw4wBA75DtPZk0knGtrpLXTRjJfCCLApPsYIa4k 7RQRI5pLKrAh71nRVIGhTP4xJBSNMUDaQcagjuJSNK9EW2ebzWDjH7qyGiGZ7TPhNP6D 2ODg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=H52lGY3IEINcovmX9keuh/cjqfM0QZ/kDW0+rBen2d0=; b=ZkFfPaZWEKjywS85Xefph3LRR/E7mAHPWJkdA7w2Byl4fp+RXZePsA0yUJ6+FI+RYX 0e0BdulWjujhLFSNRVbjKXp0dHW/EOQXGESDHt6WfUXBkK6mNAPZxEM0nmqB5lnvItZ+ q1SEjQn9VSweDHwW6a7tCR27TzyxPqZAn9sMok3hRElh2h5m5mnR8YAM+qMZxLDqUtCX ltH01D2WatUbG/V96OoHKXiwvsV3PpvwyNRwwbToE8UlHLoWYEIugkA4RjAcNC8A5Ct3 kuEmf6Mq8BQbGyQOomJV80VsrYInmla7dRQzOpVDfTmqEURRxzzAkePQdtQExXTNekT9 Kgww== X-Gm-Message-State: AOAM531cyWilfR/1hjimwbX0FqTmN1jgLYfsiJ+3wfutlCruSfCHLf3A m9UF7l4wz8hZlBhQ/ESpa0t284SGjvfmnGUJaV1BmA== X-Google-Smtp-Source: ABdhPJx9U+r4izDZKWeYJnhGZLKjfRBAU/7k5zg03qqJ1P5q+kTRDSxslNeHOQYcpRGaB9xio47CbnxBsKnFBXWt32o= X-Received: by 2002:adf:ded2:: with SMTP id i18mr67574304wrn.109.1594373153244; Fri, 10 Jul 2020 02:25:53 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:9d84:0:0:0:0:0 with HTTP; Fri, 10 Jul 2020 02:25:52 -0700 (PDT) In-Reply-To: References: <202007100647.06A6lwCE015392@repo.freebsd.org> <20200710090131.GA34716@x8.osted.lan> From: Mateusz Guzik Date: Fri, 10 Jul 2020 11:25:52 +0200 Message-ID: Subject: Re: svn commit: r363069 - head/sys/kern To: Peter Holm Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4B372B5dcNz4NLR X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=B+XF5ldl; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2a00:1450:4864:20::443 as permitted sender) smtp.mailfrom=mjguzik@gmail.com X-Spamd-Result: default: False [-3.74 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; NEURAL_HAM_LONG(-1.04)[-1.035]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::443:from]; NEURAL_HAM_SHORT(-0.70)[-0.705]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 09:25:55 -0000 On 7/10/20, Mateusz Guzik wrote: > On 7/10/20, Peter Holm wrote: >> On Fri, Jul 10, 2020 at 06:47:58AM +0000, Mateusz Guzik wrote: >>> Author: mjg >>> Date: Fri Jul 10 06:47:58 2020 >>> New Revision: 363069 >>> URL: https://svnweb.freebsd.org/changeset/base/363069 >>> >>> Log: >>> vfs: depessimize getfsstat when only the count is requested >>> >>> This avoids relocking mountlist_mtx for each entry. >>> >>> Modified: >>> head/sys/kern/vfs_syscalls.c >>> >>> Modified: head/sys/kern/vfs_syscalls.c >>> ============================================================================== >>> --- head/sys/kern/vfs_syscalls.c Fri Jul 10 06:46:42 2020 (r363068) >> >> Could this one be yours? >> >> 20200710 09:46:31 all (267/723): procfs.sh >> panic: lock (sleep mutex) mountlist not locked @ kern/vfs_syscalls.c:561 >> cpuid = 4 >> time = 1594367192 >> KDB: stack backtrace: >> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame >> 0xfffffe00377a6910 >> vpanic() at vpanic+0x182/frame 0xfffffe00377a6960 >> panic() at panic+0x43/frame 0xfffffe00377a69c0 >> witness_unlock() at witness_unlock+0x147/frame 0xfffffe00377a6a00 >> __mtx_unlock_flags() at __mtx_unlock_flags+0x4d/frame 0xfffffe00377a6a30 >> kern_getfsstat() at kern_getfsstat+0x40b/frame 0xfffffe00377a6ab0 >> sys_getfsstat() at sys_getfsstat+0x22/frame 0xfffffe00377a6ad0 >> amd64_syscall() at amd64_syscall+0x159/frame 0xfffffe00377a6bf0 >> fast_syscall_common() at fast_syscall_common+0x101/frame >> 0xfffffe00377a6bf0 >> --- syscall (557, FreeBSD ELF64, sys_getfsstat), rip = 0x80032db1a, rsp = >> 0x7fffffffd738, rbp = 0x7fffffffd790 --- >> KDB: enter: panic >> >> https://people.freebsd.org/~pho/stress/log/mjguzik030.txt >> > > Does this fix it for you? > > diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c > index f37a54809e24..2caf09f3412c 100644 > --- a/sys/kern/vfs_syscalls.c > +++ b/sys/kern/vfs_syscalls.c > @@ -551,7 +551,7 @@ kern_getfsstat(struct thread *td, struct statfs > **buf, size_t bufsize, > > if (count == maxcount) { > vfs_unbusy(mp); > - break; > + goto out; > } > > mtx_lock(&mountlist_mtx); > Reproduced and verified the above fixes it, committed here: https://svnweb.freebsd.org/changeset/base/363072 -- Mateusz Guzik From owner-svn-src-head@freebsd.org Fri Jul 10 09:34:47 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E1A62364C44; Fri, 10 Jul 2020 09:34:47 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B37DR5jY2z4Nn8; Fri, 10 Jul 2020 09:34:47 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A77161FAF8; Fri, 10 Jul 2020 09:34:47 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06A9YlMi018749; Fri, 10 Jul 2020 09:34:47 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06A9Yluw018748; Fri, 10 Jul 2020 09:34:47 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202007100934.06A9Yluw018748@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 10 Jul 2020 09:34:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363073 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm/broadcom/bcm2835 X-SVN-Commit-Revision: 363073 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 09:34:47 -0000 Author: andrew Date: Fri Jul 10 09:34:47 2020 New Revision: 363073 URL: https://svnweb.freebsd.org/changeset/base/363073 Log: Split long lines in the Raspberry Pi FB driver Sponsored by: Innovate UK Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Fri Jul 10 09:24:27 2020 (r363072) +++ head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Fri Jul 10 09:34:47 2020 (r363073) @@ -88,17 +88,20 @@ bcm_fb_init(struct bcmsc_softc *sc, struct bcm2835_fb_ if (bcm2835_mbox_fb_get_bpp(fb) != 0) return (ENXIO); if (fb->bpp < FB_DEPTH) { - device_printf(sc->dev, "changing fb bpp from %d to %d\n", fb->bpp, FB_DEPTH); + device_printf(sc->dev, "changing fb bpp from %d to %d\n", + fb->bpp, FB_DEPTH); fb->bpp = FB_DEPTH; } else - device_printf(sc->dev, "keeping existing fb bpp of %d\n", fb->bpp); + device_printf(sc->dev, "keeping existing fb bpp of %d\n", + fb->bpp); fb->vxres = fb->xres; fb->vyres = fb->yres; fb->xoffset = fb->yoffset = 0; if ((err = bcm2835_mbox_fb_init(fb)) != 0) { - device_printf(sc->dev, "bcm2835_mbox_fb_init failed, err=%d\n", err); + device_printf(sc->dev, "bcm2835_mbox_fb_init failed, err=%d\n", + err); return (ENXIO); } From owner-svn-src-head@freebsd.org Fri Jul 10 09:54:12 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 63F793655F3; Fri, 10 Jul 2020 09:54:12 +0000 (UTC) (envelope-from pho@holm.cc) Received: from relay05.pair.com (relay05.pair.com [216.92.24.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B37fq60l4z4Q1B; Fri, 10 Jul 2020 09:54:11 +0000 (UTC) (envelope-from pho@holm.cc) Received: from x8.osted.lan (5.186.119.8.cgn.fibianet.dk [5.186.119.8]) by relay05.pair.com (Postfix) with ESMTP id D41E51A27D8; Fri, 10 Jul 2020 05:54:10 -0400 (EDT) Received: from x8.osted.lan (localhost [127.0.0.1]) by x8.osted.lan (8.15.2/8.15.2) with ESMTPS id 06A9s7YF035926 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 10 Jul 2020 11:54:07 +0200 (CEST) (envelope-from pho@x8.osted.lan) Received: (from pho@localhost) by x8.osted.lan (8.15.2/8.15.2/Submit) id 06A9s7Eg035925; Fri, 10 Jul 2020 11:54:07 +0200 (CEST) (envelope-from pho) Date: Fri, 10 Jul 2020 11:54:07 +0200 From: Peter Holm To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r363069 - head/sys/kern Message-ID: <20200710095407.GA35896@x8.osted.lan> References: <202007100647.06A6lwCE015392@repo.freebsd.org> <20200710090131.GA34716@x8.osted.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4B37fq60l4z4Q1B X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of pho@holm.cc has no SPF policy when checking 216.92.24.67) smtp.mailfrom=pho@holm.cc X-Spamd-Result: default: False [-0.07 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.09)[-0.085]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-0.51)[-0.508]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; AUTH_NA(1.00)[]; RWL_MAILSPIKE_GOOD(0.00)[216.92.24.67:from]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.58)[-0.580]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[pho@freebsd.org,pho@holm.cc]; RCVD_IN_DNSWL_LOW(-0.10)[216.92.24.67:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7859, ipnet:216.92.0.0/16, country:US]; FROM_NEQ_ENVFROM(0.00)[pho@freebsd.org,pho@holm.cc]; RECEIVED_SPAMHAUS_PBL(0.00)[5.186.119.8:received] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 09:54:12 -0000 On Fri, Jul 10, 2020 at 11:25:52AM +0200, Mateusz Guzik wrote: > On 7/10/20, Mateusz Guzik wrote: > > On 7/10/20, Peter Holm wrote: > >> On Fri, Jul 10, 2020 at 06:47:58AM +0000, Mateusz Guzik wrote: > >>> Author: mjg > >>> Date: Fri Jul 10 06:47:58 2020 > >>> New Revision: 363069 > >>> URL: https://svnweb.freebsd.org/changeset/base/363069 > >>> > >>> Log: > >>> vfs: depessimize getfsstat when only the count is requested > >>> > >>> This avoids relocking mountlist_mtx for each entry. > >>> > >>> Modified: > >>> head/sys/kern/vfs_syscalls.c > >>> > >>> Modified: head/sys/kern/vfs_syscalls.c > >>> ============================================================================== > >>> --- head/sys/kern/vfs_syscalls.c Fri Jul 10 06:46:42 2020 (r363068) > >> > >> Could this one be yours? > >> > >> 20200710 09:46:31 all (267/723): procfs.sh > >> panic: lock (sleep mutex) mountlist not locked @ kern/vfs_syscalls.c:561 > >> cpuid = 4 > >> time = 1594367192 > >> KDB: stack backtrace: > >> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame > >> 0xfffffe00377a6910 > >> vpanic() at vpanic+0x182/frame 0xfffffe00377a6960 > >> panic() at panic+0x43/frame 0xfffffe00377a69c0 > >> witness_unlock() at witness_unlock+0x147/frame 0xfffffe00377a6a00 > >> __mtx_unlock_flags() at __mtx_unlock_flags+0x4d/frame 0xfffffe00377a6a30 > >> kern_getfsstat() at kern_getfsstat+0x40b/frame 0xfffffe00377a6ab0 > >> sys_getfsstat() at sys_getfsstat+0x22/frame 0xfffffe00377a6ad0 > >> amd64_syscall() at amd64_syscall+0x159/frame 0xfffffe00377a6bf0 > >> fast_syscall_common() at fast_syscall_common+0x101/frame > >> 0xfffffe00377a6bf0 > >> --- syscall (557, FreeBSD ELF64, sys_getfsstat), rip = 0x80032db1a, rsp = > >> 0x7fffffffd738, rbp = 0x7fffffffd790 --- > >> KDB: enter: panic > >> > >> https://people.freebsd.org/~pho/stress/log/mjguzik030.txt > >> > > > > Does this fix it for you? > > > > diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c > > index f37a54809e24..2caf09f3412c 100644 > > --- a/sys/kern/vfs_syscalls.c > > +++ b/sys/kern/vfs_syscalls.c > > @@ -551,7 +551,7 @@ kern_getfsstat(struct thread *td, struct statfs > > **buf, size_t bufsize, > > > > if (count == maxcount) { > > vfs_unbusy(mp); > > - break; > > + goto out; > > } > > > > mtx_lock(&mountlist_mtx); > > > > Reproduced and verified the above fixes it, committed here: > https://svnweb.freebsd.org/changeset/base/363072 > > -- > Mateusz Guzik Yes, thank you. This fixed the problem for me. - Peter From owner-svn-src-head@freebsd.org Fri Jul 10 10:29:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E5CDE365BF8; Fri, 10 Jul 2020 10:29:50 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-yb1-f178.google.com (mail-yb1-f178.google.com [209.85.219.178]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B38Ry4247z4Rky; Fri, 10 Jul 2020 10:29:50 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-yb1-f178.google.com with SMTP id l19so2468034ybl.1; Fri, 10 Jul 2020 03:29:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Mz6fTyKNj3NGUIzhJPZfJD4NRKbqEURPh2yZXt87jE4=; b=cRXU20aZbbA86EDOv6o5vMeBQEDti4l8ZADDYBb9QJnTOQvs7U57tBd65UblBQ30J5 7pyiq1Ul9wbEmNJ21ZDujuWBXWpNgK0/54FbFPGOTJ+M/y/KQ7DK1JSl85gcjU/PJyqp nlvbmnVykedxwdkDhYdmeLuLQw8slYgTBFLJNbAwQbU7MFJ4ZuXWyM9jBpG1MDNw2K69 6BPNBrrbUlAsfoPnSpNryIlL5DaobGVzgJLWYB695KRKIMw+OiiswrUbdS7wdbR2p1cl nda3IzB8UuZE8W6wrzKCQIZcAgVbR+CnAdEZMqX34Gm/wfysfi5PmOtCHF90Rb6lJH9c k2AQ== X-Gm-Message-State: AOAM530UKuFCAhAp2NKIMMBwSRQTnEWxSfhQfZavxTJQ95/FJoRTtB1q w7SQ9ECHC2Q2rcThHsNKN1ZMYKR608Uq9chr6PTGz/IIWow= X-Google-Smtp-Source: ABdhPJzOJvtfUfkdbXs7ZEmFGqcD3fUEpxgmjKS0uN3Uv3pAvAQz7/fYzHxMNkHWWAmJ+s/Hjqv7orbTY/wRYluc3w8= X-Received: by 2002:a25:c712:: with SMTP id w18mr18722772ybe.127.1594376989414; Fri, 10 Jul 2020 03:29:49 -0700 (PDT) MIME-Version: 1.0 References: <202007100045.06A0jYIX093335@repo.freebsd.org> In-Reply-To: <202007100045.06A0jYIX093335@repo.freebsd.org> From: Li-Wen Hsu Date: Fri, 10 Jul 2020 18:29:38 +0800 Message-ID: Subject: Re: svn commit: r363067 - head/usr.bin/xinstall To: Eugene Grosbein Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4B38Ry4247z4Rky X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 10:29:51 -0000 On Fri, Jul 10, 2020 at 8:45 AM Eugene Grosbein wrote: > > Author: eugen > Date: Fri Jul 10 00:45:34 2020 > New Revision: 363067 > URL: https://svnweb.freebsd.org/changeset/base/363067 > > Log: > install(1): correction after r363064 > > Make it not break if STRIPBIN points to strip version without -o support. > In that case, perform extra copy just like before r363064. Hi Eugene, I'm not sure if this commit or r363064, there are 7 test cases related to install strip are failing these two changes: https://ci.freebsd.org/job/FreeBSD-head-amd64-test/15801/testReport/ Can you help check if the code or the test need fixing? Thanks, Li-Wen From owner-svn-src-head@freebsd.org Fri Jul 10 11:15:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5C65F366CD5; Fri, 10 Jul 2020 11:15:11 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B39SH1pkhz4TTr; Fri, 10 Jul 2020 11:15:11 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E37F20D61; Fri, 10 Jul 2020 11:15:11 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06ABFAgb080362; Fri, 10 Jul 2020 11:15:10 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06ABFAUD080361; Fri, 10 Jul 2020 11:15:10 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007101115.06ABFAUD080361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 10 Jul 2020 11:15:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363076 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 363076 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 11:15:11 -0000 Author: tuexen Date: Fri Jul 10 11:15:10 2020 New Revision: 363076 URL: https://svnweb.freebsd.org/changeset/base/363076 Log: Fix a use-after-free bug for the userland stack. The kernel stack is not affected. Thanks to Mark Wodrich from Google for finding and reporting the bug. MFC after: 1 week Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Fri Jul 10 11:01:05 2020 (r363075) +++ head/sys/netinet/sctp_indata.c Fri Jul 10 11:15:10 2020 (r363076) @@ -1700,6 +1700,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struc int *break_flag, int last_chunk, uint8_t chk_type) { struct sctp_tmit_chunk *chk = NULL; /* make gcc happy */ + struct sctp_stream_in *strm; uint32_t tsn, fsn, gap, mid; struct mbuf *dmbuf; int the_len; @@ -2327,12 +2328,13 @@ finish_express_del: /* All can be removed */ TAILQ_FOREACH_SAFE(control, &asoc->pending_reply_queue, next, ncontrol) { TAILQ_REMOVE(&asoc->pending_reply_queue, control, next); + strm = &asoc->strmin[control->sinfo_stream]; sctp_queue_data_to_stream(stcb, asoc, control, abort_flag, &need_reasm_check); if (*abort_flag) { return (0); } if (need_reasm_check) { - (void)sctp_deliver_reasm_check(stcb, asoc, &asoc->strmin[control->sinfo_stream], SCTP_READ_LOCK_NOT_HELD); + (void)sctp_deliver_reasm_check(stcb, asoc, strm, SCTP_READ_LOCK_NOT_HELD); need_reasm_check = 0; } } @@ -2347,12 +2349,13 @@ finish_express_del: * control->sinfo_tsn > liste->tsn */ TAILQ_REMOVE(&asoc->pending_reply_queue, control, next); + strm = &asoc->strmin[control->sinfo_stream]; sctp_queue_data_to_stream(stcb, asoc, control, abort_flag, &need_reasm_check); if (*abort_flag) { return (0); } if (need_reasm_check) { - (void)sctp_deliver_reasm_check(stcb, asoc, &asoc->strmin[control->sinfo_stream], SCTP_READ_LOCK_NOT_HELD); + (void)sctp_deliver_reasm_check(stcb, asoc, strm, SCTP_READ_LOCK_NOT_HELD); need_reasm_check = 0; } } From owner-svn-src-head@freebsd.org Fri Jul 10 11:27:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ADF2E36709A; Fri, 10 Jul 2020 11:27:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B39kz46YVz4VKJ; Fri, 10 Jul 2020 11:27:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C2A221244; Fri, 10 Jul 2020 11:27:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06ABRtLH086790; Fri, 10 Jul 2020 11:27:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06ABRtZu086788; Fri, 10 Jul 2020 11:27:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202007101127.06ABRtZu086788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 10 Jul 2020 11:27:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363077 - in head/sys: compat/linuxkpi/common/include/linux sys X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys: compat/linuxkpi/common/include/linux sys X-SVN-Commit-Revision: 363077 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 11:27:55 -0000 Author: hselasky Date: Fri Jul 10 11:27:54 2020 New Revision: 363077 URL: https://svnweb.freebsd.org/changeset/base/363077 Log: Implement the array_size() function in the LinuxKPI. This function basically multiplies its two arguments and returns SIZE_MAX if the result overflows the size_t type. Else the product of the two arguments is returned. Bump the FreeBSD_version to mitigate issues with existing implementation of array_size() in drm-devel-kmod. Discussed with: manu@ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/overflow.h head/sys/sys/param.h Modified: head/sys/compat/linuxkpi/common/include/linux/overflow.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/overflow.h Fri Jul 10 11:15:10 2020 (r363076) +++ head/sys/compat/linuxkpi/common/include/linux/overflow.h Fri Jul 10 11:27:54 2020 (r363077) @@ -31,6 +31,9 @@ #ifndef __LINUX_OVERFLOW_H__ #define __LINUX_OVERFLOW_H__ +#include +#include + #ifndef __has_builtin #define __has_builtin(x) 0 #endif @@ -45,6 +48,16 @@ #if __has_builtin(__builtin_mul_overflow) #define check_mul_overflow(a, b, c) \ __builtin_mul_overflow(a, b, c) + +static inline size_t +array_size(size_t x, size_t y) +{ + size_t retval; + + if (__builtin_mul_overflow(x, y, &retval)) + retval = SIZE_MAX; + return (retval); +} #else #error "Compiler does not support __builtin_mul_overflow" #endif Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri Jul 10 11:15:10 2020 (r363076) +++ head/sys/sys/param.h Fri Jul 10 11:27:54 2020 (r363077) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300100 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300101 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Fri Jul 10 12:06:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7778B368688; Fri, 10 Jul 2020 12:06:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3BbH2YBWz4XTp; Fri, 10 Jul 2020 12:06:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 371B821A33; Fri, 10 Jul 2020 12:06:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06AC6IeF011826; Fri, 10 Jul 2020 12:06:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06AC6Iah011825; Fri, 10 Jul 2020 12:06:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202007101206.06AC6Iah011825@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 10 Jul 2020 12:06:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363078 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 363078 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 12:06:19 -0000 Author: hselasky Date: Fri Jul 10 12:06:18 2020 New Revision: 363078 URL: https://svnweb.freebsd.org/changeset/base/363078 Log: Implement the bitmap_subset() function in the LinuxKPI. This function checks if the bitmap pointed to by the first argument is a subset of the bitmap pointed to by the second argument. The function returns one on success and zero on failure. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/bitmap.h Modified: head/sys/compat/linuxkpi/common/include/linux/bitmap.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/bitmap.h Fri Jul 10 11:27:54 2020 (r363077) +++ head/sys/compat/linuxkpi/common/include/linux/bitmap.h Fri Jul 10 12:06:18 2020 (r363078) @@ -244,6 +244,28 @@ bitmap_equal(const unsigned long *pa, return (1); } +static inline int +bitmap_subset(const unsigned long *pa, + const unsigned long *pb, unsigned size) +{ + const unsigned end = BIT_WORD(size); + const unsigned tail = size & (BITS_PER_LONG - 1); + unsigned i; + + for (i = 0; i != end; i++) { + if (pa[i] & ~pb[i]) + return (0); + } + + if (tail) { + const unsigned long mask = BITMAP_LAST_WORD_MASK(tail); + + if (pa[end] & ~pb[end] & mask) + return (0); + } + return (1); +} + static inline void bitmap_complement(unsigned long *dst, const unsigned long *src, const unsigned int size) From owner-svn-src-head@freebsd.org Fri Jul 10 14:56:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5B87136B560; Fri, 10 Jul 2020 14:56:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3GMC22fTz4hKR; Fri, 10 Jul 2020 14:56:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A6D623B4A; Fri, 10 Jul 2020 14:56:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06AEu7eP017609; Fri, 10 Jul 2020 14:56:07 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06AEu6kS017603; Fri, 10 Jul 2020 14:56:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007101456.06AEu6kS017603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 10 Jul 2020 14:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363079 - in head: share/man/man4 sys/modules sys/modules/sctp sys/netinet X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head: share/man/man4 sys/modules sys/modules/sctp sys/netinet X-SVN-Commit-Revision: 363079 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 14:56:07 -0000 Author: markj Date: Fri Jul 10 14:56:05 2020 New Revision: 363079 URL: https://svnweb.freebsd.org/changeset/base/363079 Log: Provide support for building SCTP as a loadable module. With this change, a kernel compiled with "options SCTP_SUPPORT" and without "options SCTP" supports dynamic loading of the SCTP stack. Currently sctp.ko cannot be unloaded since some prerequisite teardown logic is not yet implemented. Attempts to unload the module will return EOPNOTSUPP. Discussed with: tuexen MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21997 Added: head/sys/modules/sctp/ head/sys/modules/sctp/Makefile (contents, props changed) head/sys/netinet/sctp_module.c (contents, props changed) Modified: head/share/man/man4/sctp.4 head/sys/modules/Makefile head/sys/netinet/sctp_os_bsd.h head/sys/netinet/sctp_syscalls.c head/sys/netinet/sctp_usrreq.c Modified: head/share/man/man4/sctp.4 ============================================================================== --- head/share/man/man4/sctp.4 Fri Jul 10 12:06:18 2020 (r363078) +++ head/share/man/man4/sctp.4 Fri Jul 10 14:56:05 2020 (r363079) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 18, 2020 +.Dd July 9, 2020 .Dt SCTP 4 .Os .Sh NAME @@ -144,8 +144,18 @@ The transport protocol also provides a unordered service as well. The unordered service allows a message to be sent and delivered with no regard to the ordering of any other message. +.Pp +The +.Tn SCTP +kernel implementation may either be compiled into the kernel, or loaded +dynamically as a module. +To support dynamic loading of the stack, the kernel must be compiled +with +.Cd "options SCTP_SUPPORT" . .Ss Extensions -The FreeBSD implementation of +The +.Fx +implementation of .Tn SCTP also supports the following extensions: .Bl -tag -width "sctp partial reliability" @@ -609,3 +619,7 @@ Maximum outgoing SCTP buffer size. .Xr sctp_recvmsg 3 , .Xr sctp_sendmsg 3 , .Xr blackhole 4 +.Sh BUGS +The +.Nm +kernel module cannot be unloaded. Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Fri Jul 10 12:06:18 2020 (r363078) +++ head/sys/modules/Makefile Fri Jul 10 14:56:05 2020 (r363079) @@ -319,6 +319,7 @@ SUBDIR= \ ${_safe} \ ${_sbni} \ scc \ + ${_sctp} \ sdhci \ ${_sdhci_acpi} \ sdhci_pci \ @@ -429,6 +430,9 @@ _if_gre= if_gre _ipfw_pmod= ipfw_pmod .if ${KERN_OPTS:MIPSEC_SUPPORT} && !${KERN_OPTS:MIPSEC} _ipsec= ipsec +.endif +.if ${KERN_OPTS:MSCTP_SUPPORT} || ${KERN_OPTS:MSCTP} +_sctp= sctp .endif .endif Added: head/sys/modules/sctp/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/sctp/Makefile Fri Jul 10 14:56:05 2020 (r363079) @@ -0,0 +1,30 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/netinet +.PATH: ${SRCTOP}/sys/netinet6 + +KMOD= sctp +SRCS= sctp_asconf.c \ + sctp_auth.c \ + sctp_bsd_addr.c \ + sctp_cc_functions.c \ + sctp_crc32.c \ + sctp_indata.c \ + sctp_input.c \ + sctp_kdtrace.c \ + sctp_module.c \ + sctp_output.c \ + sctp_pcb.c \ + sctp_peeloff.c \ + sctp_ss_functions.c \ + sctp_syscalls.c \ + sctp_sysctl.c \ + sctp_timer.c \ + sctp_usrreq.c \ + sctp6_usrreq.c \ + sctputil.c + +SRCS+= device_if.h bus_if.h vnode_if.h +SRCS+= opt_capsicum.h opt_ktrace.h opt_inet.h opt_inet6.h opt_sctp.h + +.include Added: head/sys/netinet/sctp_module.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/netinet/sctp_module.c Fri Jul 10 14:56:05 2020 (r363079) @@ -0,0 +1,197 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019-2020 The FreeBSD Foundation + * + * This software was developed by Mark Johnston under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_inet.h" +#include "opt_inet6.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#ifdef INET +extern struct domain inetdomain; + +struct protosw sctp_stream_protosw = { + .pr_type = SOCK_STREAM, + .pr_domain = &inetdomain, + .pr_protocol = IPPROTO_SCTP, + .pr_flags = PR_CONNREQUIRED|PR_WANTRCVD|PR_LASTHDR, + .pr_input = sctp_input, + .pr_ctlinput = sctp_ctlinput, + .pr_ctloutput = sctp_ctloutput, + .pr_drain = sctp_drain, + .pr_usrreqs = &sctp_usrreqs, +}; + +struct protosw sctp_seqpacket_protosw = { + .pr_type = SOCK_SEQPACKET, + .pr_domain = &inetdomain, + .pr_protocol = IPPROTO_SCTP, + .pr_flags = PR_WANTRCVD|PR_LASTHDR, + .pr_input = sctp_input, + .pr_ctlinput = sctp_ctlinput, + .pr_ctloutput = sctp_ctloutput, + .pr_drain = sctp_drain, + .pr_usrreqs = &sctp_usrreqs, +}; +#endif + +#ifdef INET6 +extern struct domain inet6domain; + +struct protosw sctp6_stream_protosw = { + .pr_type = SOCK_STREAM, + .pr_domain = &inet6domain, + .pr_protocol = IPPROTO_SCTP, + .pr_flags = PR_CONNREQUIRED|PR_WANTRCVD|PR_LASTHDR, + .pr_input = sctp6_input, + .pr_ctlinput = sctp6_ctlinput, + .pr_ctloutput = sctp_ctloutput, + .pr_init = sctp_init, + .pr_drain = sctp_drain, + .pr_usrreqs = &sctp6_usrreqs, +}; + +struct protosw sctp6_seqpacket_protosw = { + .pr_type = SOCK_SEQPACKET, + .pr_domain = &inet6domain, + .pr_protocol = IPPROTO_SCTP, + .pr_flags = PR_WANTRCVD|PR_LASTHDR, + .pr_input = sctp6_input, + .pr_ctlinput = sctp6_ctlinput, + .pr_ctloutput = sctp_ctloutput, +#ifndef INET /* Do not call initialization and drain routines twice. */ + .pr_init = sctp_init, + .pr_drain = sctp_drain, +#endif + .pr_usrreqs = &sctp6_usrreqs, +}; +#endif + +static int +sctp_module_load(void) +{ + int error; + +#ifdef INET + error = pf_proto_register(PF_INET, &sctp_stream_protosw); + if (error != 0) + return (error); + error = pf_proto_register(PF_INET, &sctp_seqpacket_protosw); + if (error != 0) + return (error); + error = ipproto_register(IPPROTO_SCTP); + if (error != 0) + return (error); +#endif +#ifdef INET6 + error = pf_proto_register(PF_INET6, &sctp6_stream_protosw); + if (error != 0) + return (error); + error = pf_proto_register(PF_INET6, &sctp6_seqpacket_protosw); + if (error != 0) + return (error); + error = ip6proto_register(IPPROTO_SCTP); + if (error != 0) + return (error); +#endif + error = sctp_syscalls_init(); + if (error != 0) + return (error); + return (0); +} + +static int __unused +sctp_module_unload(void) +{ + + (void)sctp_syscalls_uninit(); + +#ifdef INET + (void)ipproto_unregister(IPPROTO_SCTP); + (void)pf_proto_unregister(PF_INET, IPPROTO_SCTP, SOCK_STREAM); + (void)pf_proto_unregister(PF_INET, IPPROTO_SCTP, SOCK_SEQPACKET); +#endif +#ifdef INET6 + (void)ip6proto_unregister(IPPROTO_SCTP); + (void)pf_proto_unregister(PF_INET6, IPPROTO_SCTP, SOCK_STREAM); + (void)pf_proto_unregister(PF_INET6, IPPROTO_SCTP, SOCK_SEQPACKET); +#endif + return (0); +} + +static int +sctp_modload(struct module *module, int cmd, void *arg) +{ + int error; + + switch (cmd) { + case MOD_LOAD: + error = sctp_module_load(); + break; + case MOD_UNLOAD: + /* + * Unloading SCTP is currently unsupported. Currently, SCTP + * iterator threads are not stopped during unload. + */ + error = EOPNOTSUPP; + break; + default: + error = 0; + break; + } + return (error); +} + +static moduledata_t sctp_mod = { + "sctp", + &sctp_modload, + NULL, +}; + +DECLARE_MODULE(sctp, sctp_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY); +MODULE_VERSION(sctp, 1); Modified: head/sys/netinet/sctp_os_bsd.h ============================================================================== --- head/sys/netinet/sctp_os_bsd.h Fri Jul 10 12:06:18 2020 (r363078) +++ head/sys/netinet/sctp_os_bsd.h Fri Jul 10 14:56:05 2020 (r363079) @@ -45,9 +45,12 @@ __FBSDID("$FreeBSD$"); #include "opt_sctp.h" #include +#include +#include #include #include #include +#include #include #include #include @@ -85,7 +88,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef INET6 -#include #include #include #include @@ -476,5 +478,8 @@ sctp_get_mbuf_for_msg(unsigned int space_needed, #endif #define SCTP_IS_LISTENING(inp) ((inp->sctp_flags & SCTP_PCB_FLAGS_ACCEPTING) != 0) + +int sctp_syscalls_init(void); +int sctp_syscalls_uninit(void); #endif Modified: head/sys/netinet/sctp_syscalls.c ============================================================================== --- head/sys/netinet/sctp_syscalls.c Fri Jul 10 12:06:18 2020 (r363078) +++ head/sys/netinet/sctp_syscalls.c Fri Jul 10 14:56:05 2020 (r363079) @@ -69,6 +69,8 @@ __FBSDID("$FreeBSD$"); #include #endif #ifdef COMPAT_FREEBSD32 +#include +#include #include #endif @@ -78,6 +80,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include static struct syscall_helper_data sctp_syscalls[] = { @@ -88,28 +91,52 @@ static struct syscall_helper_data sctp_syscalls[] = { SYSCALL_INIT_LAST }; -static void -sctp_syscalls_init(void *unused __unused) +#ifdef COMPAT_FREEBSD32 +static struct syscall_helper_data sctp32_syscalls[] = { + SYSCALL32_INIT_HELPER_COMPAT(sctp_peeloff), + SYSCALL32_INIT_HELPER_COMPAT(sctp_generic_sendmsg), + SYSCALL32_INIT_HELPER_COMPAT(sctp_generic_sendmsg_iov), + SYSCALL32_INIT_HELPER_COMPAT(sctp_generic_recvmsg), + SYSCALL_INIT_LAST +}; +#endif + +int +sctp_syscalls_init(void) { - int error __unused; + int error; - error = syscall_helper_register(sctp_syscalls, SY_THR_STATIC); - KASSERT((error == 0), - ("%s: syscall_helper_register failed for sctp syscalls", __func__)); + error = syscall_helper_register(sctp_syscalls, SY_THR_STATIC_KLD); + if (error != 0) + return (error); #ifdef COMPAT_FREEBSD32 - error = syscall32_helper_register(sctp_syscalls, SY_THR_STATIC); - KASSERT((error == 0), - ("%s: syscall32_helper_register failed for sctp syscalls", - __func__)); + error = syscall32_helper_register(sctp32_syscalls, SY_THR_STATIC_KLD); + if (error != 0) + return (error); #endif + return (0); } -SYSINIT(sctp_syscalls, SI_SUB_SYSCALLS, SI_ORDER_ANY, sctp_syscalls_init, NULL); +int +sctp_syscalls_uninit(void) +{ + int error; + +#ifdef COMPAT_FREEBSD32 + error = syscall32_helper_unregister(sctp32_syscalls); + if (error != 0) + return (error); +#endif + error = syscall_helper_unregister(sctp_syscalls); + if (error != 0) + return (error); + return (0); +} + /* * SCTP syscalls. * Functionality only compiled in if SCTP is defined in the kernel Makefile, * otherwise all return EOPNOTSUPP. - * XXX: We should make this loadable one day. */ int sys_sctp_peeloff(td, uap) @@ -119,7 +146,7 @@ sys_sctp_peeloff(td, uap) caddr_t name; } */ *uap; { -#if (defined(INET) || defined(INET6)) && defined(SCTP) +#if defined(INET) || defined(INET6) struct file *headfp, *nfp = NULL; struct socket *head, *so; cap_rights_t rights; @@ -181,9 +208,7 @@ done: fdrop(headfp, td); done2: return (error); -#else /* SCTP */ - return (EOPNOTSUPP); -#endif /* SCTP */ +#endif } int @@ -199,7 +224,7 @@ sys_sctp_generic_sendmsg (td, uap) int flags } */ *uap; { -#if (defined(INET) || defined(INET6)) && defined(SCTP) +#if defined(INET) || defined(INET6) struct sctp_sndrcvinfo sinfo, *u_sinfo = NULL; struct socket *so; struct file *fp = NULL; @@ -294,9 +319,7 @@ sctp_bad: sctp_bad2: free(to, M_SONAME); return (error); -#else /* SCTP */ - return (EOPNOTSUPP); -#endif /* SCTP */ +#endif } int @@ -312,7 +335,7 @@ sys_sctp_generic_sendmsg_iov(td, uap) int flags } */ *uap; { -#if (defined(INET) || defined(INET6)) && defined(SCTP) +#if defined(INET) || defined(INET6) struct sctp_sndrcvinfo sinfo, *u_sinfo = NULL; struct socket *so; struct file *fp = NULL; @@ -424,9 +447,7 @@ sctp_bad1: sctp_bad2: free(to, M_SONAME); return (error); -#else /* SCTP */ - return (EOPNOTSUPP); -#endif /* SCTP */ +#endif } int @@ -442,7 +463,7 @@ sys_sctp_generic_recvmsg(td, uap) int *msg_flags } */ *uap; { -#if (defined(INET) || defined(INET6)) && defined(SCTP) +#if defined(INET) || defined(INET6) uint8_t sockbufstore[256]; struct uio auio; struct iovec *iov, *tiov; @@ -572,7 +593,5 @@ out1: fdrop(fp, td); return (error); -#else /* SCTP */ - return (EOPNOTSUPP); -#endif /* SCTP */ +#endif } Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Fri Jul 10 12:06:18 2020 (r363078) +++ head/sys/netinet/sctp_usrreq.c Fri Jul 10 14:56:05 2020 (r363079) @@ -97,9 +97,9 @@ sctp_init(void) static void sctp_finish(void *unused __unused) { + EVENTHANDLER_DEREGISTER(rt_addrmsg, SCTP_BASE_VAR(eh_tag)); sctp_pcb_finish(); } - VNET_SYSUNINIT(sctp, SI_SUB_PROTO_DOMAIN, SI_ORDER_FOURTH, sctp_finish, NULL); #endif From owner-svn-src-head@freebsd.org Fri Jul 10 15:04:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1AE4E36BCC7; Fri, 10 Jul 2020 15:04:22 +0000 (UTC) (envelope-from bz@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4B3GXj70k8z4jK8; Fri, 10 Jul 2020 15:04:21 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id B9EF02DBE8; Fri, 10 Jul 2020 15:04:21 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id CED938D4A456; Fri, 10 Jul 2020 15:04:19 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 505B4E70828; Fri, 10 Jul 2020 15:04:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id PhZ7EM9eyZUB; Fri, 10 Jul 2020 15:04:18 +0000 (UTC) Received: from [169.254.55.72] (unknown [IPv6:fde9:577b:c1a9:4902:102b:1215:1599:651a]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id EE1E8E707AE; Fri, 10 Jul 2020 15:04:17 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Cy Schubert" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r363061 - in head/usr.sbin/wpa: hostapd wpa_supplicant Date: Fri, 10 Jul 2020 15:04:17 +0000 X-Mailer: MailMate (2.0BETAr6146) Message-ID: In-Reply-To: <202007092301.069N1aof028804@repo.freebsd.org> References: <202007092301.069N1aof028804@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 15:04:22 -0000 On 9 Jul 2020, at 23:01, Cy Schubert wrote: > Author: cy > Date: Thu Jul 9 23:01:36 2020 > New Revision: 363061 > URL: https://svnweb.freebsd.org/changeset/base/363061 > > Log: > Enable support for IEEE 802.11N, 802.11W, 802.11AC and 802.11.AX to > hostapd and wpa_supplicant. Thank you for also doing wpa_supplicant. > Submitted by: bz > MFC after: 2 weeks > Relnotes: yes > Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate") > > Modified: > head/usr.sbin/wpa/hostapd/Makefile > head/usr.sbin/wpa/wpa_supplicant/Makefile From owner-svn-src-head@freebsd.org Fri Jul 10 15:34:49 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D600936C56B; Fri, 10 Jul 2020 15:34:49 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3HCs1CWdz4kmY; Fri, 10 Jul 2020 15:34:48 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id tv2yjPXYZYYpxtv30jCltV; Fri, 10 Jul 2020 09:34:47 -0600 X-Authority-Analysis: v=2.3 cv=OubUNx3t c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=_RQrkK6FrEwA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=F6657g4R3qgFWcjS01sA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id EE5E91405; Fri, 10 Jul 2020 08:34:43 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 06AFYh7R045975; Fri, 10 Jul 2020 08:34:43 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id 06AFYhCW045972; Fri, 10 Jul 2020 08:34:43 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202007101534.06AFYhCW045972@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: "Bjoern A. Zeeb" cc: "Cy Schubert" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r363061 - in head/usr.sbin/wpa: hostapd wpa_supplicant In-reply-to: References: <202007092301.069N1aof028804@repo.freebsd.org> Comments: In-reply-to "Bjoern A. Zeeb" message dated "Fri, 10 Jul 2020 15:04:17 -0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 10 Jul 2020 08:34:43 -0700 X-CMAE-Envelope: MS4wfKzJNTImE85rH+6xeB8tL0OIzfY3ekPE98c6aGilPw7v8l+o1lzACLjHkAmiaYfGSn0csoKaAW8z9oIjNCN9Oya9i2cn0FUdPye3VuNEbBsKurqa13e/ JrqhcBI9ZNz/vc0O+ISa9AopaRfSdK0NaFDm+fWJkSYbK18Qf2hdBkXXuXQ4bte3q7QFhV0ZnrSiVS+Rw1ikJs8svseMFFvXF+1AlYCxx9DYBJIl1Bl7zvxg pg+/D4rewo3b2SQRP2nlqxs29k2MBTJBPEaZaub1XgROV3qD1IngF/WzMyz2uOeWaOIV6xEPsKxD9ikdgm+HLQ== X-Rspamd-Queue-Id: 4B3HCs1CWdz4kmY X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 15:34:49 -0000 In message , "Bjoern A. Zeeb" writes: > On 9 Jul 2020, at 23:01, Cy Schubert wrote: > > > Author: cy > > Date: Thu Jul 9 23:01:36 2020 > > New Revision: 363061 > > URL: https://svnweb.freebsd.org/changeset/base/363061 > > > > Log: > > Enable support for IEEE 802.11N, 802.11W, 802.11AC and 802.11.AX to > > hostapd and wpa_supplicant. > > Thank you for also doing wpa_supplicant. I'll do the ports next. The wpa_supplicant port is done but yet to be committed. The hostapd port needs a good deal of work to implement options. (I've reinstalled the atheros nic in my sandbox again this morning.) -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Fri Jul 10 16:59:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 251AB36E3BE; Fri, 10 Jul 2020 16:59:07 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3K570DM3z4qlN; Fri, 10 Jul 2020 16:59:07 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DAFCB25341; Fri, 10 Jul 2020 16:59:06 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06AGx61j092437; Fri, 10 Jul 2020 16:59:06 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06AGx6Xc092435; Fri, 10 Jul 2020 16:59:06 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007101659.06AGx6Xc092435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 10 Jul 2020 16:59:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363080 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 363080 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 16:59:07 -0000 Author: tuexen Date: Fri Jul 10 16:59:06 2020 New Revision: 363080 URL: https://svnweb.freebsd.org/changeset/base/363080 Log: Whitespace changes due to upstreaming r363079. Modified: head/sys/netinet/sctp_os_bsd.h head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_os_bsd.h ============================================================================== --- head/sys/netinet/sctp_os_bsd.h Fri Jul 10 14:56:05 2020 (r363079) +++ head/sys/netinet/sctp_os_bsd.h Fri Jul 10 16:59:06 2020 (r363080) @@ -479,7 +479,7 @@ sctp_get_mbuf_for_msg(unsigned int space_needed, #define SCTP_IS_LISTENING(inp) ((inp->sctp_flags & SCTP_PCB_FLAGS_ACCEPTING) != 0) -int sctp_syscalls_init(void); -int sctp_syscalls_uninit(void); +int sctp_syscalls_init(void); +int sctp_syscalls_uninit(void); #endif Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Fri Jul 10 14:56:05 2020 (r363079) +++ head/sys/netinet/sctp_usrreq.c Fri Jul 10 16:59:06 2020 (r363080) @@ -100,6 +100,7 @@ sctp_finish(void *unused __unused) EVENTHANDLER_DEREGISTER(rt_addrmsg, SCTP_BASE_VAR(eh_tag)); sctp_pcb_finish(); } + VNET_SYSUNINIT(sctp, SI_SUB_PROTO_DOMAIN, SI_ORDER_FOURTH, sctp_finish, NULL); #endif From owner-svn-src-head@freebsd.org Fri Jul 10 17:24:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6A7E336EAF2; Fri, 10 Jul 2020 17:24:40 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from mouf.net (mouf.net [IPv6:2607:fc50:0:4400:216:3eff:fe69:33b3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mouf.net", Issuer "mouf.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3Kfc0pRzz4sXV; Fri, 10 Jul 2020 17:24:39 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from lrrr.mouf.net (cpe-76-182-16-135.nc.res.rr.com [76.182.16.135]) (authenticated bits=0) by mouf.net (8.14.9/8.14.9) with ESMTP id 06AHOKG9099205 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 10 Jul 2020 17:24:26 GMT (envelope-from swills@FreeBSD.org) Subject: Re: svn commit: r352558 - head/usr.bin/top To: Mark Millard , "daichi@freebsd.org" , svn-src-head@freebsd.org, FreeBSD Current , Hiroki Sato References: <1BDFB387-930D-4F4D-8729-A5850F1C15B9.ref@yahoo.com> <1BDFB387-930D-4F4D-8729-A5850F1C15B9@yahoo.com> From: Steve Wills Message-ID: <61107ecc-6f9b-a4db-7b1e-ec75f73939ee@FreeBSD.org> Date: Fri, 10 Jul 2020 13:24:16 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <1BDFB387-930D-4F4D-8729-A5850F1C15B9@yahoo.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mouf.net [199.48.129.64]); Fri, 10 Jul 2020 17:24:28 +0000 (UTC) X-Spam-Status: No, score=0.3 required=4.5 tests=KHOP_HELO_FCRDNS autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mouf.net X-Virus-Scanned: clamav-milter 0.99.2 at mouf.net X-Virus-Status: Clean X-Rspamd-Queue-Id: 4B3Kfc0pRzz4sXV X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; ASN(0.00)[asn:36236, ipnet:2607:fc50::/36, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 17:24:40 -0000 On 11/28/19 4:08 PM, Mark Millard via svn-src-head wrote: >> Author: daichi >> Date: Fri Sep 20 17:37:23 2019 >> New Revision: 352558 >> URL: >> https://svnweb.freebsd.org/changeset/base/352558 >> >> >> Log: >> top(1): support multibyte characters in command names (ARGV array) >> depending on locale. >> >> - add setlocale() >> - remove printable() function >> - add VIS_OCTAL and VIS_SAFE to the flag of strvisx() to display >> non-printable characters that do not use C-style backslash sequences >> in three digit octal sequence, or remove it >> >> This change allows multibyte characters to be displayed according to >> locale. If it is recognized as a non-display character according to the >> locale, it is displayed in three digit octal sequence. >> > > Initially picking on tab characters as an example of what is > probably a somewhat broader issue . . . > > Ever since this change, characters like tabs that do not fit > in the next character cell when output, but for which they > are !isprintable(...), now mess up the top display. Again > using tab as an example: line wrapping from the text having > been shifted over by more than one character cell. top does > not track the line wrapping result in how it decides what > to output for the following display updates. > Apologies for the way late reply here, but I just now bothered tracking this down. This commit seems to be the cause of some corruption I'm seeing in long running top(1) as well. As Mark mentions, if I use "hh" it clears up. Should I open a bugzilla bug? I can share screenshots of the corruption, such as: https://i.imgur.com/Xqlwf9h.png https://i.imgur.com/Jv0d5NU.png Thanks, Steve From owner-svn-src-head@freebsd.org Fri Jul 10 17:42:23 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 80B8E36F218; Fri, 10 Jul 2020 17:42:23 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3L332v9Rz4v2B; Fri, 10 Jul 2020 17:42:23 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 47D3425C14; Fri, 10 Jul 2020 17:42:23 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06AHgNim022603; Fri, 10 Jul 2020 17:42:23 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06AHgNNA022602; Fri, 10 Jul 2020 17:42:23 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202007101742.06AHgNNA022602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Fri, 10 Jul 2020 17:42:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363081 - head/usr.bin/xinstall X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/usr.bin/xinstall X-SVN-Commit-Revision: 363081 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 17:42:23 -0000 Author: eugen Date: Fri Jul 10 17:42:22 2020 New Revision: 363081 URL: https://svnweb.freebsd.org/changeset/base/363081 Log: install(1): addition to r363067 Also, make it not break if STRIPBIN points to strip version without -o support and destination does not exist before installing. Reported by: lwhsu MFC after: 1 month X-MFC-With: 363064 Modified: head/usr.bin/xinstall/xinstall.c Modified: head/usr.bin/xinstall/xinstall.c ============================================================================== --- head/usr.bin/xinstall/xinstall.c Fri Jul 10 16:59:06 2020 (r363080) +++ head/usr.bin/xinstall/xinstall.c Fri Jul 10 17:42:22 2020 (r363081) @@ -1350,9 +1350,9 @@ strip(const char *to_name, const char *from_name, char /* NOTREACHED */ } if (status != 0) { - (void)unlink(to_name); if (from_name != NULL) return (0); + (void)unlink(to_name); errx(EX_SOFTWARE, "strip command %s failed on %s", stripbin, to_name); } From owner-svn-src-head@freebsd.org Fri Jul 10 19:54:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF4673720E1; Fri, 10 Jul 2020 19:54:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3Nz14CRfz3ZZG; Fri, 10 Jul 2020 19:54:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 739DC273DA; Fri, 10 Jul 2020 19:54:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06AJs5N5003101; Fri, 10 Jul 2020 19:54:05 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06AJs5sj003100; Fri, 10 Jul 2020 19:54:05 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007101954.06AJs5sj003100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 10 Jul 2020 19:54:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363084 - head/contrib/netcat X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/contrib/netcat X-SVN-Commit-Revision: 363084 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 19:54:05 -0000 Author: markj Date: Fri Jul 10 19:54:04 2020 New Revision: 363084 URL: https://svnweb.freebsd.org/changeset/base/363084 Log: Add a --sctp flag to nc. The change adds an SCTP mode akin to UDP mode. This is handy for doing smoke testing of SCTP. Use a long option to minimize the risk of option conflicts with OpenBSD. For bonus points, this change unbreaks --no-tcpopt by adding a missing case required by getopt_long(). Reviewed by: delphij, tuexen MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25610 Modified: head/contrib/netcat/nc.1 head/contrib/netcat/netcat.c Modified: head/contrib/netcat/nc.1 ============================================================================== --- head/contrib/netcat/nc.1 Fri Jul 10 18:30:53 2020 (r363083) +++ head/contrib/netcat/nc.1 Fri Jul 10 19:54:04 2020 (r363084) @@ -41,6 +41,7 @@ .Op Fl I Ar length .Op Fl i Ar interval .Op Fl -no-tcpopt +.Op Fl -sctp .Op Fl O Ar length .Op Fl P Ar proxy_username .Op Fl p Ar source_port @@ -187,6 +188,8 @@ hostnames or ports. Disables the use of TCP options on the socket, by setting the boolean TCP_NOOPT socket option. +.It Fl -sctp +Use SCTP instead of the default option of TCP. .It Fl O Ar length Specifies the size of the TCP send buffer. .It Fl P Ar proxy_username Modified: head/contrib/netcat/netcat.c ============================================================================== --- head/contrib/netcat/netcat.c Fri Jul 10 18:30:53 2020 (r363083) +++ head/contrib/netcat/netcat.c Fri Jul 10 19:54:04 2020 (r363084) @@ -93,6 +93,7 @@ int FreeBSD_Mflag; /* Measure using stats(3) */ int Nflag; /* shutdown() network socket */ int nflag; /* Don't do name look up */ int FreeBSD_Oflag; /* Do not use TCP options */ +int FreeBSD_sctp; /* Use SCTP */ char *Pflag; /* Proxy username */ char *pflag; /* Localport flag */ int rflag; /* Random ports flag */ @@ -160,6 +161,7 @@ main(int argc, char *argv[]) char unix_dg_tmp_socket_buf[UNIX_DG_TMP_SOCKET_SIZE]; struct option longopts[] = { { "no-tcpopt", no_argument, &FreeBSD_Oflag, 1 }, + { "sctp", no_argument, &FreeBSD_sctp, 1 }, { NULL, 0, NULL, 0 } }; @@ -324,6 +326,9 @@ main(int argc, char *argv[]) if (Tflag < 0 || Tflag > 255 || errstr || errno) errx(1, "illegal tos value %s", optarg); break; + case 0: + /* Long option. */ + break; default: usage(1); } @@ -354,6 +359,12 @@ main(int argc, char *argv[]) errx(1, "cannot use -z and -l"); if (!lflag && kflag) errx(1, "must use -l with -k"); + if (FreeBSD_sctp) { + if (uflag) + errx(1, "cannot use -u and --sctp"); + if (family == AF_UNIX) + errx(1, "cannot use -U and --sctp"); + } /* Get name of temporary socket for unix datagram client */ if ((family == AF_UNIX) && uflag && !lflag) { @@ -373,7 +384,8 @@ main(int argc, char *argv[]) memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = family; hints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM; - hints.ai_protocol = uflag ? IPPROTO_UDP : IPPROTO_TCP; + hints.ai_protocol = uflag ? IPPROTO_UDP : + FreeBSD_sctp ? IPPROTO_SCTP : IPPROTO_TCP; if (nflag) hints.ai_flags |= AI_NUMERICHOST; } @@ -382,6 +394,9 @@ main(int argc, char *argv[]) if (uflag) errx(1, "no proxy support for UDP mode"); + if (FreeBSD_sctp) + errx(1, "no proxy support for SCTP mode"); + if (lflag) errx(1, "no proxy support for listen"); @@ -1424,6 +1439,7 @@ help(void) \t-N Shutdown the network socket after EOF on stdin\n\ \t-n Suppress name/port resolutions\n\ \t--no-tcpopt Disable TCP options\n\ + \t--sctp\t SCTP mode\n\ \t-O length TCP send buffer length\n\ \t-P proxyuser\tUsername for proxy authentication\n\ \t-p port\t Specify local port for remote connects\n\ @@ -1442,7 +1458,7 @@ help(void) \t-z Zero-I/O mode [used for scanning]\n\ Port numbers can be individual or ranges: lo-hi [inclusive]\n"); #ifdef IPSEC - fprintf(stderr, "See ipsec_set_policy(3) for -e argument format\n"); + fprintf(stderr, "\tSee ipsec_set_policy(3) for -e argument format\n"); #endif exit(1); } @@ -1482,6 +1498,7 @@ usage(int ret) #else "usage: nc [-46DdFhklNnrStUuvz] [-I length] [-i interval] [-O length]\n" #endif + "\t [--no-tcpopt] [--sctp]\n" "\t [-P proxy_username] [-p source_port] [-s source] [-T ToS]\n" "\t [-V rtable] [-w timeout] [-X proxy_protocol]\n" "\t [-x proxy_address[:port]] [destination] [port]\n"); From owner-svn-src-head@freebsd.org Fri Jul 10 19:58:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 93ED03722CD; Fri, 10 Jul 2020 19:58:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3P3h3RMvz3b2y; Fri, 10 Jul 2020 19:58:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A17A27162; Fri, 10 Jul 2020 19:58:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06AJw8Jd003349; Fri, 10 Jul 2020 19:58:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06AJw8rp003348; Fri, 10 Jul 2020 19:58:08 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007101958.06AJw8rp003348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 10 Jul 2020 19:58:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363085 - head/contrib/netcat X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/contrib/netcat X-SVN-Commit-Revision: 363085 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 19:58:08 -0000 Author: markj Date: Fri Jul 10 19:58:07 2020 New Revision: 363085 URL: https://svnweb.freebsd.org/changeset/base/363085 Log: Adjust .Dd, missed in r363084. MFC with: r363084 Modified: head/contrib/netcat/nc.1 Modified: head/contrib/netcat/nc.1 ============================================================================== --- head/contrib/netcat/nc.1 Fri Jul 10 19:54:04 2020 (r363084) +++ head/contrib/netcat/nc.1 Fri Jul 10 19:58:07 2020 (r363085) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 20, 2019 +.Dd July 10, 2020 .Dt NC 1 .Os .Sh NAME From owner-svn-src-head@freebsd.org Fri Jul 10 19:58:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 02387372320; Fri, 10 Jul 2020 19:58:27 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3P4269tZz3bBd; Fri, 10 Jul 2020 19:58:26 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8A4827163; Fri, 10 Jul 2020 19:58:26 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06AJwQ0K003408; Fri, 10 Jul 2020 19:58:26 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06AJwQmt003407; Fri, 10 Jul 2020 19:58:26 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007101958.06AJwQmt003407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 10 Jul 2020 19:58:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363086 - head X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 363086 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 19:58:27 -0000 Author: markj Date: Fri Jul 10 19:58:26 2020 New Revision: 363086 URL: https://svnweb.freebsd.org/changeset/base/363086 Log: Add a RELNOTES entry for r363084. Modified: head/RELNOTES Modified: head/RELNOTES ============================================================================== --- head/RELNOTES Fri Jul 10 19:58:07 2020 (r363085) +++ head/RELNOTES Fri Jul 10 19:58:26 2020 (r363086) @@ -10,6 +10,9 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +r363084: + nc(1) now implements SCTP mode, enabled by specifying the --sctp option. + r362158, r362163: struct export_args has changed so that the "user" specified for the -maproot and -mapall exports(5) options may be in more than From owner-svn-src-head@freebsd.org Fri Jul 10 21:41:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 557D9374805; Fri, 10 Jul 2020 21:41:10 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3RLZ1cCvz3yVj; Fri, 10 Jul 2020 21:41:10 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B8718640; Fri, 10 Jul 2020 21:41:10 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06ALf96x065581; Fri, 10 Jul 2020 21:41:09 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06ALf9Je065580; Fri, 10 Jul 2020 21:41:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202007102141.06ALf9Je065580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 10 Jul 2020 21:41:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363087 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 363087 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 21:41:10 -0000 Author: trasz Date: Fri Jul 10 21:41:09 2020 New Revision: 363087 URL: https://svnweb.freebsd.org/changeset/base/363087 Log: Don't emit warnings on MADV_HUGEPAGE; Firefox uses it a lot. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/linux/linux_mmap.c Modified: head/sys/compat/linux/linux_mmap.c ============================================================================== --- head/sys/compat/linux/linux_mmap.c Fri Jul 10 19:58:26 2020 (r363086) +++ head/sys/compat/linux/linux_mmap.c Fri Jul 10 21:41:09 2020 (r363087) @@ -371,7 +371,13 @@ linux_madvise_common(struct thread *td, uintptr_t addr /* Ignored; on FreeBSD huge pages are always on. */ return (0); case LINUX_MADV_NOHUGEPAGE: +#if 0 + /* + * Don't warn - Firefox uses it a lot, and in real Linux it's + * an optional feature. + */ linux_msg(curthread, "unsupported madvise MADV_NOHUGEPAGE"); +#endif return (EINVAL); case LINUX_MADV_DONTDUMP: return (kern_madvise(td, addr, len, MADV_NOCORE)); From owner-svn-src-head@freebsd.org Fri Jul 10 22:59:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CC86C376145; Fri, 10 Jul 2020 22:59:26 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3T4t51nwz43sG; Fri, 10 Jul 2020 22:59:26 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8AC5A94C2; Fri, 10 Jul 2020 22:59:26 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06AMxQ8n013751; Fri, 10 Jul 2020 22:59:26 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06AMxQxA013750; Fri, 10 Jul 2020 22:59:26 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202007102259.06AMxQxA013750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Fri, 10 Jul 2020 22:59:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363088 - head/usr.bin/xinstall/tests X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/usr.bin/xinstall/tests X-SVN-Commit-Revision: 363088 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 22:59:26 -0000 Author: eugen Date: Fri Jul 10 22:59:26 2020 New Revision: 363088 URL: https://svnweb.freebsd.org/changeset/base/363088 Log: Fix the tests for install(1): add support for STRIPBIN's -o option. Reported by: lwhsu MFC after: 1 week Modified: head/usr.bin/xinstall/tests/install_test.sh Modified: head/usr.bin/xinstall/tests/install_test.sh ============================================================================== --- head/usr.bin/xinstall/tests/install_test.sh Fri Jul 10 21:41:09 2020 (r363087) +++ head/usr.bin/xinstall/tests/install_test.sh Fri Jul 10 22:59:26 2020 (r363088) @@ -186,8 +186,12 @@ overwrite_backup_safe_comparing_body() { setup_stripbin() { cat <<\STRIPBIN >stripbin #!/bin/sh -tr z @ <"$1" >"$1.new" && mv -- "$1.new" "$1" +[ "$1" = "-o" ] && dst="$2" && shift 2 +[ "$1" = "--" ] && shift +[ -z "$dst" ] && dst="$1" STRIPBIN + [ "$1" = "true" ] && cmd="cat" || cmd="tr z @" + echo $cmd '<"$1" >"$1.new" && mv -- "$1.new" "$dst"' >>stripbin chmod 755 stripbin export STRIPBIN="$PWD/stripbin" } @@ -253,7 +257,7 @@ strip_changing_overwrite_eq_comparing_body() { atf_test_case strip_noop strip_noop_body() { - export STRIPBIN=true + setup_stripbin true printf 'test\n123\r456\r\n789\0z' >testf atf_check install -s testf copyf [ ! testf -nt copyf ] || atf_fail "bad timestamp" From owner-svn-src-head@freebsd.org Fri Jul 10 23:34:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1F69E376C1B; Fri, 10 Jul 2020 23:34:50 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3Tsj5dPKz45Xm; Fri, 10 Jul 2020 23:34:49 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pl1-x630.google.com with SMTP id m16so1673474pls.5; Fri, 10 Jul 2020 16:34:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Y6u2oyGwECo6V28/b0OEJqsmSOffp4T5LgWsoM9sFLk=; b=UI5zudx1GAWDKJnU0hQ5Va08XpcfoqO3TfWQRyv94GQBNrCnN6O1Q2pGJdqW2F3e5h 5ymgxfd5UMMifWh8cxxLrjKa3sLmdMfkOMLMcP8Qe+B4AKdPJBPpkyyMjxbrESFK7zVy 7Psf1noMZIgQGFiw5C3Zt3m+1HniNqWQ/2tmvHFITIhRT3i2gCeqD3I7adHPMbCpEt8t JI2rl3SXVQD5TX3dE4eHE/0nMKhQGBjcFAq70V/vP+FzVZqvu/QU3f3LC4J19BpvxL20 SfEP+bhpTEf2h5MuzESMXAZchAnZxq3mYWnXsKwhrPi6fl52FrLeCK09LNTE4A9gymZ3 Thew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Y6u2oyGwECo6V28/b0OEJqsmSOffp4T5LgWsoM9sFLk=; b=YW31Gu+CokMMtBEnB4OIEVZHyv9bv1RJvF8IZ3FRXpk4asU0yhRn3AnsOrPiyirwzx qPIXyGT7jGi4OfgwYGhVI1PMyrNm5syCGbN/pjUVvNQKPoLnwvR8Cz1UODaoxi35rThg Hk6UkmZbqMxLG0tOgEDpacqQe96EZ9PdOSrNiasqIFD3/l7vBGSLrTgt+mEFUyueQm+H NU897BSNLUXUyZFOCyXUtaRvfJzvo2pfzz5aBsCUkSn/8hkdaSVZbhwAY2wufLZBh+tX 9L/X33U4lQzktJx/IwU+OUDpD+cBfoVvWCzBxZfuNpgYCKXnj5SV50k5K3XW+WGlGQ6m sasg== X-Gm-Message-State: AOAM532trLM6NkEIcGdSkx6YmX9vGXCys+8ROgCxELXmeq3e3OTp7KVg 0q1X8zMYzXqXt8niwUkUMxyQHoKxxIg= X-Google-Smtp-Source: ABdhPJx9NWHbgU9J3tlFD0ldf1phJQj0U1vb/qPROlxWSh47gGvTqSGD0/kowskYjONw6QGNIUMP+g== X-Received: by 2002:a17:90a:8904:: with SMTP id u4mr8543181pjn.87.1594424086980; Fri, 10 Jul 2020 16:34:46 -0700 (PDT) Received: from [192.168.20.26] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id x8sm6780401pfn.61.2020.07.10.16.34.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jul 2020 16:34:46 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: svn commit: r363088 - head/usr.bin/xinstall/tests From: Enji Cooper In-Reply-To: <202007102259.06AMxQxA013750@repo.freebsd.org> Date: Fri, 10 Jul 2020 16:34:45 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <54EAE812-6AAA-4882-B18E-75ED4FBB6628@gmail.com> References: <202007102259.06AMxQxA013750@repo.freebsd.org> To: Eugene Grosbein X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 4B3Tsj5dPKz45Xm X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 23:34:50 -0000 > On Jul 10, 2020, at 3:59 PM, Eugene Grosbein = wrote: >=20 > Author: eugen > Date: Fri Jul 10 22:59:26 2020 > New Revision: 363088 > URL: https://svnweb.freebsd.org/changeset/base/363088 >=20 > Log: > Fix the tests for install(1): add support for STRIPBIN's -o option. Is this feature now completely gone? Are binaries being stripped = properly in ports, etc? Thanks, -Enji =46rom install(1) on a host running r362553: ENVIRONMENT The install utility checks for the presence of the STRIPBIN = environment variable and if present, uses the assigned value as the program to = run if and when the -s option has been specified. From owner-svn-src-head@freebsd.org Sat Jul 11 01:07:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD4863511E5; Sat, 11 Jul 2020 01:07:46 +0000 (UTC) (envelope-from eugen@freebsd.org) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3Wwy0RqPz4C2R; Sat, 11 Jul 2020 01:07:45 +0000 (UTC) (envelope-from eugen@freebsd.org) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 06B17aBt014133 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 11 Jul 2020 01:07:39 GMT (envelope-from eugen@freebsd.org) X-Envelope-From: eugen@freebsd.org X-Envelope-To: yaneurabeya@gmail.com Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 06B17WaM017174 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 11 Jul 2020 08:07:32 +0700 (+07) (envelope-from eugen@freebsd.org) Subject: Re: svn commit: r363088 - head/usr.bin/xinstall/tests To: Enji Cooper References: <202007102259.06AMxQxA013750@repo.freebsd.org> <54EAE812-6AAA-4882-B18E-75ED4FBB6628@gmail.com> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <8ac0c5b6-1045-75a2-b7ff-ea7b76780cf0@freebsd.org> Date: Sat, 11 Jul 2020 08:07:23 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <54EAE812-6AAA-4882-B18E-75ED4FBB6628@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 4B3Wwy0RqPz4C2R X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; local_wl_from(0.00)[freebsd.org] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 01:07:46 -0000 11.07.2020 6:34, Enji Cooper wrote: >> On Jul 10, 2020, at 3:59 PM, Eugene Grosbein wrote: >> >> Author: eugen >> Date: Fri Jul 10 22:59:26 2020 >> New Revision: 363088 >> URL: https://svnweb.freebsd.org/changeset/base/363088 >> >> Log: >> Fix the tests for install(1): add support for STRIPBIN's -o option. > > Is this feature now completely gone? Are binaries being stripped properly in ports, etc? > Thanks, > -Enji > >>From install(1) on a host running r362553: > > ENVIRONMENT > The install utility checks for the presence of the STRIPBIN environment > variable and if present, uses the assigned value as the program to run if > and when the -s option has been specified. Nothing changed at all for install(1) called without -s option. With this option supplied, install(1) uses "strip -o dst src" instead of making another temporary copy and falls back to previous behaviour if strip/STRIPBIN does not support -o. Please take a look at https://reviews.freebsd.org/D25551 for details. From owner-svn-src-head@freebsd.org Sat Jul 11 01:14:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B9A0D351524; Sat, 11 Jul 2020 01:14:11 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3X4L5D2gz4CJq; Sat, 11 Jul 2020 01:14:10 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 06B1E77F014237 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 11 Jul 2020 01:14:08 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: yaneurabeya@gmail.com Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 06B1E4De017770 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 11 Jul 2020 08:14:04 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r363088 - head/usr.bin/xinstall/tests To: Enji Cooper References: <202007102259.06AMxQxA013750@repo.freebsd.org> <54EAE812-6AAA-4882-B18E-75ED4FBB6628@gmail.com> <8ac0c5b6-1045-75a2-b7ff-ea7b76780cf0@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <33914205-17ca-3ec3-d425-1e269c6d6470@grosbein.net> Date: Sat, 11 Jul 2020 08:13:53 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <8ac0c5b6-1045-75a2-b7ff-ea7b76780cf0@freebsd.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * -0.0 SPF_PASS SPF: sender matches SPF record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 4B3X4L5D2gz4CJq X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-0.11 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-0.62)[-0.616]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; NEURAL_SPAM_MEDIUM(0.83)[0.834]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_PERMFAIL(0.00)[empty SPF record]; NEURAL_HAM_SHORT(-0.23)[-0.231]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 01:14:11 -0000 11.07.2020 8:07, Eugene Grosbein wrote: >>> Fix the tests for install(1): add support for STRIPBIN's -o option. >> Is this feature now completely gone? Are binaries being stripped properly in ports, etc? Support for STRIPBIN has not changed. Stripping of ports etc. still works as before, just more quick due to less I/O. From owner-svn-src-head@freebsd.org Sat Jul 11 06:51:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 40138357FF5; Sat, 11 Jul 2020 06:51:44 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3gYr0hLGz4S7H; Sat, 11 Jul 2020 06:51:44 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EEEE6EFBC; Sat, 11 Jul 2020 06:51:43 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06B6phNW006412; Sat, 11 Jul 2020 06:51:43 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06B6pgca006405; Sat, 11 Jul 2020 06:51:42 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202007110651.06B6pgca006405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sat, 11 Jul 2020 06:51:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363090 - in head/stand: i386/gptboot libsa/geli X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: in head/stand: i386/gptboot libsa/geli X-SVN-Commit-Revision: 363090 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 06:51:44 -0000 Author: tsoome Date: Sat Jul 11 06:51:42 2020 New Revision: 363090 URL: https://svnweb.freebsd.org/changeset/base/363090 Log: loader: implement GELI writes Bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247482 This patch is based on initial work from allanjude. PR: 247482 Obtained from: https://reviews.freebsd.org/D10236 Differential Revision: https://reviews.freebsd.org/D25605 Modified: head/stand/i386/gptboot/gptboot.c head/stand/libsa/geli/geliboot.c head/stand/libsa/geli/geliboot.h head/stand/libsa/geli/geliboot_crypto.c head/stand/libsa/geli/geliboot_internal.h head/stand/libsa/geli/gelidev.c Modified: head/stand/i386/gptboot/gptboot.c ============================================================================== --- head/stand/i386/gptboot/gptboot.c Sat Jul 11 03:39:44 2020 (r363089) +++ head/stand/i386/gptboot/gptboot.c Sat Jul 11 06:51:42 2020 (r363090) @@ -610,7 +610,7 @@ dskread(void *buf, daddr_t lba, unsigned nblk) #ifdef LOADER_GELI_SUPPORT if (err == 0 && gdsk.gdev != NULL) { /* Decrypt */ - if (geli_read(gdsk.gdev, lba * DEV_BSIZE, buf, + if (geli_io(gdsk.gdev, GELI_DECRYPT, lba * DEV_BSIZE, buf, nblk * DEV_BSIZE)) return (err); } Modified: head/stand/libsa/geli/geliboot.c ============================================================================== --- head/stand/libsa/geli/geliboot.c Sat Jul 11 03:39:44 2020 (r363089) +++ head/stand/libsa/geli/geliboot.c Sat Jul 11 06:51:42 2020 (r363090) @@ -310,7 +310,8 @@ found_key: } int -geli_read(struct geli_dev *gdev, off_t offset, u_char *buf, size_t bytes) +geli_io(struct geli_dev *gdev, geli_op_t enc, off_t offset, u_char *buf, + size_t bytes) { u_char iv[G_ELI_IVKEYLEN]; u_char *pbuf; @@ -343,12 +344,13 @@ geli_read(struct geli_dev *gdev, off_t offset, u_char keyno = (dstoff >> G_ELI_KEY_SHIFT) / secsize; g_eli_key_fill(&gdev->sc, &gkey, keyno); - error = geliboot_crypt(gdev->sc.sc_ealgo, 0, pbuf, secsize, + error = geliboot_crypt(gdev->sc.sc_ealgo, enc, pbuf, secsize, gkey.gek_key, gdev->sc.sc_ekeylen, iv); if (error != 0) { explicit_bzero(&gkey, sizeof(gkey)); - printf("Failed to decrypt in geli_read()!"); + printf("%s: Failed to %s!", __func__, + enc ? "encrypt" : "decrypt"); return (error); } pbuf += secsize; Modified: head/stand/libsa/geli/geliboot.h ============================================================================== --- head/stand/libsa/geli/geliboot.h Sat Jul 11 03:39:44 2020 (r363089) +++ head/stand/libsa/geli/geliboot.h Sat Jul 11 06:51:42 2020 (r363090) @@ -50,6 +50,11 @@ #define GELI_KEYBUF_SIZE (sizeof(struct keybuf) + \ (GELI_MAX_KEYS * sizeof(struct keybuf_ent))) +typedef enum geli_op { + GELI_DECRYPT, + GELI_ENCRYPT +} geli_op_t; + extern void pwgets(char *buf, int n, int hide); typedef u_char geli_ukey[G_ELI_USERKEYLEN]; @@ -73,9 +78,10 @@ struct preloaded_file; typedef int (*geli_readfunc)(void *vdev, void *readpriv, off_t offbytes, void *buf, size_t sizebytes); -struct geli_dev * geli_taste(geli_readfunc readfunc, void *readpriv, +struct geli_dev *geli_taste(geli_readfunc readfunc, void *readpriv, daddr_t lastsector, const char *namefmt, ...); -int geli_read(struct geli_dev *gdev, off_t offset, u_char *buf, size_t bytes); +int geli_io(struct geli_dev *gdev, geli_op_t, off_t offset, u_char *buf, + size_t bytes); int geli_havekey(struct geli_dev *gdev); int geli_passphrase(struct geli_dev *gdev, char *pw); Modified: head/stand/libsa/geli/geliboot_crypto.c ============================================================================== --- head/stand/libsa/geli/geliboot_crypto.c Sat Jul 11 03:39:44 2020 (r363089) +++ head/stand/libsa/geli/geliboot_crypto.c Sat Jul 11 06:51:42 2020 (r363090) @@ -35,7 +35,7 @@ #include "geliboot.h" int -geliboot_crypt(u_int algo, int enc, u_char *data, size_t datasize, +geliboot_crypt(u_int algo, geli_op_t enc, u_char *data, size_t datasize, const u_char *key, size_t keysize, u_char *iv) { keyInstance aeskey; @@ -49,7 +49,7 @@ geliboot_crypt(u_int algo, int enc, u_char *data, size err = rijndael_makeKey(&aeskey, !enc, keysize, (const char *)key); if (err < 0) { - printf("Failed to setup decryption keys: %d\n", err); + printf("Failed to setup crypo keys: %d\n", err); return (err); } @@ -59,18 +59,20 @@ geliboot_crypt(u_int algo, int enc, u_char *data, size return (err); } - if (enc == 0) { - /* decrypt */ + switch (enc) { + case GELI_DECRYPT: blks = rijndael_blockDecrypt(&cipher, &aeskey, data, datasize * 8, data); - } else { - /* encrypt */ + break; + case GELI_ENCRYPT: blks = rijndael_blockEncrypt(&cipher, &aeskey, data, datasize * 8, data); + break; } if (datasize != (blks / 8)) { - printf("Failed to decrypt the entire input: " - "%u != %zu\n", blks, datasize); + printf("Failed to %s the entire input: %u != %zu\n", + enc ? "decrypt" : "encrypt", + blks, datasize); return (1); } break; @@ -82,16 +84,16 @@ geliboot_crypt(u_int algo, int enc, u_char *data, size enc_xform_aes_xts.reinit(ctxp, iv); switch (enc) { - case 0: /* decrypt */ + case GELI_DECRYPT: for (i = 0; i < datasize; i += AES_XTS_BLOCKSIZE) { enc_xform_aes_xts.decrypt(ctxp, data + i, data + i); } break; - case 1: /* encrypt */ + case GELI_ENCRYPT: for (i = 0; i < datasize; i += AES_XTS_BLOCKSIZE) { enc_xform_aes_xts.encrypt(ctxp, data + i, - data + 1); + data + i); } break; } @@ -105,7 +107,7 @@ geliboot_crypt(u_int algo, int enc, u_char *data, size } static int -g_eli_crypto_cipher(u_int algo, int enc, u_char *data, size_t datasize, +g_eli_crypto_cipher(u_int algo, geli_op_t enc, u_char *data, size_t datasize, const u_char *key, size_t keysize) { u_char iv[keysize]; @@ -123,7 +125,8 @@ g_eli_crypto_encrypt(u_int algo, u_char *data, size_t if (algo == CRYPTO_AES_XTS) algo = CRYPTO_AES_CBC; - return (g_eli_crypto_cipher(algo, 1, data, datasize, key, keysize)); + return (g_eli_crypto_cipher(algo, GELI_ENCRYPT, data, datasize, key, + keysize)); } int @@ -135,5 +138,6 @@ g_eli_crypto_decrypt(u_int algo, u_char *data, size_t if (algo == CRYPTO_AES_XTS) algo = CRYPTO_AES_CBC; - return (g_eli_crypto_cipher(algo, 0, data, datasize, key, keysize)); + return (g_eli_crypto_cipher(algo, GELI_DECRYPT, data, datasize, key, + keysize)); } Modified: head/stand/libsa/geli/geliboot_internal.h ============================================================================== --- head/stand/libsa/geli/geliboot_internal.h Sat Jul 11 03:39:44 2020 (r363089) +++ head/stand/libsa/geli/geliboot_internal.h Sat Jul 11 06:51:42 2020 (r363090) @@ -55,6 +55,8 @@ #define STAND_H /* We don't want stand.h in {gpt,zfs,gptzfs}boot */ #include +#include "geliboot.h" + #define GELIDEV_NAMELEN 32 struct geli_dev { @@ -65,7 +67,7 @@ struct geli_dev { char *name; /* for prompting; it ends in ':' */ }; -int geliboot_crypt(u_int algo, int enc, u_char *data, size_t datasize, +int geliboot_crypt(u_int algo, geli_op_t enc, u_char *data, size_t datasize, const u_char *key, size_t keysize, u_char *iv); #endif /* _GELIBOOT_INTERNAL_H_ */ Modified: head/stand/libsa/geli/gelidev.c ============================================================================== --- head/stand/libsa/geli/gelidev.c Sat Jul 11 03:39:44 2020 (r363089) +++ head/stand/libsa/geli/gelidev.c Sat Jul 11 06:51:42 2020 (r363090) @@ -115,10 +115,6 @@ geli_dev_strategy(void *devdata, int rw, daddr_t blk, char *iobuf; int rc; - /* We only handle reading; no write support. */ - if ((rw & F_MASK) != F_READ) - return (EOPNOTSUPP); - gdesc = (struct geli_devdesc *)devdata; /* @@ -139,34 +135,63 @@ geli_dev_strategy(void *devdata, int rw, daddr_t blk, alnsize = alnend - alnstart; /* - * If alignment requires us to read more than the size of the provided - * buffer, allocate a temporary buffer. + * If alignment requires us to read/write more than the size of the + * provided buffer, allocate a temporary buffer. + * The writes will always get temporary buffer because of encryption. */ - if (alnsize <= size) + if (alnsize <= size && (rw & F_MASK) == F_READ) iobuf = buf; else if ((iobuf = malloc(alnsize)) == NULL) return (ENOMEM); - /* - * Read the encrypted data using the host provider, then decrypt it. - */ - rc = gdesc->hdesc->dd.d_dev->dv_strategy(gdesc->hdesc, rw, - alnstart / DEV_BSIZE, alnsize, iobuf, NULL); - if (rc != 0) - goto out; - rc = geli_read(gdesc->gdev, alnstart, iobuf, alnsize); - if (rc != 0) - goto out; + switch (rw & F_MASK) { + case F_READ: + /* + * Read the encrypted data using the host provider, + * then decrypt it. + */ + rc = gdesc->hdesc->dd.d_dev->dv_strategy(gdesc->hdesc, rw, + alnstart / DEV_BSIZE, alnsize, iobuf, NULL); + if (rc != 0) + goto out; + rc = geli_io(gdesc->gdev, GELI_DECRYPT, alnstart, iobuf, + alnsize); + if (rc != 0) + goto out; - /* - * If we had to use a temporary buffer, copy the requested part of the - * data to the caller's buffer. - */ - if (iobuf != buf) - memcpy(buf, iobuf + (reqstart - alnstart), size); + /* + * If we had to use a temporary buffer, copy the requested + * part of the data to the caller's buffer. + */ + if (iobuf != buf) + memcpy(buf, iobuf + (reqstart - alnstart), size); - if (rsize != NULL) - *rsize = size; + if (rsize != NULL) + *rsize = size; + break; + case F_WRITE: + if (iobuf != buf) { + /* Read, decrypt, then modify. */ + rc = gdesc->hdesc->dd.d_dev->dv_strategy(gdesc->hdesc, + F_READ, alnstart / DEV_BSIZE, alnsize, iobuf, NULL); + if (rc != 0) + goto out; + rc = geli_io(gdesc->gdev, GELI_DECRYPT, alnstart, iobuf, + alnsize); + if (rc != 0) + goto out; + /* Copy data to iobuf */ + memcpy(iobuf + (reqstart - alnstart), buf, size); + } + + /* Encrypt and write it. */ + rc = geli_io(gdesc->gdev, GELI_ENCRYPT, alnstart, iobuf, + alnsize); + if (rc != 0) + goto out; + rc = gdesc->hdesc->dd.d_dev->dv_strategy(gdesc->hdesc, + rw, alnstart / DEV_BSIZE, alnsize, iobuf, NULL); + } out: if (iobuf != buf) free(iobuf); From owner-svn-src-head@freebsd.org Sat Jul 11 07:33:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A145A359646; Sat, 11 Jul 2020 07:33:21 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3hTs3nCLz4VH0; Sat, 11 Jul 2020 07:33:21 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C1F3F861; Sat, 11 Jul 2020 07:33:21 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06B7XLWE033788; Sat, 11 Jul 2020 07:33:21 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06B7XJrp033777; Sat, 11 Jul 2020 07:33:19 GMT (envelope-from se@FreeBSD.org) Message-Id: <202007110733.06B7XJrp033777@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Sat, 11 Jul 2020 07:33:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363091 - in head/contrib/bc: . include manuals src tests tests/bc X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: in head/contrib/bc: . include manuals src tests tests/bc X-SVN-Commit-Revision: 363091 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 07:33:21 -0000 Author: se Date: Sat Jul 11 07:33:18 2020 New Revision: 363091 URL: https://svnweb.freebsd.org/changeset/base/363091 Log: Update to version 3.1.3 This version fixes the following evaluation, which lead to a parse error: echo "if (1 < 3) 1" | bc Modified: head/contrib/bc/Makefile.in head/contrib/bc/NEWS.md head/contrib/bc/configure.sh head/contrib/bc/include/vm.h head/contrib/bc/locale_install.sh head/contrib/bc/locale_uninstall.sh head/contrib/bc/manuals/build.md head/contrib/bc/src/vm.c head/contrib/bc/tests/bc/stdin.txt head/contrib/bc/tests/bc/stdin_results.txt head/contrib/bc/tests/stdin.sh Directory Properties: head/contrib/bc/ (props changed) Modified: head/contrib/bc/Makefile.in ============================================================================== --- head/contrib/bc/Makefile.in Sat Jul 11 06:51:42 2020 (r363090) +++ head/contrib/bc/Makefile.in Sat Jul 11 07:33:18 2020 (r363091) @@ -29,7 +29,7 @@ # .POSIX: -VERSION = 3.1.1 +VERSION = 3.1.3 SRC = %%SRC%% OBJ = %%OBJ%% @@ -335,7 +335,7 @@ clean_tests: clean clean_config clean_coverage @$(RM) -f bc.old install_locales: - $(LOCALE_INSTALL) $(NLSPATH) $(MAIN_EXEC) $(DESTDIR) + %%INSTALL_LOCALES%% install_bc_manpage: $(SAFE_INSTALL) $(MANPAGE_INSTALL_ARGS) $(BC_MANPAGE) $(DESTDIR)$(MAN1DIR)/$(BC_MANPAGE_NAME) Modified: head/contrib/bc/NEWS.md ============================================================================== --- head/contrib/bc/NEWS.md Sat Jul 11 06:51:42 2020 (r363090) +++ head/contrib/bc/NEWS.md Sat Jul 11 07:33:18 2020 (r363091) @@ -1,5 +1,25 @@ # News +## 3.1.3 + +This is a production release that fixes one minor bug: if `bc` was invoked like +the following, it would error: + +``` +echo "if (1 < 3) 1" | bc +``` + +Unless users run into this bug, they do not need to upgrade, but it is suggested +that they do. + +## 3.1.2 + +This is a production release that adds a way to install *all* locales. Users do +***NOT*** need to upgrade. + +For package maintainers wishing to make use of the change, just pass `-l` to +`configure.sh`. + ## 3.1.1 This is a production release that adds two Spanish locales. Users do ***NOT*** Modified: head/contrib/bc/configure.sh ============================================================================== --- head/contrib/bc/configure.sh Sat Jul 11 06:51:42 2020 (r363090) +++ head/contrib/bc/configure.sh Sat Jul 11 07:33:18 2020 (r363091) @@ -47,12 +47,12 @@ usage() { printf 'usage: %s -h\n' "$script" printf ' %s --help\n' "$script" - printf ' %s [-bD|-dB|-c] [-EfgGHMNPT] [-O OPT_LEVEL] [-k KARATSUBA_LEN]\n' "$script" + printf ' %s [-bD|-dB|-c] [-EfgGHlMNPT] [-O OPT_LEVEL] [-k KARATSUBA_LEN]\n' "$script" printf ' %s \\\n' "$script" printf ' [--bc-only --disable-dc|--dc-only --disable-bc|--coverage] \\\n' printf ' [--debug --disable-extra-math --disable-generated-tests] \\\n' printf ' [--disable-history --disable-man-pages --disable-nls] \\\n' - printf ' [--disable-prompt --disable-strip] \\\n' + printf ' [--disable-prompt --disable-strip] [--install-all-locales] \\\n' printf ' [--opt=OPT_LEVEL] [--karatsuba-len=KARATSUBA_LEN] \\\n' printf ' [--prefix=PREFIX] [--bindir=BINDIR] [--datarootdir=DATAROOTDIR] \\\n' printf ' [--datadir=DATADIR] [--mandir=MANDIR] [--man1dir=MAN1DIR] \\\n' @@ -98,6 +98,10 @@ usage() { printf ' -k KARATSUBA_LEN, --karatsuba-len KARATSUBA_LEN\n' printf ' Set the karatsuba length to KARATSUBA_LEN (default is 64).\n' printf ' It is an error if KARATSUBA_LEN is not a number or is less than 16.\n' + printf ' -l, --install-all-locales\n' + printf ' Installs all locales, regardless of how many are on the system. This\n' + printf ' option is useful for package maintainers who want to make sure that\n' + printf ' a package contains all of the locales that end users might need.\n' printf ' -M, --disable-man-pages\n' printf ' Disable installing manpages.\n' printf ' -N, --disable-nls\n' @@ -319,8 +323,9 @@ nls=1 prompt=1 force=0 strip_bin=1 +all_locales=0 -while getopts "bBcdDEfgGhHk:MNO:PST-" opt; do +while getopts "bBcdDEfgGhHk:lMNO:PST-" opt; do case "$opt" in b) bc_only=1 ;; @@ -335,6 +340,7 @@ while getopts "bBcdDEfgGhHk:MNO:PST-" opt; do h) usage ;; H) hist=0 ;; k) karatsuba_len="$OPTARG" ;; + l) all_locales=1 ;; M) install_manpages=0 ;; N) nls=0 ;; O) optimization="$OPTARG" ;; @@ -423,6 +429,7 @@ while getopts "bBcdDEfgGhHk:MNO:PST-" opt; do disable-nls) nls=0 ;; disable-prompt) prompt=0 ;; disable-strip) strip_bin=0 ;; + install-all-locales) all_locales=1 ;; help* | bc-only* | dc-only* | coverage* | debug*) usage "No arg allowed for --$arg option" ;; disable-bc* | disable-dc* | disable-extra-math*) @@ -431,6 +438,8 @@ while getopts "bBcdDEfgGhHk:MNO:PST-" opt; do usage "No arg allowed for --$arg option" ;; disable-man-pages* | disable-nls* | disable-strip*) usage "No arg allowed for --$arg option" ;; + install-all-locales*) + usage "No arg allowed for --$arg option" ;; '') break ;; # "--" terminates argument processing * ) usage "Invalid option $LONG_OPTARG" ;; esac @@ -751,8 +760,15 @@ if [ "$nls" -ne 0 ]; then else install_locales_prereqs="" uninstall_locales_prereqs="" + all_locales=0 fi +if [ "$nls" -ne 0 ] && [ "$all_locales" -ne 0 ]; then + install_locales="\$(LOCALE_INSTALL) -l \$(NLSPATH) \$(MAIN_EXEC) \$(DESTDIR)" +else + install_locales="\$(LOCALE_INSTALL) \$(NLSPATH) \$(MAIN_EXEC) \$(DESTDIR)" +fi + if [ "$hist" -eq 1 ]; then set +e @@ -911,6 +927,7 @@ contents=$(replace "$contents" "HOSTCC" "$HOSTCC") contents=$(replace "$contents" "COVERAGE_OUTPUT" "$COVERAGE_OUTPUT") contents=$(replace "$contents" "COVERAGE_PREREQS" "$COVERAGE_PREREQS") contents=$(replace "$contents" "INSTALL_PREREQS" "$install_prereqs") +contents=$(replace "$contents" "INSTALL_LOCALES" "$install_locales") contents=$(replace "$contents" "INSTALL_LOCALES_PREREQS" "$install_locales_prereqs") contents=$(replace "$contents" "UNINSTALL_MAN_PREREQS" "$uninstall_man_prereqs") contents=$(replace "$contents" "UNINSTALL_PREREQS" "$uninstall_prereqs") Modified: head/contrib/bc/include/vm.h ============================================================================== --- head/contrib/bc/include/vm.h Sat Jul 11 06:51:42 2020 (r363090) +++ head/contrib/bc/include/vm.h Sat Jul 11 07:33:18 2020 (r363091) @@ -112,10 +112,10 @@ #if BC_ENABLED -#define BC_S (BC_ENABLED && (vm.flags & BC_FLAG_S)) -#define BC_W (BC_ENABLED && (vm.flags & BC_FLAG_W)) -#define BC_L (BC_ENABLED && (vm.flags & BC_FLAG_L)) -#define BC_G (BC_ENABLED && (vm.flags & BC_FLAG_G)) +#define BC_S (vm.flags & BC_FLAG_S) +#define BC_W (vm.flags & BC_FLAG_W) +#define BC_L (vm.flags & BC_FLAG_L) +#define BC_G (vm.flags & BC_FLAG_G) #endif // BC_ENABLED Modified: head/contrib/bc/locale_install.sh ============================================================================== --- head/contrib/bc/locale_install.sh Sat Jul 11 06:51:42 2020 (r363090) +++ head/contrib/bc/locale_install.sh Sat Jul 11 07:33:18 2020 (r363091) @@ -28,6 +28,9 @@ # usage() { + if [ $# -eq 1 ]; then + printf '%s\n' "$1" + fi printf "usage: %s NLSPATH main_exec [DESTDIR]\n" "$0" 1>&2 exit 1 } @@ -150,6 +153,17 @@ scriptdir=$(dirname "$script") . "$scriptdir/functions.sh" +all_locales=0 + +while getopts "l" opt; do + + case "$opt" in + l) all_locales=1 ; shift ;; + ?) usage "Invalid option $opt" ;; + esac + +done + test "$#" -ge 2 || usage nlspath="$1" @@ -180,19 +194,23 @@ fi for file in $locales_dir/*.msg; do locale=$(basename "$file" ".msg") - loc=$(gen_nlspath "$destdir/$nlspath" "$locale" "$main_exec") - localeexists "$locales" "$locale" "$destdir" - err="$?" + if [ "$all_locales" -eq 0 ]; then - if [ "$err" -eq 0 ]; then - continue + localeexists "$locales" "$locale" "$destdir" + err="$?" + + if [ "$err" -eq 0 ]; then + continue + fi fi if [ -L "$file" ]; then continue fi + loc=$(gen_nlspath "$destdir/$nlspath" "$locale" "$main_exec") + gencatfile "$loc" "$file" done @@ -200,14 +218,18 @@ done for file in $locales_dir/*.msg; do locale=$(basename "$file" ".msg") - loc=$(gen_nlspath "$destdir/$nlspath" "$locale" "$main_exec") - localeexists "$locales" "$locale" "$destdir" - err="$?" + if [ "$all_locales" -eq 0 ]; then - if [ "$err" -eq 0 ]; then - continue + localeexists "$locales" "$locale" "$destdir" + err="$?" + + if [ "$err" -eq 0 ]; then + continue + fi fi + + loc=$(gen_nlspath "$destdir/$nlspath" "$locale" "$main_exec") mkdir -p $(dirname "$loc") Modified: head/contrib/bc/locale_uninstall.sh ============================================================================== --- head/contrib/bc/locale_uninstall.sh Sat Jul 11 06:51:42 2020 (r363090) +++ head/contrib/bc/locale_uninstall.sh Sat Jul 11 07:33:18 2020 (r363091) @@ -59,6 +59,7 @@ fi # This way, we can delete catalogs for locales that we had to install # because they are symlinks. locales=$(gen_nlspath "$destdir/$nlspath" "*" "$main_exec") +locales=$(ls $locales 2> /dev/null) for l in $locales; do rm -f "$l" Modified: head/contrib/bc/manuals/build.md ============================================================================== --- head/contrib/bc/manuals/build.md Sat Jul 11 06:51:42 2020 (r363090) +++ head/contrib/bc/manuals/build.md Sat Jul 11 07:33:18 2020 (r363091) @@ -366,18 +366,18 @@ can be disabled permanently in the build by passing th Both commands are equivalent. -### Long Options +### Locales -By default, `bc` and `dc` support long options like `--mathlib` and -`--interactive`. However, support for these options requires `getopt_long()` -which is not in the POSIX standard. For those platforms that do *not* have -`getopt_long()` it will be disabled automatically, or if you wish to disable -them regardless, you can pass the `-L` flag or the `--disable-long-options` -option to `configure.sh`, as follows: +By default, `bc` and `dc` do not install all locales, but only the enabled +locales. If `DESTDIR` exists and is not empty, then they will install all of +the locales that exist on the system. The `-l` flag or `--install-all-locales` +option skips all of that and just installs all of the locales that `bc` and `dc` +have, regardless. To enable that behavior, you can pass the `-l` flag or the +`--install-all-locales` option to `configure.sh`, as follows: ``` -./configure.sh -L -./configure.sh --disable-long-options +./configure.sh -l +./configure.sh --install-all-locales ``` Both commands are equivalent. Modified: head/contrib/bc/src/vm.c ============================================================================== --- head/contrib/bc/src/vm.c Sat Jul 11 06:51:42 2020 (r363090) +++ head/contrib/bc/src/vm.c Sat Jul 11 07:33:18 2020 (r363091) @@ -602,8 +602,21 @@ restart: else if (BC_ERR(string)) bc_parse_err(&vm.prs, BC_ERROR_PARSE_STRING); #if BC_ENABLED - else if (BC_IS_BC && BC_ERR(BC_PARSE_NO_EXEC(&vm.prs))) - bc_parse_err(&vm.prs, BC_ERROR_PARSE_BLOCK); + else if (BC_IS_BC && BC_ERR(BC_PARSE_NO_EXEC(&vm.prs))) { + + size_t i; + bool good = true; + + for (i = 0; good && i < vm.prs.flags.len; ++i) { + uint16_t flag = *((uint16_t*) bc_vec_item(&vm.prs.flags, i)); + good = ((flag & BC_PARSE_FLAG_BRACE) != BC_PARSE_FLAG_BRACE); + } + + if (good) { + while (BC_PARSE_IF_END(&vm.prs)) bc_vm_process("else {}", true); + } + else bc_parse_err(&vm.prs, BC_ERROR_PARSE_BLOCK); + } #endif // BC_ENABLED } Modified: head/contrib/bc/tests/bc/stdin.txt ============================================================================== --- head/contrib/bc/tests/bc/stdin.txt Sat Jul 11 06:51:42 2020 (r363090) +++ head/contrib/bc/tests/bc/stdin.txt Sat Jul 11 07:33:18 2020 (r363091) @@ -13,3 +13,4 @@ i = 4 read() i *= 5 +if (1 < 3) 1 Modified: head/contrib/bc/tests/bc/stdin_results.txt ============================================================================== --- head/contrib/bc/tests/bc/stdin_results.txt Sat Jul 11 06:51:42 2020 (r363090) +++ head/contrib/bc/tests/bc/stdin_results.txt Sat Jul 11 07:33:18 2020 (r363091) @@ -4,3 +4,4 @@ String /* with partial commentString /* with full comm 7 String with a # hash comment3 20 +1 Modified: head/contrib/bc/tests/stdin.sh ============================================================================== --- head/contrib/bc/tests/stdin.sh Sat Jul 11 06:51:42 2020 (r363090) +++ head/contrib/bc/tests/stdin.sh Sat Jul 11 07:33:18 2020 (r363091) @@ -65,8 +65,16 @@ rm -f "$out" printf 'Running %s stdin tests...' "$d" cat "$testdir/$d/stdin.txt" | "$exe" "$@" "$options" > "$out" 2> /dev/null - diff "$testdir/$d/stdin_results.txt" "$out" + +if [ "$d" = "bc" ]; then + + cat "$testdir/$d/stdin1.txt" | "$exe" "$@" "$options" > "$out" 2> /dev/null + diff "$testdir/$d/stdin1_results.txt" "$out" + + cat "$testdir/$d/stdin2.txt" | "$exe" "$@" "$options" > "$out" 2> /dev/null + diff "$testdir/$d/stdin2_results.txt" "$out" +fi rm -f "$out1" From owner-svn-src-head@freebsd.org Sat Jul 11 13:08:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D4135361CCF; Sat, 11 Jul 2020 13:08:17 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3qwK4K5Hz3dMk; Sat, 11 Jul 2020 13:08:17 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 72D2C1335C; Sat, 11 Jul 2020 13:08:17 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06BD8HKA048497; Sat, 11 Jul 2020 13:08:17 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06BD8H4R048496; Sat, 11 Jul 2020 13:08:17 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202007111308.06BD8H4R048496@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 11 Jul 2020 13:08:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363093 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 363093 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 13:08:17 -0000 Author: trasz Date: Sat Jul 11 13:08:16 2020 New Revision: 363093 URL: https://svnweb.freebsd.org/changeset/base/363093 Log: Make linux stat(2) return the same st_dev for every devfs instance. The reason for this is to work around an idiosyncrasy of glibc getttynam(3) implementation: it checks whether st_dev returned for fd 0 is the same as st_dev returned for the target of /proc/self/fd/0 symlink, and with linux chroots having their own devfs instance, the check will fail if you chrooted into it. PR: kern/240767 Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25559 Modified: head/sys/compat/linux/linux_stats.c Modified: head/sys/compat/linux/linux_stats.c ============================================================================== --- head/sys/compat/linux/linux_stats.c Sat Jul 11 09:43:16 2020 (r363092) +++ head/sys/compat/linux/linux_stats.c Sat Jul 11 13:08:16 2020 (r363093) @@ -70,6 +70,17 @@ translate_vnhook_major_minor(struct vnode *vp, struct sb->st_mode |= S_IFBLK; } + /* + * Return the same st_dev for every devfs instance. The reason + * for this is to work around an idiosyncrasy of glibc getttynam() + * implementation: it checks whether st_dev returned for fd 0 + * is the same as st_dev returned for the target of /proc/self/fd/0 + * symlink, and with linux chroots having their own devfs instance, + * the check will fail if you chroot into it. + */ + if (rootdevmp != NULL && vp->v_mount->mnt_vfc == rootdevmp->mnt_vfc) + sb->st_dev = rootdevmp->mnt_stat.f_fsid.val[0]; + if (vp->v_type == VCHR && vp->v_rdev != NULL && linux_driver_get_major_minor(devtoname(vp->v_rdev), &major, &minor) == 0) { @@ -110,6 +121,7 @@ translate_fd_major_minor(struct thread *td, int fd, st { struct file *fp; struct vnode *vp; + struct mount *mp; int major, minor; /* @@ -122,6 +134,12 @@ translate_fd_major_minor(struct thread *td, int fd, st if (vp != NULL && vn_isdisk(vp, NULL)) { buf->st_mode &= ~S_IFMT; buf->st_mode |= S_IFBLK; + } + if (vp != NULL && rootdevmp != NULL) { + mp = vp->v_mount; + __compiler_membar(); + if (mp != NULL && mp->mnt_vfc == rootdevmp->mnt_vfc) + buf->st_dev = rootdevmp->mnt_stat.f_fsid.val[0]; } if (vp != NULL && vp->v_rdev != NULL && linux_driver_get_major_minor(devtoname(vp->v_rdev), From owner-svn-src-head@freebsd.org Sat Jul 11 13:11:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AA046361CEE; Sat, 11 Jul 2020 13:11:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3r0V453mz3dpY; Sat, 11 Jul 2020 13:11:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6FB851389C; Sat, 11 Jul 2020 13:11:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06BDBsYJ054918; Sat, 11 Jul 2020 13:11:54 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06BDBsn5054917; Sat, 11 Jul 2020 13:11:54 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202007111311.06BDBsn5054917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 11 Jul 2020 13:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363094 - head/sys/compat/linprocfs X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linprocfs X-SVN-Commit-Revision: 363094 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 13:11:54 -0000 Author: trasz Date: Sat Jul 11 13:11:54 2020 New Revision: 363094 URL: https://svnweb.freebsd.org/changeset/base/363094 Log: Make linprocfs(5) report correct tty number in /proc//stat. Fixes sudo (sudo-1.8.21p2-3ubuntu1.2); previously would fail with "sudo: no tty present and no askpass program specified". Reviewed by: kib, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25588 Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Sat Jul 11 13:08:16 2020 (r363093) +++ head/sys/compat/linprocfs/linprocfs.c Sat Jul 11 13:11:54 2020 (r363094) @@ -767,6 +767,32 @@ linprocfs_doloadavg(PFS_FILL_ARGS) return (0); } +static int +linprocfs_get_tty_nr(struct proc *p) +{ + struct session *sp; + const char *ttyname; + int error, major, minor, nr; + + PROC_LOCK_ASSERT(p, MA_OWNED); + sx_assert(&proctree_lock, SX_LOCKED); + + if ((p->p_flag & P_CONTROLT) == 0) + return (-1); + + sp = p->p_pgrp->pg_session; + if (sp == NULL) + return (-1); + + ttyname = devtoname(sp->s_ttyp->t_dev); + error = linux_driver_get_major_minor(ttyname, &major, &minor); + if (error != 0) + return (-1); + + nr = makedev(major, minor); + return (nr); +} + /* * Filler function for proc/pid/stat */ @@ -777,12 +803,14 @@ linprocfs_doprocstat(PFS_FILL_ARGS) struct timeval boottime; char state; static int ratelimit = 0; + int tty_nr; vm_offset_t startcode, startdata; getboottime(&boottime); sx_slock(&proctree_lock); PROC_LOCK(p); fill_kinfo_proc(p, &kp); + tty_nr = linprocfs_get_tty_nr(p); sx_sunlock(&proctree_lock); if (p->p_vmspace) { startcode = (vm_offset_t)p->p_vmspace->vm_taddr; @@ -809,10 +837,7 @@ linprocfs_doprocstat(PFS_FILL_ARGS) PS_ADD("pgrp", "%d", p->p_pgid); PS_ADD("session", "%d", p->p_session->s_sid); PROC_UNLOCK(p); - if (kp.ki_tdev == NODEV) - PS_ADD("tty", "%s", "-1"); - else - PS_ADD("tty", "%ju", (uintmax_t)kp.ki_tdev); + PS_ADD("tty", "%d", tty_nr); PS_ADD("tpgid", "%d", kp.ki_tpgid); PS_ADD("flags", "%u", 0); /* XXX */ PS_ADD("minflt", "%lu", kp.ki_rusage.ru_minflt); From owner-svn-src-head@freebsd.org Sat Jul 11 13:56:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D63F336355C; Sat, 11 Jul 2020 13:56:37 +0000 (UTC) (envelope-from mr@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3s055NRmz3yD5; Sat, 11 Jul 2020 13:56:37 +0000 (UTC) (envelope-from mr@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 979691402B; Sat, 11 Jul 2020 13:56:37 +0000 (UTC) (envelope-from mr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06BDubjW079881; Sat, 11 Jul 2020 13:56:37 GMT (envelope-from mr@FreeBSD.org) Received: (from mr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06BDuaIr079878; Sat, 11 Jul 2020 13:56:36 GMT (envelope-from mr@FreeBSD.org) Message-Id: <202007111356.06BDuaIr079878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mr set sender to mr@FreeBSD.org using -f From: Michael Reifenberger Date: Sat, 11 Jul 2020 13:56:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363095 - head/usr.bin/systat X-SVN-Group: head X-SVN-Commit-Author: mr X-SVN-Commit-Paths: head/usr.bin/systat X-SVN-Commit-Revision: 363095 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 13:56:37 -0000 Author: mr Date: Sat Jul 11 13:56:36 2020 New Revision: 363095 URL: https://svnweb.freebsd.org/changeset/base/363095 Log: Handle device removal and removal+add cases to fix infinity rate. PR: 219829 Submitted by: ota@j.email.ne.jp Reported by: rezo@live.cn MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25226 Modified: head/usr.bin/systat/ifcmds.c head/usr.bin/systat/ifstat.c head/usr.bin/systat/systat.1 Modified: head/usr.bin/systat/ifcmds.c ============================================================================== --- head/usr.bin/systat/ifcmds.c Sat Jul 11 13:11:54 2020 (r363094) +++ head/usr.bin/systat/ifcmds.c Sat Jul 11 13:56:36 2020 (r363095) @@ -74,6 +74,8 @@ ifcmd(const char *cmd, const char *args) } } else if (prefix(cmd, "pps")) showpps = !showpps; + else + return (0); return (1); } Modified: head/usr.bin/systat/ifstat.c ============================================================================== --- head/usr.bin/systat/ifstat.c Sat Jul 11 13:11:54 2020 (r363094) +++ head/usr.bin/systat/ifstat.c Sat Jul 11 13:56:36 2020 (r363095) @@ -37,6 +37,7 @@ #include #include +#include #include #include #include @@ -67,7 +68,8 @@ SLIST_HEAD(, if_stat_disp) displist; struct if_stat { SLIST_ENTRY(if_stat) link; - char if_name[IF_NAMESIZE]; + char display_name[IF_NAMESIZE]; + char dev_name[IFNAMSIZ]; /* copied from ifmibdata */ struct ifmibdata if_mib; struct timeval tv; struct timeval tv_lastchanged; @@ -81,7 +83,7 @@ struct if_stat { uint64_t if_out_pps_peak; u_int if_row; /* Index into ifmib sysctl */ int if_ypos; /* -1 if not being displayed */ - u_int display; + bool display; u_int match; }; @@ -91,11 +93,13 @@ extern int showpps; extern int needsort; static int needclear = 0; +static bool displayall = false; -static void right_align_string(struct if_stat *); -static void getifmibdata(const int, struct ifmibdata *); +static void format_device_name(struct if_stat *); +static int getifmibdata(const int, struct ifmibdata *); static void sort_interface_list(void); static u_int getifnum(void); +static void clearifstat(void); #define IFSTAT_ERR(n, s) do { \ putchar('\014'); \ @@ -165,7 +169,7 @@ static u_int getifnum(void); } while (0) #define PUTNAME(p) do { \ - mvprintw(p->if_ypos, 0, "%s", p->if_name); \ + mvprintw(p->if_ypos, 0, "%s", p->display_name); \ mvprintw(p->if_ypos, col2-3, "%s", (const char *)"in"); \ mvprintw(p->if_ypos+1, col2-3, "%s", (const char *)"out"); \ } while (0) @@ -214,7 +218,7 @@ showifstat(void) SLIST_FOREACH(ifp, &curlist, link) { if (ifp->if_ypos < LINES - 3 && ifp->if_ypos != -1) - if (ifp->display == 0 || ifp->match == 0) { + if (!ifp->display || ifp->match == 0) { wmove(wnd, ifp->if_ypos, 0); wclrtoeol(wnd); wmove(wnd, ifp->if_ypos + 1, 0); @@ -235,7 +239,7 @@ int initifstat(void) { struct if_stat *p = NULL; - u_int n = 0, i = 0; + u_int n, i; n = getifnum(); if (n <= 0) @@ -247,18 +251,21 @@ initifstat(void) p = (struct if_stat *)calloc(1, sizeof(struct if_stat)); if (p == NULL) IFSTAT_ERR(1, "out of memory"); - SLIST_INSERT_HEAD(&curlist, p, link); p->if_row = i+1; - getifmibdata(p->if_row, &p->if_mib); - right_align_string(p); + if (getifmibdata(p->if_row, &p->if_mib) == -1) { + free(p); + continue; + } + SLIST_INSERT_HEAD(&curlist, p, link); + format_device_name(p); p->match = 1; /* * Initially, we only display interfaces that have - * received some traffic. + * received some traffic unless display-all is on. */ - if (p->if_mib.ifmd_data.ifi_ibytes != 0) - p->display = 1; + if (displayall || p->if_mib.ifmd_data.ifi_ibytes != 0) + p->display = true; } sort_interface_list(); @@ -269,13 +276,13 @@ initifstat(void) void fetchifstat(void) { - struct if_stat *ifp = NULL; + struct if_stat *ifp = NULL, *temp_var; struct timeval tv, new_tv, old_tv; double elapsed = 0.0; uint64_t new_inb, new_outb, old_inb, old_outb = 0; uint64_t new_inp, new_outp, old_inp, old_outp = 0; - SLIST_FOREACH(ifp, &curlist, link) { + SLIST_FOREACH_SAFE(ifp, &curlist, link, temp_var) { /* * Grab a copy of the old input/output values before we * call getifmibdata(). @@ -287,7 +294,22 @@ fetchifstat(void) ifp->tv_lastchanged = ifp->if_mib.ifmd_data.ifi_lastchange; (void)gettimeofday(&new_tv, NULL); - (void)getifmibdata(ifp->if_row, &ifp->if_mib); + if (getifmibdata(ifp->if_row, &ifp->if_mib) == -1 ) { + /* if a device was removed */ + SLIST_REMOVE(&curlist, ifp, if_stat, link); + free(ifp); + needsort = 1; + clearifstat(); + } else if (strcmp(ifp->dev_name, ifp->if_mib.ifmd_name) != 0 ) { + /* a device was removed and another one was added */ + format_device_name(ifp); + /* clear to the current value for the new device */ + old_inb = ifp->if_mib.ifmd_data.ifi_ibytes; + old_outb = ifp->if_mib.ifmd_data.ifi_obytes; + old_inp = ifp->if_mib.ifmd_data.ifi_ipackets; + old_outp = ifp->if_mib.ifmd_data.ifi_opackets; + needsort = 1; + } new_inb = ifp->if_mib.ifmd_data.ifi_ibytes; new_outb = ifp->if_mib.ifmd_data.ifi_obytes; @@ -295,8 +317,8 @@ fetchifstat(void) new_outp = ifp->if_mib.ifmd_data.ifi_opackets; /* Display interface if it's received some traffic. */ - if (new_inb > 0 && old_inb == 0) { - ifp->display = 1; + if (!ifp->display && new_inb > 0 && old_inb == 0) { + ifp->display = true; needsort = 1; } @@ -351,28 +373,18 @@ fetchifstat(void) /* * We want to right justify our interface names against the first column * (first sixteen or so characters), so we need to do some alignment. + * We save original name so that we can find a same spot is take by a + * different device. */ static void -right_align_string(struct if_stat *ifp) +format_device_name(struct if_stat *ifp) { - int str_len = 0, pad_len = 0; - char *newstr = NULL, *ptr = NULL; - if (ifp == NULL || ifp->if_mib.ifmd_name == NULL) - return; - else { - /* string length + '\0' */ - str_len = strlen(ifp->if_mib.ifmd_name)+1; - pad_len = IF_NAMESIZE-(str_len); - - newstr = ifp->if_name; - ptr = newstr + pad_len; - (void)memset((void *)newstr, (int)' ', IF_NAMESIZE); - (void)strncpy(ptr, (const char *)&ifp->if_mib.ifmd_name, - str_len); + if (ifp != NULL ) { + snprintf(ifp->display_name, IF_NAMESIZE, "%*s", IF_NAMESIZE-1, + ifp->if_mib.ifmd_name); + strcpy(ifp->dev_name, ifp->if_mib.ifmd_name); } - - return; } static int @@ -461,9 +473,10 @@ getifnum(void) return (data); } -static void +static int getifmibdata(int row, struct ifmibdata *data) { + int ret = 0; size_t datalen = 0; static int name[] = { CTL_NET, PF_LINK, @@ -474,9 +487,12 @@ getifmibdata(int row, struct ifmibdata *data) datalen = sizeof(*data); name[4] = row; - if ((sysctl(name, 6, (void *)data, (size_t *)&datalen, (void *)NULL, - (size_t)0) != 0) && (errno != ENOENT)) + ret = sysctl(name, 6, (void *)data, (size_t *)&datalen, (void *)NULL, + (size_t)0); + if ((ret != 0) && (errno != ENOENT)) IFSTAT_ERR(2, "sysctl error getting interface data"); + + return (ret); } int @@ -487,13 +503,23 @@ cmdifstat(const char *cmd, const char *args) retval = ifcmd(cmd, args); /* ifcmd() returns 1 on success */ if (retval == 1) { - if (needclear) { - showifstat(); - refresh(); - werase(wnd); - labelifstat(); - needclear = 0; - } + if (needclear) + clearifstat(); } + else if (prefix(cmd, "all")) { + retval = 1; + displayall = true; + } return (retval); +} + +static void +clearifstat(void) +{ + + showifstat(); + refresh(); + werase(wnd); + labelifstat(); + needclear = 0; } Modified: head/usr.bin/systat/systat.1 ============================================================================== --- head/usr.bin/systat/systat.1 Sat Jul 11 13:11:54 2020 (r363094) +++ head/usr.bin/systat/systat.1 Sat Jul 11 13:56:36 2020 (r363095) @@ -680,6 +680,7 @@ in Silicon Graphics' system. .Sh BUGS Certain displays presume a minimum of 80 characters per line. +Ifstat does not detect new interfaces. The .Ic vmstat display looks out of place because it is (it was added in as From owner-svn-src-head@freebsd.org Sat Jul 11 15:32:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0C071366C81; Sat, 11 Jul 2020 15:32:54 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3v796b15z45Kn; Sat, 11 Jul 2020 15:32:53 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C548515509; Sat, 11 Jul 2020 15:32:53 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06BFWrTx041418; Sat, 11 Jul 2020 15:32:53 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06BFWr7Y041417; Sat, 11 Jul 2020 15:32:53 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202007111532.06BFWr7Y041417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 11 Jul 2020 15:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363097 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 363097 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 15:32:54 -0000 Author: allanjude Date: Sat Jul 11 15:32:53 2020 New Revision: 363097 URL: https://svnweb.freebsd.org/changeset/base/363097 Log: bsdinstall: kill dhclient before starting a new instance PR: 205821 Submitted by: William Orr MFC after: 2 weeks Sponsored by: Klara Inc. Event: July 2020 Bugathon Differential Revision: https://reviews.freebsd.org/D14572 Modified: head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Modified: head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 ============================================================================== --- head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Sat Jul 11 14:55:11 2020 (r363096) +++ head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Sat Jul 11 15:32:53 2020 (r363097) @@ -51,7 +51,7 @@ if [ $? -eq $DIALOG_OK ]; then if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then ifconfig $INTERFACE up dialog --backtitle 'FreeBSD Installer' --infobox "Acquiring DHCP lease..." 0 0 - err=$( dhclient $INTERFACE 2>&1 ) + err=$( pkill dhclient; dhclient $INTERFACE 2>&1 ) if [ $? -ne 0 ]; then f_dprintf "%s" "$err" dialog --backtitle 'FreeBSD Installer' --msgbox "DHCP lease acquisition failed." 0 0 From owner-svn-src-head@freebsd.org Sat Jul 11 15:44:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F203E367023; Sat, 11 Jul 2020 15:44:43 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3vNq21Qmz45c5; Sat, 11 Jul 2020 15:44:43 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr1-x433.google.com with SMTP id r12so8802193wrj.13; Sat, 11 Jul 2020 08:44:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=4i28J6n4cxkSye5q3iZiF8LxUw8sCGcHghGF4F9lQf0=; b=uO9txqc6OI+Dff8shubksuKXcdhHI72aZKYquByM4TE2NeAqcg9I3PYqm3PwSN0XJa bw6Aik62YadlVMIWW9ZuFg/+VewRabyGAt2qXvUryTRT0gPRuKr56jDrHNN+dKRukXQl qH83Run5AGajyCaoVRMkuy3VnQ/GMfr1wwml+b3RLypNfuZsqdDRVczNadmlFe1zNcZw jvfP+A3lwg+knK4Y7dt494vIrT3f6h7sqNKL/M9d+rQIhuV4fhk71mEslLPWyL4ui8oZ gfnuNYGC9trBuJoZ9HlSuaszCOgqMQLzeztsdsgPWA21G6InDi9NL4vopeij70KFccj/ lEaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=4i28J6n4cxkSye5q3iZiF8LxUw8sCGcHghGF4F9lQf0=; b=i/O1GTOne2A1siDCAiAJ/kyLBf63Ot/uIFaKT9w+fPHxJVTL0QH0h25WSQBGHUMaNf DGdy9q+uSAUMdhI9OFRf7lggi/QgnQwIGlE7O3cFDqp7vr6s5vrhJ4BhnP3hIlS/kVh1 rTyDvESTS8bXHweswOhjwnqJfZJ6yHhvLdiJBK7yZExrZJkwhD30T84BhvuWU/uzeuiv y6I8tQKwVxSd/8stonKLzhEL0YFqBmf68JTBGcbxrdPQK/1RITHyj/geYdrjr58MyZGG fHRlOFjzUH32GNyICNSuHC+2rrvFOE3U8QmxJm0ZuHFiLET2mOlAT3sKc1jfhQYw4pr7 Wghw== X-Gm-Message-State: AOAM5316yZcEQlrph7yuAK2LEonnv7uo3fN1ws9KgokSdUcD8yNuv7fo dm/c4XlEJllTiHIyHjKHTD70H2AwGywCGn+9XzAzFw== X-Google-Smtp-Source: ABdhPJzUvGqI2asjoia3ktHH7VWDdL6A/fer/ZCoJZR+ImcWKAG14z3oQIlqgQQPQf0v+7hZ2b9DRpVF/1YHXQQvIu0= X-Received: by 2002:adf:f311:: with SMTP id i17mr75575167wro.237.1594482281421; Sat, 11 Jul 2020 08:44:41 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:9d84:0:0:0:0:0 with HTTP; Sat, 11 Jul 2020 08:44:40 -0700 (PDT) In-Reply-To: <202007111532.06BFWr7Y041417@repo.freebsd.org> References: <202007111532.06BFWr7Y041417@repo.freebsd.org> From: Mateusz Guzik Date: Sat, 11 Jul 2020 17:44:40 +0200 Message-ID: Subject: Re: svn commit: r363097 - head/usr.sbin/bsdinstall/scripts To: Allan Jude Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4B3vNq21Qmz45c5 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 15:44:44 -0000 On 7/11/20, Allan Jude wrote: > Author: allanjude > Date: Sat Jul 11 15:32:53 2020 > New Revision: 363097 > URL: https://svnweb.freebsd.org/changeset/base/363097 > > Log: > bsdinstall: kill dhclient before starting a new instance > > PR: 205821 > Submitted by: William Orr > MFC after: 2 weeks > Sponsored by: Klara Inc. > Event: July 2020 Bugathon > Differential Revision: https://reviews.freebsd.org/D14572 > > Modified: > head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 > > Modified: head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 > ============================================================================== > --- head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Sat Jul 11 14:55:11 > 2020 (r363096) > +++ head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Sat Jul 11 15:32:53 > 2020 (r363097) > @@ -51,7 +51,7 @@ if [ $? -eq $DIALOG_OK ]; then > if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then > ifconfig $INTERFACE up > dialog --backtitle 'FreeBSD Installer' --infobox "Acquiring DHCP > lease..." 0 0 > - err=$( dhclient $INTERFACE 2>&1 ) > + err=$( pkill dhclient; dhclient $INTERFACE 2>&1 ) > if [ $? -ne 0 ]; then > f_dprintf "%s" "$err" > dialog --backtitle 'FreeBSD Installer' --msgbox "DHCP lease acquisition > failed." 0 0 There can be more than one dhclient running, but this will kill everything. -- Mateusz Guzik From owner-svn-src-head@freebsd.org Sat Jul 11 16:57:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A9B8F3690F7; Sat, 11 Jul 2020 16:57:45 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3x1541K4z4Bgv; Sat, 11 Jul 2020 16:57:45 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 68402163AB; Sat, 11 Jul 2020 16:57:45 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06BGvjsJ092162; Sat, 11 Jul 2020 16:57:45 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06BGvjJb092161; Sat, 11 Jul 2020 16:57:45 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202007111657.06BGvjJb092161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 11 Jul 2020 16:57:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363100 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 363100 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 16:57:45 -0000 Author: allanjude Date: Sat Jul 11 16:57:44 2020 New Revision: 363100 URL: https://svnweb.freebsd.org/changeset/base/363100 Log: defaults/rc.conf: note that the default is ppp_nat="YES" PR: 243062 Submitted by: Evilham MFC after: 2 weeks Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D25621 Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sat Jul 11 16:38:46 2020 (r363099) +++ head/share/man/man5/rc.conf.5 Sat Jul 11 16:57:44 2020 (r363100) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 28, 2020 +.Dd July 11, 2020 .Dt RC.CONF 5 .Os .Sh NAME @@ -1955,6 +1955,8 @@ Used in conjunction with .Va gateway_enable allows hosts on private network addresses access to the Internet using this host as a network address translating router. +Default is +.Dq Li YES . .It Va ppp_ Ns Ao Ar profile Ac Ns _nat .Pq Vt str Overrides the global From owner-svn-src-head@freebsd.org Sat Jul 11 17:06:49 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 08C8B369971; Sat, 11 Jul 2020 17:06:49 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3xCX6Kmhz4CxB; Sat, 11 Jul 2020 17:06:48 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BDBB116511; Sat, 11 Jul 2020 17:06:48 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06BH6mN4098560; Sat, 11 Jul 2020 17:06:48 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06BH6mFg098559; Sat, 11 Jul 2020 17:06:48 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202007111706.06BH6mFg098559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 11 Jul 2020 17:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363101 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 363101 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 17:06:49 -0000 Author: allanjude Date: Sat Jul 11 17:06:48 2020 New Revision: 363101 URL: https://svnweb.freebsd.org/changeset/base/363101 Log: bsdinstall: don't fail if fstab is empty PR: 210865 Submitted by: Tim Lukasiewicz , h-fujishima@sakura.ad.jp (original version) Reported by: h-fujishima@sakura.ad.jp Reviewed by: sef MFC after: 2 weeks Sponsored by: Klara Inc. Event: July 2020 Bugathon Modified: head/usr.sbin/bsdinstall/scripts/umount Modified: head/usr.sbin/bsdinstall/scripts/umount ============================================================================== --- head/usr.sbin/bsdinstall/scripts/umount Sat Jul 11 16:57:44 2020 (r363100) +++ head/usr.sbin/bsdinstall/scripts/umount Sat Jul 11 17:06:48 2020 (r363101) @@ -39,4 +39,6 @@ cat $PATH_FSTAB | awk -v BSDINSTALL_CHROOT=$BSDINSTALL }' > $TMP_FSTAB umount $BSDINSTALL_CHROOT/dev 2>/dev/null -umount -F $TMP_FSTAB -a 2>/dev/null +if [ -n "$TMP_FSTAB" ]; then + umount -F $TMP_FSTAB -a 2>/dev/null +fi From owner-svn-src-head@freebsd.org Sat Jul 11 17:10:16 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B27E8369A55; Sat, 11 Jul 2020 17:10:16 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3xHX4Gckz4D81; Sat, 11 Jul 2020 17:10:16 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 75AEF16515; Sat, 11 Jul 2020 17:10:16 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06BHAGCn098947; Sat, 11 Jul 2020 17:10:16 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06BHAGc1098946; Sat, 11 Jul 2020 17:10:16 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007111710.06BHAGc1098946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 11 Jul 2020 17:10:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363102 - head/sbin/ping X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sbin/ping X-SVN-Commit-Revision: 363102 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 17:10:16 -0000 Author: markj Date: Sat Jul 11 17:10:16 2020 New Revision: 363102 URL: https://svnweb.freebsd.org/changeset/base/363102 Log: ping(8): Check for integer truncation when handling the value for -s. PR: 239976 Submitted by: Neeraj MFC after: 1 week Event: July 2020 Bugathon Modified: head/sbin/ping/ping.c Modified: head/sbin/ping/ping.c ============================================================================== --- head/sbin/ping/ping.c Sat Jul 11 17:06:48 2020 (r363101) +++ head/sbin/ping/ping.c Sat Jul 11 17:10:16 2020 (r363102) @@ -478,7 +478,7 @@ main(int argc, char *const *argv) break; case 's': /* size of packet to send */ ltmp = strtol(optarg, &ep, 0); - if (*ep || ep == optarg || ltmp < 0) + if (*ep || ep == optarg || ltmp > INT_MAX || ltmp < 0) errx(EX_USAGE, "invalid packet size: `%s'", optarg); if (uid != 0 && ltmp > DEFDATALEN) { From owner-svn-src-head@freebsd.org Sat Jul 11 17:20:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D4BC8369CDF; Sat, 11 Jul 2020 17:20:17 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3xW54XQ9z4Dh9; Sat, 11 Jul 2020 17:20:17 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 802B3162F3; Sat, 11 Jul 2020 17:20:17 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06BHKHHg005505; Sat, 11 Jul 2020 17:20:17 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06BHKHUE005504; Sat, 11 Jul 2020 17:20:17 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202007111720.06BHKHUE005504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 11 Jul 2020 17:20:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363103 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 363103 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 17:20:17 -0000 Author: allanjude Date: Sat Jul 11 17:20:17 2020 New Revision: 363103 URL: https://svnweb.freebsd.org/changeset/base/363103 Log: bsdinstall: only kill the dhclient for the interface we are restarting PR: 205821 Reported by: mjg MFC after: 2 weeks Sponsored by: Klara Inc. Event: July 2020 Bugathon Modified: head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Modified: head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 ============================================================================== --- head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Sat Jul 11 17:10:16 2020 (r363102) +++ head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Sat Jul 11 17:20:17 2020 (r363103) @@ -51,7 +51,7 @@ if [ $? -eq $DIALOG_OK ]; then if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then ifconfig $INTERFACE up dialog --backtitle 'FreeBSD Installer' --infobox "Acquiring DHCP lease..." 0 0 - err=$( pkill dhclient; dhclient $INTERFACE 2>&1 ) + err=$( pkill -F /var/run/dhclient/dhclient.${INTERFACE}.pid; dhclient $INTERFACE 2>&1 ) if [ $? -ne 0 ]; then f_dprintf "%s" "$err" dialog --backtitle 'FreeBSD Installer' --msgbox "DHCP lease acquisition failed." 0 0 From owner-svn-src-head@freebsd.org Sat Jul 11 17:20:53 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 081B7369F27; Sat, 11 Jul 2020 17:20:53 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from tor1-11.mx.scaleengine.net (tor1-11.mx.scaleengine.net [IPv6:2001:470:1:474::25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3xWm4pXcz4Dj5; Sat, 11 Jul 2020 17:20:52 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (Seawolf.HML3.ScaleEngine.net [209.51.186.28]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by tor1-11.mx.scaleengine.net (Postfix) with ESMTPSA id 806E4C11B; Sat, 11 Jul 2020 17:20:46 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.10.3 tor1-11.mx.scaleengine.net 806E4C11B Subject: Re: svn commit: r363097 - head/usr.sbin/bsdinstall/scripts To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Mark Johnston References: <202007111532.06BFWr7Y041417@repo.freebsd.org> From: Allan Jude Autocrypt: addr=allanjude@freebsd.org; prefer-encrypt=mutual; keydata= xsFNBFVwZcYBEADwrZDH0xe0ZVjc9ORCc6PcBLwS/RTXA6NkvpD6ea02pZ8lPOVgteuuugFc D34LdDbiWr+479vfrKBh+Y38GL0oZ0/13j10tIlDMHSa5BU0y6ACtnhupFvVlQ57+XaJAb/q 7qkfSiuxVwQ3FY3PL3cl1RrIP5eGHLA9hu4eVbu+FOX/q/XVKz49HaeIaxzo2Q54572VzIo6 C28McX9m65UL5fXMUGJDDLCItLmehZlHsQQ+uBxvODLFpVV2lUgDR/0rDa0B9zHZX8jY8qQ7 ZdCSy7CwClXI054CkXZCaBzgxYh/CotdI8ezmaw7NLs5vWNTxaDEFXaFMQtMVhvqQBpHkfOD 7rjjOmFw00nJL4FuPE5Yut0CPyx8vLjVmNJSt/Y8WxxmhutsqJYFgYfWl/vaWkrFLur/Zcmz IklwLw35HLsCZytCN5A3rGKdRbQjD6QPXOTJu0JPrJF6t2xFkWAT7oxnSV0ELhl2g+JfMMz2 Z1PDmS3NRnyEdqEm7NoRGXJJ7bgxDbN+9SXTyOletqGNXj/bSrBvhvZ0RQrzdHAPwQUfVSU2 qBhQEi2apSZstgVNMan0GUPqCdbE2zpysg+zT7Yhvf9EUQbzPL4LpdK1llT9fZbrdMzEXvEF oSvwJFdV3sqKmZc7b+E3PuxK6GTsKqaukd/3Cj8aLHG1T1im1QARAQABzSJBbGxhbiBKdWRl IDxhbGxhbmp1ZGVAZnJlZWJzZC5vcmc+wsF/BBMBAgApBQJVcGXGAhsjBQkSzAMABwsJCAcD AgEGFQgCCQoLBBYCAwECHgECF4AACgkQGZU1PhKYC34Muw/+JOKpSfhhysWFYiRXynGRDe07 Z6pVsn7DzrPUMRNZfHu8Uujmmy3p2nx9FelIY9yjd2UKHhug+whM54MiIFs90eCRVa4XEsPR 4FFAm0DAWrrb7qhZFcE/GhHdRWpZ341WAElWf6Puj2devtRjfYbikvj5+1V1QmDbju7cEw5D mEET44pTuD2VMRJpu2yZZzkM0i+wKFuPxlhqreufA1VNkZXI/rIfkYWK+nkXd9Efw3YdCyCQ zUgTUCb88ttSqcyhik/li1CDbXBpkzDCKI6I/8fAb7jjOC9LAtrZJrdgONywcVFoyK9ZN7EN AVA+xvYCmuYhR/3zHWH1g4hAm1v1+gIsufhajhfo8/wY1SetlzPaYkSkVQLqD8T6zZyhf+AN bC7ci44UsiKGAplB3phAXrtSPUEqM86kbnHg3fSx37kWKUiYNOnx4AC2VXvEiKsOBlpyt3dw WQbOtOYM+vkfbBwDtoGOOPYAKxc4LOIt9r+J8aD+gTooi9Eo5tvphATf9WkCpl9+aaGbSixB tUpvQMRnSMqTqq4Z7DeiG6VMRQIjsXDSLJEUqcfhnLFo0Ko/RiaHd5xyAQ4DhQ9QpkyQjjNf /3f/dYG7JAtoD30txaQ5V8uHrz210/77DRRX+HJjEj6xCxWUGvQgvEZf5XXyxeePvqZ+zQyT DX61bYw6w6bOwU0EVXBlxgEQAMy7YVnCCLN4oAOBVLZ5nUbVPvpUhsdA94/0/P+uqCIh28Cz ar56OCX0X19N/nAWecxL4H32zFbIRyDB2V/MEh4p9Qvyu/j4i1r3Ex5GhOT2hnit43Ng46z5 29Es4TijrHJP4/l/rB2VOqMKBS7Cq8zk1cWqaI9XZ59imxDNjtLLPPM+zQ1yE3OAMb475QwN UgWxTMw8rkA7CEaqeIn4sqpTSD5C7kT1Bh26+rbgJDZ77D6Uv1LaCZZOaW52okW3bFbdozV8 yM2u+xz2Qs8bHz67p+s+BlygryiOyYytpkiK6Iy4N7FTolyj5EIwCuqzfk0SaRHeOKX2ZRjC qatkgoD/t13PNT38V9tw3qZVOJDS0W6WM8VSg+F+bkM9LgJ8CmKV+Hj0k3pfGfYPOZJ/v18i +SmZmL/Uw2RghnwDWGAsPCKu4uZR777iw7n9Io6Vfxndw2dcS0e9klvFYoaGS6H2F13Asygr WBzFNGFQscN4mUW+ZYBzpTOcHkdT7w8WS55BmXYLna+dYer9/HaAuUrONjujukN4SPS1fMJ2 /CS/idAUKyyVVX5vozoNK2JVC1h1zUAVsdnmhEzNPsvBoqcVNfyqBFROEVLIPwq+lQMGNVjH ekLTKRWf59MEhUC2ztjSKkGmwdg73d6xSXMuq45EgIJV2wPvOgWQonoHH/kxABEBAAHCwWUE GAECAA8FAlVwZcYCGwwFCRLMAwAACgkQGZU1PhKYC34w5A//YViBtZyDV5O+SJT9FFO3lb9x Zdxf0trA3ooCt7gdBkdnBM6T5EmjgVZ3KYYyFfwXZVkteuCCycMF/zVw5eE9FL1+zz9gg663 nY9q2F77TZTKXVWOLlOV2bY+xaK94U4ytogOGhh9b4UnQ/Ct3+6aviCF78Go608BXbmF/GVT 7uhddemk7ItxM1gE5Hscx3saxGKlayaOsdPKeGTVJCDEtHDuOc7/+jGh5Zxpk/Hpi+DUt1ot 8e6hPYLIQa4uVx4f1xxxV858PQ7QysSLr9pTV7FAQ18JclCaMc7JWIa3homZQL/MNKOfST0S 2e+msuRwQo7AnnfFKBUtb02KwpA4GhWryhkjUh/kbVc1wmGxaU3DgXYQ5GV5+Zf4kk/wqr/7 KG0dkTz6NLCVLyDlmAzuFhf66DJ3zzz4yIo3pbDYi3HB/BwJXVSKB3Ko0oUo+6/qMrOIS02L s++QE/z7K12CCcs7WwOjfCYHK7VtE0Sr/PfybBdTbuDncOuAyAIeIKxdI2nmQHzl035hhvQX s4CSghsP319jAOQiIolCeSbTMD4QWMK8RL/Pe1FI1jC3Nw9s+jq8Dudtbcj2UwAP/STUEbJ9 5rznzuuhPjE0e++EU/RpWmcaIMK/z1zZDMN+ce2v1qzgV936ZhJ3iaVzyqbEE81gDxg3P+IM kiYh4ZtPB4Q= Message-ID: Date: Sat, 11 Jul 2020 13:20:45 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4B3xWm4pXcz4Dj5 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 17:20:53 -0000 On 2020-07-11 11:44, Mateusz Guzik wrote: > On 7/11/20, Allan Jude wrote: >> Author: allanjude >> Date: Sat Jul 11 15:32:53 2020 >> New Revision: 363097 >> URL: https://svnweb.freebsd.org/changeset/base/363097 >> >> Log: >> bsdinstall: kill dhclient before starting a new instance >> >> PR: 205821 >> Submitted by: William Orr >> MFC after: 2 weeks >> Sponsored by: Klara Inc. >> Event: July 2020 Bugathon >> Differential Revision: https://reviews.freebsd.org/D14572 >> >> Modified: >> head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 >> >> Modified: head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 >> ============================================================================== >> --- head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Sat Jul 11 14:55:11 >> 2020 (r363096) >> +++ head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Sat Jul 11 15:32:53 >> 2020 (r363097) >> @@ -51,7 +51,7 @@ if [ $? -eq $DIALOG_OK ]; then >> if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then >> ifconfig $INTERFACE up >> dialog --backtitle 'FreeBSD Installer' --infobox "Acquiring DHCP >> lease..." 0 0 >> - err=$( dhclient $INTERFACE 2>&1 ) >> + err=$( pkill dhclient; dhclient $INTERFACE 2>&1 ) >> if [ $? -ne 0 ]; then >> f_dprintf "%s" "$err" >> dialog --backtitle 'FreeBSD Installer' --msgbox "DHCP lease acquisition >> failed." 0 0 > > There can be more than one dhclient running, but this will kill everything. > Good point. Thanks to markj for the suggested fix, committed as r363103 -- Allan Jude From owner-svn-src-head@freebsd.org Sat Jul 11 18:04:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4764536B3CC; Sat, 11 Jul 2020 18:04:10 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3yTk18WBz4J95; Sat, 11 Jul 2020 18:04:10 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0BDE81729F; Sat, 11 Jul 2020 18:04:10 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06BI49Sd037231; Sat, 11 Jul 2020 18:04:09 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06BI49NM037230; Sat, 11 Jul 2020 18:04:09 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202007111804.06BI49NM037230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 11 Jul 2020 18:04:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363104 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 363104 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 18:04:10 -0000 Author: allanjude Date: Sat Jul 11 18:04:09 2020 New Revision: 363104 URL: https://svnweb.freebsd.org/changeset/base/363104 Log: procctl(2): consistently refer to the last agrument as 'data' Some older references called it 'arg' Also fix a syntax error that was underlining an entire sentence. PR: 247386 Reported by: Paul Floyd , PauAmma (research) MFC after: 2 weeks Sponsored by: Klara Inc. Modified: head/lib/libc/sys/procctl.2 Modified: head/lib/libc/sys/procctl.2 ============================================================================== --- head/lib/libc/sys/procctl.2 Sat Jul 11 17:20:17 2020 (r363103) +++ head/lib/libc/sys/procctl.2 Sat Jul 11 18:04:09 2020 (r363104) @@ -483,7 +483,7 @@ and must be the either caller's pid or zero, with no difference in effect. The value is cleared for child processes and when executing set-user-ID or set-group-ID binaries. -.Fa arg +.Fa data must point to a value of type .Vt int indicating the signal @@ -498,7 +498,7 @@ must be and .Fa id must be the either caller's pid or zero, with no difference in effect. -.Fa arg +.Fa data must point to a memory location that can hold a value of type .Vt int . If signal delivery has not been requested, it will contain zero @@ -596,7 +596,8 @@ privilege might use this option. .El .It Dv PROC_KPTI_STATUS Returns the current KPTI status for the specified process. -.Fa data must point to the integer variable, which returns the +.Fa data +must point to the integer variable, which returns the following statuses: .Bl -tag -width PROC_KPTI_CTL_DISABLE_ON_EXEC .It Dv PROC_KPTI_CTL_ENABLE_ON_EXEC @@ -624,7 +625,7 @@ will fail if: .Bl -tag -width Er .It Bq Er EFAULT The -.Fa arg +.Fa data parameter points outside the process's allocated address space. .It Bq Er EINVAL The @@ -644,7 +645,7 @@ and .Fa id . .It Bq Er EINVAL An invalid operation or flag was passed in -.Fa arg +.Fa data for a .Dv PROC_SPROTECT command. From owner-svn-src-head@freebsd.org Sat Jul 11 18:24:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9C48736C809; Sat, 11 Jul 2020 18:24:17 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3ywx3MVvz4Nmx; Sat, 11 Jul 2020 18:24:17 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 56C66174EE; Sat, 11 Jul 2020 18:24:17 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06BIOHC5054243; Sat, 11 Jul 2020 18:24:17 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06BIOHEd054242; Sat, 11 Jul 2020 18:24:17 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202007111824.06BIOHEd054242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 11 Jul 2020 18:24:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363105 - head/usr.sbin/ppp X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/usr.sbin/ppp X-SVN-Commit-Revision: 363105 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 18:24:17 -0000 Author: allanjude Date: Sat Jul 11 18:24:16 2020 New Revision: 363105 URL: https://svnweb.freebsd.org/changeset/base/363105 Log: ppp: Document the fact that ppp_nat is enabled by default No functional change. PR: 243062 Submitted by: Evilham (original version) MFC after: 2 weeks Sponsored by: Klara Inc. Event: July 2020 Bugathon Differential Revision: https://reviews.freebsd.org/D25623 Modified: head/usr.sbin/ppp/ppp.8 Modified: head/usr.sbin/ppp/ppp.8 ============================================================================== --- head/usr.sbin/ppp/ppp.8 Sat Jul 11 18:04:09 2020 (r363104) +++ head/usr.sbin/ppp/ppp.8 Sat Jul 11 18:24:16 2020 (r363105) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 25, 2017 +.Dd July 11, 2020 .Dt PPP 8 .Os .Sh NAME @@ -1653,6 +1653,15 @@ Check that IP forwarding is enabled in and that other machines have designated the .Nm host as the gateway for the LAN. +When starting +.Nm +with the provided rc script, the default is to +enable NAT; see +.Va ppp_nat +in +.Xr rc.conf 5 +and +.Pa /etc/defaults/rc.conf . .Sh PACKET FILTERING This implementation supports packet filtering. There are four kinds of From owner-svn-src-head@freebsd.org Sat Jul 11 18:27:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6BD4E36CB0C; Sat, 11 Jul 2020 18:27:06 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3z0B2D1vz4PDT; Sat, 11 Jul 2020 18:27:06 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 309D9174F9; Sat, 11 Jul 2020 18:27:06 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06BIR6NI054456; Sat, 11 Jul 2020 18:27:06 GMT (envelope-from carlavilla@FreeBSD.org) Received: (from carlavilla@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06BIR5pY054454; Sat, 11 Jul 2020 18:27:05 GMT (envelope-from carlavilla@FreeBSD.org) Message-Id: <202007111827.06BIR5pY054454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: carlavilla set sender to carlavilla@FreeBSD.org using -f From: Sergio Carlavilla Delgado Date: Sat, 11 Jul 2020 18:27:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363106 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: carlavilla X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 363106 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 18:27:06 -0000 Author: carlavilla (doc committer) Date: Sat Jul 11 18:27:05 2020 New Revision: 363106 URL: https://svnweb.freebsd.org/changeset/base/363106 Log: Add orders man page PR: 239020 Submitted by: gbe@ Approved by: imp@ Obtained from: NetBSD MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24293 Added: head/share/man/man7/orders.7 (contents, props changed) Modified: head/share/man/man7/Makefile Modified: head/share/man/man7/Makefile ============================================================================== --- head/share/man/man7/Makefile Sat Jul 11 18:24:16 2020 (r363105) +++ head/share/man/man7/Makefile Sat Jul 11 18:27:05 2020 (r363106) @@ -21,6 +21,7 @@ MAN= arch.7 \ intro.7 \ maclabel.7 \ operator.7 \ + orders.7 \ ports.7 \ release.7 \ sdoc.7 \ Added: head/share/man/man7/orders.7 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man7/orders.7 Sat Jul 11 18:27:05 2020 (r363106) @@ -0,0 +1,111 @@ +.\" $NetBSD: orders.7,v 1.6 2011/08/06 11:07:18 jruoho Exp $ +.\" +.\" Copyright (c) 2010 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Jukka Ruohonen. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd August 6, 2011 +.Dt ORDERS 7 +.Os +.Sh NAME +.Nm orders +.Nd orders of magnitude +.Sh DESCRIPTION +The following table lists common multiples of bytes. +.Bl -column -offset 2n \ +"Kilobyte" "Prefix" "Power of 2" "Power of 10" +.It Sy Name Ta Sy Prefix Ta Sy Power of 2 Ta Sy Power of 10 +.It Kilobyte Ta kB Ta 2^10 Ta 10^3 +.It Megabyte Ta MB Ta 2^20 Ta 10^6 +.It Gigabyte Ta GB Ta 2^30 Ta 10^9 +.It Terabyte Ta TB Ta 2^40 Ta 10^12 +.It Petabyte Ta PB Ta 2^50 Ta 10^15 +.It Exabyte Ta EB Ta 2^60 Ta 10^18 +.It Zettabyte Ta ZB Ta 2^70 Ta 10^21 +.It Yottabyte Ta YB Ta 2^80 Ta 10^24 +.El +.Pp +The following table lists common bit rates as a power of ten. +.Bl -column -offset 2n \ +"Megabit per second" "Prefix" "Bit per second" "Byte per second" +.It Sy Name Ta Sy Prefix Ta Sy Bit per second Ta Sy Byte per second +.It Bit per second Ta bit/s Ta 1 Ta 0.125 +.It Byte per second Ta B/s Ta 8 Ta 1 +.It Kilobit per second Ta kbit/s Ta 10^3 Ta 125 +.It Kilobyte per second Ta kB/s Ta 8 * 10^3 Ta 1000 +.It Megabit per second Ta Mbit/s Ta 10^6 Ta 125000 +.It Megabyte per second Ta MB/s Ta 8 * 10^6 Ta 1000000 +.It Gigabit per second Ta Gbit/s Ta 10^9 Ta 125000000 +.It Gigabyte per second Ta GB/s Ta 8 * 10^9 Ta 1000000000 +.It Terabit per second Ta Tbit/s Ta 10^12 Ta 125000000000 +.It Terabyte per second Ta TB/s Ta 8 * 10^12 Ta 1000000000000 +.El +.Pp +The following table lists common orders of magnitude as a power of ten. +.Bl -column -offset 2n \ +"Septillionth" "Order" "Prefix" "Symbol" "Decimal" +.It Sy Name Ta Sy Order Ta Sy Prefix Ta Sy Symbol Ta Sy Decimal +.It Septillionth Ta 10^-24 Ta yocto Ta y Ta 0.000000000000000000000001 +.It Sextillionth Ta 10^-21 Ta zepto Ta z Ta 0.000000000000000000001 +.It Quintillionth Ta 10^-18 Ta atto Ta a Ta 0.000000000000000001 +.It Quadrillionth Ta 10^-15 Ta femto Ta f Ta 0.000000000000001 +.It Trillionth Ta 10^-12 Ta pico Ta p Ta 0.000000000001 +.It Billionth Ta 10^-9 Ta nano Ta n Ta 0.000000001 +.It Millionth Ta 10^-6 Ta micro Ta mu Ta 0.000001 +.It Thousandth Ta 10^-3 Ta milli Ta m Ta 0.001 +.It Hundredth Ta 10^-2 Ta centi Ta c Ta 0.01 +.It Tenth Ta 10^-1 Ta deci Ta d Ta 0.1 +.It One Ta 10^0 Ta - Ta - Ta 1 +.It Ten Ta 10^1 Ta deca Ta da Ta 10 +.It Hundred Ta 10^2 Ta hecto Ta h Ta 100 +.It Thousand Ta 10^3 Ta kilo Ta k Ta 1000 +.It Million Ta 10^6 Ta mega Ta M Ta 1000000 +.It Billion Ta 10^9 Ta giga Ta G Ta 1000000000 +.It Trillion Ta 10^12 Ta tera Ta T Ta 1000000000000 +.It Quadrillion Ta 10^15 Ta peta Ta P Ta 1000000000000000 +.It Quintillion Ta 10^18 Ta exa Ta E Ta 1000000000000000000 +.It Sextillion Ta 10^21 Ta zetta Ta Z Ta 1000000000000000000000 +.It Septillion Ta 10^24 Ta yotta Ta Y Ta 1000000000000000000000000 +.El +.Sh SEE ALSO +.Xr units 1 , +.Xr number 6 +.Sh STANDARDS +There have been various attempts to standardize the set of binary prefixes. +Organizations such as International Electrotechnical Commission +.Pq Tn IEC +have proposed new prefixes such as +.Dq kibi , +.Dq mebi , +.Dq gibi , +and +.Dq yobi , +but the adoption has been slow at best. +.Sh AUTHORS +This manual page was written by +.An Jukka Ruohonen Aq Mt jruoho@netbsd.org . From owner-svn-src-head@freebsd.org Sat Jul 11 19:18:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8290C36DFD6; Sat, 11 Jul 2020 19:18:44 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B407m2mk9z4SWt; Sat, 11 Jul 2020 19:18:44 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43CCF1830D; Sat, 11 Jul 2020 19:18:44 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06BJIiPZ085441; Sat, 11 Jul 2020 19:18:44 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06BJIivp085440; Sat, 11 Jul 2020 19:18:44 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202007111918.06BJIivp085440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 11 Jul 2020 19:18:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363107 - head/sbin/reboot X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/sbin/reboot X-SVN-Commit-Revision: 363107 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 19:18:44 -0000 Author: allanjude Date: Sat Jul 11 19:18:43 2020 New Revision: 363107 URL: https://svnweb.freebsd.org/changeset/base/363107 Log: boot(8): Add additional cross references Provide hints to direct people towards gptzfsboot, zfsbootcfg, efibootmgr, etc PR: 199103 MFC after: 2 weeks Sponsored by: Klara Inc. Event: July 2020 Bugathon Modified: head/sbin/reboot/boot_i386.8 Modified: head/sbin/reboot/boot_i386.8 ============================================================================== --- head/sbin/reboot/boot_i386.8 Sat Jul 11 18:27:05 2020 (r363106) +++ head/sbin/reboot/boot_i386.8 Sat Jul 11 19:18:43 2020 (r363107) @@ -36,7 +36,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 7, 2020 +.Dd July 11, 2020 .Dt BOOT 8 i386 .Os .Sh NAME @@ -330,11 +330,15 @@ requirement has not been adhered to. .Xr config 8 , .Xr gpart 8 , .Xr gptboot 8 , +.Xr gptzfsboot 8 , .Xr halt 8 , .Xr loader 8 , .Xr nextboot 8 , .Xr reboot 8 , .Xr shutdown 8 , +.Xr zfsbootcfg 8 , +.Xr efibootmgr 8 , +.Xr efivar 8 , .Xr uefi 8 .Sh BUGS The bsdlabel format used by this version of From owner-svn-src-head@freebsd.org Sat Jul 11 19:29:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 72C5836EA21; Sat, 11 Jul 2020 19:29:25 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B40N52RcHz4THs; Sat, 11 Jul 2020 19:29:25 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 32DA0182BA; Sat, 11 Jul 2020 19:29:25 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06BJTOuQ091806; Sat, 11 Jul 2020 19:29:24 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06BJTOKh091805; Sat, 11 Jul 2020 19:29:24 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202007111929.06BJTOKh091805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 11 Jul 2020 19:29:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363108 - head/sbin/reboot X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/sbin/reboot X-SVN-Commit-Revision: 363108 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 19:29:25 -0000 Author: allanjude Date: Sat Jul 11 19:29:24 2020 New Revision: 363108 URL: https://svnweb.freebsd.org/changeset/base/363108 Log: boot(8): fix sorting of cross references Reported by: yuripv Event: July 2020 Bugathon Modified: head/sbin/reboot/boot_i386.8 Modified: head/sbin/reboot/boot_i386.8 ============================================================================== --- head/sbin/reboot/boot_i386.8 Sat Jul 11 19:18:43 2020 (r363107) +++ head/sbin/reboot/boot_i386.8 Sat Jul 11 19:29:24 2020 (r363108) @@ -328,6 +328,8 @@ requirement has not been adhered to. .Xr boot0cfg 8 , .Xr btxld 8 , .Xr config 8 , +.Xr efibootmgr 8 , +.Xr efivar 8 , .Xr gpart 8 , .Xr gptboot 8 , .Xr gptzfsboot 8 , @@ -336,10 +338,8 @@ requirement has not been adhered to. .Xr nextboot 8 , .Xr reboot 8 , .Xr shutdown 8 , -.Xr zfsbootcfg 8 , -.Xr efibootmgr 8 , -.Xr efivar 8 , -.Xr uefi 8 +.Xr uefi 8 , +.Xr zfsbootcfg 8 .Sh BUGS The bsdlabel format used by this version of .Bx From owner-svn-src-head@freebsd.org Sat Jul 11 19:44:12 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C130B36EAD9; Sat, 11 Jul 2020 19:44:12 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B40j84jWsz4V5f; Sat, 11 Jul 2020 19:44:12 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 852011855E; Sat, 11 Jul 2020 19:44:12 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06BJiCJr004082; Sat, 11 Jul 2020 19:44:12 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06BJiCKK004081; Sat, 11 Jul 2020 19:44:12 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202007111944.06BJiCKK004081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 11 Jul 2020 19:44:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363109 - head/usr.sbin/nscd X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/usr.sbin/nscd X-SVN-Commit-Revision: 363109 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 19:44:12 -0000 Author: allanjude Date: Sat Jul 11 19:44:12 2020 New Revision: 363109 URL: https://svnweb.freebsd.org/changeset/base/363109 Log: nscd: does not warn about invalid values what parsing config file PR: 202135 Submitted by: amutu@amutu.com Reported By: Trond.Endrestol@ximalas.info Reviewed by: markj, freqlabs MFC after: 4 weeks Sponsored by: Klara Inc. Event: July 2020 Bugathon Differential Revision: https://reviews.freebsd.org/D25627 Modified: head/usr.sbin/nscd/parser.c Modified: head/usr.sbin/nscd/parser.c ============================================================================== --- head/usr.sbin/nscd/parser.c Sat Jul 11 19:29:24 2020 (r363108) +++ head/usr.sbin/nscd/parser.c Sat Jul 11 19:44:12 2020 (r363109) @@ -375,6 +375,7 @@ parse_config_file(struct configuration *config, char *fields[128]; int field_count, line_num, value; int res; + int invalid_value; TRACE_IN(parse_config_file); assert(config != NULL); @@ -388,6 +389,7 @@ parse_config_file(struct configuration *config, res = 0; line_num = 0; + invalid_value = 0; memset(buffer, 0, sizeof(buffer)); while ((res == 0) && (fgets(buffer, sizeof(buffer) - 1, fin) != NULL)) { field_count = strbreak(buffer, fields, sizeof(fields)); @@ -421,12 +423,20 @@ parse_config_file(struct configuration *config, (strcmp(fields[0], "positive-time-to-live") == 0) && (check_cachename(fields[1]) == 0) && ((value = get_number(fields[2], 0, -1)) != -1)) { + if (value <= 0) { + invalid_value = 1; + break; + } set_positive_time_to_live(config, fields[1], value); continue; } else if ((field_count == 3) && (strcmp(fields[0], "positive-confidence-threshold") == 0) && ((value = get_number(fields[2], 1, -1)) != -1)) { + if (value <= 0) { + invalid_value = 1; + break; + } set_positive_confidence_threshold(config, fields[1], value); continue; @@ -450,12 +460,20 @@ parse_config_file(struct configuration *config, (strcmp(fields[0], "negative-time-to-live") == 0) && (check_cachename(fields[1]) == 0) && ((value = get_number(fields[2], 0, -1)) != -1)) { + if (value <= 0) { + invalid_value = 1; + break; + } set_negative_time_to_live(config, fields[1], value); continue; } else if ((field_count == 3) && (strcmp(fields[0], "negative-confidence-threshold") == 0) && ((value = get_number(fields[2], 1, -1)) != -1)) { + if (value <= 0) { + invalid_value = 1; + break; + } set_negative_confidence_threshold(config, fields[1], value); continue; @@ -473,6 +491,10 @@ parse_config_file(struct configuration *config, (strcmp(fields[0], "suggested-size") == 0) && (check_cachename(fields[1]) == 0) && ((value = get_number(fields[2], 1, -1)) != -1)) { + if (value <= 0) { + invalid_value = 1; + break; + } set_suggested_size(config, fields[1], value); continue; } @@ -490,6 +512,10 @@ parse_config_file(struct configuration *config, (strcmp(fields[0], "keep-hot-count") == 0) && (check_cachename(fields[1]) == 0) && ((value = get_number(fields[2], 0, -1)) != -1)) { + if (value < 0) { + invalid_value = 1; + break; + } set_keep_hot_count(config, fields[1], value); continue; @@ -509,9 +535,16 @@ parse_config_file(struct configuration *config, break; } - LOG_ERR_2("config file parser", "error in file " - "%s on line %d", fname, line_num); - *error_str = "syntax error"; + if (invalid_value != 0) { + LOG_ERR_2("Invalid value for parameter", + "error in file %s on line %d", + fname, line_num); + *error_str = "invalid value"; + } else { + LOG_ERR_2("config file parser", "error in file " + "%s on line %d", fname, line_num); + *error_str = "syntax error"; + } *error_line = line_num; res = -1; } From owner-svn-src-head@freebsd.org Sat Jul 11 20:53:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A771D3710B5; Sat, 11 Jul 2020 20:53:32 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B42F840xmz4b1Q; Sat, 11 Jul 2020 20:53:32 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6D61219691; Sat, 11 Jul 2020 20:53:32 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06BKrW91048646; Sat, 11 Jul 2020 20:53:32 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06BKrVxv048643; Sat, 11 Jul 2020 20:53:31 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202007112053.06BKrVxv048643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 11 Jul 2020 20:53:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363110 - in head: share/man/man5 usr.sbin/periodic usr.sbin/periodic/etc/daily X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: in head: share/man/man5 usr.sbin/periodic usr.sbin/periodic/etc/daily X-SVN-Commit-Revision: 363110 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 20:53:32 -0000 Author: allanjude Date: Sat Jul 11 20:53:31 2020 New Revision: 363110 URL: https://svnweb.freebsd.org/changeset/base/363110 Log: Add a periodic script to backup the partition table and boot code Optionally, alert you if the contents change from the previous backup PR: 86388 Submitted by: Rob Fairbanks , Miroslav Lachman <000.fbsd@quip.cz> (Original Version) MFC after: 4 weeks Relnotes: yes Sponsored by: Klara Inc. Event: July 2020 Bugathon Differential Revision: https://reviews.freebsd.org/D25628 Added: head/usr.sbin/periodic/etc/daily/221.backup-gpart (contents, props changed) Modified: head/share/man/man5/periodic.conf.5 head/usr.sbin/periodic/periodic.conf Modified: head/share/man/man5/periodic.conf.5 ============================================================================== --- head/share/man/man5/periodic.conf.5 Sat Jul 11 19:44:12 2020 (r363109) +++ head/share/man/man5/periodic.conf.5 Sat Jul 11 20:53:31 2020 (r363110) @@ -252,6 +252,22 @@ Files will be deleted using the same criteria as would normally use when determining whether to believe the cached information, as configured in .Pa /etc/mail/sendmail.cf . +.It Va daily_backup_efi_enable +.Pq Vt bool +Set to +.Dq Li YES +To create backup of EFI System Partion (ESP). +.It Va daily_backup_gpart_enable +.Pq Vt bool +Set to +.Dq Li YES +To create backups of partition tables, and bootcode partition contents. +.It Va daily_backup_gpart_verbose +.Pq Vt bool +Set to +.Dq Li YES +To be verbose if existing backups for kern.geom.conftxt or the partition tables differ +from the new backups. .It Va daily_backup_passwd_enable .Pq Vt bool Set to Added: head/usr.sbin/periodic/etc/daily/221.backup-gpart ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/periodic/etc/daily/221.backup-gpart Sat Jul 11 20:53:31 2020 (r363110) @@ -0,0 +1,124 @@ +#!/bin/sh + +## $FreeBSD$ +## Created by: Miroslav Lachman <000.fbsd@quip.cz> + +## Backup of disk partitions layout, useful for gpart restore. +## Data are stored on local filesystem, in /var/backup. +## It is recommended to copy those files to off-site storage. + + +## If there is a global system configuration file, suck it in. +## +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +bak_dir=/var/backups + +rotate() { + base_name=$1 + show_diff=$2 + file="$bak_dir/$base_name" + + if [ -f "${file}.bak" ] ; then + rc=0 + if cmp -s "${file}.bak" "${file}.tmp"; then + rm "${file}.tmp" + else + rc=1 + [ -n "$show_diff" ] && diff "${file}.bak" "${file}.tmp" + mv "${file}.bak" "${file}.bak2" || rc=3 + mv "${file}.tmp" "${file}.bak" || rc=3 + fi + else + rc=1 + mv "${file}.tmp" "${file}.bak" || rc=3 + [ -n "$show_diff" ] && cat "${file}.bak" + fi +} + +case "$daily_backup_gpart_verbose" in + [Yy][Ee][Ss]) show="YES" +esac + +case "$daily_backup_gpart_enable" in + [Yy][Ee][Ss]) + + echo "" + echo "Dump of kern.geom.conftxt:"; + sysctl -n kern.geom.conftxt > "$bak_dir/kern.geom.conftxt.tmp" + rotate "kern.geom.conftxt" $show + + gpart_devs=$(gpart show | awk '$1 == "=>" { print $4 }') + if [ -n "$daily_backup_gpart_exclude" ]; then + gpart_devs=$(echo ${gpart_devs} | grep -E -v "${daily_backup_gpart_exclude}") + fi + + if [ -z "$gpart_devs" ]; then + echo '$daily_backup_gpart_enable is set but no disk probed by kernel.' \ + "perhaps NFS diskless client." + rc=2 + else + echo "" + echo "Backup of partitions information for:"; + + for d in ${gpart_devs}; do + echo "$d" + safe_name=$(echo "gpart.${d}" | tr -cs ".[:alnum:]\n" "_") + gpart backup "$d" > "$bak_dir/$safe_name.tmp" + rotate "$safe_name" $show + done + + gpart_show=$(gpart show -p) + boot_part=$(echo "$gpart_show" | awk '$4 ~ /(bios|freebsd)-boot/ { print $3 }') + if [ -n "$boot_part" ]; then + echo "" + echo "Backup of boot partition content:" + for b in ${boot_part}; do + echo "$b" + safe_name=$(echo "boot.${b}" | tr -cs ".[:alnum:]\n" "_") + dd if="/dev/${b}" of="$bak_dir/$safe_name.tmp" 2> /dev/null + rotate "$safe_name" + done + fi + + mbr_part=$(echo "$gpart_show" | awk '$1 == "=>" && $5 == "MBR" { print $4 }') + if [ -n "$mbr_part" ]; then + echo "" + echo "Backup of MBR record:" + for mb in ${mbr_part}; do + echo "$mb" + safe_name=$(echo "boot.${mb}" | tr -cs ".[:alnum:]\n" "_") + dd if="/dev/${mb}" of="$bak_dir/$safe_name.tmp" bs=512 count=1 2> /dev/null + rotate "$safe_name" + done + fi + + fi + ;; + + *) rc=0 + ;; +esac + +case "$daily_backup_efi_enable" in + [Yy][Ee][Ss]) + + efi_part=$(gpart show -p | awk '$4 ~ /efi/ {print $3}') + if [ -n "$efi_part" ]; then + echo "" + echo "Backup of EFI partition content:" + for efi in ${efi_part}; do + echo "$efi" + safe_name=$(echo "efi.${efi}" | tr -cs ".[:alnum:]\n" "_") + dd if="/dev/${efi}" of="$bak_dir/$safe_name.tmp" 2> /dev/null + rotate "$safe_name" + done + fi + ;; +esac + +exit $rc Modified: head/usr.sbin/periodic/periodic.conf ============================================================================== --- head/usr.sbin/periodic/periodic.conf Sat Jul 11 19:44:12 2020 (r363109) +++ head/usr.sbin/periodic/periodic.conf Sat Jul 11 20:53:31 2020 (r363110) @@ -77,6 +77,11 @@ daily_backup_passwd_enable="YES" # Backup passwd & g # 210.backup-aliases daily_backup_aliases_enable="YES" # Backup mail aliases +# 221.backup-gpart +daily_backup_gpart_enable="YES" # Backup partition table/boot partition/MBR +daily_backup_gpart_verbose="NO" # Be verbose if new backup differs from the new one +daily_backup_efi_enable="NO" # Backup EFI system partition (ESP) + # 300.calendar daily_calendar_enable="NO" # Run calendar -a From owner-svn-src-head@freebsd.org Sat Jul 11 20:56:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2F32B370FDF; Sat, 11 Jul 2020 20:56:59 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B42K70VJgz4bQk; Sat, 11 Jul 2020 20:56:59 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CE6571917C; Sat, 11 Jul 2020 20:56:58 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06BKuwOc048909; Sat, 11 Jul 2020 20:56:58 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06BKuwWB048906; Sat, 11 Jul 2020 20:56:58 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202007112056.06BKuwWB048906@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 11 Jul 2020 20:56:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363111 - in head: libexec/getty share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: in head: libexec/getty share/man/man4 X-SVN-Commit-Revision: 363111 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 20:56:59 -0000 Author: allanjude Date: Sat Jul 11 20:56:57 2020 New Revision: 363111 URL: https://svnweb.freebsd.org/changeset/base/363111 Log: Add cross references betwen ttys(5) and related drivers nmdm(4), ucom(4), and uart(4) PR: 247638 Submitted by: Pau Amma Reported by: 0mp MFC after: 4 weeks Sponsored by: Klara Inc. Event: July 2020 Bugathon Modified: head/libexec/getty/ttys.5 head/share/man/man4/nmdm.4 head/share/man/man4/uart.4 head/share/man/man4/ucom.4 Modified: head/libexec/getty/ttys.5 ============================================================================== --- head/libexec/getty/ttys.5 Sat Jul 11 20:53:31 2020 (r363110) +++ head/libexec/getty/ttys.5 Sat Jul 11 20:56:57 2020 (r363111) @@ -28,7 +28,7 @@ .\" from: @(#)ttys.5 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" " -.Dd August 3, 2018 +.Dd July 11, 2020 .Dt TTYS 5 .Os .Sh NAME @@ -162,6 +162,9 @@ ttyv0 "/usr/local/bin/xterm -display :0" xterm on wind .Sh SEE ALSO .Xr login 1 , .Xr getttyent 3 , +.Xr nmdm 4 , +.Xr uart 4 , +.Xr ucom 4 , .Xr gettytab 5 , .Xr login.conf 5 , .Xr termcap 5 , Modified: head/share/man/man4/nmdm.4 ============================================================================== --- head/share/man/man4/nmdm.4 Sat Jul 11 20:53:31 2020 (r363110) +++ head/share/man/man4/nmdm.4 Sat Jul 11 20:56:57 2020 (r363111) @@ -21,7 +21,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 23, 2018 +.Dd July 11, 2020 .Dt NMDM 4 .Os .Sh NAME @@ -89,7 +89,8 @@ None. .Sh SEE ALSO .Xr stty 1 , .Xr termios 4 , -.Xr tty 4 +.Xr tty 4 , +.Xr ttys 5 .Sh HISTORY The .Nm Modified: head/share/man/man4/uart.4 ============================================================================== --- head/share/man/man4/uart.4 Sat Jul 11 20:53:31 2020 (r363110) +++ head/share/man/man4/uart.4 Sat Jul 11 20:56:57 2020 (r363111) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 26, 2017 +.Dd July 11, 2020 .Dt UART 4 .Os .Sh NAME @@ -286,8 +286,10 @@ for callout ports corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO +.Xr cu 1 , .Xr puc 4 , -.Xr scc 4 +.Xr scc 4 , +.Xr ttys 5 .\" .Sh HISTORY The Modified: head/share/man/man4/ucom.4 ============================================================================== --- head/share/man/man4/ucom.4 Sat Jul 11 20:53:31 2020 (r363110) +++ head/share/man/man4/ucom.4 Sat Jul 11 20:56:57 2020 (r363111) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 25, 2018 +.Dd July 11, 2020 .Dt UCOM 4 .Os .Sh NAME @@ -125,6 +125,7 @@ for callout ports corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO +.Xr cu 1 , .Xr tty 4 , .Xr uark 4 , .Xr ubsa 4 , @@ -144,7 +145,8 @@ corresponding callout initial-state and lock-state dev .Xr usb 4 , .Xr uslcom 4 , .Xr uvisor 4 , -.Xr uvscom 4 +.Xr uvscom 4 , +.Xr ttys 5 .Sh HISTORY The .Nm From owner-svn-src-head@freebsd.org Sat Jul 11 21:57:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1F97A37259A; Sat, 11 Jul 2020 21:57:04 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B43fS01lJz4flk; Sat, 11 Jul 2020 21:57:04 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D8C2B19F43; Sat, 11 Jul 2020 21:57:03 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06BLv3NZ086317; Sat, 11 Jul 2020 21:57:03 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06BLv32u086316; Sat, 11 Jul 2020 21:57:03 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007112157.06BLv32u086316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 11 Jul 2020 21:57:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363112 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 363112 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 21:57:04 -0000 Author: mjg Date: Sat Jul 11 21:57:03 2020 New Revision: 363112 URL: https://svnweb.freebsd.org/changeset/base/363112 Log: fd: stop looping in pwd_hold We don't expect to fail acquiring the reference unless running into a corner case. Just in case ensure forward progress by taking the lock. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D25616 Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sat Jul 11 20:56:57 2020 (r363111) +++ head/sys/kern/kern_descrip.c Sat Jul 11 21:57:03 2020 (r363112) @@ -3347,13 +3347,17 @@ pwd_hold(struct thread *td) fdp = td->td_proc->p_fd; smr_enter(pwd_smr); - for (;;) { - pwd = smr_entered_load(&fdp->fd_pwd, pwd_smr); - MPASS(pwd != NULL); - if (refcount_acquire_if_not_zero(&pwd->pwd_refcount)) - break; + pwd = smr_entered_load(&fdp->fd_pwd, pwd_smr); + MPASS(pwd != NULL); + if (__predict_true(refcount_acquire_if_not_zero(&pwd->pwd_refcount))) { + smr_exit(pwd_smr); + return (pwd); } smr_exit(pwd_smr); + FILEDESC_SLOCK(fdp); + pwd = pwd_hold_filedesc(fdp); + MPASS(pwd != NULL); + FILEDESC_SUNLOCK(fdp); return (pwd); } From owner-svn-src-head@freebsd.org Sat Jul 11 21:57:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2488137244B; Sat, 11 Jul 2020 21:57:44 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B43gD07B7z4fYQ; Sat, 11 Jul 2020 21:57:44 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD4A91A28C; Sat, 11 Jul 2020 21:57:43 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06BLvhJn086392; Sat, 11 Jul 2020 21:57:43 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06BLvhn5086391; Sat, 11 Jul 2020 21:57:43 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007112157.06BLvhn5086391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 11 Jul 2020 21:57:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363113 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 363113 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 21:57:44 -0000 Author: mjg Date: Sat Jul 11 21:57:43 2020 New Revision: 363113 URL: https://svnweb.freebsd.org/changeset/base/363113 Log: sx: remove SX_NOADAPTIVE from the man page The flag itself was removed in r341593 Modified: head/share/man/man9/sx.9 Modified: head/share/man/man9/sx.9 ============================================================================== --- head/share/man/man9/sx.9 Sat Jul 11 21:57:03 2020 (r363112) +++ head/share/man/man9/sx.9 Sat Jul 11 21:57:43 2020 (r363113) @@ -124,12 +124,6 @@ argument to specifies a set of optional flags to alter the behavior of .Fa sx . It contains one or more of the following flags: -.Bl -tag -width SX_NOADAPTIVE -.It Dv SX_NOADAPTIVE -Disable adaptive spinning, rather than sleeping, for lock operations -while an exclusive lock holder is executing on another CPU. -Adaptive spinning is the default unless the kernel is compiled with -.Cd "options NO_ADAPTIVE_SX" . .It Dv SX_DUPOK Witness should not log messages about duplicate locks being acquired. .It Dv SX_NOWITNESS From owner-svn-src-head@freebsd.org Sat Jul 11 22:14:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB5BD372E86; Sat, 11 Jul 2020 22:14:44 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B442r5xVNz3Rxx; Sat, 11 Jul 2020 22:14:44 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B02E51A337; Sat, 11 Jul 2020 22:14:44 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06BMEima098411; Sat, 11 Jul 2020 22:14:44 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06BMEich098410; Sat, 11 Jul 2020 22:14:44 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202007112214.06BMEich098410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 11 Jul 2020 22:14:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363114 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 363114 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 22:14:45 -0000 Author: allanjude Date: Sat Jul 11 22:14:44 2020 New Revision: 363114 URL: https://svnweb.freebsd.org/changeset/base/363114 Log: periodic.conf: correct capitailization in the middle of a sentence Reported by: yuripv Event: July 2020 Bugathon Modified: head/share/man/man5/periodic.conf.5 Modified: head/share/man/man5/periodic.conf.5 ============================================================================== --- head/share/man/man5/periodic.conf.5 Sat Jul 11 21:57:43 2020 (r363113) +++ head/share/man/man5/periodic.conf.5 Sat Jul 11 22:14:44 2020 (r363114) @@ -256,17 +256,17 @@ as configured in .Pq Vt bool Set to .Dq Li YES -To create backup of EFI System Partion (ESP). +to create backup of EFI System Partion (ESP). .It Va daily_backup_gpart_enable .Pq Vt bool Set to .Dq Li YES -To create backups of partition tables, and bootcode partition contents. +to create backups of partition tables, and bootcode partition contents. .It Va daily_backup_gpart_verbose .Pq Vt bool Set to .Dq Li YES -To be verbose if existing backups for kern.geom.conftxt or the partition tables differ +to be verbose if existing backups for kern.geom.conftxt or the partition tables differ from the new backups. .It Va daily_backup_passwd_enable .Pq Vt bool