From owner-dev-commits-src-all@freebsd.org Mon Dec 28 01:27:40 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 97A844CD89E; Mon, 28 Dec 2020 01:27:40 +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 4D40KS17C9z4Vw2; Mon, 28 Dec 2020 01:27:39 +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 0BS1RVRC069671; Sun, 27 Dec 2020 17:27:31 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 0BS1RVie069670; Sun, 27 Dec 2020 17:27:31 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202012280127.0BS1RVie069670@gndrsh.dnsmgr.net> Subject: Re: git: 6d075fd9a5d3 - main - Document eventfd(). In-Reply-To: <202012271057.0BRAvd9r013861@gitrepo.freebsd.org> To: Konstantin Belousov Date: Sun, 27 Dec 2020 17:27:31 -0800 (PST) CC: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4D40KS17C9z4Vw2 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 01:27:40 -0000 > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=6d075fd9a5d339c6d178968d7be86ba128b6dc7b > > commit 6d075fd9a5d339c6d178968d7be86ba128b6dc7b > Author: Konstantin Belousov > AuthorDate: 2020-12-23 14:17:09 +0000 > Commit: Konstantin Belousov > CommitDate: 2020-12-27 10:57:26 +0000 > > Document eventfd(). > > Submitted by: greg@unrelenting.technology > Reviewed by: bcr, markj (previous version) > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D26668 > --- > lib/libc/sys/eventfd.2 | 208 +++++++++++++++++++++++++++++++++++++++++++++++++ > lib/libc/sys/kqueue.2 | 12 ++- > 2 files changed, 219 insertions(+), 1 deletion(-) > > diff --git a/lib/libc/sys/eventfd.2 b/lib/libc/sys/eventfd.2 > new file mode 100644 > index 000000000000..597c58122033 > --- /dev/null > +++ b/lib/libc/sys/eventfd.2 > @@ -0,0 +1,208 @@ > +.\" SPDX-License-Identifier: BSD-2-Clause > +.\" > +.\" Copyright (c) 2020 Greg V Can we get just a little bit more of a name on here? Searching for other copyrights that match the submitter I do find: ./sys/arm64/rockchip/clk/rk3399_cru.c: * Copyright (c) 2018 Greg V ./sys/arm64/rockchip/clk/rk3399_pmucru.c: * Copyright (c) 2018 Greg V It would be nice to be consistant with these. > +.\" > +.\" Redistribution and use in source and binary forms, with or without > +.\" modification, are permitted provided that the following conditions > +.\" are met: > +.\" 1. Redistributions of source code must retain the above copyright > +.\" notice, this list of conditions and the following disclaimer. > +.\" 2. Redistributions in binary form must reproduce the above copyright > +.\" notice, this list of conditions and the following disclaimer in the > +.\" documentation and/or other materials provided with the distribution. > +.\" > +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > +.\" SUCH DAMAGE. > +.\" > +.\" $FreeBSD$ > +.\" > +.Dd October 8, 2020 > +.Dt EVENTFD 2 > +.Os > +.Sh NAME > +.Nm eventfd > +.Nd create a file descriptor for event notification > +.Sh LIBRARY > +.Lb libc > +.Sh SYNOPSIS > +.In sys/eventfd.h > +.Ft int > +.Fn eventfd "unsigned int initval" "int flags" > +.Ft int > +.Fn eventfd_read "int fd" "eventfd_t *value" > +.Ft int > +.Fn eventfd_write "int fd" "eventfd_t value" > +.Sh DESCRIPTION > +.Fn eventfd > +creates a special file descriptor with event counter or semaphore semantics, > +designed for interprocess communication. > +The returned file descriptor refers to a kernel object containing an > +unsigned 64-bit integer counter, which is initialized with the value of the > +.Fa initval > +argument. > +.Pp > +The > +.Fa flags > +argument may contain the result of > +.Em or Ns 'ing > +the following values: > +.Pp > +.Bl -tag -width "EFD_SEMAPHORE" -compact > +.It Dv EFD_CLOEXEC > +set FD_CLOEXEC on the file descriptor > +.It Dv EFD_NONBLOCK > +do not block on read/write operations > +.It Dv EFD_SEMAPHORE > +use semaphore semantics > +.El > +.Pp > +File operations have the following semantics: > +.Bl -tag -width EFD_SEMAPHORE > +.It Xr read 2 > +If the counter is zero, the call blocks until the counter becomes non-zero, unless > +.Dv EFD_NONBLOCK > +was set, in which case it would fail with > +.Dv EAGAIN > +instead. > +.Pp > +If the counter is non-zero: > +.Bl -bullet > +.It > +If > +.Dv EFD_SEMAPHORE > +is not set, the current value of the counter is returned, > +and the value is reset to zero. > +.It > +If > +.Dv EFD_SEMAPHORE > +is set, the constant 1 is returned, and the value is decremented by 1. > +.El > +.Pp > +The numeric value is encoded as 64-bit (8 bytes) in host byte order. > +The > +.Xr read 2 > +call fails with > +.Dv EINVAL > +if there is less than 8 bytes available in the supplied buffer. > +.It Xr write 2 > +Adds the given value to the counter. > +The maximum value that can be stored in the counter is the > +maximum unsigned 64-bit integer value minus one (0xfffffffffffffffe). > +.Pp > +If the resulting value exceeds the maximum, the call would block > +until the value is reduced by > +.Xr read 2 , > +unless > +.Dv EFD_NONBLOCK > +was set, in which case it would fail with > +.Dv EAGAIN > +instead. > +.Pp > +The numeric value is encoded as 64-bit (8 bytes) in host byte order. > +The > +.Xr write 2 > +call fails with > +.Dv EINVAL > +if there is less than 8 bytes available in the supplied buffer, > +or if the value 0xffffffffffffffff is given. > +.It Xr poll 2 > +When receiving notifications via > +.Xr poll 2 / > +.Xr ppoll 2 / > +.Xr select 2 / > +.Xr pselect 2 / > +.Xr kqueue 2 , > +the following semantics apply: > +.Bl -bullet > +.It > +The file descriptor is readable when the counter is greater than zero. > +.It > +The file descriptor is writable when the counter is less than the maximum value. > +.El > +.El > +.Pp > +File descriptors created by > +.Fn eventfd > +are passable to other processes via > +.Xr sendmsg 2 > +and are preserved across > +.Xr fork 2 ; > +in both cases the descriptors refer to the same counter from both processes. > +Unless > +.Dv O_CLOEXEC > +flag was specified, > +the created file descriptor will remain open across > +.Xr execve 2 > +system calls; see > +.Xr close 2 , > +.Xr fcntl 2 > +and > +.Dv O_CLOEXEC > +description. > +.Pp > +.Fn eventfd_read > +and > +.Fn eventfd_write > +are thin wrappers around > +.Xr read 2 > +and > +.Xr write 2 > +system calls, > +provided for compatibility with glibc. > +.Sh RETURN VALUES > +If successful, > +.Fn eventfd > +returns a non-negative integer, termed a file descriptor. > +It returns \-1 on failure, and sets > +.Va errno > +to indicate the error. > +.Pp > +The > +.Fn eventfd_read > +and > +.Fn eventfd_write > +functions return 0 if the operation succeeded, -1 otherwise. > +.Sh ERRORS > +.Fn eventfd > +may fail with: > +.Bl -tag -width Er > +.It Bq Er EINVAL > +The > +.Fa flags > +argument given to > +.Fn eventfd > +has unknown bits set. > +.It Bq Er EMFILE > +The process has already reached its limit for open > +file descriptors. > +.It Bq Er ENFILE > +The system file table is full. > +.It Bq Er ENOMEM > +No memory was available to create the kernel object. > +.El > +.Sh SEE ALSO > +.Xr close 2 , > +.Xr kqueue 2 , > +.Xr poll 2 , > +.Xr read 2 , > +.Xr select 2 , > +.Xr write 2 > +.Sh STANDARDS > +The > +.Fn eventfd > +system call is non-standard. > +It is present in Linux. > +.Sh HISTORY > +The > +.Fn eventfd > +system call first appeared in > +.Fx 13.0 . > diff --git a/lib/libc/sys/kqueue.2 b/lib/libc/sys/kqueue.2 > index ef4278cf3c35..b83d85d90d42 100644 > --- a/lib/libc/sys/kqueue.2 > +++ b/lib/libc/sys/kqueue.2 > @@ -24,7 +24,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd May 1, 2020 > +.Dd October 8, 2020 > .Dt KQUEUE 2 > .Os > .Sh NAME > @@ -341,6 +341,11 @@ when the BPF has > enabled and there is any data to read; > .Va data > contains the number of bytes available. > +.It Eventfds > +Returns when the counter is greater than 0; > +.Va data > +contains the counter value, which must be cast to > +.Vt uint64_t . > .El > .It Dv EVFILT_WRITE > Takes a descriptor as the identifier, and returns whenever > @@ -359,6 +364,11 @@ For sockets, the low water mark and socket error handling is > identical to the > .Dv EVFILT_READ > case. > +.Pp > +For eventfds, > +.Va data > +will contain the maximum value that can be added to the counter > +without blocking. > .It Dv EVFILT_EMPTY > Takes a descriptor as the identifier, and returns whenever > there is no remaining data in the write buffer. > -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-all@freebsd.org Mon Dec 28 01:52:00 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 771854CDA64; Mon, 28 Dec 2020 01:52:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D40sX30t5z4Wfm; Mon, 28 Dec 2020 01:52:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A57711841; Mon, 28 Dec 2020 01:52:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS1q0OX092152; Mon, 28 Dec 2020 01:52:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS1q0Kn092151; Mon, 28 Dec 2020 01:52:00 GMT (envelope-from git) Date: Mon, 28 Dec 2020 01:52:00 GMT Message-Id: <202012280152.0BS1q0Kn092151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 833dbf1e2288 - main - route: quiet -Wredundant-decls MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 833dbf1e2288f72ce8338fa43dad6088c3f2010a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 01:52:00 -0000 The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=833dbf1e2288f72ce8338fa43dad6088c3f2010a commit 833dbf1e2288f72ce8338fa43dad6088c3f2010a Author: Ryan Libby AuthorDate: 2020-12-28 00:32:27 +0000 Commit: Ryan Libby CommitDate: 2020-12-28 00:32:27 +0000 route: quiet -Wredundant-decls Remove declaration duplicated in f5baf8bb12f39d0e8d64508c47eb6c4386ef716d Reviewed by: melifaro Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27790 --- sys/net/route/route_var.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/net/route/route_var.h b/sys/net/route/route_var.h index 2a0564db2b8b..fe299f90714d 100644 --- a/sys/net/route/route_var.h +++ b/sys/net/route/route_var.h @@ -305,7 +305,6 @@ int nhgrp_get_addition_group(struct rib_head *rnh, void nhgrp_ref_object(struct nhgrp_object *nhg); uint32_t nhgrp_get_idx(const struct nhgrp_object *nhg); void nhgrp_free(struct nhgrp_object *nhg); -uint32_t nhgrp_get_idx(const struct nhgrp_object *nhg); /* lookup_framework.c */ void fib_grow_rtables(uint32_t new_num_tables); From owner-dev-commits-src-all@freebsd.org Mon Dec 28 02:03:18 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 19D144CDDAB; Mon, 28 Dec 2020 02:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D416Z0BWVz4Xcc; Mon, 28 Dec 2020 02:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED28811D94; Mon, 28 Dec 2020 02:03:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS23HRp005319; Mon, 28 Dec 2020 02:03:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS23HFn005318; Mon, 28 Dec 2020 02:03:17 GMT (envelope-from git) Date: Mon, 28 Dec 2020 02:03:17 GMT Message-Id: <202012280203.0BS23HFn005318@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 0714f921cdcc - main - cache: save on some branching in common case mount point traversal MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0714f921cdcc10367f258134a30eed6e5384374c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 02:03:18 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0714f921cdcc10367f258134a30eed6e5384374c commit 0714f921cdcc10367f258134a30eed6e5384374c Author: Mateusz Guzik AuthorDate: 2020-12-28 01:52:20 +0000 Commit: Mateusz Guzik CommitDate: 2020-12-28 01:53:28 +0000 cache: save on some branching in common case mount point traversal --- sys/kern/vfs_cache.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 64 insertions(+), 7 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index c9bc2074d5e6..83227a9b70a8 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -3745,7 +3745,7 @@ cache_fpl_terminated(struct cache_fpl *fpl) _Static_assert((CACHE_FPL_SUPPORTED_CN_FLAGS & CACHE_FPL_INTERNAL_CN_FLAGS) == 0, "supported and internal flags overlap"); -static bool cache_fplookup_need_climb_mount(struct cache_fpl *fpl); +static bool cache_fplookup_is_mp(struct cache_fpl *fpl); static bool cache_fpl_islastcn(struct nameidata *ndp) @@ -4069,7 +4069,7 @@ cache_fplookup_final_modifying(struct cache_fpl *fpl) * almost never be true. */ if (__predict_false(!cache_fplookup_vnode_supported(tvp) || - cache_fplookup_need_climb_mount(fpl))) { + cache_fplookup_is_mp(fpl))) { vput(dvp); vput(tvp); return (cache_fpl_aborted(fpl)); @@ -4308,7 +4308,7 @@ cache_fplookup_noentry(struct cache_fpl *fpl) } if (__predict_false(!cache_fplookup_vnode_supported(tvp) || - cache_fplookup_need_climb_mount(fpl))) { + cache_fplookup_is_mp(fpl))) { vput(dvp); vput(tvp); return (cache_fpl_aborted(fpl)); @@ -4544,8 +4544,9 @@ cache_fplookup_climb_mount(struct cache_fpl *fpl) VNPASS(vp->v_type == VDIR || vp->v_type == VBAD, vp); mp = atomic_load_ptr(&vp->v_mountedhere); - if (mp == NULL) + if (__predict_false(mp == NULL)) { return (0); + } prev_mp = NULL; for (;;) { @@ -4587,8 +4588,64 @@ cache_fplookup_climb_mount(struct cache_fpl *fpl) return (0); } +static int __noinline +cache_fplookup_cross_mount(struct cache_fpl *fpl) +{ + struct mount *mp; + struct mount_pcpu *mpcpu; + struct vnode *vp; + seqc_t vp_seqc; + + vp = fpl->tvp; + vp_seqc = fpl->tvp_seqc; + + VNPASS(vp->v_type == VDIR || vp->v_type == VBAD, vp); + mp = atomic_load_ptr(&vp->v_mountedhere); + if (__predict_false(mp == NULL)) { + return (0); + } + + if (!vfs_op_thread_enter_crit(mp, mpcpu)) { + return (cache_fpl_partial(fpl)); + } + if (!vn_seqc_consistent(vp, vp_seqc)) { + vfs_op_thread_exit_crit(mp, mpcpu); + return (cache_fpl_partial(fpl)); + } + if (!cache_fplookup_mp_supported(mp)) { + vfs_op_thread_exit_crit(mp, mpcpu); + return (cache_fpl_partial(fpl)); + } + vp = atomic_load_ptr(&mp->mnt_rootvnode); + if (__predict_false(vp == NULL || VN_IS_DOOMED(vp))) { + vfs_op_thread_exit_crit(mp, mpcpu); + return (cache_fpl_partial(fpl)); + } + vp_seqc = vn_seqc_read_any(vp); + vfs_op_thread_exit_crit(mp, mpcpu); + if (seqc_in_modify(vp_seqc)) { + return (cache_fpl_partial(fpl)); + } + mp = atomic_load_ptr(&vp->v_mountedhere); + if (__predict_false(mp != NULL)) { + /* + * There are possibly more mount points stack on top. + * Normally this does not happen so for simplicity just start + * over. + */ + return (cache_fplookup_climb_mount(fpl)); + } + + fpl->tvp = vp; + fpl->tvp_seqc = vp_seqc; + return (0); +} + +/* + * Check if a vnode mounted on. + */ static bool -cache_fplookup_need_climb_mount(struct cache_fpl *fpl) +cache_fplookup_is_mp(struct cache_fpl *fpl) { struct mount *mp; struct vnode *vp; @@ -4834,8 +4891,8 @@ cache_fplookup_impl(struct vnode *dvp, struct cache_fpl *fpl) VNPASS(!seqc_in_modify(fpl->tvp_seqc), fpl->tvp); - if (cache_fplookup_need_climb_mount(fpl)) { - error = cache_fplookup_climb_mount(fpl); + if (cache_fplookup_is_mp(fpl)) { + error = cache_fplookup_cross_mount(fpl); if (__predict_false(error != 0)) { break; } From owner-dev-commits-src-all@freebsd.org Mon Dec 28 02:03:18 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F7BD4CDCEF; Mon, 28 Dec 2020 02:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D416Z1KVpz4Xcd; Mon, 28 Dec 2020 02:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F47911D95; Mon, 28 Dec 2020 02:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS23IFo005353; Mon, 28 Dec 2020 02:03:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS23Inm005352; Mon, 28 Dec 2020 02:03:18 GMT (envelope-from git) Date: Mon, 28 Dec 2020 02:03:18 GMT Message-Id: <202012280203.0BS23Inm005352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 002e18eb7f3e - main - vfs: add FAILIFEXISTS flag MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 002e18eb7f3e1ae972827cb35705502e91c540e3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 02:03:18 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=002e18eb7f3e1ae972827cb35705502e91c540e3 commit 002e18eb7f3e1ae972827cb35705502e91c540e3 Author: Mateusz Guzik AuthorDate: 2020-12-27 23:33:04 +0000 Commit: Mateusz Guzik CommitDate: 2020-12-28 01:53:27 +0000 vfs: add FAILIFEXISTS flag Both FreeBSD and Linux mkdir -p walk the tree up ignoring any EEXIST on the way and both are used a lot when building respective kernels. This poses a problem as spurious locking avoidably interferes with concurrent operations like getdirentries on affected directories. Work around the problem by adding FAILIFEXISTS flag. In case of lockless lookup this manages to avoid any work to begin with, there is no speed up for the locked case but perhaps this can be augmented later on. For simplicity the only supported semantics are as used by mkdir. Reviewed by: kib (previous version) Differential Revision: https://reviews.freebsd.org/D27789 --- sys/kern/vfs_cache.c | 16 ++++++++++++++-- sys/kern/vfs_lookup.c | 33 ++++++++++++++++++++++++++++++++- sys/kern/vfs_syscalls.c | 18 +----------------- sys/sys/namei.h | 2 +- 4 files changed, 48 insertions(+), 21 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 22dfe01ac624..c9bc2074d5e6 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -3736,8 +3736,8 @@ cache_fpl_terminated(struct cache_fpl *fpl) #define CACHE_FPL_SUPPORTED_CN_FLAGS \ (NC_NOMAKEENTRY | NC_KEEPPOSENTRY | LOCKLEAF | LOCKPARENT | WANTPARENT | \ - FOLLOW | LOCKSHARED | SAVENAME | SAVESTART | WILLBEDIR | ISOPEN | \ - NOMACCHECK | AUDITVNODE1 | AUDITVNODE2 | NOCAPCHECK) + FAILIFEXISTS | FOLLOW | LOCKSHARED | SAVENAME | SAVESTART | WILLBEDIR | \ + ISOPEN | NOMACCHECK | AUDITVNODE1 | AUDITVNODE2 | NOCAPCHECK) #define CACHE_FPL_INTERNAL_CN_FLAGS \ (ISDOTDOT | MAKEENTRY | ISLASTCN) @@ -3990,6 +3990,11 @@ cache_fplookup_final_modifying(struct cache_fpl *fpl) return (cache_fpl_handled(fpl, EROFS)); } + if (fpl->tvp != NULL && (cnp->cn_flags & FAILIFEXISTS) != 0) { + cache_fpl_smr_exit(fpl); + return (cache_fpl_handled(fpl, EEXIST)); + } + /* * Secure access to dvp; check cache_fplookup_partial_setup for * reasoning. @@ -4070,6 +4075,12 @@ cache_fplookup_final_modifying(struct cache_fpl *fpl) return (cache_fpl_aborted(fpl)); } + if ((cnp->cn_flags & FAILIFEXISTS) != 0) { + vput(dvp); + vput(tvp); + return (cache_fpl_handled(fpl, EEXIST)); + } + if ((cnp->cn_flags & LOCKLEAF) == 0) { VOP_UNLOCK(tvp); } @@ -4221,6 +4232,7 @@ cache_fplookup_noentry(struct cache_fpl *fpl) MPASS(!cache_fpl_isdotdot(cnp)); if (cnp->cn_nameiop != LOOKUP) { + fpl->tvp = NULL; return (cache_fplookup_modifying(fpl)); } diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 511efaa9d01a..da04dd09af40 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -545,6 +545,16 @@ namei(struct nameidata *ndp) ndp->ni_debugflags |= NAMEI_DBG_CALLED; if (ndp->ni_startdir != NULL) ndp->ni_debugflags |= NAMEI_DBG_HADSTARTDIR; + if (cnp->cn_flags & FAILIFEXISTS) { + KASSERT(cnp->cn_nameiop == CREATE, + ("%s: FAILIFEXISTS passed for op %d", __func__, cnp->cn_nameiop)); + /* + * The limitation below is to restrict hairy corner cases. + */ + KASSERT((cnp->cn_flags & (LOCKPARENT | LOCKLEAF)) == LOCKPARENT, + ("%s: FAILIFEXISTS must be passed with LOCKPARENT and without LOCKLEAF", + __func__)); + } /* * For NDVALIDATE. * @@ -1295,8 +1305,11 @@ success: goto bad2; } } - if (ndp->ni_vp != NULL && ndp->ni_vp->v_type == VDIR) + if (ndp->ni_vp != NULL) { nameicap_tracker_add(ndp, ndp->ni_vp); + if ((cnp->cn_flags & (FAILIFEXISTS | ISSYMLINK)) == FAILIFEXISTS) + goto bad_eexist; + } return (0); bad2: @@ -1311,6 +1324,24 @@ bad: vput(dp); ndp->ni_vp = NULL; return (error); +bad_eexist: + /* + * FAILIFEXISTS handling. + * + * XXX namei called with LOCKPARENT but not LOCKLEAF has the strange + * behaviour of leaving the vnode unlocked if the target is the same + * vnode as the parent. + */ + MPASS((cnp->cn_flags & ISSYMLINK) == 0); + if (ndp->ni_vp == ndp->ni_dvp) + vrele(ndp->ni_dvp); + else + vput(ndp->ni_dvp); + vrele(ndp->ni_vp); + ndp->ni_dvp = NULL; + ndp->ni_vp = NULL; + NDFREE(ndp, NDF_ONLY_PNBUF); + return (EEXIST); } /* diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index cbfff229540a..5a30b06e4e9e 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -3768,7 +3768,6 @@ kern_mkdirat(struct thread *td, int fd, const char *path, enum uio_seg segflg, int mode) { struct mount *mp; - struct vnode *vp; struct vattr vattr; struct nameidata nd; int error; @@ -3777,26 +3776,11 @@ kern_mkdirat(struct thread *td, int fd, const char *path, enum uio_seg segflg, restart: bwillwrite(); NDINIT_ATRIGHTS(&nd, CREATE, LOCKPARENT | SAVENAME | AUDITVNODE1 | - NC_NOMAKEENTRY | NC_KEEPPOSENTRY, segflg, path, fd, + NC_NOMAKEENTRY | NC_KEEPPOSENTRY | FAILIFEXISTS, segflg, path, fd, &cap_mkdirat_rights, td); nd.ni_cnd.cn_flags |= WILLBEDIR; if ((error = namei(&nd)) != 0) return (error); - vp = nd.ni_vp; - if (vp != NULL) { - NDFREE(&nd, NDF_ONLY_PNBUF); - /* - * XXX namei called with LOCKPARENT but not LOCKLEAF has - * the strange behaviour of leaving the vnode unlocked - * if the target is the same vnode as the parent. - */ - if (vp == nd.ni_dvp) - vrele(nd.ni_dvp); - else - vput(nd.ni_dvp); - vrele(vp); - return (EEXIST); - } if (vn_start_write(nd.ni_dvp, &mp, V_NOWAIT) != 0) { NDFREE(&nd, NDF_ONLY_PNBUF); vput(nd.ni_dvp); diff --git a/sys/sys/namei.h b/sys/sys/namei.h index dfb5e5e4cec3..ddba9cbd8912 100644 --- a/sys/sys/namei.h +++ b/sys/sys/namei.h @@ -143,7 +143,7 @@ int cache_fplookup(struct nameidata *ndp, enum cache_fpl_status *status, #define LOCKLEAF 0x0004 /* lock vnode on return */ #define LOCKPARENT 0x0008 /* want parent vnode returned locked */ #define WANTPARENT 0x0010 /* want parent vnode returned unlocked */ -/* UNUSED 0x0020 */ +#define FAILIFEXISTS 0x0020 /* return EEXIST if found */ #define FOLLOW 0x0040 /* follow symbolic links */ #define BENEATH 0x0080 /* No escape from the start dir */ #define LOCKSHARED 0x0100 /* Shared lock leaf */ From owner-dev-commits-src-all@freebsd.org Mon Dec 28 02:03:18 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4E30A4CE037; Mon, 28 Dec 2020 02:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D416Z1nBMz4XLJ; Mon, 28 Dec 2020 02:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3005411C36; Mon, 28 Dec 2020 02:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS23IoH005370; Mon, 28 Dec 2020 02:03:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS23I5T005369; Mon, 28 Dec 2020 02:03:18 GMT (envelope-from git) Date: Mon, 28 Dec 2020 02:03:18 GMT Message-Id: <202012280203.0BS23I5T005369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: ff97bc034fcd - main - cache: simplify lockless dot lookups MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff97bc034fcdf16207ed75e43622e9f0d91fa553 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 02:03:18 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ff97bc034fcdf16207ed75e43622e9f0d91fa553 commit ff97bc034fcdf16207ed75e43622e9f0d91fa553 Author: Mateusz Guzik AuthorDate: 2020-12-28 00:12:28 +0000 Commit: Mateusz Guzik CommitDate: 2020-12-28 01:53:27 +0000 cache: simplify lockless dot lookups --- sys/kern/vfs_cache.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 75c362534c91..22dfe01ac624 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4317,19 +4317,18 @@ cache_fplookup_noentry(struct cache_fpl *fpl) static int __noinline cache_fplookup_dot(struct cache_fpl *fpl) { - struct vnode *dvp; - - dvp = fpl->dvp; - fpl->tvp = dvp; - fpl->tvp_seqc = vn_seqc_read_any(dvp); - if (seqc_in_modify(fpl->tvp_seqc)) { - return (cache_fpl_aborted(fpl)); - } + MPASS(!seqc_in_modify(fpl->dvp_seqc)); + /* + * Just re-assign the value. seqc will be checked later for the first + * non-dot path component in line and/or before deciding to return the + * vnode. + */ + fpl->tvp = fpl->dvp; + fpl->tvp_seqc = fpl->dvp_seqc; counter_u64_add(dothits, 1); - SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ".", dvp); - + SDT_PROBE3(vfs, namecache, lookup, hit, fpl->dvp, ".", fpl->dvp); return (0); } From owner-dev-commits-src-all@freebsd.org Mon Dec 28 02:03:18 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 27B7D4CE1B2; Mon, 28 Dec 2020 02:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D416Z0gDkz4Xfl; Mon, 28 Dec 2020 02:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 09E4211C35; Mon, 28 Dec 2020 02:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS23HSk005336; Mon, 28 Dec 2020 02:03:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS23Hd1005335; Mon, 28 Dec 2020 02:03:17 GMT (envelope-from git) Date: Mon, 28 Dec 2020 02:03:17 GMT Message-Id: <202012280203.0BS23Hd1005335@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 8c9d74634ab7 - main - vfs: stop open-coding setting WILLBEDIR flag MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c9d74634ab7121d887cf539c02af87a394900d9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 02:03:18 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=8c9d74634ab7121d887cf539c02af87a394900d9 commit 8c9d74634ab7121d887cf539c02af87a394900d9 Author: Mateusz Guzik AuthorDate: 2020-12-28 01:17:15 +0000 Commit: Mateusz Guzik CommitDate: 2020-12-28 01:53:27 +0000 vfs: stop open-coding setting WILLBEDIR flag --- sys/kern/vfs_syscalls.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 5a30b06e4e9e..ce5da109f168 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -3610,6 +3610,7 @@ kern_renameat(struct thread *td, int oldfd, const char *old, int newfd, struct mount *mp = NULL; struct vnode *tvp, *fvp, *tdvp; struct nameidata fromnd, tond; + u_int64_t tondflags; int error; again: @@ -3630,11 +3631,11 @@ again: } #endif fvp = fromnd.ni_vp; - NDINIT_ATRIGHTS(&tond, RENAME, LOCKPARENT | LOCKLEAF | NOCACHE | - SAVESTART | AUDITVNODE2, pathseg, new, newfd, - &cap_renameat_target_rights, td); + tondflags = LOCKPARENT | LOCKLEAF | NOCACHE | SAVESTART | AUDITVNODE2; if (fromnd.ni_vp->v_type == VDIR) - tond.ni_cnd.cn_flags |= WILLBEDIR; + tondflags |= WILLBEDIR; + NDINIT_ATRIGHTS(&tond, RENAME, tondflags, pathseg, new, newfd, + &cap_renameat_target_rights, td); if ((error = namei(&tond)) != 0) { /* Translate error code for rename("dir1", "dir2/."). */ if (error == EISDIR && fvp->v_type == VDIR) @@ -3776,9 +3777,8 @@ kern_mkdirat(struct thread *td, int fd, const char *path, enum uio_seg segflg, restart: bwillwrite(); NDINIT_ATRIGHTS(&nd, CREATE, LOCKPARENT | SAVENAME | AUDITVNODE1 | - NC_NOMAKEENTRY | NC_KEEPPOSENTRY | FAILIFEXISTS, segflg, path, fd, - &cap_mkdirat_rights, td); - nd.ni_cnd.cn_flags |= WILLBEDIR; + NC_NOMAKEENTRY | NC_KEEPPOSENTRY | FAILIFEXISTS | WILLBEDIR, + segflg, path, fd, &cap_mkdirat_rights, td); if ((error = namei(&nd)) != 0) return (error); if (vn_start_write(nd.ni_dvp, &mp, V_NOWAIT) != 0) { From owner-dev-commits-src-all@freebsd.org Mon Dec 28 02:05:52 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0B354CDFBF; Mon, 28 Dec 2020 02:05:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D419X4cPjz4Y1Z; Mon, 28 Dec 2020 02:05:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9184E117EC; Mon, 28 Dec 2020 02:05:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS25qZY005517; Mon, 28 Dec 2020 02:05:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS25qSr005516; Mon, 28 Dec 2020 02:05:52 GMT (envelope-from git) Date: Mon, 28 Dec 2020 02:05:52 GMT Message-Id: <202012280205.0BS25qSr005516@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 4ab7d9f484bc - main - cache: reduce engrish in previous commit MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ab7d9f484bc8981e11d644858d3b327aa082d22 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 02:05:52 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=4ab7d9f484bc8981e11d644858d3b327aa082d22 commit 4ab7d9f484bc8981e11d644858d3b327aa082d22 Author: Mateusz Guzik AuthorDate: 2020-12-28 02:05:30 +0000 Commit: Mateusz Guzik CommitDate: 2020-12-28 02:05:30 +0000 cache: reduce engrish in previous commit --- sys/kern/vfs_cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 83227a9b70a8..4513e4dc970f 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4629,7 +4629,7 @@ cache_fplookup_cross_mount(struct cache_fpl *fpl) mp = atomic_load_ptr(&vp->v_mountedhere); if (__predict_false(mp != NULL)) { /* - * There are possibly more mount points stack on top. + * There are possibly more mount points on top. * Normally this does not happen so for simplicity just start * over. */ @@ -4642,7 +4642,7 @@ cache_fplookup_cross_mount(struct cache_fpl *fpl) } /* - * Check if a vnode mounted on. + * Check if a vnode is mounted on. */ static bool cache_fplookup_is_mp(struct cache_fpl *fpl) From owner-dev-commits-src-all@freebsd.org Mon Dec 28 02:31:20 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D67104CE6DA; Mon, 28 Dec 2020 02:31:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D41kw5mbtz4YXS; Mon, 28 Dec 2020 02:31:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B944611E42; Mon, 28 Dec 2020 02:31:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS2VK1h034751; Mon, 28 Dec 2020 02:31:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS2VK7m034750; Mon, 28 Dec 2020 02:31:20 GMT (envelope-from git) Date: Mon, 28 Dec 2020 02:31:20 GMT Message-Id: <202012280231.0BS2VK7m034750@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Lo Subject: git: a8ec81e79871 - main - Mention boot1.efi since it is an image of 800KB FAT filesystem stored as /EFI/BOOT/BOOTX64.EFI. Differential Revision: https://reviews.freebsd.org/D27782 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevlo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a8ec81e79871de98e30ce572a313f3f8d059ce7b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 02:31:20 -0000 The branch main has been updated by kevlo: URL: https://cgit.FreeBSD.org/src/commit/?id=a8ec81e79871de98e30ce572a313f3f8d059ce7b commit a8ec81e79871de98e30ce572a313f3f8d059ce7b Author: Kevin Lo AuthorDate: 2020-12-28 02:30:21 +0000 Commit: Kevin Lo CommitDate: 2020-12-28 02:30:21 +0000 Mention boot1.efi since it is an image of 800KB FAT filesystem stored as /EFI/BOOT/BOOTX64.EFI. Differential Revision: https://reviews.freebsd.org/D27782 --- share/man/man8/uefi.8 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/share/man/man8/uefi.8 b/share/man/man8/uefi.8 index 4224af835738..9214dec8e20d 100644 --- a/share/man/man8/uefi.8 +++ b/share/man/man8/uefi.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 9, 2020 +.Dd December 28, 2020 .Dt UEFI 8 .Os .Sh NAME @@ -118,6 +118,15 @@ system console is automatically selected when booting via .Bl -tag -width /boot/loader -compact .Nm bootstrap +.It Pa /boot/boot1.efi +.Xr msdosfs 5 +FAT file system image +used by +.Xr bsdinstall 8 +and the +.Ar bootcode +argument of +.Xr gpart 8 . .It Pa /boot/loader.efi Final stage bootstrap .It Pa /boot/kernel/kernel From owner-dev-commits-src-all@freebsd.org Mon Dec 28 03:19:42 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8AC394CF761; Mon, 28 Dec 2020 03:19:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D42pk3JhDz4c5F; Mon, 28 Dec 2020 03:19:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 647FC12753; Mon, 28 Dec 2020 03:19:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS3JgY2081689; Mon, 28 Dec 2020 03:19:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS3JgB4081688; Mon, 28 Dec 2020 03:19:42 GMT (envelope-from git) Date: Mon, 28 Dec 2020 03:19:42 GMT Message-Id: <202012280319.0BS3JgB4081688@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: a3abf6658334 - stable/12 - grep: replace the internal queue with a ring buffer MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: a3abf665833465461030c413f07d324e7d64ae30 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 03:19:42 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=a3abf665833465461030c413f07d324e7d64ae30 commit a3abf665833465461030c413f07d324e7d64ae30 Author: Kyle Evans AuthorDate: 2020-12-09 05:27:45 +0000 Commit: Kyle Evans CommitDate: 2020-12-28 03:19:26 +0000 grep: replace the internal queue with a ring buffer We know up front how many items we can have in the queue (-B/Bflag), so pay the cost of those particular allocations early on. The reduced queue maintenance overhead seemed to yield about an ~8% improvement for my earlier `grep -C8 -r closefrom .` test. (cherry picked from commit df546c3b730d4abcace1da24226bd5f01280588e) --- usr.bin/grep/grep.c | 2 + usr.bin/grep/grep.h | 1 + usr.bin/grep/queue.c | 127 ++++++++++++++++++++++++++++++--------------------- 3 files changed, 78 insertions(+), 52 deletions(-) diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c index 731e46bb112e..a7ecc2015571 100644 --- a/usr.bin/grep/grep.c +++ b/usr.bin/grep/grep.c @@ -712,6 +712,8 @@ main(int argc, char *argv[]) if ((aargc == 0 || aargc == 1) && !Hflag) hflag = true; + initqueue(); + if (aargc == 0 && dirbehave != DIR_RECURSE) exit(!procfile("-")); diff --git a/usr.bin/grep/grep.h b/usr.bin/grep/grep.h index 6d1e87ae4d7c..62e82c7f56b6 100644 --- a/usr.bin/grep/grep.h +++ b/usr.bin/grep/grep.h @@ -149,6 +149,7 @@ char *grep_strdup(const char *str); void grep_printline(struct str *line, int sep); /* queue.c */ +void initqueue(void); bool enqueue(struct str *x); void printqueue(void); void clearqueue(void); diff --git a/usr.bin/grep/queue.c b/usr.bin/grep/queue.c index b5f3aa14f0e2..ac15185f0694 100644 --- a/usr.bin/grep/queue.c +++ b/usr.bin/grep/queue.c @@ -6,6 +6,7 @@ * * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav * All rights reserved. + * Copyright (c) 2020 Kyle Evans * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -45,77 +46,99 @@ __FBSDID("$FreeBSD$"); #include "grep.h" -struct qentry { - STAILQ_ENTRY(qentry) list; - struct str data; -}; +typedef struct str qentry_t; -static STAILQ_HEAD(, qentry) queue = STAILQ_HEAD_INITIALIZER(queue); -static long long count; - -static struct qentry *dequeue(void); +static long long filled; +static qentry_t *qend, *qpool; /* - * Enqueue another line; return true if we've dequeued a line as a result + * qnext is the next entry to populate. qlist is where the list actually + * starts, for the purposes of printing. */ -bool -enqueue(struct str *x) +static qentry_t *qlist, *qnext; + +void +initqueue(void) { - struct qentry *item; - - item = grep_malloc(sizeof(struct qentry)); - item->data.dat = grep_malloc(sizeof(char) * x->len); - item->data.len = x->len; - item->data.line_no = x->line_no; - item->data.boff = x->boff; - item->data.off = x->off; - memcpy(item->data.dat, x->dat, x->len); - item->data.file = x->file; - - STAILQ_INSERT_TAIL(&queue, item, list); - - if (++count > Bflag) { - item = dequeue(); - free(item->data.dat); - free(item); - return (true); - } - return (false); + + qlist = qnext = qpool = grep_calloc(Bflag, sizeof(*qpool)); + qend = qpool + (Bflag - 1); } -static struct qentry * -dequeue(void) +static qentry_t * +advqueue(qentry_t *itemp) { - struct qentry *item; - item = STAILQ_FIRST(&queue); - if (item == NULL) - return (NULL); + if (itemp == qend) + return (qpool); + return (itemp + 1); +} - STAILQ_REMOVE_HEAD(&queue, list); - --count; - return (item); +/* + * Enqueue another line; return true if we've dequeued a line as a result + */ +bool +enqueue(struct str *x) +{ + qentry_t *item; + bool rotated; + + item = qnext; + qnext = advqueue(qnext); + rotated = false; + + if (filled < Bflag) { + filled++; + } else if (filled == Bflag) { + /* We had already filled up coming in; just rotate. */ + qlist = advqueue(qlist); + rotated = true; + free(item->dat); + } + item->dat = grep_malloc(sizeof(char) * x->len); + item->len = x->len; + item->line_no = x->line_no; + item->boff = x->boff; + item->off = x->off; + memcpy(item->dat, x->dat, x->len); + item->file = x->file; + + return (rotated); } void printqueue(void) { - struct qentry *item; - - while ((item = dequeue()) != NULL) { - grep_printline(&item->data, '-'); - free(item->data.dat); - free(item); - } + qentry_t *item; + + item = qlist; + do { + /* Buffer must have ended early. */ + if (item->dat == NULL) + break; + + grep_printline(item, '-'); + free(item->dat); + item->dat = NULL; + item = advqueue(item); + } while (item != qlist); + + qlist = qnext = qpool; + filled = 0; } void clearqueue(void) { - struct qentry *item; + qentry_t *item; - while ((item = dequeue()) != NULL) { - free(item->data.dat); - free(item); - } + item = qlist; + do { + free(item->dat); + item->dat = NULL; + item = advqueue(item); + } while (item != qlist); + + qlist = qnext = qpool; + filled = 0; } From owner-dev-commits-src-all@freebsd.org Mon Dec 28 03:22:34 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 092504CF897; Mon, 28 Dec 2020 03:22:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D42t16pT8z4cGY; Mon, 28 Dec 2020 03:22:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC55012DE0; Mon, 28 Dec 2020 03:22:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS3MXKe092284; Mon, 28 Dec 2020 03:22:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS3MXvr092283; Mon, 28 Dec 2020 03:22:33 GMT (envelope-from git) Date: Mon, 28 Dec 2020 03:22:33 GMT Message-Id: <202012280322.0BS3MXvr092283@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 35505aacb979 - stable/12 - lib/libc/regex: fix build with REDEBUG defined MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 35505aacb97901be1347a6bffbfeabafd6b3b1b7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 03:22:34 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=35505aacb97901be1347a6bffbfeabafd6b3b1b7 commit 35505aacb97901be1347a6bffbfeabafd6b3b1b7 Author: Yuri Pankov AuthorDate: 2019-09-24 12:21:01 +0000 Commit: Kyle Evans CommitDate: 2020-12-28 03:22:18 +0000 lib/libc/regex: fix build with REDEBUG defined (cherry picked from commit 3c78771400e74f5bc54ee8e9a28fbf70190fd250) --- lib/libc/regex/engine.c | 2 +- lib/libc/regex/regcomp.c | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c index a25bfa08ede7..e7da4cbc2a5d 100644 --- a/lib/libc/regex/engine.c +++ b/lib/libc/regex/engine.c @@ -1068,7 +1068,7 @@ print(struct match *m, fprintf(d, " %s", pchar(ch)); for (i = 0; i < g->nstates; i++) if (ISSET(st, i)) { - fprintf(d, "%s%d", (first) ? "\t" : ", ", i); + fprintf(d, "%s%lu", (first) ? "\t" : ", ", i); first = 0; } fprintf(d, "\n"); diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index 586621c5a745..b76e58a26082 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -196,12 +196,6 @@ static char nuls[10]; /* place to point scanner in event of error */ #define THERETHERE() (p->slen - 2) #define DROP(n) (p->slen -= (n)) -#ifndef NDEBUG -static int never = 0; /* for use in asserts; shuts lint up */ -#else -#define never 0 /* some s have bugs too */ -#endif - /* Macro used by computejump()/computematchjump() */ #define MIN(a,b) ((a)<(b)?(a):(b)) From owner-dev-commits-src-all@freebsd.org Mon Dec 28 03:23:10 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EBC7E4CFB7B; Mon, 28 Dec 2020 03:23:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D42tk6BRfz4cBx; Mon, 28 Dec 2020 03:23:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C788612C28; Mon, 28 Dec 2020 03:23:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS3NAU2092391; Mon, 28 Dec 2020 03:23:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS3NApl092390; Mon, 28 Dec 2020 03:23:10 GMT (envelope-from git) Date: Mon, 28 Dec 2020 03:23:10 GMT Message-Id: <202012280323.0BS3NApl092390@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 90dbd2a623c3 - stable/12 - regex(3): belatedly document REG_POSIX from r363734 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 90dbd2a623c345ad66228c48b5bf2e901bdb6c61 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 03:23:11 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=90dbd2a623c345ad66228c48b5bf2e901bdb6c61 commit 90dbd2a623c345ad66228c48b5bf2e901bdb6c61 Author: Kyle Evans AuthorDate: 2020-08-04 02:06:49 +0000 Commit: Kyle Evans CommitDate: 2020-12-28 03:23:04 +0000 regex(3): belatedly document REG_POSIX from r363734 My original patch included this documented, but it appears that I failed to include the manpage update. Do so now. (cherry picked from commit ba8b64de05d0df84ad9064be950ca38bc7bafe7d) --- lib/libc/regex/regex.3 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/libc/regex/regex.3 b/lib/libc/regex/regex.3 index 8959272e9891..d22dec1e87f7 100644 --- a/lib/libc/regex/regex.3 +++ b/lib/libc/regex/regex.3 @@ -32,7 +32,7 @@ .\" @(#)regex.3 8.4 (Berkeley) 3/20/94 .\" $FreeBSD$ .\" -.Dd May 25, 2016 +.Dd April 15, 2017 .Dt REGEX 3 .Os .Sh NAME @@ -183,6 +183,17 @@ compatible with but not specified by .St -p1003.2 , and should be used with caution in software intended to be portable to other systems. +.It Dv REG_POSIX +Compile only +.St -p1003.2 +compliant expressions. +This flag has no effect unless linking against +.Nm libregex . +This is an extension, +compatible with but not specified by +.St -p1003.2 , +and should be used with +caution in software intended to be portable to other systems. .El .Pp When successful, From owner-dev-commits-src-all@freebsd.org Mon Dec 28 03:49:00 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F15054CFCF9; Mon, 28 Dec 2020 03:49:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D43SX5G48z4dPc; Mon, 28 Dec 2020 03:49:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A7C17131A6; Mon, 28 Dec 2020 03:49:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS3n0ZJ014672; Mon, 28 Dec 2020 03:49:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS3n0ND014671; Mon, 28 Dec 2020 03:49:00 GMT (envelope-from git) Date: Mon, 28 Dec 2020 03:49:00 GMT Message-Id: <202012280349.0BS3n0ND014671@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: f20c0e331952 - main - caroot: drop $FreeBSD$ expansion from root bundle MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f20c0e3319524d51ab474608851bc705d57a7482 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 03:49:01 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=f20c0e3319524d51ab474608851bc705d57a7482 commit f20c0e3319524d51ab474608851bc705d57a7482 Author: Kyle Evans AuthorDate: 2020-12-28 03:47:41 +0000 Commit: Kyle Evans CommitDate: 2020-12-28 03:47:41 +0000 caroot: drop $FreeBSD$ expansion from root bundle This debatably could have waited until the next update would have taken place, but it's easier to see what changes if we get it out of the way now. MFC after: 3 days --- secure/caroot/trusted/ACCVRAIZ1.pem | 2 +- secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem | 2 +- secure/caroot/trusted/Actalis_Authentication_Root_CA.pem | 2 +- secure/caroot/trusted/AffirmTrust_Commercial.pem | 2 +- secure/caroot/trusted/AffirmTrust_Networking.pem | 2 +- secure/caroot/trusted/AffirmTrust_Premium.pem | 2 +- secure/caroot/trusted/AffirmTrust_Premium_ECC.pem | 2 +- secure/caroot/trusted/Amazon_Root_CA_1.pem | 2 +- secure/caroot/trusted/Amazon_Root_CA_2.pem | 2 +- secure/caroot/trusted/Amazon_Root_CA_3.pem | 2 +- secure/caroot/trusted/Amazon_Root_CA_4.pem | 2 +- secure/caroot/trusted/Atos_TrustedRoot_2011.pem | 2 +- .../Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem | 2 +- secure/caroot/trusted/Baltimore_CyberTrust_Root.pem | 2 +- secure/caroot/trusted/Buypass_Class_2_Root_CA.pem | 2 +- secure/caroot/trusted/Buypass_Class_3_Root_CA.pem | 2 +- secure/caroot/trusted/CA_Disig_Root_R2.pem | 2 +- secure/caroot/trusted/CFCA_EV_ROOT.pem | 2 +- secure/caroot/trusted/COMODO_Certification_Authority.pem | 2 +- secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem | 2 +- secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem | 2 +- secure/caroot/trusted/Camerfirma_Chambers_of_Commerce_Root.pem | 2 +- secure/caroot/trusted/Camerfirma_Global_Chambersign_Root.pem | 2 +- secure/caroot/trusted/Certigna.pem | 2 +- secure/caroot/trusted/Certigna_Root_CA.pem | 2 +- secure/caroot/trusted/Certum_Root_CA.pem | 2 +- secure/caroot/trusted/Certum_Trusted_Network_CA.pem | 2 +- secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem | 2 +- secure/caroot/trusted/Chambers_of_Commerce_Root_-_2008.pem | 2 +- secure/caroot/trusted/Comodo_AAA_Services_root.pem | 2 +- secure/caroot/trusted/Cybertrust_Global_Root.pem | 2 +- secure/caroot/trusted/D-TRUST_Root_CA_3_2013.pem | 2 +- secure/caroot/trusted/D-TRUST_Root_Class_3_CA_2_2009.pem | 2 +- secure/caroot/trusted/D-TRUST_Root_Class_3_CA_2_EV_2009.pem | 2 +- secure/caroot/trusted/DST_Root_CA_X3.pem | 2 +- secure/caroot/trusted/DigiCert_Assured_ID_Root_CA.pem | 2 +- secure/caroot/trusted/DigiCert_Assured_ID_Root_G2.pem | 2 +- secure/caroot/trusted/DigiCert_Assured_ID_Root_G3.pem | 2 +- secure/caroot/trusted/DigiCert_Global_Root_CA.pem | 2 +- secure/caroot/trusted/DigiCert_Global_Root_G2.pem | 2 +- secure/caroot/trusted/DigiCert_Global_Root_G3.pem | 2 +- secure/caroot/trusted/DigiCert_High_Assurance_EV_Root_CA.pem | 2 +- secure/caroot/trusted/DigiCert_Trusted_Root_G4.pem | 2 +- secure/caroot/trusted/E-Tugra_Certification_Authority.pem | 2 +- secure/caroot/trusted/EC-ACC.pem | 2 +- secure/caroot/trusted/Entrust_Root_Certification_Authority.pem | 2 +- secure/caroot/trusted/Entrust_Root_Certification_Authority_-_EC1.pem | 2 +- secure/caroot/trusted/Entrust_Root_Certification_Authority_-_G2.pem | 2 +- secure/caroot/trusted/Entrust_Root_Certification_Authority_-_G4.pem | 2 +- secure/caroot/trusted/Entrust_net_Premium_2048_Secure_Server_CA.pem | 2 +- secure/caroot/trusted/GDCA_TrustAUTH_R5_ROOT.pem | 2 +- secure/caroot/trusted/GTS_Root_R1.pem | 2 +- secure/caroot/trusted/GTS_Root_R2.pem | 2 +- secure/caroot/trusted/GTS_Root_R3.pem | 2 +- secure/caroot/trusted/GTS_Root_R4.pem | 2 +- secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G2.pem | 2 +- secure/caroot/trusted/GlobalSign_ECC_Root_CA_-_R4.pem | 2 +- secure/caroot/trusted/GlobalSign_ECC_Root_CA_-_R5.pem | 2 +- secure/caroot/trusted/GlobalSign_Root_CA.pem | 2 +- secure/caroot/trusted/GlobalSign_Root_CA_-_R2.pem | 2 +- secure/caroot/trusted/GlobalSign_Root_CA_-_R3.pem | 2 +- secure/caroot/trusted/GlobalSign_Root_CA_-_R6.pem | 2 +- secure/caroot/trusted/Global_Chambersign_Root_-_2008.pem | 2 +- secure/caroot/trusted/Go_Daddy_Class_2_CA.pem | 2 +- secure/caroot/trusted/Go_Daddy_Root_Certificate_Authority_-_G2.pem | 2 +- .../Hellenic_Academic_and_Research_Institutions_ECC_RootCA_2015.pem | 2 +- .../trusted/Hellenic_Academic_and_Research_Institutions_RootCA_2011.pem | 2 +- .../trusted/Hellenic_Academic_and_Research_Institutions_RootCA_2015.pem | 2 +- secure/caroot/trusted/Hongkong_Post_Root_CA_1.pem | 2 +- secure/caroot/trusted/Hongkong_Post_Root_CA_3.pem | 2 +- secure/caroot/trusted/ISRG_Root_X1.pem | 2 +- secure/caroot/trusted/IdenTrust_Commercial_Root_CA_1.pem | 2 +- secure/caroot/trusted/IdenTrust_Public_Sector_Root_CA_1.pem | 2 +- secure/caroot/trusted/Izenpe_com.pem | 2 +- secure/caroot/trusted/Microsec_e-Szigno_Root_CA_2009.pem | 2 +- secure/caroot/trusted/Microsoft_ECC_Root_Certificate_Authority_2017.pem | 2 +- secure/caroot/trusted/Microsoft_RSA_Root_Certificate_Authority_2017.pem | 2 +- secure/caroot/trusted/NAVER_Global_Root_Certification_Authority.pem | 2 +- secure/caroot/trusted/NetLock_Arany__Class_Gold__F__tan__s__tv__ny.pem | 2 +- secure/caroot/trusted/Network_Solutions_Certificate_Authority.pem | 2 +- secure/caroot/trusted/OISTE_WISeKey_Global_Root_GA_CA.pem | 2 +- secure/caroot/trusted/OISTE_WISeKey_Global_Root_GB_CA.pem | 2 +- secure/caroot/trusted/OISTE_WISeKey_Global_Root_GC_CA.pem | 2 +- secure/caroot/trusted/QuoVadis_Root_CA.pem | 2 +- secure/caroot/trusted/QuoVadis_Root_CA_1_G3.pem | 2 +- secure/caroot/trusted/QuoVadis_Root_CA_2.pem | 2 +- secure/caroot/trusted/QuoVadis_Root_CA_2_G3.pem | 2 +- secure/caroot/trusted/QuoVadis_Root_CA_3.pem | 2 +- secure/caroot/trusted/QuoVadis_Root_CA_3_G3.pem | 2 +- secure/caroot/trusted/SSL_com_EV_Root_Certification_Authority_ECC.pem | 2 +- .../caroot/trusted/SSL_com_EV_Root_Certification_Authority_RSA_R2.pem | 2 +- secure/caroot/trusted/SSL_com_Root_Certification_Authority_ECC.pem | 2 +- secure/caroot/trusted/SSL_com_Root_Certification_Authority_RSA.pem | 2 +- secure/caroot/trusted/SZAFIR_ROOT_CA2.pem | 2 +- secure/caroot/trusted/SecureSign_RootCA11.pem | 2 +- secure/caroot/trusted/SecureTrust_CA.pem | 2 +- secure/caroot/trusted/Secure_Global_CA.pem | 2 +- secure/caroot/trusted/Security_Communication_RootCA2.pem | 2 +- secure/caroot/trusted/Security_Communication_Root_CA.pem | 2 +- secure/caroot/trusted/Sonera_Class_2_Root_CA.pem | 2 +- secure/caroot/trusted/Staat_der_Nederlanden_EV_Root_CA.pem | 2 +- secure/caroot/trusted/Staat_der_Nederlanden_Root_CA_-_G3.pem | 2 +- secure/caroot/trusted/Starfield_Class_2_CA.pem | 2 +- secure/caroot/trusted/Starfield_Root_Certificate_Authority_-_G2.pem | 2 +- .../trusted/Starfield_Services_Root_Certificate_Authority_-_G2.pem | 2 +- secure/caroot/trusted/SwissSign_Gold_CA_-_G2.pem | 2 +- secure/caroot/trusted/SwissSign_Platinum_CA_-_G2.pem | 2 +- secure/caroot/trusted/SwissSign_Silver_CA_-_G2.pem | 2 +- .../Symantec_Class_1_Public_Primary_Certification_Authority_-_G6.pem | 2 +- .../Symantec_Class_2_Public_Primary_Certification_Authority_-_G6.pem | 2 +- secure/caroot/trusted/T-TeleSec_GlobalRoot_Class_2.pem | 2 +- secure/caroot/trusted/T-TeleSec_GlobalRoot_Class_3.pem | 2 +- secure/caroot/trusted/TUBITAK_Kamu_SM_SSL_Kok_Sertifikasi_-_Surum_1.pem | 2 +- secure/caroot/trusted/TWCA_Global_Root_CA.pem | 2 +- secure/caroot/trusted/TWCA_Root_Certification_Authority.pem | 2 +- secure/caroot/trusted/TeliaSonera_Root_CA_v1.pem | 2 +- secure/caroot/trusted/TrustCor_ECA-1.pem | 2 +- secure/caroot/trusted/TrustCor_RootCert_CA-1.pem | 2 +- secure/caroot/trusted/TrustCor_RootCert_CA-2.pem | 2 +- secure/caroot/trusted/Trustis_FPS_Root_CA.pem | 2 +- secure/caroot/trusted/Trustwave_Global_Certification_Authority.pem | 2 +- .../trusted/Trustwave_Global_ECC_P256_Certification_Authority.pem | 2 +- .../trusted/Trustwave_Global_ECC_P384_Certification_Authority.pem | 2 +- secure/caroot/trusted/UCA_Extended_Validation_Root.pem | 2 +- secure/caroot/trusted/UCA_Global_G2_Root.pem | 2 +- secure/caroot/trusted/USERTrust_ECC_Certification_Authority.pem | 2 +- secure/caroot/trusted/USERTrust_RSA_Certification_Authority.pem | 2 +- .../caroot/trusted/VeriSign_Universal_Root_Certification_Authority.pem | 2 +- .../Verisign_Class_1_Public_Primary_Certification_Authority_-_G3.pem | 2 +- .../Verisign_Class_2_Public_Primary_Certification_Authority_-_G3.pem | 2 +- secure/caroot/trusted/XRamp_Global_CA_Root.pem | 2 +- secure/caroot/trusted/certSIGN_ROOT_CA.pem | 2 +- secure/caroot/trusted/certSIGN_Root_CA_G2.pem | 2 +- secure/caroot/trusted/e-Szigno_Root_CA_2017.pem | 2 +- secure/caroot/trusted/ePKI_Root_Certification_Authority.pem | 2 +- secure/caroot/trusted/emSign_ECC_Root_CA_-_C3.pem | 2 +- secure/caroot/trusted/emSign_ECC_Root_CA_-_G3.pem | 2 +- secure/caroot/trusted/emSign_Root_CA_-_C1.pem | 2 +- secure/caroot/trusted/emSign_Root_CA_-_G1.pem | 2 +- 139 files changed, 139 insertions(+), 139 deletions(-) diff --git a/secure/caroot/trusted/ACCVRAIZ1.pem b/secure/caroot/trusted/ACCVRAIZ1.pem index 136f7bddb6f3..0c7c7c41b57d 100644 --- a/secure/caroot/trusted/ACCVRAIZ1.pem +++ b/secure/caroot/trusted/ACCVRAIZ1.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem b/secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem index d327b3ecf2cb..579f50d8d730 100644 --- a/secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem +++ b/secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Actalis_Authentication_Root_CA.pem b/secure/caroot/trusted/Actalis_Authentication_Root_CA.pem index 6e7823d4b81f..7248545350e2 100644 --- a/secure/caroot/trusted/Actalis_Authentication_Root_CA.pem +++ b/secure/caroot/trusted/Actalis_Authentication_Root_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/AffirmTrust_Commercial.pem b/secure/caroot/trusted/AffirmTrust_Commercial.pem index e0a8ebdf12e1..1d85c32853c8 100644 --- a/secure/caroot/trusted/AffirmTrust_Commercial.pem +++ b/secure/caroot/trusted/AffirmTrust_Commercial.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/AffirmTrust_Networking.pem b/secure/caroot/trusted/AffirmTrust_Networking.pem index a96b036f4153..222bde26c934 100644 --- a/secure/caroot/trusted/AffirmTrust_Networking.pem +++ b/secure/caroot/trusted/AffirmTrust_Networking.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/AffirmTrust_Premium.pem b/secure/caroot/trusted/AffirmTrust_Premium.pem index ee259e197476..dc1447429465 100644 --- a/secure/caroot/trusted/AffirmTrust_Premium.pem +++ b/secure/caroot/trusted/AffirmTrust_Premium.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/AffirmTrust_Premium_ECC.pem b/secure/caroot/trusted/AffirmTrust_Premium_ECC.pem index 5f600162a941..a6f01409a2ef 100644 --- a/secure/caroot/trusted/AffirmTrust_Premium_ECC.pem +++ b/secure/caroot/trusted/AffirmTrust_Premium_ECC.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Amazon_Root_CA_1.pem b/secure/caroot/trusted/Amazon_Root_CA_1.pem index 9221de0cea44..6bf1acafd4c7 100644 --- a/secure/caroot/trusted/Amazon_Root_CA_1.pem +++ b/secure/caroot/trusted/Amazon_Root_CA_1.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Amazon_Root_CA_2.pem b/secure/caroot/trusted/Amazon_Root_CA_2.pem index 418ffc0b8de0..80a1eb66bee2 100644 --- a/secure/caroot/trusted/Amazon_Root_CA_2.pem +++ b/secure/caroot/trusted/Amazon_Root_CA_2.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Amazon_Root_CA_3.pem b/secure/caroot/trusted/Amazon_Root_CA_3.pem index 36ff13dc4708..6b61b3e18fa0 100644 --- a/secure/caroot/trusted/Amazon_Root_CA_3.pem +++ b/secure/caroot/trusted/Amazon_Root_CA_3.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Amazon_Root_CA_4.pem b/secure/caroot/trusted/Amazon_Root_CA_4.pem index c1f88d6bc8a3..df7aa6f1c165 100644 --- a/secure/caroot/trusted/Amazon_Root_CA_4.pem +++ b/secure/caroot/trusted/Amazon_Root_CA_4.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Atos_TrustedRoot_2011.pem b/secure/caroot/trusted/Atos_TrustedRoot_2011.pem index 3f038d3c239c..21b229561733 100644 --- a/secure/caroot/trusted/Atos_TrustedRoot_2011.pem +++ b/secure/caroot/trusted/Atos_TrustedRoot_2011.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem b/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem index da12de780be6..4d2eaa61962f 100644 --- a/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem +++ b/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Baltimore_CyberTrust_Root.pem b/secure/caroot/trusted/Baltimore_CyberTrust_Root.pem index cc5d711bc08d..3dc1de849346 100644 --- a/secure/caroot/trusted/Baltimore_CyberTrust_Root.pem +++ b/secure/caroot/trusted/Baltimore_CyberTrust_Root.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Buypass_Class_2_Root_CA.pem b/secure/caroot/trusted/Buypass_Class_2_Root_CA.pem index 5ebb2edfcf84..dc2c86edbed1 100644 --- a/secure/caroot/trusted/Buypass_Class_2_Root_CA.pem +++ b/secure/caroot/trusted/Buypass_Class_2_Root_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Buypass_Class_3_Root_CA.pem b/secure/caroot/trusted/Buypass_Class_3_Root_CA.pem index 1aab9dec0adc..fda39f8731d1 100644 --- a/secure/caroot/trusted/Buypass_Class_3_Root_CA.pem +++ b/secure/caroot/trusted/Buypass_Class_3_Root_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/CA_Disig_Root_R2.pem b/secure/caroot/trusted/CA_Disig_Root_R2.pem index a6db02606c5d..0ecc9d1ee08d 100644 --- a/secure/caroot/trusted/CA_Disig_Root_R2.pem +++ b/secure/caroot/trusted/CA_Disig_Root_R2.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/CFCA_EV_ROOT.pem b/secure/caroot/trusted/CFCA_EV_ROOT.pem index 460785cc21e6..7eb37baa3bed 100644 --- a/secure/caroot/trusted/CFCA_EV_ROOT.pem +++ b/secure/caroot/trusted/CFCA_EV_ROOT.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/COMODO_Certification_Authority.pem b/secure/caroot/trusted/COMODO_Certification_Authority.pem index f6c1cb232ac6..7aa1237bb8e1 100644 --- a/secure/caroot/trusted/COMODO_Certification_Authority.pem +++ b/secure/caroot/trusted/COMODO_Certification_Authority.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem b/secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem index 322154206039..215581b14fdf 100644 --- a/secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem +++ b/secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem b/secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem index 53c540ff2146..38e275f1365e 100644 --- a/secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem +++ b/secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Camerfirma_Chambers_of_Commerce_Root.pem b/secure/caroot/trusted/Camerfirma_Chambers_of_Commerce_Root.pem index 601df8f89e10..cf7de6cc122b 100644 --- a/secure/caroot/trusted/Camerfirma_Chambers_of_Commerce_Root.pem +++ b/secure/caroot/trusted/Camerfirma_Chambers_of_Commerce_Root.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Camerfirma_Global_Chambersign_Root.pem b/secure/caroot/trusted/Camerfirma_Global_Chambersign_Root.pem index 203fb13108c8..b1fa96bc405e 100644 --- a/secure/caroot/trusted/Camerfirma_Global_Chambersign_Root.pem +++ b/secure/caroot/trusted/Camerfirma_Global_Chambersign_Root.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Certigna.pem b/secure/caroot/trusted/Certigna.pem index 3a25f25160ea..bbcd413be511 100644 --- a/secure/caroot/trusted/Certigna.pem +++ b/secure/caroot/trusted/Certigna.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Certigna_Root_CA.pem b/secure/caroot/trusted/Certigna_Root_CA.pem index 564d3fe8f50d..c1a0286ab2a0 100644 --- a/secure/caroot/trusted/Certigna_Root_CA.pem +++ b/secure/caroot/trusted/Certigna_Root_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Certum_Root_CA.pem b/secure/caroot/trusted/Certum_Root_CA.pem index ec03a0f913de..f815c49ddae0 100644 --- a/secure/caroot/trusted/Certum_Root_CA.pem +++ b/secure/caroot/trusted/Certum_Root_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Certum_Trusted_Network_CA.pem b/secure/caroot/trusted/Certum_Trusted_Network_CA.pem index 5ced43da18d8..a321445a502c 100644 --- a/secure/caroot/trusted/Certum_Trusted_Network_CA.pem +++ b/secure/caroot/trusted/Certum_Trusted_Network_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem b/secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem index 0493c488801c..62cee7fc2058 100644 --- a/secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem +++ b/secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Chambers_of_Commerce_Root_-_2008.pem b/secure/caroot/trusted/Chambers_of_Commerce_Root_-_2008.pem index b705886574c8..1e3864180a66 100644 --- a/secure/caroot/trusted/Chambers_of_Commerce_Root_-_2008.pem +++ b/secure/caroot/trusted/Chambers_of_Commerce_Root_-_2008.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Comodo_AAA_Services_root.pem b/secure/caroot/trusted/Comodo_AAA_Services_root.pem index 5e2506239c66..3ab5ce74bc37 100644 --- a/secure/caroot/trusted/Comodo_AAA_Services_root.pem +++ b/secure/caroot/trusted/Comodo_AAA_Services_root.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Cybertrust_Global_Root.pem b/secure/caroot/trusted/Cybertrust_Global_Root.pem index 54647522233b..b6261df7f2df 100644 --- a/secure/caroot/trusted/Cybertrust_Global_Root.pem +++ b/secure/caroot/trusted/Cybertrust_Global_Root.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/D-TRUST_Root_CA_3_2013.pem b/secure/caroot/trusted/D-TRUST_Root_CA_3_2013.pem index ab9d138bd3e1..debf7b30c2ef 100644 --- a/secure/caroot/trusted/D-TRUST_Root_CA_3_2013.pem +++ b/secure/caroot/trusted/D-TRUST_Root_CA_3_2013.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/D-TRUST_Root_Class_3_CA_2_2009.pem b/secure/caroot/trusted/D-TRUST_Root_Class_3_CA_2_2009.pem index a460f18db523..37b0f004ef94 100644 --- a/secure/caroot/trusted/D-TRUST_Root_Class_3_CA_2_2009.pem +++ b/secure/caroot/trusted/D-TRUST_Root_Class_3_CA_2_2009.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/D-TRUST_Root_Class_3_CA_2_EV_2009.pem b/secure/caroot/trusted/D-TRUST_Root_Class_3_CA_2_EV_2009.pem index f270c37caa80..71d0f7fc323f 100644 --- a/secure/caroot/trusted/D-TRUST_Root_Class_3_CA_2_EV_2009.pem +++ b/secure/caroot/trusted/D-TRUST_Root_Class_3_CA_2_EV_2009.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/DST_Root_CA_X3.pem b/secure/caroot/trusted/DST_Root_CA_X3.pem index 47f5f3212169..aeaa167d590c 100644 --- a/secure/caroot/trusted/DST_Root_CA_X3.pem +++ b/secure/caroot/trusted/DST_Root_CA_X3.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/DigiCert_Assured_ID_Root_CA.pem b/secure/caroot/trusted/DigiCert_Assured_ID_Root_CA.pem index f768b06d12db..12ce54725012 100644 --- a/secure/caroot/trusted/DigiCert_Assured_ID_Root_CA.pem +++ b/secure/caroot/trusted/DigiCert_Assured_ID_Root_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/DigiCert_Assured_ID_Root_G2.pem b/secure/caroot/trusted/DigiCert_Assured_ID_Root_G2.pem index 0135f133c7ac..7c5d96a053e4 100644 --- a/secure/caroot/trusted/DigiCert_Assured_ID_Root_G2.pem +++ b/secure/caroot/trusted/DigiCert_Assured_ID_Root_G2.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/DigiCert_Assured_ID_Root_G3.pem b/secure/caroot/trusted/DigiCert_Assured_ID_Root_G3.pem index cdd8f0be47f5..901c33448725 100644 --- a/secure/caroot/trusted/DigiCert_Assured_ID_Root_G3.pem +++ b/secure/caroot/trusted/DigiCert_Assured_ID_Root_G3.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/DigiCert_Global_Root_CA.pem b/secure/caroot/trusted/DigiCert_Global_Root_CA.pem index 3a273557ab67..75c9fd45ebab 100644 --- a/secure/caroot/trusted/DigiCert_Global_Root_CA.pem +++ b/secure/caroot/trusted/DigiCert_Global_Root_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/DigiCert_Global_Root_G2.pem b/secure/caroot/trusted/DigiCert_Global_Root_G2.pem index 7b80ce72c72e..363d93b2c9ac 100644 --- a/secure/caroot/trusted/DigiCert_Global_Root_G2.pem +++ b/secure/caroot/trusted/DigiCert_Global_Root_G2.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/DigiCert_Global_Root_G3.pem b/secure/caroot/trusted/DigiCert_Global_Root_G3.pem index 6538535dd73b..45776f544654 100644 --- a/secure/caroot/trusted/DigiCert_Global_Root_G3.pem +++ b/secure/caroot/trusted/DigiCert_Global_Root_G3.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/DigiCert_High_Assurance_EV_Root_CA.pem b/secure/caroot/trusted/DigiCert_High_Assurance_EV_Root_CA.pem index dcb88fb3d1b4..d76acb3c3896 100644 --- a/secure/caroot/trusted/DigiCert_High_Assurance_EV_Root_CA.pem +++ b/secure/caroot/trusted/DigiCert_High_Assurance_EV_Root_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/DigiCert_Trusted_Root_G4.pem b/secure/caroot/trusted/DigiCert_Trusted_Root_G4.pem index 92295c4ec38e..7ebb30081d81 100644 --- a/secure/caroot/trusted/DigiCert_Trusted_Root_G4.pem +++ b/secure/caroot/trusted/DigiCert_Trusted_Root_G4.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/E-Tugra_Certification_Authority.pem b/secure/caroot/trusted/E-Tugra_Certification_Authority.pem index 256c0b3e524b..04d1e630a816 100644 --- a/secure/caroot/trusted/E-Tugra_Certification_Authority.pem +++ b/secure/caroot/trusted/E-Tugra_Certification_Authority.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/EC-ACC.pem b/secure/caroot/trusted/EC-ACC.pem index 7fca8890028f..a4b43b39414b 100644 --- a/secure/caroot/trusted/EC-ACC.pem +++ b/secure/caroot/trusted/EC-ACC.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Entrust_Root_Certification_Authority.pem b/secure/caroot/trusted/Entrust_Root_Certification_Authority.pem index 2ed6ff3e94a2..50b0d2ed5c94 100644 --- a/secure/caroot/trusted/Entrust_Root_Certification_Authority.pem +++ b/secure/caroot/trusted/Entrust_Root_Certification_Authority.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_EC1.pem b/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_EC1.pem index ae0d6859b1d6..eb15c3801be6 100644 --- a/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_EC1.pem +++ b/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_EC1.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_G2.pem b/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_G2.pem index d82aaf71ecae..b92fd4aef90f 100644 --- a/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_G2.pem +++ b/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_G2.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_G4.pem b/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_G4.pem index a84b6ca03d42..8443ae5ca195 100644 --- a/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_G4.pem +++ b/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_G4.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Entrust_net_Premium_2048_Secure_Server_CA.pem b/secure/caroot/trusted/Entrust_net_Premium_2048_Secure_Server_CA.pem index 1d18cb8d6a4b..b429d96786ea 100644 --- a/secure/caroot/trusted/Entrust_net_Premium_2048_Secure_Server_CA.pem +++ b/secure/caroot/trusted/Entrust_net_Premium_2048_Secure_Server_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GDCA_TrustAUTH_R5_ROOT.pem b/secure/caroot/trusted/GDCA_TrustAUTH_R5_ROOT.pem index 59b80e1f45ce..f9db5d422b8e 100644 --- a/secure/caroot/trusted/GDCA_TrustAUTH_R5_ROOT.pem +++ b/secure/caroot/trusted/GDCA_TrustAUTH_R5_ROOT.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GTS_Root_R1.pem b/secure/caroot/trusted/GTS_Root_R1.pem index 422977ba0649..9abe191b9bb9 100644 --- a/secure/caroot/trusted/GTS_Root_R1.pem +++ b/secure/caroot/trusted/GTS_Root_R1.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GTS_Root_R2.pem b/secure/caroot/trusted/GTS_Root_R2.pem index 06abfca8ccbb..8c5f92d1e610 100644 --- a/secure/caroot/trusted/GTS_Root_R2.pem +++ b/secure/caroot/trusted/GTS_Root_R2.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GTS_Root_R3.pem b/secure/caroot/trusted/GTS_Root_R3.pem index 04d8829f66aa..d621d3053df1 100644 --- a/secure/caroot/trusted/GTS_Root_R3.pem +++ b/secure/caroot/trusted/GTS_Root_R3.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GTS_Root_R4.pem b/secure/caroot/trusted/GTS_Root_R4.pem index c423a356f791..5a7a71764294 100644 --- a/secure/caroot/trusted/GTS_Root_R4.pem +++ b/secure/caroot/trusted/GTS_Root_R4.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G2.pem b/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G2.pem index 65a90850db69..b03758a63c98 100644 --- a/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G2.pem +++ b/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G2.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GlobalSign_ECC_Root_CA_-_R4.pem b/secure/caroot/trusted/GlobalSign_ECC_Root_CA_-_R4.pem index 7566a58a862b..c63f8d8c441a 100644 --- a/secure/caroot/trusted/GlobalSign_ECC_Root_CA_-_R4.pem +++ b/secure/caroot/trusted/GlobalSign_ECC_Root_CA_-_R4.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GlobalSign_ECC_Root_CA_-_R5.pem b/secure/caroot/trusted/GlobalSign_ECC_Root_CA_-_R5.pem index 9d273a384295..7a989c4577d8 100644 --- a/secure/caroot/trusted/GlobalSign_ECC_Root_CA_-_R5.pem +++ b/secure/caroot/trusted/GlobalSign_ECC_Root_CA_-_R5.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GlobalSign_Root_CA.pem b/secure/caroot/trusted/GlobalSign_Root_CA.pem index 71a5de48edad..0e2348e6c4f1 100644 --- a/secure/caroot/trusted/GlobalSign_Root_CA.pem +++ b/secure/caroot/trusted/GlobalSign_Root_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GlobalSign_Root_CA_-_R2.pem b/secure/caroot/trusted/GlobalSign_Root_CA_-_R2.pem index 810db4a2984b..616fe024937a 100644 --- a/secure/caroot/trusted/GlobalSign_Root_CA_-_R2.pem +++ b/secure/caroot/trusted/GlobalSign_Root_CA_-_R2.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GlobalSign_Root_CA_-_R3.pem b/secure/caroot/trusted/GlobalSign_Root_CA_-_R3.pem index 0835e56cd757..aedb37900191 100644 --- a/secure/caroot/trusted/GlobalSign_Root_CA_-_R3.pem +++ b/secure/caroot/trusted/GlobalSign_Root_CA_-_R3.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GlobalSign_Root_CA_-_R6.pem b/secure/caroot/trusted/GlobalSign_Root_CA_-_R6.pem index 5d792a7da0e5..112aaf7fde17 100644 --- a/secure/caroot/trusted/GlobalSign_Root_CA_-_R6.pem +++ b/secure/caroot/trusted/GlobalSign_Root_CA_-_R6.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Global_Chambersign_Root_-_2008.pem b/secure/caroot/trusted/Global_Chambersign_Root_-_2008.pem index cceb29ac1bfd..cd9bebaf8c0f 100644 --- a/secure/caroot/trusted/Global_Chambersign_Root_-_2008.pem +++ b/secure/caroot/trusted/Global_Chambersign_Root_-_2008.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Go_Daddy_Class_2_CA.pem b/secure/caroot/trusted/Go_Daddy_Class_2_CA.pem index cb38b1b1c417..5083a0fcf21d 100644 --- a/secure/caroot/trusted/Go_Daddy_Class_2_CA.pem +++ b/secure/caroot/trusted/Go_Daddy_Class_2_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ *** 979 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Mon Dec 28 04:20:52 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DFCBC4D073B; Mon, 28 Dec 2020 04:20:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D449J62yyz4frt; Mon, 28 Dec 2020 04:20:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C32AC13648; Mon, 28 Dec 2020 04:20:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS4Kq7A054408; Mon, 28 Dec 2020 04:20:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS4KqKE054407; Mon, 28 Dec 2020 04:20:52 GMT (envelope-from git) Date: Mon, 28 Dec 2020 04:20:52 GMT Message-Id: <202012280420.0BS4KqKE054407@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: aaacbdb3993b - stable/12 - : reserve a regcomp field for REG_POSIX MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: aaacbdb3993b7ba9b31c7f26412ffcc44ba94a52 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 04:20:52 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=aaacbdb3993b7ba9b31c7f26412ffcc44ba94a52 commit aaacbdb3993b7ba9b31c7f26412ffcc44ba94a52 Author: Kyle Evans AuthorDate: 2020-07-31 12:40:31 +0000 Commit: Kyle Evans CommitDate: 2020-12-28 04:20:26 +0000 : reserve a regcomp field for REG_POSIX For libc regcomp, this will be a nop. libregex will take this to mean that it needs to turn off GNU extensions, effectively switching it back to the POSIX-compliant libc implementation at runtime. (cherry picked from commit 7c5ec5fe6afb50ba5c83ad0b3dab036f91b7dafe) --- include/regex.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/regex.h b/include/regex.h index 6b0838a9bd97..3bea3df4f3d4 100644 --- a/include/regex.h +++ b/include/regex.h @@ -71,6 +71,7 @@ typedef struct { #define REG_NOSPEC 0020 #define REG_PEND 0040 #define REG_DUMP 0200 +#define REG_POSIX 0400 /* only POSIX-compliant regex (libregex) */ /* regerror() flags */ #define REG_ENOSYS (-1) From owner-dev-commits-src-all@freebsd.org Mon Dec 28 04:55:30 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB8214D1209; Mon, 28 Dec 2020 04:55:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D44xG6N4Qz4h2K; Mon, 28 Dec 2020 04:55:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C9C14139EC; Mon, 28 Dec 2020 04:55:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS4tUh9090174; Mon, 28 Dec 2020 04:55:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS4tUDf090173; Mon, 28 Dec 2020 04:55:30 GMT (envelope-from git) Date: Mon, 28 Dec 2020 04:55:30 GMT Message-Id: <202012280455.0BS4tUDf090173@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 70233fc21258 - stable/12 - regex(3): Interpret many escaped ordinary characters as EESCAPE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 70233fc21258ab4347fd07401297d3d409a9c4a8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 04:55:31 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=70233fc21258ab4347fd07401297d3d409a9c4a8 commit 70233fc21258ab4347fd07401297d3d409a9c4a8 Author: Kyle Evans AuthorDate: 2020-07-29 23:21:56 +0000 Commit: Kyle Evans CommitDate: 2020-12-28 04:20:27 +0000 regex(3): Interpret many escaped ordinary characters as EESCAPE MFC NOTE: This only merged the infrastructure back, the new regcomp symbol that actually interprets these as EESCAPE was *dropped*. This is purely to make future commits for libregex easier to merge back so that we can choose to use it. In IEEE 1003.1-2008 [1] and earlier revisions, BRE/ERE grammar allows for any character to be escaped, but "ORD_CHAR preceded by an unescaped character [gives undefined results]". Historically, we've interpreted an escaped ordinary character as the ordinary character itself. This becomes problematic when some extensions give special meanings to an otherwise ordinary character (e.g. GNU's \b, \s, \w), meaning we may have two different valid interpretations of the same sequence. To make this easier to deal with and given that the standard calls this undefined, we should throw an error (EESCAPE) if we run into this scenario to ease transition into a state where some escaped ordinaries are blessed with a special meaning -- it will either error out or have extended behavior, rather than have two entirely different versions of undefined behavior that leave the consumer of regex(3) guessing as to what behavior will be used or leaving them with false impressions. This change bumps the symbol version of regcomp to FBSD_1.6 and provides the old escape semantics for legacy applications, just in case one has an older application that would immediately turn into a pumpkin because of an extraneous escape that's embedded or otherwise critical to its operation. This is the final piece needed before enhancing libregex with GNU extensions and flipping the switch on bsdgrep. [1] http://pubs.opengroup.org/onlinepubs/9699919799.2016edition/ (cherry picked from commit adeebf4cd47c3e85155d92f386bda5e519b75ab2) --- contrib/netbsd-tests/lib/libc/regex/data/meta.in | 4 +- contrib/netbsd-tests/lib/libc/regex/data/subexp.in | 2 +- lib/libc/regex/regcomp.c | 103 +++++++++++++++++---- 3 files changed, 90 insertions(+), 19 deletions(-) diff --git a/contrib/netbsd-tests/lib/libc/regex/data/meta.in b/contrib/netbsd-tests/lib/libc/regex/data/meta.in index 4533d3591bc6..eb24075aea62 100644 --- a/contrib/netbsd-tests/lib/libc/regex/data/meta.in +++ b/contrib/netbsd-tests/lib/libc/regex/data/meta.in @@ -4,7 +4,9 @@ a[bc]d & abd abd a\*c & a*c a*c a\\b & a\b a\b a\\\*b & a\*b a\*b -a\bc & abc abc +# Begin FreeBSD +a\bc &C EESCAPE +# End FreeBSD a\ &C EESCAPE a\\bc & a\bc a\bc \{ bC BADRPT diff --git a/contrib/netbsd-tests/lib/libc/regex/data/subexp.in b/contrib/netbsd-tests/lib/libc/regex/data/subexp.in index d3efe2eab270..e3d376bb7cb3 100644 --- a/contrib/netbsd-tests/lib/libc/regex/data/subexp.in +++ b/contrib/netbsd-tests/lib/libc/regex/data/subexp.in @@ -12,7 +12,7 @@ a(b+)c - abbbc abbbc bbb a(b*)c - ac ac @c (a|ab)(bc([de]+)f|cde) - abcdef abcdef a,bcdef,de # Begin FreeBSD -a\(b\|c\)d b ab|cd ab|cd b|c +a\(b|c\)d b ab|cd ab|cd b|c # End FreeBSD # the regression tester only asks for 9 subexpressions a(b)(c)(d)(e)(f)(g)(h)(i)(j)k - abcdefghijk abcdefghijk b,c,d,e,f,g,h,i,j diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index b76e58a26082..5cda77da1a6a 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -102,11 +102,14 @@ struct parse { sopno pend[NPAREN]; /* -> ) ([0] unused) */ bool allowbranch; /* can this expression branch? */ bool bre; /* convenience; is this a BRE? */ + int pflags; /* other parsing flags -- legacy escapes? */ bool (*parse_expr)(struct parse *, struct branchc *); void (*pre_parse)(struct parse *, struct branchc *); void (*post_parse)(struct parse *, struct branchc *); }; +#define PFLAG_LEGACY_ESC 0x00000001 + /* ========= begin header generated by ./mkh ========= */ #ifdef __cplusplus extern "C" { @@ -132,6 +135,7 @@ static void p_b_cclass(struct parse *p, cset *cs); static void p_b_eclass(struct parse *p, cset *cs); static wint_t p_b_symbol(struct parse *p); static wint_t p_b_coll_elem(struct parse *p, wint_t endc); +static bool may_escape(struct parse *p, const wint_t ch); static wint_t othercase(wint_t ch); static void bothcases(struct parse *p, wint_t ch); static void ordinary(struct parse *p, wint_t ch); @@ -199,22 +203,10 @@ static char nuls[10]; /* place to point scanner in event of error */ /* Macro used by computejump()/computematchjump() */ #define MIN(a,b) ((a)<(b)?(a):(b)) -/* - - regcomp - interface for parser and compilation - = extern int regcomp(regex_t *, const char *, int); - = #define REG_BASIC 0000 - = #define REG_EXTENDED 0001 - = #define REG_ICASE 0002 - = #define REG_NOSUB 0004 - = #define REG_NEWLINE 0010 - = #define REG_NOSPEC 0020 - = #define REG_PEND 0040 - = #define REG_DUMP 0200 - */ -int /* 0 success, otherwise REG_something */ -regcomp(regex_t * __restrict preg, +static int /* 0 success, otherwise REG_something */ +regcomp_internal(regex_t * __restrict preg, const char * __restrict pattern, - int cflags) + int cflags, int pflags) { struct parse pa; struct re_guts *g; @@ -273,6 +265,7 @@ regcomp(regex_t * __restrict preg, p->end = p->next + len; p->error = 0; p->ncsalloc = 0; + p->pflags = pflags; for (i = 0; i < NPAREN; i++) { p->pbegin[i] = 0; p->pend[i] = 0; @@ -345,6 +338,27 @@ regcomp(regex_t * __restrict preg, return(p->error); } +/* + - regcomp - interface for parser and compilation + = extern int regcomp(regex_t *, const char *, int); + = #define REG_BASIC 0000 + = #define REG_EXTENDED 0001 + = #define REG_ICASE 0002 + = #define REG_NOSUB 0004 + = #define REG_NEWLINE 0010 + = #define REG_NOSPEC 0020 + = #define REG_PEND 0040 + = #define REG_DUMP 0200 + */ +int /* 0 success, otherwise REG_something */ +regcomp(regex_t * __restrict preg, + const char * __restrict pattern, + int cflags) +{ + + return (regcomp_internal(preg, pattern, cflags, PFLAG_LEGACY_ESC)); +} + /* - p_ere_exp - parse one subERE, an atom possibly followed by a repetition op, - return whether we should terminate or not @@ -435,7 +449,10 @@ p_ere_exp(struct parse *p, struct branchc *bc) EMIT(OEOW, 0); break; default: - ordinary(p, wc); + if (may_escape(p, wc)) + ordinary(p, wc); + else + SETERROR(REG_EESCAPE); break; } break; @@ -797,7 +814,10 @@ p_simp_re(struct parse *p, struct branchc *bc) return (false); /* Definitely not $... */ p->next--; wc = WGETNEXT(); - ordinary(p, wc); + if ((c & BACKSL) == 0 || may_escape(p, wc)) + ordinary(p, wc); + else + SETERROR(REG_EESCAPE); break; } @@ -1094,6 +1114,55 @@ p_b_coll_elem(struct parse *p, return(0); } +/* + - may_escape - determine whether 'ch' is escape-able in the current context + == static int may_escape(struct parse *p, const wint_t ch) + */ +static bool +may_escape(struct parse *p, const wint_t ch) +{ + + if ((p->pflags & PFLAG_LEGACY_ESC) != 0) + return (true); + if (isalpha(ch) || ch == '\'' || ch == '`') + return (false); + return (true); +#ifdef NOTYET + /* + * Build a whitelist of characters that may be escaped to produce an + * ordinary in the current context. This assumes that these have not + * been otherwise interpreted as a special character. Escaping an + * ordinary character yields undefined results according to + * IEEE 1003.1-2008. Some extensions (notably, some GNU extensions) take + * advantage of this and use escaped ordinary characters to provide + * special meaning, e.g. \b, \B, \w, \W, \s, \S. + */ + switch(ch) { + case '|': + case '+': + case '?': + /* The above characters may not be escaped in BREs */ + if (!(p->g->cflags®_EXTENDED)) + return (false); + /* Fallthrough */ + case '(': + case ')': + case '{': + case '}': + case '.': + case '[': + case ']': + case '\\': + case '*': + case '^': + case '$': + return (true); + default: + return (false); + } +#endif +} + /* - othercase - return the case counterpart of an alphabetic == static wint_t othercase(wint_t ch); From owner-dev-commits-src-all@freebsd.org Mon Dec 28 04:55:30 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D831F4D0CEE; Mon, 28 Dec 2020 04:55:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D44xG5lpvz4h9F; Mon, 28 Dec 2020 04:55:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B809713C42; Mon, 28 Dec 2020 04:55:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS4tUTG090157; Mon, 28 Dec 2020 04:55:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS4tUW0090156; Mon, 28 Dec 2020 04:55:30 GMT (envelope-from git) Date: Mon, 28 Dec 2020 04:55:30 GMT Message-Id: <202012280455.0BS4tUW0090156@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 06e63004abb0 - stable/12 - libregex: implement GNU extensions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 06e63004abb0abc801e9f8af066ef10095189b10 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 04:55:30 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=06e63004abb0abc801e9f8af066ef10095189b10 commit 06e63004abb0abc801e9f8af066ef10095189b10 Author: Kyle Evans AuthorDate: 2020-08-04 02:14:51 +0000 Commit: Kyle Evans CommitDate: 2020-12-28 04:34:53 +0000 libregex: implement GNU extensions 18a1e2e9: libregex: Implement a subset of the GNU extensions The entire patch-set is not yet mature enough for commit, but this usable subset is generally enough for googletest to be happy with and mostly map to some existing concepts, so they're not as invasive. The specific changes included here are: - Branching in BREs with \| - \w and \W for [[:alnum:]] and [^[:alnum:]] respectively - \s and \S for [[:space:]] and [^[:space:]] respectively - Additional quantifiers in BREs, \? and \+ (self-explanatory) There's some #ifdef'd out work for allowing empty branches as a match-all. This is a feature that's under assessment... future work will determine how standard this behavior is and act accordingly. 61898cde: libregex: disable some of the unimplemented test cases for now This should allow the tests to actually pass. Future work will uncomment the unimplemented tests as they're implemented. 7518fb34: libc: regex: factor out ISBOW/ISEOW macros These will be reused for \b (word boundary, which matches both sides). No functional change. ca53e5ae: libregex: implement \` and \' (begin-of-subj, end-of-subj) These are GNU extensions, generally equivalent to ^ and $ except that the new syntax will not match beginning of line after the first in a multi-line expression or the end of line before absolute last in a multi-line expression. 6b986646: libregex: implement \b and \B (word boundary, not word boundary) This is the last of the needed GNU expressions before we can unleash bsdgrep by default. \b is effectively an agnostic equivalent of \< and \>, while \B will match every space that isn't making a transition from nonchar -> char or char -> nonchar. 4afa7dd6: libc: regex: retire internal EMPTBR ("Empty branch present") It was realized just a little too late that this was a hack that belonged in individual regex(3)-using applications. It was surrounded in NOTYET and not implemented in the engine, so remove it. 4f1efa30: libc: regex: partial revert of r368358 (6b986646) MFC NOTE: Altered to match the legacy behavior of a\bc => abc. Part of the libregex functionality leaked into the tests it shares with the standard regex(3). Introduce a P flag to set the REG_POSIX cflag to indicate that libc regex should effectively do nothing while libregex should specifically run it in non-extended mode. This unbreaks the libc/regex test run. (cherry picked from commit 18a1e2e9b9f109a78c5a9274e4cfb4777801b4fb) (cherry picked from commit 61898cde69374d5a9994e2074605bc4101aff72d) (cherry picked from commit 7518fb346fe9603f99d2406a073b30fb8e4a270c) (cherry picked from commit ca53e5aedfebcc1b4091b68e01b2d5cae923f85e) (cherry picked from commit 6b986646d434baa21ae3d74d6a662ad206c7ddbd) (cherry picked from commit 4afa7dd61a3a1454a5b3cf5e6de2029c7e2d9a84) (cherry picked from commit 4f1efa309ca48a088595dd57969ae6a397dd49d1) --- contrib/netbsd-tests/lib/libc/regex/README | 1 + contrib/netbsd-tests/lib/libc/regex/data/meta.in | 2 +- contrib/netbsd-tests/lib/libc/regex/main.c | 5 +- lib/libc/regex/engine.c | 115 ++++++-- lib/libc/regex/regcomp.c | 336 +++++++++++++++++------ lib/libc/regex/regex2.h | 4 + lib/libregex/tests/gnuext.in | 4 + lib/libregex/tests/libregex_test.sh | 4 - 8 files changed, 365 insertions(+), 106 deletions(-) diff --git a/contrib/netbsd-tests/lib/libc/regex/README b/contrib/netbsd-tests/lib/libc/regex/README index 6d9a28cf60ca..0e8a09a764ff 100644 --- a/contrib/netbsd-tests/lib/libc/regex/README +++ b/contrib/netbsd-tests/lib/libc/regex/README @@ -28,6 +28,7 @@ The full list of flags: $ REG_NOTEOL # REG_STARTEND (see below) p REG_PEND + P REG_POSIX For REG_STARTEND, the start/end offsets are those of the substring enclosed in (). diff --git a/contrib/netbsd-tests/lib/libc/regex/data/meta.in b/contrib/netbsd-tests/lib/libc/regex/data/meta.in index eb24075aea62..61e432353f6b 100644 --- a/contrib/netbsd-tests/lib/libc/regex/data/meta.in +++ b/contrib/netbsd-tests/lib/libc/regex/data/meta.in @@ -5,7 +5,7 @@ a\*c & a*c a*c a\\b & a\b a\b a\\\*b & a\*b a\*b # Begin FreeBSD -a\bc &C EESCAPE +a\bc &P abc abc # End FreeBSD a\ &C EESCAPE a\\bc & a\bc a\bc diff --git a/contrib/netbsd-tests/lib/libc/regex/main.c b/contrib/netbsd-tests/lib/libc/regex/main.c index eac4e2d9b51e..243c8dc5ff80 100644 --- a/contrib/netbsd-tests/lib/libc/regex/main.c +++ b/contrib/netbsd-tests/lib/libc/regex/main.c @@ -338,7 +338,7 @@ options(int type, char *s) { char *p; int o = (type == 'c') ? copts : eopts; - const char *legal = (type == 'c') ? "bisnmp" : "^$#tl"; + const char *legal = (type == 'c') ? "bisnmpP" : "^$#tl"; for (p = s; *p != '\0'; p++) if (strchr(legal, *p) != NULL) @@ -362,6 +362,9 @@ options(int type, char *s) case 'p': o |= REG_PEND; break; + case 'P': + o |= REG_POSIX; + break; case '^': o |= REG_NOTBOL; break; diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c index e7da4cbc2a5d..bb40018c07e1 100644 --- a/lib/libc/regex/engine.c +++ b/lib/libc/regex/engine.c @@ -109,7 +109,7 @@ static int matcher(struct re_guts *g, const char *string, size_t nmatch, regmatc static const char *dissect(struct match *m, const char *start, const char *stop, sopno startst, sopno stopst); static const char *backref(struct match *m, const char *start, const char *stop, sopno startst, sopno stopst, sopno lev, int); static const char *walk(struct match *m, const char *start, const char *stop, sopno startst, sopno stopst, bool fast); -static states step(struct re_guts *g, sopno start, sopno stop, states bef, wint_t ch, states aft); +static states step(struct re_guts *g, sopno start, sopno stop, states bef, wint_t ch, states aft, int sflags); #define MAX_RECURSION 100 #define BOL (OUT-1) #define EOL (BOL-1) @@ -118,7 +118,12 @@ static states step(struct re_guts *g, sopno start, sopno stop, states bef, wint_ #define BOW (BOL-4) #define EOW (BOL-5) #define BADCHAR (BOL-6) +#define NWBND (BOL-7) #define NONCHAR(c) ((c) <= OUT) +/* sflags */ +#define SBOS 0x0001 +#define SEOS 0x0002 + #ifdef REDEBUG static void print(struct match *m, const char *caption, states st, int ch, FILE *d); #endif @@ -457,6 +462,10 @@ dissect(struct match *m, case OEOL: case OBOW: case OEOW: + case OBOS: + case OEOS: + case OWBND: + case ONWBND: break; case OANY: case OANYOF: @@ -589,6 +598,17 @@ dissect(struct match *m, return(sp); } +#define ISBOW(m, sp) \ + (sp < m->endp && ISWORD(*sp) && \ + ((sp == m->beginp && !(m->eflags®_NOTBOL)) || \ + (sp > m->offp && !ISWORD(*(sp-1))))) +#define ISEOW(m, sp) \ + (((sp == m->endp && !(m->eflags®_NOTEOL)) || \ + (sp < m->endp && *sp == '\n' && \ + (m->g->cflags®_NEWLINE)) || \ + (sp < m->endp && !ISWORD(*sp)) ) && \ + (sp > m->beginp && ISWORD(*(sp-1)))) \ + /* - backref - figure out what matched what, figuring in back references == static const char *backref(struct match *m, const char *start, \ @@ -646,6 +666,18 @@ backref(struct match *m, if (wc == BADCHAR || !CHIN(cs, wc)) return(NULL); break; + case OBOS: + if (sp == m->beginp && (m->eflags & REG_NOTBOL) == 0) + { /* yes */ } + else + return(NULL); + break; + case OEOS: + if (sp == m->endp && (m->eflags & REG_NOTEOL) == 0) + { /* yes */ } + else + return(NULL); + break; case OBOL: if ((sp == m->beginp && !(m->eflags®_NOTBOL)) || (sp > m->offp && sp < m->endp && @@ -662,20 +694,29 @@ backref(struct match *m, else return(NULL); break; + case OWBND: + if (ISBOW(m, sp) || ISEOW(m, sp)) + { /* yes */ } + else + return(NULL); + break; + case ONWBND: + if (((sp == m->beginp) && !ISWORD(*sp)) || + (sp == m->endp && !ISWORD(*(sp - 1)))) + { /* yes, beginning/end of subject */ } + else if (ISWORD(*(sp - 1)) == ISWORD(*sp)) + { /* yes, beginning/end of subject */ } + else + return(NULL); + break; case OBOW: - if (sp < m->endp && ISWORD(*sp) && - ((sp == m->beginp && !(m->eflags®_NOTBOL)) || - (sp > m->offp && !ISWORD(*(sp-1))))) + if (ISBOW(m, sp)) { /* yes */ } else return(NULL); break; case OEOW: - if (( (sp == m->endp && !(m->eflags®_NOTEOL)) || - (sp < m->endp && *sp == '\n' && - (m->g->cflags®_NEWLINE)) || - (sp < m->endp && !ISWORD(*sp)) ) && - (sp > m->beginp && ISWORD(*(sp-1))) ) + if (ISEOW(m, sp)) { /* yes */ } else return(NULL); @@ -814,15 +855,16 @@ walk(struct match *m, const char *start, const char *stop, sopno startst, wint_t c; wint_t lastc; /* previous c */ wint_t flagch; - int i; + int i, sflags; const char *matchp; /* last p at which a match ended */ size_t clen; + sflags = 0; AT("slow", start, stop, startst, stopst); CLEAR(st); SET1(st, startst); SP("sstart", st, *p); - st = step(m->g, startst, stopst, st, NOTHING, st); + st = step(m->g, startst, stopst, st, NOTHING, st, sflags); if (fast) ASSIGN(fresh, st); matchp = NULL; @@ -839,6 +881,7 @@ walk(struct match *m, const char *start, const char *stop, sopno startst, for (;;) { /* next character */ lastc = c; + sflags = 0; if (p == m->endp) { c = OUT; clen = 0; @@ -861,9 +904,20 @@ walk(struct match *m, const char *start, const char *stop, sopno startst, flagch = (flagch == BOL) ? BOLEOL : EOL; i += m->g->neol; } + if (lastc == OUT && (m->eflags & REG_NOTBOL) == 0) { + sflags |= SBOS; + /* Step one more for BOS. */ + i++; + } + if (c == OUT && (m->eflags & REG_NOTEOL) == 0) { + sflags |= SEOS; + /* Step one more for EOS. */ + i++; + } if (i != 0) { for (; i > 0; i--) - st = step(m->g, startst, stopst, st, flagch, st); + st = step(m->g, startst, stopst, st, flagch, st, + sflags); SP("sboleol", st, c); } @@ -877,9 +931,20 @@ walk(struct match *m, const char *start, const char *stop, sopno startst, flagch = EOW; } if (flagch == BOW || flagch == EOW) { - st = step(m->g, startst, stopst, st, flagch, st); + st = step(m->g, startst, stopst, st, flagch, st, sflags); SP("sboweow", st, c); } + if (lastc != OUT && c != OUT && + ISWORD(lastc) == ISWORD(c)) { + flagch = NWBND; + } else if ((lastc == OUT && !ISWORD(c)) || + (c == OUT && !ISWORD(lastc))) { + flagch = NWBND; + } + if (flagch == NWBND) { + st = step(m->g, startst, stopst, st, flagch, st, sflags); + SP("snwbnd", st, c); + } /* are we done? */ if (ISSET(st, stopst)) { @@ -898,9 +963,10 @@ walk(struct match *m, const char *start, const char *stop, sopno startst, else ASSIGN(st, empty); assert(c != OUT); - st = step(m->g, startst, stopst, tmp, c, st); + st = step(m->g, startst, stopst, tmp, c, st, sflags); SP("saft", st, c); - assert(EQ(step(m->g, startst, stopst, st, NOTHING, st), st)); + assert(EQ(step(m->g, startst, stopst, st, NOTHING, st, sflags), + st)); p += clen; } @@ -934,7 +1000,8 @@ step(struct re_guts *g, sopno stop, /* state after stop state within strip */ states bef, /* states reachable before */ wint_t ch, /* character or NONCHAR code */ - states aft) /* states already known reachable after */ + states aft, /* states already known reachable after */ + int sflags) /* state flags */ { cset *cs; sop s; @@ -955,6 +1022,14 @@ step(struct re_guts *g, if (ch == OPND(s)) FWD(aft, bef, 1); break; + case OBOS: + if ((ch == BOL || ch == BOLEOL) && (sflags & SBOS) != 0) + FWD(aft, bef, 1); + break; + case OEOS: + if ((ch == EOL || ch == BOLEOL) && (sflags & SEOS) != 0) + FWD(aft, bef, 1); + break; case OBOL: if (ch == BOL || ch == BOLEOL) FWD(aft, bef, 1); @@ -971,6 +1046,14 @@ step(struct re_guts *g, if (ch == EOW) FWD(aft, bef, 1); break; + case OWBND: + if (ch == BOW || ch == EOW) + FWD(aft, bef, 1); + break; + case ONWBND: + if (ch == NWBND) + FWD(aft, aft, 1); + break; case OANY: if (!NONCHAR(ch)) FWD(aft, bef, 1); diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index 5cda77da1a6a..00ab6a77141b 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -92,6 +92,7 @@ struct parse { const char *next; /* next character in RE */ const char *end; /* end of string (-> NUL normally) */ int error; /* has an error been seen? */ + int gnuext; sop *strip; /* malloced strip */ sopno ssize; /* malloced strip size (allocated) */ sopno slen; /* malloced strip length (used) */ @@ -131,7 +132,9 @@ static int p_count(struct parse *p); static void p_bracket(struct parse *p); static int p_range_cmp(wchar_t c1, wchar_t c2); static void p_b_term(struct parse *p, cset *cs); +static int p_b_pseudoclass(struct parse *p, char c); static void p_b_cclass(struct parse *p, cset *cs); +static void p_b_cclass_named(struct parse *p, cset *cs, const char[]); static void p_b_eclass(struct parse *p, cset *cs); static wint_t p_b_symbol(struct parse *p); static wint_t p_b_coll_elem(struct parse *p, wint_t endc); @@ -181,6 +184,7 @@ static char nuls[10]; /* place to point scanner in event of error */ #define SEESPEC(a) (p->bre ? SEETWO('\\', a) : SEE(a)) #define EAT(c) ((SEE(c)) ? (NEXT(), 1) : 0) #define EATTWO(a, b) ((SEETWO(a, b)) ? (NEXT2(), 1) : 0) +#define EATSPEC(a) (p->bre ? EATTWO('\\', a) : EAT(a)) #define NEXT() (p->next++) #define NEXT2() (p->next += 2) #define NEXTn(n) (p->next += (n)) @@ -270,14 +274,22 @@ regcomp_internal(regex_t * __restrict preg, p->pbegin[i] = 0; p->pend[i] = 0; } +#ifdef LIBREGEX + if (cflags®_POSIX) { + p->gnuext = false; + p->allowbranch = (cflags & REG_EXTENDED) != 0; + } else + p->gnuext = p->allowbranch = true; +#else + p->gnuext = false; + p->allowbranch = (cflags & REG_EXTENDED) != 0; +#endif if (cflags & REG_EXTENDED) { - p->allowbranch = true; p->bre = false; p->parse_expr = p_ere_exp; p->pre_parse = NULL; p->post_parse = NULL; } else { - p->allowbranch = false; p->bre = true; p->parse_expr = p_simp_re; p->pre_parse = p_bre_pre_parse; @@ -372,6 +384,10 @@ p_ere_exp(struct parse *p, struct branchc *bc) sopno pos; int count; int count2; +#ifdef LIBREGEX + int i; + int handled; +#endif sopno subno; int wascaret = 0; @@ -379,6 +395,9 @@ p_ere_exp(struct parse *p, struct branchc *bc) assert(MORE()); /* caller should have ensured this */ c = GETNEXT(); +#ifdef LIBREGEX + handled = 0; +#endif pos = HERE(); switch (c) { case '(': @@ -441,6 +460,59 @@ p_ere_exp(struct parse *p, struct branchc *bc) case '\\': (void)REQUIRE(MORE(), REG_EESCAPE); wc = WGETNEXT(); +#ifdef LIBREGEX + if (p->gnuext) { + handled = 1; + switch (wc) { + case '`': + EMIT(OBOS, 0); + break; + case '\'': + EMIT(OEOS, 0); + break; + case 'B': + EMIT(ONWBND, 0); + break; + case 'b': + EMIT(OWBND, 0); + break; + case 'W': + case 'w': + case 'S': + case 's': + p_b_pseudoclass(p, wc); + break; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + i = wc - '0'; + assert(i < NPAREN); + if (p->pend[i] != 0) { + assert(i <= p->g->nsub); + EMIT(OBACK_, i); + assert(p->pbegin[i] != 0); + assert(OP(p->strip[p->pbegin[i]]) == OLPAREN); + assert(OP(p->strip[p->pend[i]]) == ORPAREN); + (void) dupl(p, p->pbegin[i]+1, p->pend[i]); + EMIT(O_BACK, i); + } else + SETERROR(REG_ESUBREG); + p->g->backrefs = 1; + break; + default: + handled = 0; + } + /* Don't proceed to the POSIX bits if we've already handled it */ + if (handled) + break; + } +#endif switch (wc) { case '<': EMIT(OBOW, 0); @@ -551,7 +623,7 @@ p_branch_eat_delim(struct parse *p, struct branchc *bc) (void)bc; nskip = 0; - while (EAT('|')) + while (EATSPEC('|')) ++nskip; return (nskip); } @@ -697,7 +769,11 @@ p_re(struct parse *p, } if (p->post_parse != NULL) p->post_parse(p, &bc); - (void) REQUIRE(HERE() != bc.start, REG_EMPTY); + (void) REQUIRE(p->gnuext || HERE() != bc.start, REG_EMPTY); +#ifdef LIBREGEX + if (HERE() == bc.start && !p_branch_empty(p, &bc)) + break; +#endif if (!p->allowbranch) break; /* @@ -724,101 +800,134 @@ static bool /* was the simple RE an unbackslashed $? */ p_simp_re(struct parse *p, struct branchc *bc) { int c; + int cc; /* convenient/control character */ int count; int count2; sopno pos; + bool handled; int i; wint_t wc; sopno subno; # define BACKSL (1<gnuext) { + handled = true; + switch (c) { + case BACKSL|'`': + EMIT(OBOS, 0); + break; + case BACKSL|'\'': + EMIT(OEOS, 0); + break; + case BACKSL|'B': + EMIT(ONWBND, 0); + break; + case BACKSL|'b': + EMIT(OWBND, 0); + break; + case BACKSL|'W': + case BACKSL|'w': + case BACKSL|'S': + case BACKSL|'s': + p_b_pseudoclass(p, cc); + break; + default: + handled = false; + } + } +#endif } - switch (c) { - case '.': - if (p->g->cflags®_NEWLINE) - nonnewline(p); - else - EMIT(OANY, 0); - break; - case '[': - p_bracket(p); - break; - case BACKSL|'<': - EMIT(OBOW, 0); - break; - case BACKSL|'>': - EMIT(OEOW, 0); - break; - case BACKSL|'{': - SETERROR(REG_BADRPT); - break; - case BACKSL|'(': - p->g->nsub++; - subno = p->g->nsub; - if (subno < NPAREN) - p->pbegin[subno] = HERE(); - EMIT(OLPAREN, subno); - /* the MORE here is an error heuristic */ - if (MORE() && !SEETWO('\\', ')')) - p_re(p, '\\', ')'); - if (subno < NPAREN) { - p->pend[subno] = HERE(); - assert(p->pend[subno] != 0); + if (!handled) { + switch (c) { + case '.': + if (p->g->cflags®_NEWLINE) + nonnewline(p); + else + EMIT(OANY, 0); + break; + case '[': + p_bracket(p); + break; + case BACKSL|'<': + EMIT(OBOW, 0); + break; + case BACKSL|'>': + EMIT(OEOW, 0); + break; + case BACKSL|'{': + SETERROR(REG_BADRPT); + break; + case BACKSL|'(': + p->g->nsub++; + subno = p->g->nsub; + if (subno < NPAREN) + p->pbegin[subno] = HERE(); + EMIT(OLPAREN, subno); + /* the MORE here is an error heuristic */ + if (MORE() && !SEETWO('\\', ')')) + p_re(p, '\\', ')'); + if (subno < NPAREN) { + p->pend[subno] = HERE(); + assert(p->pend[subno] != 0); + } + EMIT(ORPAREN, subno); + (void)REQUIRE(EATTWO('\\', ')'), REG_EPAREN); + break; + case BACKSL|')': /* should not get here -- must be user */ + SETERROR(REG_EPAREN); + break; + case BACKSL|'1': + case BACKSL|'2': + case BACKSL|'3': + case BACKSL|'4': + case BACKSL|'5': + case BACKSL|'6': + case BACKSL|'7': + case BACKSL|'8': + case BACKSL|'9': + i = (c&~BACKSL) - '0'; + assert(i < NPAREN); + if (p->pend[i] != 0) { + assert(i <= p->g->nsub); + EMIT(OBACK_, i); + assert(p->pbegin[i] != 0); + assert(OP(p->strip[p->pbegin[i]]) == OLPAREN); + assert(OP(p->strip[p->pend[i]]) == ORPAREN); + (void) dupl(p, p->pbegin[i]+1, p->pend[i]); + EMIT(O_BACK, i); + } else + SETERROR(REG_ESUBREG); + p->g->backrefs = 1; + break; + case '*': + /* + * Ordinary if used as the first character beyond BOL anchor of + * a (sub-)expression, counts as a bad repetition operator if it + * appears otherwise. + */ + (void)REQUIRE(bc->nchain == 0, REG_BADRPT); + /* FALLTHROUGH */ + default: + if (p->error != 0) + return (false); /* Definitely not $... */ + p->next--; + wc = WGETNEXT(); + if ((c & BACKSL) == 0 || may_escape(p, wc)) + ordinary(p, wc); + else + SETERROR(REG_EESCAPE); + break; } - EMIT(ORPAREN, subno); - (void)REQUIRE(EATTWO('\\', ')'), REG_EPAREN); - break; - case BACKSL|')': /* should not get here -- must be user */ - SETERROR(REG_EPAREN); - break; - case BACKSL|'1': - case BACKSL|'2': - case BACKSL|'3': - case BACKSL|'4': - case BACKSL|'5': - case BACKSL|'6': - case BACKSL|'7': - case BACKSL|'8': - case BACKSL|'9': - i = (c&~BACKSL) - '0'; - assert(i < NPAREN); - if (p->pend[i] != 0) { - assert(i <= p->g->nsub); - EMIT(OBACK_, i); - assert(p->pbegin[i] != 0); - assert(OP(p->strip[p->pbegin[i]]) == OLPAREN); - assert(OP(p->strip[p->pend[i]]) == ORPAREN); - (void) dupl(p, p->pbegin[i]+1, p->pend[i]); - EMIT(O_BACK, i); - } else - SETERROR(REG_ESUBREG); - p->g->backrefs = 1; - break; - case '*': - /* - * Ordinary if used as the first character beyond BOL anchor of - * a (sub-)expression, counts as a bad repetition operator if it - * appears otherwise. - */ - (void)REQUIRE(bc->nchain == 0, REG_BADRPT); - /* FALLTHROUGH */ - default: - if (p->error != 0) - return (false); /* Definitely not $... */ - p->next--; - wc = WGETNEXT(); - if ((c & BACKSL) == 0 || may_escape(p, wc)) - ordinary(p, wc); - else - SETERROR(REG_EESCAPE); - break; } if (EAT('*')) { /* implemented as +? */ @@ -827,6 +936,14 @@ p_simp_re(struct parse *p, struct branchc *bc) ASTERN(O_PLUS, pos); INSERT(OQUEST_, pos); ASTERN(O_QUEST, pos); +#ifdef LIBREGEX + } else if (p->gnuext && EATTWO('\\', '?')) { + INSERT(OQUEST_, pos); + ASTERN(O_QUEST, pos); + } else if (p->gnuext && EATTWO('\\', '+')) { + INSERT(OPLUS_, pos); + ASTERN(O_PLUS, pos); +#endif } else if (EATTWO('\\', '{')) { count = p_count(p); if (EAT(',')) { @@ -1018,6 +1135,41 @@ p_b_term(struct parse *p, cset *cs) } } +/* + - p_b_pseudoclass - parse a pseudo-class (\w, \W, \s, \S) + == static int p_b_pseudoclass(struct parse *p, char c) + */ +static int +p_b_pseudoclass(struct parse *p, char c) { + cset *cs; + + if ((cs = allocset(p)) == NULL) + return(0); + + if (p->g->cflags®_ICASE) + cs->icase = 1; + + switch (c) { + case 'W': + cs->invert = 1; + /* PASSTHROUGH */ + case 'w': + p_b_cclass_named(p, cs, "alnum"); + break; + case 'S': + cs->invert = 1; + /* PASSTHROUGH */ + case 's': + p_b_cclass_named(p, cs, "space"); + break; + default: + return(0); + } + + EMIT(OANYOF, (int)(cs - p->g->sets)); + return(1); +} + /* - p_b_cclass - parse a character-class name and deal with it == static void p_b_cclass(struct parse *p, cset *cs); @@ -1027,7 +1179,6 @@ p_b_cclass(struct parse *p, cset *cs) { const char *sp = p->next; size_t len; - wctype_t wct; char clname[16]; while (MORE() && isalpha((uch)PEEK())) @@ -1039,6 +1190,17 @@ p_b_cclass(struct parse *p, cset *cs) } memcpy(clname, sp, len); clname[len] = '\0'; + + p_b_cclass_named(p, cs, clname); +} +/* + - p_b_cclass_named - deal with a named character class + == static void p_b_cclass_named(struct parse *p, cset *cs, const char []); + */ +static void +p_b_cclass_named(struct parse *p, cset *cs, const char clname[]) { + wctype_t wct; + if ((wct = wctype(clname)) == 0) { SETERROR(REG_ECTYPE); return; @@ -1718,6 +1880,10 @@ findmust(struct parse *p, struct re_guts *g) case OEOW: case OBOL: case OEOL: + case OBOS: + case OEOS: + case OWBND: + case ONWBND: case O_QUEST: case O_CH: case OEND: @@ -1869,6 +2035,8 @@ altoffset(sop *scan, int offset) try++; case OBOW: case OEOW: + case OWBND: + case ONWBND: case OLPAREN: case ORPAREN: case OOR2: diff --git a/lib/libc/regex/regex2.h b/lib/libc/regex/regex2.h index a7c45683229c..19e3b7992982 100644 --- a/lib/libc/regex/regex2.h +++ b/lib/libc/regex/regex2.h @@ -104,6 +104,10 @@ typedef unsigned long sopno; #define O_CH (18L< b \B[abc]+ - bc \B[abc]\+ b bc +\`abc & abc abc +abc\' & abc abc \`abc\' & abc abc \`.+\' - abNc abNc \`.\+\' b abNc abNc (\`a) - Na +(a\`) - aN (a\') - aN +(\'a) - Na diff --git a/lib/libregex/tests/libregex_test.sh b/lib/libregex/tests/libregex_test.sh index 071f407cdb10..8ebe9b64ab63 100755 --- a/lib/libregex/tests/libregex_test.sh +++ b/lib/libregex/tests/libregex_test.sh @@ -29,10 +29,6 @@ check() { local dataname="${1}"; shift - if [ "${dataname}" == "gnuext" ]; then - atf_expect_fail "GNU extensions are not currently implemented" - fi - prog="$(atf_get_srcdir)/h_regex" data="$(atf_get_srcdir)/data/${dataname}.in" From owner-dev-commits-src-all@freebsd.org Mon Dec 28 04:59:16 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B6BA84D129F; Mon, 28 Dec 2020 04:59:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D451c4G1Vz4hKB; Mon, 28 Dec 2020 04:59:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8101313FF6; Mon, 28 Dec 2020 04:59:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS4xG6u090339; Mon, 28 Dec 2020 04:59:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS4xGIg090338; Mon, 28 Dec 2020 04:59:16 GMT (envelope-from git) Date: Mon, 28 Dec 2020 04:59:16 GMT Message-Id: <202012280459.0BS4xGIg090338@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Yuri Pankov Subject: git: 3cc3872829b1 - stable/12 - tools/tools/locale: skip control character widths MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuripv X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 3cc3872829b1852f3edea43f187c959fb264e95d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 04:59:16 -0000 The branch stable/12 has been updated by yuripv: URL: https://cgit.FreeBSD.org/src/commit/?id=3cc3872829b1852f3edea43f187c959fb264e95d commit 3cc3872829b1852f3edea43f187c959fb264e95d Author: Yuri Pankov AuthorDate: 2020-12-23 12:49:25 +0000 Commit: Yuri Pankov CommitDate: 2020-12-28 04:58:51 +0000 tools/tools/locale: skip control character widths Do not explicitly encode control characters widths as 0 allowing wcwidth() to return the proper implicit value for non-printable characters (-1). Reported by: naddy (cherry picked from commit f952bdf1425d6a877f99b5c5ca59f25fc8bedabe) --- tools/tools/locale/etc/final-maps/widths.txt | 65 ---------------------------- tools/tools/locale/tools/getwidths.c | 4 ++ 2 files changed, 4 insertions(+), 65 deletions(-) diff --git a/tools/tools/locale/etc/final-maps/widths.txt b/tools/tools/locale/etc/final-maps/widths.txt index f01a4d5a0dd5..74c28ac58463 100644 --- a/tools/tools/locale/etc/final-maps/widths.txt +++ b/tools/tools/locale/etc/final-maps/widths.txt @@ -3,71 +3,6 @@ # utf8proc 2.5.0. # ----------------------------------------------------------------------------- WIDTH - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 0 0 0 diff --git a/tools/tools/locale/tools/getwidths.c b/tools/tools/locale/tools/getwidths.c index 670ebd957878..f1c7c6cc463d 100644 --- a/tools/tools/locale/tools/getwidths.c +++ b/tools/tools/locale/tools/getwidths.c @@ -35,12 +35,16 @@ main(void) { int32_t wc; int i, wcw; + utf8proc_category_t wcc; setlocale(LC_CTYPE, "C.UTF-8"); printf("%s\n", utf8proc_version()); for (wc = 0; wc < 0x110000; wc++) { + wcc = utf8proc_category(wc); + if (wcc == UTF8PROC_CATEGORY_CC) + continue; wcw = utf8proc_charwidth(wc); if (wcw == 1) continue; From owner-dev-commits-src-all@freebsd.org Mon Dec 28 08:47:43 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 841634D4BBA; Mon, 28 Dec 2020 08:47:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4B5C3KdSz4sPj; Mon, 28 Dec 2020 08:47:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6542016C29; Mon, 28 Dec 2020 08:47:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS8lhRL041040; Mon, 28 Dec 2020 08:47:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS8lhkd041039; Mon, 28 Dec 2020 08:47:43 GMT (envelope-from git) Date: Mon, 28 Dec 2020 08:47:43 GMT Message-Id: <202012280847.0BS8lhkd041039@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 63f93c7e11e3 - main - rtld-elf: link libcompiler_rt on all architectures MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 63f93c7e11e33149429ddc2831cd1683b2e7f3e1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 08:47:43 -0000 The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=63f93c7e11e33149429ddc2831cd1683b2e7f3e1 commit 63f93c7e11e33149429ddc2831cd1683b2e7f3e1 Author: Ryan Libby AuthorDate: 2020-12-28 08:44:25 +0000 Commit: Ryan Libby CommitDate: 2020-12-28 08:44:25 +0000 rtld-elf: link libcompiler_rt on all architectures Statically link rtld-elf with libcompiler_rt on all architectures so that we don't need to try to pick and choose the bits we need from it for each architecture (we now leave that to the linker). Compilers may emit calls to support functions in this library, but because of the use of the linker flag -nostdlib for rtld's special needs, the library is not linked as normal. Previously we had two different solutions. On some architectures, we were able to extract reimplementations of the necessary builtin functions from our special build of libc. On ARM, we just linked libcompiler_rt. This is motivated by the same issue as D26199 and D27665, but should be a simpler solution that will apply to all architectures. Reviewed by: arichardson, kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27736 --- libexec/rtld-elf/Makefile | 4 ++++ libexec/rtld-elf/arm/Makefile.inc | 5 ----- libexec/rtld-elf/rtld-libc/Makefile.inc | 16 ++++------------ 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index c61477c68236..9ae998942a12 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -82,6 +82,10 @@ HAS_TESTS= SUBDIR.${MK_TESTS}+= tests .endif +# Some of the required math functions (div & mod) are implemented in +# libcompiler_rt on some architectures. +LIBADD+= compiler_rt + .include ${PROG_FULL}: ${VERSION_MAP} .include diff --git a/libexec/rtld-elf/arm/Makefile.inc b/libexec/rtld-elf/arm/Makefile.inc index 25bd4120edae..f39f1e89a8eb 100644 --- a/libexec/rtld-elf/arm/Makefile.inc +++ b/libexec/rtld-elf/arm/Makefile.inc @@ -1,8 +1,3 @@ # $FreeBSD$ -# Some of the required math functions (div & mod) are implemented in -# libcompiler_rt on ARM. The library also needs to be placed first to be -# correctly linked. As some of the functions are used before we have -# shared libraries. -LIBADD+= compiler_rt CFLAGS+= -mfpu=none diff --git a/libexec/rtld-elf/rtld-libc/Makefile.inc b/libexec/rtld-elf/rtld-libc/Makefile.inc index 88f13c8db8cb..d682472c3cca 100644 --- a/libexec/rtld-elf/rtld-libc/Makefile.inc +++ b/libexec/rtld-elf/rtld-libc/Makefile.inc @@ -57,22 +57,14 @@ _libc_other_objects= sigsetjmp lstat stat fstat fstatat fstatfs syscall \ # ARM needs aeabi_unwind_cpp for _setjmp _libc_other_objects+=aeabi_unwind_cpp .elif ${LIBC_ARCH} == "i386" -# __udivdi3 is needed by kvprintf() in rtld_printf.c -# i386 also needs i386_set_gsbase for allocate_initial_tls() -_libc_other_objects+=umoddi3 udivdi3 qdivrem i386_set_gsbase +# i386 needs i386_set_gsbase for allocate_initial_tls() +_libc_other_objects+=i386_set_gsbase .elif ${LIBC_ARCH} == "powerpc" || ${LIBC_ARCH} == "powerpcspe" -# ppc needs __syncicache for reloc.c and __umoddi3+__udivdi3 for rtld_printf.c -_libc_other_objects+=syncicache umoddi3 udivdi3 qdivrem -# for some reason there is also a reference to abs() -_libc_other_objects+=abs +# ppc needs __syncicache and abs for reloc.c +_libc_other_objects+=syncicache abs .elif ${LIBC_ARCH} == "powerpc64" # ppc64 needs __syncicache for reloc.c _libc_other_objects+=syncicache -.elif ${LIBC_ARCH} == "mips" -# 32-bit MIPS needs __umoddi3+__udivdi3 for rtld_printf.c -.if ${MACHINE_ARCH:Mmipsn32*} == "" && ${MACHINE_ARCH:Mmips64*} == "" -_libc_other_objects+=umoddi3 udivdi3 qdivrem -.endif .endif # Extract all the .o files from libc_nossp_pic.a. This ensures that From owner-dev-commits-src-all@freebsd.org Mon Dec 28 08:47:43 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9A7534D4C5A; Mon, 28 Dec 2020 08:47:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4B5C3y8tz4s6v; Mon, 28 Dec 2020 08:47:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7661416A5A; Mon, 28 Dec 2020 08:47:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS8lhMg041057; Mon, 28 Dec 2020 08:47:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS8lhiZ041056; Mon, 28 Dec 2020 08:47:43 GMT (envelope-from git) Date: Mon, 28 Dec 2020 08:47:43 GMT Message-Id: <202012280847.0BS8lhiZ041056@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 85b8932d0a9a - main - Revert "rtld-elf: link udivmoddi4 from compiler_rt" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 85b8932d0a9a2f3a1e8db26892e863cd8dbc0846 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 08:47:43 -0000 The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=85b8932d0a9a2f3a1e8db26892e863cd8dbc0846 commit 85b8932d0a9a2f3a1e8db26892e863cd8dbc0846 Author: Ryan Libby AuthorDate: 2020-12-28 08:44:25 +0000 Commit: Ryan Libby CommitDate: 2020-12-28 08:44:25 +0000 Revert "rtld-elf: link udivmoddi4 from compiler_rt" This reverts commit bce2cff0bc0ee3ab5b7a66c19920e7cfe3400f6f. Revert D27665 in favor of a more general fix coming in D27736. --- libexec/rtld-elf/rtld-libc/Makefile.inc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libexec/rtld-elf/rtld-libc/Makefile.inc b/libexec/rtld-elf/rtld-libc/Makefile.inc index e0d05d194401..88f13c8db8cb 100644 --- a/libexec/rtld-elf/rtld-libc/Makefile.inc +++ b/libexec/rtld-elf/rtld-libc/Makefile.inc @@ -51,12 +51,8 @@ _libc_other_objects= sigsetjmp lstat stat fstat fstatat fstatfs syscall \ getdirentries _getdirentries _close _fcntl _open _openat _read \ _sigprocmask _write readlink __realpathat _setjmp setjmp setjmperr -# Allow building files from libcompiler_rt. Beware, there are some name -# collisions between libcompiler_rt files and libc files. -CRTSRC= ${SRCTOP}/contrib/llvm-project/compiler-rt/lib/builtins -.PATH: ${CRTSRC} -# Finally add additional architecture-dependent dependencies +# Finally add additional architecture-dependent libc dependencies .if ${LIBC_ARCH} == "arm" # ARM needs aeabi_unwind_cpp for _setjmp _libc_other_objects+=aeabi_unwind_cpp @@ -64,7 +60,6 @@ _libc_other_objects+=aeabi_unwind_cpp # __udivdi3 is needed by kvprintf() in rtld_printf.c # i386 also needs i386_set_gsbase for allocate_initial_tls() _libc_other_objects+=umoddi3 udivdi3 qdivrem i386_set_gsbase -SRCS+= udivmoddi4.c .elif ${LIBC_ARCH} == "powerpc" || ${LIBC_ARCH} == "powerpcspe" # ppc needs __syncicache for reloc.c and __umoddi3+__udivdi3 for rtld_printf.c _libc_other_objects+=syncicache umoddi3 udivdi3 qdivrem From owner-dev-commits-src-all@freebsd.org Mon Dec 28 08:47:43 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A40244D4A5B; Mon, 28 Dec 2020 08:47:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4B5C4G2Lz4sJ5; Mon, 28 Dec 2020 08:47:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7EE1C167CB; Mon, 28 Dec 2020 08:47:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS8lhxG041074; Mon, 28 Dec 2020 08:47:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS8lhiU041073; Mon, 28 Dec 2020 08:47:43 GMT (envelope-from git) Date: Mon, 28 Dec 2020 08:47:43 GMT Message-Id: <202012280847.0BS8lhiU041073@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: a723bb667e48 - main - libcompiler_rt: stop building with stack smashing protection MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a723bb667e48b9ec55c3a262c9cc49e700e52989 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 08:47:43 -0000 The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=a723bb667e48b9ec55c3a262c9cc49e700e52989 commit a723bb667e48b9ec55c3a262c9cc49e700e52989 Author: Ryan Libby AuthorDate: 2020-12-28 08:44:25 +0000 Commit: Ryan Libby CommitDate: 2020-12-28 08:44:25 +0000 libcompiler_rt: stop building with stack smashing protection libcompiler_rt implements certain functions that clang and gcc emit calls to as part of their codegen (e.g. for extended width math). Build it without stack smashing protection (SSP, -fstack-protector) in order to support building binaries without SSP, especially the dynamic linker. Besides, SSP is probably not very valuable in this library. Reviewed by: arichardson, dim, kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27786 --- lib/libcompiler_rt/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libcompiler_rt/Makefile b/lib/libcompiler_rt/Makefile index 9ec4e896e7a5..0f42dd516c51 100644 --- a/lib/libcompiler_rt/Makefile +++ b/lib/libcompiler_rt/Makefile @@ -4,6 +4,7 @@ PACKAGE= lib${LIB} LIB= compiler_rt +MK_SSP= no NO_PIC= WARNS?= 2 From owner-dev-commits-src-all@freebsd.org Mon Dec 28 12:38:55 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E21094B3981; Mon, 28 Dec 2020 12:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4HCz60zXz3N73; Mon, 28 Dec 2020 12:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B277519760; Mon, 28 Dec 2020 12:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSCctbE091084; Mon, 28 Dec 2020 12:38:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSCctJ8091083; Mon, 28 Dec 2020 12:38:55 GMT (envelope-from git) Date: Mon, 28 Dec 2020 12:38:55 GMT Message-Id: <202012281238.0BSCctJ8091083@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 1952bc128c99 - stable/11 - MFC r368632: Be bug compatible with other operating systems by allowing non-sequential interface numbering for USB descriptors in userspace. Else certain USB control requests using the interface number, won't be recognized by the USB firmware. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 1952bc128c9903a1a2985063685268522e995c14 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 12:38:55 -0000 The branch stable/11 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=1952bc128c9903a1a2985063685268522e995c14 commit 1952bc128c9903a1a2985063685268522e995c14 Author: Hans Petter Selasky AuthorDate: 2020-12-14 11:56:16 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 12:38:06 +0000 MFC r368632: Be bug compatible with other operating systems by allowing non-sequential interface numbering for USB descriptors in userspace. Else certain USB control requests using the interface number, won't be recognized by the USB firmware. Refer to section 9.2.3 in the USB 2.0 specification: Interfaces are numbered from zero to one less than the number of concurrent interfaces supported by the configuration. PR: 251784 Sponsored by: Mellanox Technologies // NVIDIA Networking --- lib/libusb/libusb20_desc.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/libusb/libusb20_desc.c b/lib/libusb/libusb20_desc.c index c285193664ab..ce3aaab84b08 100644 --- a/lib/libusb/libusb20_desc.c +++ b/lib/libusb/libusb20_desc.c @@ -79,9 +79,10 @@ libusb20_parse_config_desc(const void *config_desc) if (ptr[1] != LIBUSB20_DT_CONFIG) { return (NULL); /* not config descriptor */ } + /* - * The first "bInterfaceNumber" should never have the value 0xff. - * Then it is corrupt. + * The first "bInterfaceNumber" cannot start at 0xFFFF + * because the field is 8-bit. */ niface_no_alt = 0; nendpoint = 0; @@ -204,12 +205,15 @@ libusb20_parse_config_desc(const void *config_desc) if (libusb20_me_decode(ptr, ptr[0], &last_if->desc)) { /* ignore */ } - /* - * Sometimes USB devices have corrupt interface - * descriptors and we need to overwrite the provided - * interface number! - */ - last_if->desc.bInterfaceNumber = niface - 1; + + /* detect broken USB descriptors when USB debugging is enabled */ + if (last_if->desc.bInterfaceNumber != (uint8_t)(niface - 1)) { + const char *str = getenv("LIBUSB_DEBUG"); + if (str != NULL && str[0] != '\0' && str[0] != '0') { + printf("LIBUSB_DEBUG: bInterfaceNumber(%u) is not sequential(%u)\n", + last_if->desc.bInterfaceNumber, niface - 1); + } + } last_if->extra.ptr = LIBUSB20_ADD_BYTES(ptr, ptr[0]); last_if->extra.len = 0; last_if->extra.type = LIBUSB20_ME_IS_RAW; From owner-dev-commits-src-all@freebsd.org Mon Dec 28 12:39:51 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 037C84B3831; Mon, 28 Dec 2020 12:39:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4HF26czHz3Mxs; Mon, 28 Dec 2020 12:39:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC46619765; Mon, 28 Dec 2020 12:39:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSCdod0091214; Mon, 28 Dec 2020 12:39:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSCdolh091213; Mon, 28 Dec 2020 12:39:50 GMT (envelope-from git) Date: Mon, 28 Dec 2020 12:39:50 GMT Message-Id: <202012281239.0BSCdolh091213@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 931b121469a9 - stable/12 - MFC r368632: Be bug compatible with other operating systems by allowing non-sequential interface numbering for USB descriptors in userspace. Else certain USB control requests using the interface number, won't be recognized by the USB firmware. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 931b121469a940147e34279783be6ac7343a980c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 12:39:51 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=931b121469a940147e34279783be6ac7343a980c commit 931b121469a940147e34279783be6ac7343a980c Author: Hans Petter Selasky AuthorDate: 2020-12-14 11:56:16 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 12:39:04 +0000 MFC r368632: Be bug compatible with other operating systems by allowing non-sequential interface numbering for USB descriptors in userspace. Else certain USB control requests using the interface number, won't be recognized by the USB firmware. Refer to section 9.2.3 in the USB 2.0 specification: Interfaces are numbered from zero to one less than the number of concurrent interfaces supported by the configuration. PR: 251784 Sponsored by: Mellanox Technologies // NVIDIA Networking --- lib/libusb/libusb20_desc.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/libusb/libusb20_desc.c b/lib/libusb/libusb20_desc.c index 517a2e5972c3..3052af09e9c2 100644 --- a/lib/libusb/libusb20_desc.c +++ b/lib/libusb/libusb20_desc.c @@ -81,9 +81,10 @@ libusb20_parse_config_desc(const void *config_desc) if (ptr[1] != LIBUSB20_DT_CONFIG) { return (NULL); /* not config descriptor */ } + /* - * The first "bInterfaceNumber" should never have the value 0xff. - * Then it is corrupt. + * The first "bInterfaceNumber" cannot start at 0xFFFF + * because the field is 8-bit. */ niface_no_alt = 0; nendpoint = 0; @@ -206,12 +207,15 @@ libusb20_parse_config_desc(const void *config_desc) if (libusb20_me_decode(ptr, ptr[0], &last_if->desc)) { /* ignore */ } - /* - * Sometimes USB devices have corrupt interface - * descriptors and we need to overwrite the provided - * interface number! - */ - last_if->desc.bInterfaceNumber = niface - 1; + + /* detect broken USB descriptors when USB debugging is enabled */ + if (last_if->desc.bInterfaceNumber != (uint8_t)(niface - 1)) { + const char *str = getenv("LIBUSB_DEBUG"); + if (str != NULL && str[0] != '\0' && str[0] != '0') { + printf("LIBUSB_DEBUG: bInterfaceNumber(%u) is not sequential(%u)\n", + last_if->desc.bInterfaceNumber, niface - 1); + } + } last_if->extra.ptr = LIBUSB20_ADD_BYTES(ptr, ptr[0]); last_if->extra.len = 0; last_if->extra.type = LIBUSB20_ME_IS_RAW; From owner-dev-commits-src-all@freebsd.org Mon Dec 28 12:52:49 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5368A4B3C60; Mon, 28 Dec 2020 12:52:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4HX075B8z3P12; Mon, 28 Dec 2020 12:52:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ABBD219DBB; Mon, 28 Dec 2020 12:52:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSCqmiM012710; Mon, 28 Dec 2020 12:52:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSCqmuE012709; Mon, 28 Dec 2020 12:52:48 GMT (envelope-from git) Date: Mon, 28 Dec 2020 12:52:48 GMT Message-Id: <202012281252.0BSCqmuE012709@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 59ded046d5ed - stable/11 - MFC r368658: Improve handling of alternate settings in the USB stack. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 59ded046d5ed159b334337166dc5dd0509531d1c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 12:52:49 -0000 The branch stable/11 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=59ded046d5ed159b334337166dc5dd0509531d1c commit 59ded046d5ed159b334337166dc5dd0509531d1c Author: Hans Petter Selasky AuthorDate: 2020-12-15 11:51:17 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 12:51:31 +0000 MFC r368658: Improve handling of alternate settings in the USB stack. Limit the number of alternate settings to 256. Else the alternate index variable may wrap around. PR: 251856 Submitted by: Ma, Horse Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/dev/usb/usb_parse.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/usb_parse.c b/sys/dev/usb/usb_parse.c index 07446966fccf..e90973120626 100644 --- a/sys/dev/usb/usb_parse.c +++ b/sys/dev/usb/usb_parse.c @@ -1,6 +1,6 @@ /* $FreeBSD$ */ /*- - * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2008-2020 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -139,8 +139,20 @@ usb_idesc_foreach(struct usb_config_descriptor *cd, break; if ((id->bDescriptorType == UDESC_INTERFACE) && (id->bLength >= sizeof(*id))) { - if (ps->iface_no_last == id->bInterfaceNumber) + if (ps->iface_no_last == id->bInterfaceNumber) { + /* + * Don't allow more than 256 alternate + * settings to avoid overflowing the + * alternate index which is a 8-bit + * variable. + */ + if (ps->iface_index_alt == 255) { + DPRINTF("Interface(%u) has more than 256 alternate settings\n", + id->bInterfaceNumber); + continue; + } new_iface = 0; + } ps->iface_no_last = id->bInterfaceNumber; break; } From owner-dev-commits-src-all@freebsd.org Mon Dec 28 12:54:38 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E41044B3F86; Mon, 28 Dec 2020 12:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4HZ665D5z3P6L; Mon, 28 Dec 2020 12:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C44F619DBE; Mon, 28 Dec 2020 12:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSCscCm012859; Mon, 28 Dec 2020 12:54:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSCscbm012856; Mon, 28 Dec 2020 12:54:38 GMT (envelope-from git) Date: Mon, 28 Dec 2020 12:54:38 GMT Message-Id: <202012281254.0BSCscbm012856@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 4f89b6f56fb6 - stable/12 - MFC r368658: Improve handling of alternate settings in the USB stack. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 4f89b6f56fb65c0b4a41875e21967a11ec28d837 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 12:54:39 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=4f89b6f56fb65c0b4a41875e21967a11ec28d837 commit 4f89b6f56fb65c0b4a41875e21967a11ec28d837 Author: Hans Petter Selasky AuthorDate: 2020-12-15 11:51:17 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 12:53:47 +0000 MFC r368658: Improve handling of alternate settings in the USB stack. Limit the number of alternate settings to 256. Else the alternate index variable may wrap around. PR: 251856 Submitted by: Ma, Horse Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/dev/usb/usb_parse.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/usb_parse.c b/sys/dev/usb/usb_parse.c index 5cace00fadc7..15bd1c967044 100644 --- a/sys/dev/usb/usb_parse.c +++ b/sys/dev/usb/usb_parse.c @@ -2,7 +2,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2008-2020 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -141,8 +141,20 @@ usb_idesc_foreach(struct usb_config_descriptor *cd, break; if ((id->bDescriptorType == UDESC_INTERFACE) && (id->bLength >= sizeof(*id))) { - if (ps->iface_no_last == id->bInterfaceNumber) + if (ps->iface_no_last == id->bInterfaceNumber) { + /* + * Don't allow more than 256 alternate + * settings to avoid overflowing the + * alternate index which is a 8-bit + * variable. + */ + if (ps->iface_index_alt == 255) { + DPRINTF("Interface(%u) has more than 256 alternate settings\n", + id->bInterfaceNumber); + continue; + } new_iface = 0; + } ps->iface_no_last = id->bInterfaceNumber; break; } From owner-dev-commits-src-all@freebsd.org Mon Dec 28 13:02:08 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 128FF4B3CFD; Mon, 28 Dec 2020 13:02:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4Hkm0490z3PPg; Mon, 28 Dec 2020 13:02:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E961619FDA; Mon, 28 Dec 2020 13:02:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSD27QC023387; Mon, 28 Dec 2020 13:02:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSD27PB023386; Mon, 28 Dec 2020 13:02:07 GMT (envelope-from git) Date: Mon, 28 Dec 2020 13:02:07 GMT Message-Id: <202012281302.0BSD27PB023386@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: d511b855ed55 - stable/11 - MFC r368659 and r368664: Improve handling of alternate settings in the USB stack. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: d511b855ed55bf72e88f7b00fa1268379f30a792 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 13:02:08 -0000 The branch stable/11 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=d511b855ed55bf72e88f7b00fa1268379f30a792 commit d511b855ed55bf72e88f7b00fa1268379f30a792 Author: Hans Petter Selasky AuthorDate: 2020-12-15 12:05:07 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 13:00:42 +0000 MFC r368659 and r368664: Improve handling of alternate settings in the USB stack. Allow setting the alternate interface number to fail when there is only one alternate setting present, to comply with the USB specification. Refactor how iface->num_altsetting is computed. Bump the __FreeBSD_version due to change of core USB structure. PR: 251856 Submitted by: Ma, Horse Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/compat/linuxkpi/common/src/linux_usb.c | 5 ----- sys/dev/usb/usb_device.c | 6 +++++- sys/dev/usb/usb_request.c | 15 +++++++++++++-- sys/dev/usb/usbdi.h | 4 +++- sys/sys/param.h | 2 +- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_usb.c b/sys/compat/linuxkpi/common/src/linux_usb.c index abef31e20a07..1875bbfa5e11 100644 --- a/sys/compat/linuxkpi/common/src/linux_usb.c +++ b/sys/compat/linuxkpi/common/src/linux_usb.c @@ -937,17 +937,12 @@ usb_linux_create_usb_device(struct usb_device *udev, device_t dev) if (p_ui) { p_ui->altsetting = p_uhi - 1; p_ui->cur_altsetting = p_uhi - 1; - p_ui->num_altsetting = 1; p_ui->bsd_iface_index = iface_index; p_ui->linux_udev = udev; p_ui++; } iface_no_curr = iface_no; iface_index++; - } else { - if (p_ui) { - (p_ui - 1)->num_altsetting++; - } } break; diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index 0af33a3145ee..a502478fb4f5 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -1,6 +1,6 @@ /* $FreeBSD$ */ /*- - * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2008-2020 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -898,6 +898,9 @@ usb_config_parse(struct usb_device *udev, uint8_t iface_index, uint8_t cmd) /* initialise interface */ do_init = 1; } + /* update number of alternate settings, if any */ + if (iface_index == USB_IFACE_INDEX_ANY) + iface->num_altsetting = ips.iface_index_alt + 1; } else do_init = 0; @@ -906,6 +909,7 @@ usb_config_parse(struct usb_device *udev, uint8_t iface_index, uint8_t cmd) /* update current number of endpoints */ ep_curr = ep_max; } + /* check for init */ if (do_init) { /* setup the USB interface structure */ diff --git a/sys/dev/usb/usb_request.c b/sys/dev/usb/usb_request.c index c6e43ec1e5a7..4ecd01df5877 100644 --- a/sys/dev/usb/usb_request.c +++ b/sys/dev/usb/usb_request.c @@ -2,7 +2,7 @@ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved. * Copyright (c) 1998 Lennart Augustsson. All rights reserved. - * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2008-2020 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -1433,6 +1433,7 @@ usbd_req_set_alt_interface_no(struct usb_device *udev, struct mtx *mtx, { struct usb_interface *iface = usbd_get_iface(udev, iface_index); struct usb_device_request req; + usb_error_t err; if ((iface == NULL) || (iface->idesc == NULL)) return (USB_ERR_INVAL); @@ -1444,7 +1445,17 @@ usbd_req_set_alt_interface_no(struct usb_device *udev, struct mtx *mtx, req.wIndex[0] = iface->idesc->bInterfaceNumber; req.wIndex[1] = 0; USETW(req.wLength, 0); - return (usbd_do_request(udev, mtx, &req, 0)); + err = usbd_do_request(udev, mtx, &req, 0); + if (err == USB_ERR_STALLED && iface->num_altsetting == 1) { + /* + * The USB specification chapter 9.4.10 says that USB + * devices having only one alternate setting are + * allowed to STALL this request. Ignore this failure. + */ + err = 0; + DPRINTF("Setting default alternate number failed. (ignored)\n"); + } + return (err); } /*------------------------------------------------------------------------* diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h index 5e8ba96f72f6..d43e751cb759 100644 --- a/sys/dev/usb/usbdi.h +++ b/sys/dev/usb/usbdi.h @@ -173,6 +173,9 @@ struct usb_endpoint { struct usb_interface { struct usb_interface_descriptor *idesc; device_t subdev; + /* Total number of alternate settings, from 1 to 256 */ + uint16_t num_altsetting; + /* Current alternate interface index, from 0 to 255 */ uint8_t alt_index; uint8_t parent_iface_index; @@ -182,7 +185,6 @@ struct usb_interface { struct usb_device *linux_udev; void *bsd_priv_sc; /* device specific information */ char *pnpinfo; /* additional PnP-info for this interface */ - uint8_t num_altsetting; /* number of alternate settings */ uint8_t bsd_iface_index; }; diff --git a/sys/sys/param.h b/sys/sys/param.h index 390255ade2de..1b52f24b2d6c 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1104510 /* Master, propagated to newvers */ +#define __FreeBSD_version 1104511 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-dev-commits-src-all@freebsd.org Mon Dec 28 13:05:56 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A20784B42B2; Mon, 28 Dec 2020 13:05:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4Hq84Cmsz3PnG; Mon, 28 Dec 2020 13:05:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83D781A0ED; Mon, 28 Dec 2020 13:05:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSD5uO7024417; Mon, 28 Dec 2020 13:05:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSD5uRY024416; Mon, 28 Dec 2020 13:05:56 GMT (envelope-from git) Date: Mon, 28 Dec 2020 13:05:56 GMT Message-Id: <202012281305.0BSD5uRY024416@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: f3d75bed5475 - stable/12 - MFC r368659 and r368664: Improve handling of alternate settings in the USB stack. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f3d75bed5475b15f21edf4052665b1212b548bd0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 13:05:56 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=f3d75bed5475b15f21edf4052665b1212b548bd0 commit f3d75bed5475b15f21edf4052665b1212b548bd0 Author: Hans Petter Selasky AuthorDate: 2020-12-15 12:05:07 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 13:04:56 +0000 MFC r368659 and r368664: Improve handling of alternate settings in the USB stack. Allow setting the alternate interface number to fail when there is only one alternate setting present, to comply with the USB specification. Refactor how iface->num_altsetting is computed. Bump the __FreeBSD_version due to change of core USB structure. PR: 251856 Submitted by: Ma, Horse Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/compat/linuxkpi/common/src/linux_usb.c | 5 ----- sys/dev/usb/usb_device.c | 6 +++++- sys/dev/usb/usb_request.c | 15 +++++++++++++-- sys/dev/usb/usbdi.h | 4 +++- sys/sys/param.h | 2 +- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_usb.c b/sys/compat/linuxkpi/common/src/linux_usb.c index abef31e20a07..1875bbfa5e11 100644 --- a/sys/compat/linuxkpi/common/src/linux_usb.c +++ b/sys/compat/linuxkpi/common/src/linux_usb.c @@ -937,17 +937,12 @@ usb_linux_create_usb_device(struct usb_device *udev, device_t dev) if (p_ui) { p_ui->altsetting = p_uhi - 1; p_ui->cur_altsetting = p_uhi - 1; - p_ui->num_altsetting = 1; p_ui->bsd_iface_index = iface_index; p_ui->linux_udev = udev; p_ui++; } iface_no_curr = iface_no; iface_index++; - } else { - if (p_ui) { - (p_ui - 1)->num_altsetting++; - } } break; diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index ba49bef533c5..d6e4c0663aff 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -2,7 +2,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2008-2020 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -900,6 +900,9 @@ usb_config_parse(struct usb_device *udev, uint8_t iface_index, uint8_t cmd) /* initialise interface */ do_init = 1; } + /* update number of alternate settings, if any */ + if (iface_index == USB_IFACE_INDEX_ANY) + iface->num_altsetting = ips.iface_index_alt + 1; } else do_init = 0; @@ -908,6 +911,7 @@ usb_config_parse(struct usb_device *udev, uint8_t iface_index, uint8_t cmd) /* update current number of endpoints */ ep_curr = ep_max; } + /* check for init */ if (do_init) { /* setup the USB interface structure */ diff --git a/sys/dev/usb/usb_request.c b/sys/dev/usb/usb_request.c index e0475efeb081..13117c0b9c77 100644 --- a/sys/dev/usb/usb_request.c +++ b/sys/dev/usb/usb_request.c @@ -4,7 +4,7 @@ * * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved. * Copyright (c) 1998 Lennart Augustsson. All rights reserved. - * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2008-2020 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -1439,6 +1439,7 @@ usbd_req_set_alt_interface_no(struct usb_device *udev, struct mtx *mtx, { struct usb_interface *iface = usbd_get_iface(udev, iface_index); struct usb_device_request req; + usb_error_t err; if ((iface == NULL) || (iface->idesc == NULL)) return (USB_ERR_INVAL); @@ -1450,7 +1451,17 @@ usbd_req_set_alt_interface_no(struct usb_device *udev, struct mtx *mtx, req.wIndex[0] = iface->idesc->bInterfaceNumber; req.wIndex[1] = 0; USETW(req.wLength, 0); - return (usbd_do_request(udev, mtx, &req, 0)); + err = usbd_do_request(udev, mtx, &req, 0); + if (err == USB_ERR_STALLED && iface->num_altsetting == 1) { + /* + * The USB specification chapter 9.4.10 says that USB + * devices having only one alternate setting are + * allowed to STALL this request. Ignore this failure. + */ + err = 0; + DPRINTF("Setting default alternate number failed. (ignored)\n"); + } + return (err); } /*------------------------------------------------------------------------* diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h index 8d4ed43a132f..885a19fcfbe2 100644 --- a/sys/dev/usb/usbdi.h +++ b/sys/dev/usb/usbdi.h @@ -175,6 +175,9 @@ struct usb_endpoint { struct usb_interface { struct usb_interface_descriptor *idesc; device_t subdev; + /* Total number of alternate settings, from 1 to 256 */ + uint16_t num_altsetting; + /* Current alternate interface index, from 0 to 255 */ uint8_t alt_index; uint8_t parent_iface_index; @@ -184,7 +187,6 @@ struct usb_interface { struct usb_device *linux_udev; void *bsd_priv_sc; /* device specific information */ char *pnpinfo; /* additional PnP-info for this interface */ - uint8_t num_altsetting; /* number of alternate settings */ uint8_t bsd_iface_index; }; diff --git a/sys/sys/param.h b/sys/sys/param.h index 857274424f6c..1473009481e0 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1202504 /* Master, propagated to newvers */ +#define __FreeBSD_version 1202505 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-dev-commits-src-all@freebsd.org Mon Dec 28 13:16:01 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 94F764B4905; Mon, 28 Dec 2020 13:16:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4J2n3nQsz3QRk; Mon, 28 Dec 2020 13:16:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 738D419E7A; Mon, 28 Dec 2020 13:16:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSDG1n8035258; Mon, 28 Dec 2020 13:16:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSDG1nG035257; Mon, 28 Dec 2020 13:16:01 GMT (envelope-from git) Date: Mon, 28 Dec 2020 13:16:01 GMT Message-Id: <202012281316.0BSDG1nG035257@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: cc273d9909a2 - stable/12 - MFC r368329 and r368341: Fix definition of int64_t and uint64_t when long is 64-bit. This gets the kernel shim code in line with the rest of the kernel, sys/x86/include/_types.h. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: cc273d9909a2ab19b1bfe7900cc0cc0a9959f41b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 13:16:01 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=cc273d9909a2ab19b1bfe7900cc0cc0a9959f41b commit cc273d9909a2ab19b1bfe7900cc0cc0a9959f41b Author: Hans Petter Selasky AuthorDate: 2020-12-04 14:50:55 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 13:15:34 +0000 MFC r368329 and r368341: Fix definition of int64_t and uint64_t when long is 64-bit. This gets the kernel shim code in line with the rest of the kernel, sys/x86/include/_types.h. Sponsored by: Mellanox Technologies // NVIDIA Networking --- stand/kshim/bsd_kernel.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/stand/kshim/bsd_kernel.h b/stand/kshim/bsd_kernel.h index 4dfe307fef0c..1297eddc69a1 100644 --- a/stand/kshim/bsd_kernel.h +++ b/stand/kshim/bsd_kernel.h @@ -205,9 +205,17 @@ typedef unsigned int uint32_t; #define _INT32_T_DECLARED typedef signed int int32_t; #define _UINT64_T_DECLARED +#ifndef __LP64__ typedef unsigned long long uint64_t; -#define _INT16_T_DECLARED +#else +typedef unsigned long uint64_t; +#endif +#define _INT64_T_DECLARED +#ifndef __LP64__ typedef signed long long int64_t; +#else +typedef signed long int64_t; +#endif typedef uint16_t uid_t; typedef uint16_t gid_t; From owner-dev-commits-src-all@freebsd.org Mon Dec 28 13:18:35 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6FCEB4B4776; Mon, 28 Dec 2020 13:18:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4J5l2gtCz3Qn0; Mon, 28 Dec 2020 13:18:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4F1D31A135; Mon, 28 Dec 2020 13:18:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSDIZB6035521; Mon, 28 Dec 2020 13:18:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSDIZrQ035520; Mon, 28 Dec 2020 13:18:35 GMT (envelope-from git) Date: Mon, 28 Dec 2020 13:18:35 GMT Message-Id: <202012281318.0BSDIZrQ035520@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 8bebb7024d64 - stable/12 - MFC r368415: Properly define the bool type in the BSD kernel shim. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 8bebb7024d64859082e0bfbc9be6e42672543d16 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 13:18:35 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=8bebb7024d64859082e0bfbc9be6e42672543d16 commit 8bebb7024d64859082e0bfbc9be6e42672543d16 Author: Hans Petter Selasky AuthorDate: 2020-12-07 16:08:31 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 13:18:00 +0000 MFC r368415: Properly define the bool type in the BSD kernel shim. Sponsored by: Mellanox Technologies // NVIDIA Networking --- stand/kshim/bsd_kernel.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stand/kshim/bsd_kernel.h b/stand/kshim/bsd_kernel.h index 1297eddc69a1..882b02c0d85d 100644 --- a/stand/kshim/bsd_kernel.h +++ b/stand/kshim/bsd_kernel.h @@ -256,7 +256,12 @@ typedef uint8_t *bus_space_handle_t; typedef int bus_dma_filter_t(void *, bus_addr_t); typedef void bus_dma_lock_t(void *, bus_dma_lock_op_t); -typedef uint32_t bool; +#ifndef __bool_true_false_are_defined +#define __bool_true_false_are_defined +typedef _Bool bool; +#define true 1 +#define false 0 +#endif /* SYSINIT API */ From owner-dev-commits-src-all@freebsd.org Mon Dec 28 13:19:09 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 939DB4B4B9D; Mon, 28 Dec 2020 13:19:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4J6P3nc6z3Qfk; Mon, 28 Dec 2020 13:19:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 74CD31A196; Mon, 28 Dec 2020 13:19:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSDJ99t035636; Mon, 28 Dec 2020 13:19:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSDJ9rT035635; Mon, 28 Dec 2020 13:19:09 GMT (envelope-from git) Date: Mon, 28 Dec 2020 13:19:09 GMT Message-Id: <202012281319.0BSDJ9rT035635@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michal Meloun Subject: git: e90347891960 - main - ARM64: Port FreeBSD to Nvidia Jetson TX1 and Nano. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e903478919602c90fdc202a8628b89eb7c3bc104 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 13:19:09 -0000 The branch main has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=e903478919602c90fdc202a8628b89eb7c3bc104 commit e903478919602c90fdc202a8628b89eb7c3bc104 Author: Michal Meloun AuthorDate: 2018-01-04 12:18:24 +0000 Commit: Michal Meloun CommitDate: 2020-12-28 13:12:41 +0000 ARM64: Port FreeBSD to Nvidia Jetson TX1 and Nano. Add support for the Tergra210 SoC and its companion PMIC MAX77620. --- sys/arm64/nvidia/tegra210/max77620.c | 511 ++++++ sys/arm64/nvidia/tegra210/max77620.h | 262 +++ sys/arm64/nvidia/tegra210/max77620_gpio.c | 715 +++++++++ sys/arm64/nvidia/tegra210/max77620_regulators.c | 888 ++++++++++ sys/arm64/nvidia/tegra210/max77620_rtc.c | 413 +++++ sys/arm64/nvidia/tegra210/tegra210_car.c | 601 +++++++ sys/arm64/nvidia/tegra210/tegra210_car.h | 528 ++++++ sys/arm64/nvidia/tegra210/tegra210_clk_per.c | 951 +++++++++++ sys/arm64/nvidia/tegra210/tegra210_clk_pll.c | 1494 +++++++++++++++++ sys/arm64/nvidia/tegra210/tegra210_clk_super.c | 231 +++ sys/arm64/nvidia/tegra210/tegra210_coretemp.c | 272 ++++ sys/arm64/nvidia/tegra210/tegra210_cpufreq.c | 502 ++++++ sys/arm64/nvidia/tegra210/tegra210_pinmux.c | 758 +++++++++ sys/arm64/nvidia/tegra210/tegra210_pmc.c | 628 ++++++++ sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c | 1963 +++++++++++++++++++++++ sys/conf/files.arm64 | 48 + sys/conf/options.arm64 | 1 + sys/gnu/dts/arm64/nvidia/Makefile | 7 + 18 files changed, 10773 insertions(+) diff --git a/sys/arm64/nvidia/tegra210/max77620.c b/sys/arm64/nvidia/tegra210/max77620.c new file mode 100644 index 000000000000..d46417ce0e28 --- /dev/null +++ b/sys/arm64/nvidia/tegra210/max77620.c @@ -0,0 +1,511 @@ +/*- + * Copyright (c) 2019 Michal Meloun + * + * 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$"); + +/* + * MAX77620 PMIC driver + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "clock_if.h" +#include "regdev_if.h" + +#include "max77620.h" + +static struct ofw_compat_data compat_data[] = { + {"maxim,max77620", 1}, + {NULL, 0}, +}; + +#define LOCK(_sc) sx_xlock(&(_sc)->lock) +#define UNLOCK(_sc) sx_xunlock(&(_sc)->lock) +#define LOCK_INIT(_sc) sx_init(&(_sc)->lock, "max77620") +#define LOCK_DESTROY(_sc) sx_destroy(&(_sc)->lock); +#define ASSERT_LOCKED(_sc) sx_assert(&(_sc)->lock, SA_XLOCKED); +#define ASSERT_UNLOCKED(_sc) sx_assert(&(_sc)->lock, SA_UNLOCKED); + +#define MAX77620_DEVICE_ID 0x0C + +/* + * Raw register access function. + */ +int +max77620_read(struct max77620_softc *sc, uint8_t reg, uint8_t *val) +{ + uint8_t addr; + int rv; + struct iic_msg msgs[2] = { + {0, IIC_M_WR, 1, &addr}, + {0, IIC_M_RD, 1, val}, + }; + + msgs[0].slave = sc->bus_addr; + msgs[1].slave = sc->bus_addr; + addr = reg; + + rv = iicbus_transfer(sc->dev, msgs, 2); + if (rv != 0) { + device_printf(sc->dev, + "Error when reading reg 0x%02X, rv: %d\n", reg, rv); + return (EIO); + } + + return (0); +} + +int max77620_read_buf(struct max77620_softc *sc, uint8_t reg, uint8_t *buf, + size_t size) +{ + uint8_t addr; + int rv; + struct iic_msg msgs[2] = { + {0, IIC_M_WR, 1, &addr}, + {0, IIC_M_RD, size, buf}, + }; + + msgs[0].slave = sc->bus_addr; + msgs[1].slave = sc->bus_addr; + addr = reg; + + rv = iicbus_transfer(sc->dev, msgs, 2); + if (rv != 0) { + device_printf(sc->dev, + "Error when reading reg 0x%02X, rv: %d\n", reg, rv); + return (EIO); + } + + return (0); +} + +int +max77620_write(struct max77620_softc *sc, uint8_t reg, uint8_t val) +{ + uint8_t data[2]; + int rv; + + struct iic_msg msgs[1] = { + {0, IIC_M_WR, 2, data}, + }; + + msgs[0].slave = sc->bus_addr; + data[0] = reg; + data[1] = val; + + rv = iicbus_transfer(sc->dev, msgs, 1); + if (rv != 0) { + device_printf(sc->dev, + "Error when writing reg 0x%02X, rv: %d\n", reg, rv); + return (EIO); + } + return (0); +} + +int +max77620_write_buf(struct max77620_softc *sc, uint8_t reg, uint8_t *buf, + size_t size) +{ + uint8_t data[1]; + int rv; + struct iic_msg msgs[2] = { + {0, IIC_M_WR, 1, data}, + {0, IIC_M_WR | IIC_M_NOSTART, size, buf}, + }; + + msgs[0].slave = sc->bus_addr; + msgs[1].slave = sc->bus_addr; + data[0] = reg; + + rv = iicbus_transfer(sc->dev, msgs, 2); + if (rv != 0) { + device_printf(sc->dev, + "Error when writing reg 0x%02X, rv: %d\n", reg, rv); + return (EIO); + } + return (0); +} + +int +max77620_modify(struct max77620_softc *sc, uint8_t reg, uint8_t clear, + uint8_t set) +{ + uint8_t val; + int rv; + + rv = max77620_read(sc, reg, &val); + if (rv != 0) + return (rv); + + val &= ~clear; + val |= set; + + rv = max77620_write(sc, reg, val); + if (rv != 0) + return (rv); + + return (0); +} + +static int +max77620_parse_fps(struct max77620_softc *sc, int id, phandle_t node) +{ + int val; + + if (OF_getencprop(node, "maxim,shutdown-fps-time-period-us", &val, + sizeof(val)) >= 0) { + val = min(val, MAX77620_FPS_PERIOD_MAX_US); + val = max(val, MAX77620_FPS_PERIOD_MIN_US); + sc->shutdown_fps[id] = val; + } + if (OF_getencprop(node, "maxim,suspend-fps-time-period-us", &val, + sizeof(val)) >= 0) { + val = min(val, MAX77620_FPS_PERIOD_MAX_US); + val = max(val, MAX77620_FPS_PERIOD_MIN_US); + sc->suspend_fps[id] = val; + } + if (OF_getencprop(node, "maxim,fps-event-source", &val, + sizeof(val)) >= 0) { + if (val > 2) { + device_printf(sc->dev, "Invalid 'fps-event-source' " + "value: %d\n", val); + return (EINVAL); + } + sc->event_source[id] = val; + } + return (0); +} + +static int +max77620_parse_fdt(struct max77620_softc *sc, phandle_t node) +{ + phandle_t fpsnode; + char fps_name[6]; + int i, rv; + + for (i = 0; i < MAX77620_FPS_COUNT; i++) { + sc->shutdown_fps[i] = -1; + sc->suspend_fps[i] = -1; + sc->event_source[i] = -1; + } + + fpsnode = ofw_bus_find_child(node, "fps"); + if (fpsnode > 0) { + for (i = 0; i < MAX77620_FPS_COUNT; i++) { + sprintf(fps_name, "fps%d", i); + node = ofw_bus_find_child(node, fps_name); + if (node <= 0) + continue; + rv = max77620_parse_fps(sc, i, node); + if (rv != 0) + return (rv); + } + } + return (0); +} + +static int +max77620_get_version(struct max77620_softc *sc) +{ + uint8_t buf[6]; + int i; + int rv; + + /* Verify ID string (5 bytes ). */ + for (i = 0; i <= 6; i++) { + rv = RD1(sc, MAX77620_REG_CID0 + i , buf + i); + if (rv != 0) { + device_printf(sc->dev, "Cannot read chip ID: %d\n", rv); + return (ENXIO); + } + } + if (bootverbose) { + device_printf(sc->dev, + " ID: [0x%02X, 0x%02X, 0x%02X, 0x%02X]\n", + buf[0], buf[1], buf[2], buf[3]); + } + device_printf(sc->dev, " MAX77620 version - OTP: 0x%02X, ES: 0x%02X\n", + buf[4], buf[5]); + + return (0); +} + +static uint8_t +max77620_encode_fps_period(struct max77620_softc *sc, int val) +{ + uint8_t i; + int period; + + period = MAX77620_FPS_PERIOD_MIN_US; + for (i = 0; i < 7; i++) { + if (period >= val) + return (i); + period *= 2; + } + return (i); +} + +static int +max77620_init(struct max77620_softc *sc) +{ + uint8_t mask, val, tmp;; + int i, rv; + + mask = 0; + val = 0; + for (i = 0; i < MAX77620_FPS_COUNT; i++) { + if (sc->shutdown_fps[i] != -1) { + mask |= MAX77620_FPS_TIME_PERIOD_MASK; + tmp = max77620_encode_fps_period(sc, + sc->shutdown_fps[i]); + val |= (tmp << MAX77620_FPS_TIME_PERIOD_SHIFT) & + MAX77620_FPS_TIME_PERIOD_MASK; + } + + if (sc->event_source[i] != -1) { + mask |= MAX77620_FPS_EN_SRC_MASK; + tmp = sc->event_source[i]; + val |= (tmp << MAX77620_FPS_EN_SRC_SHIFT) & + MAX77620_FPS_EN_SRC_MASK; + if (sc->event_source[i] == 2) { + mask |= MAX77620_FPS_ENFPS_SW_MASK; + val |= MAX77620_FPS_ENFPS_SW; + } + + } + rv = RM1(sc, MAX77620_REG_FPS_CFG0 + i, mask, val); + if (rv != 0) { + device_printf(sc->dev, "I/O error: %d\n", rv); + return (ENXIO); + } + } + + /* Global mask interrupts */ + rv = RM1(sc, MAX77620_REG_INTENLBT, 0x81, 0x81); + rv = RM1(sc, MAX77620_REG_IRQTOPM, 0x81, 0x81); + if (rv != 0) + return (ENXIO); + return (0); +} +#ifdef notyet +static void +max77620_intr(void *arg) +{ + struct max77620_softc *sc; + uint8_t intenlbt, intlbt, irqtop, irqtopm, irqsd, irqmasksd; + uint8_t irq_lvl2_l0_7, irq_lvl2_l8, irq_lvl2_gpio, irq_msk_l0_7, irq_msk_l8; + uint8_t onoffirq, onoffirqm; + + sc = (struct max77620_softc *)arg; + /* XXX Finish temperature alarms. */ + RD1(sc, MAX77620_REG_INTENLBT, &intenlbt); + RD1(sc, MAX77620_REG_INTLBT, &intlbt); + + RD1(sc, MAX77620_REG_IRQTOP, &irqtop); + RD1(sc, MAX77620_REG_IRQTOPM, &irqtopm); + RD1(sc, MAX77620_REG_IRQSD, &irqsd); + RD1(sc, MAX77620_REG_IRQMASKSD, &irqmasksd); + RD1(sc, MAX77620_REG_IRQ_LVL2_L0_7, &irq_lvl2_l0_7); + RD1(sc, MAX77620_REG_IRQ_MSK_L0_7, &irq_msk_l0_7); + RD1(sc, MAX77620_REG_IRQ_LVL2_L8, &irq_lvl2_l8); + RD1(sc, MAX77620_REG_IRQ_MSK_L8, &irq_msk_l8); + RD1(sc, MAX77620_REG_IRQ_LVL2_GPIO, &irq_lvl2_gpio); + RD1(sc, MAX77620_REG_ONOFFIRQ, &onoffirq); + RD1(sc, MAX77620_REG_ONOFFIRQM, &onoffirqm); + printf("%s: intlbt: 0x%02X, intenlbt: 0x%02X\n", __func__, intlbt, intenlbt); + printf("%s: irqtop: 0x%02X, irqtopm: 0x%02X\n", __func__, irqtop, irqtopm); + printf("%s: irqsd: 0x%02X, irqmasksd: 0x%02X\n", __func__, irqsd, irqmasksd); + printf("%s: onoffirq: 0x%02X, onoffirqm: 0x%02X\n", __func__, onoffirq, onoffirqm); + printf("%s: irq_lvl2_l0_7: 0x%02X, irq_msk_l0_7: 0x%02X\n", __func__, irq_lvl2_l0_7, irq_msk_l0_7); + printf("%s: irq_lvl2_l8: 0x%02X, irq_msk_l8: 0x%02X\n", __func__, irq_lvl2_l8, irq_msk_l8); + printf("%s: irq_lvl2_gpio: 0x%02X\n", __func__, irq_lvl2_gpio); +} +#endif + +static int +max77620_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, "MAX77620 PMIC"); + return (BUS_PROBE_DEFAULT); +} + +static int +max77620_attach(device_t dev) +{ + struct max77620_softc *sc; + const char *dname; + int dunit, rv, rid; + phandle_t node; + + sc = device_get_softc(dev); + sc->dev = dev; + sc->bus_addr = iicbus_get_addr(dev); + node = ofw_bus_get_node(sc->dev); + dname = device_get_name(dev); + dunit = device_get_unit(dev); + rv = 0; + LOCK_INIT(sc); + +#ifdef notyet /* Interrupt parent is not implemented */ + rid = 0; + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_ACTIVE); + if (sc->irq_res == NULL) { + device_printf(dev, "Cannot allocate interrupt.\n"); + rv = ENXIO; + goto fail; + } +#endif + rv = max77620_parse_fdt(sc, node); + if (rv != 0) + goto fail; + + rv = max77620_get_version(sc); + if (rv != 0) + goto fail; + + rv = max77620_init(sc); + if (rv != 0) + goto fail; + rv = max77620_regulator_attach(sc, node); + if (rv != 0) + goto fail; + rv = max77620_gpio_attach(sc, node); + if (rv != 0) + goto fail; + + rv = max77620_rtc_create(sc, node); + if (rv != 0) + goto fail; + + fdt_pinctrl_register(dev, NULL); + fdt_pinctrl_configure_by_name(dev, "default"); + + /* Setup interrupt. */ +#ifdef notyet + rv = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_MISC | INTR_MPSAFE, + NULL, max77620_intr, sc, &sc->irq_h); + if (rv) { + device_printf(dev, "Cannot setup interrupt.\n"); + goto fail; + } +#endif + return (bus_generic_attach(dev)); + +fail: + if (sc->irq_h != NULL) + bus_teardown_intr(dev, sc->irq_res, sc->irq_h); + if (sc->irq_res != NULL) + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq_res); + LOCK_DESTROY(sc); + return (rv); +} + +static int +max77620_detach(device_t dev) +{ + struct max77620_softc *sc; + + sc = device_get_softc(dev); + if (sc->irq_h != NULL) + bus_teardown_intr(dev, sc->irq_res, sc->irq_h); + if (sc->irq_res != NULL) + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq_res); + LOCK_DESTROY(sc); + + return (bus_generic_detach(dev)); +} + +static phandle_t +max77620_gpio_get_node(device_t bus, device_t dev) +{ + + /* We only have one child, the GPIO bus, which needs our own node. */ + return (ofw_bus_get_node(bus)); +} + +static device_method_t max77620_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, max77620_probe), + DEVMETHOD(device_attach, max77620_attach), + DEVMETHOD(device_detach, max77620_detach), + + /* Regdev interface */ + DEVMETHOD(regdev_map, max77620_regulator_map), + + /* GPIO protocol interface */ + DEVMETHOD(gpio_get_bus, max77620_gpio_get_bus), + DEVMETHOD(gpio_pin_max, max77620_gpio_pin_max), + DEVMETHOD(gpio_pin_getname, max77620_gpio_pin_getname), + DEVMETHOD(gpio_pin_getflags, max77620_gpio_pin_getflags), + DEVMETHOD(gpio_pin_getcaps, max77620_gpio_pin_getcaps), + DEVMETHOD(gpio_pin_setflags, max77620_gpio_pin_setflags), + DEVMETHOD(gpio_pin_get, max77620_gpio_pin_get), + DEVMETHOD(gpio_pin_set, max77620_gpio_pin_set), + DEVMETHOD(gpio_pin_toggle, max77620_gpio_pin_toggle), + DEVMETHOD(gpio_map_gpios, max77620_gpio_map_gpios), + + /* fdt_pinctrl interface */ + DEVMETHOD(fdt_pinctrl_configure, max77620_pinmux_configure), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, max77620_gpio_get_node), + + DEVMETHOD_END +}; + +static devclass_t max77620_devclass; +static DEFINE_CLASS_0(gpio, max77620_driver, max77620_methods, + sizeof(struct max77620_softc)); +EARLY_DRIVER_MODULE(max77620, iicbus, max77620_driver, max77620_devclass, + NULL, NULL, 74); diff --git a/sys/arm64/nvidia/tegra210/max77620.h b/sys/arm64/nvidia/tegra210/max77620.h new file mode 100644 index 000000000000..32d486add2b8 --- /dev/null +++ b/sys/arm64/nvidia/tegra210/max77620.h @@ -0,0 +1,262 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright 2020 Michal Meloun + * + * 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 _MAX77620_H_ + +#include + +#define MAX77620_REG_CNFGGLBL1 0x00 +#define MAX77620_REG_CNFGGLBL2 0x01 +#define MAX77620_REG_CNFGGLBL3 0x02 +#define MAX77620_REG_CNFG1_32K 0x03 +#define MAX77620_REG_CNFGBBC 0x04 +#define MAX77620_REG_IRQTOP 0x05 +#define MAX77620_REG_INTLBT 0x06 +#define MAX77620_REG_IRQSD 0x07 +#define MAX77620_REG_IRQ_LVL2_L0_7 0x08 +#define MAX77620_REG_IRQ_LVL2_L8 0x09 +#define MAX77620_REG_IRQ_LVL2_GPIO 0x0A +#define MAX77620_REG_ONOFFIRQ 0x0B +#define MAX77620_REG_NVERC 0x0C +#define MAX77620_REG_IRQTOPM 0x0D +#define MAX77620_REG_INTENLBT 0x0E +#define MAX77620_REG_IRQMASKSD 0x0F +#define MAX77620_REG_IRQ_MSK_L0_7 0x10 +#define MAX77620_REG_IRQ_MSK_L8 0x11 +#define MAX77620_REG_ONOFFIRQM 0x12 +#define MAX77620_REG_STATLBT 0x13 +#define MAX77620_REG_STATSD 0x14 +#define MAX77620_REG_ONOFFSTAT 0x15 +#define MAX77620_REG_SD0 0x16 +#define MAX77620_SD0_VSEL_MASK 0x3F + +#define MAX77620_REG_SD1 0x17 +#define MAX77620_SD1_VSEL_MASK 0x7F + +#define MAX77620_REG_SD2 0x18 +#define MAX77620_REG_SD3 0x19 +#define MAX77620_REG_SD4 0x1A +#define MAX77620_SDX_VSEL_MASK 0xFF + +#define MAX77620_REG_DVSSD0 0x1B +#define MAX77620_REG_DVSSD1 0x1C +#define MAX77620_REG_CFG_SD0 0x1D +#define MAX77620_REG_CFG_SD1 0x1E +#define MAX77620_REG_CFG_SD2 0x1F +#define MAX77620_REG_CFG_SD3 0x20 +#define MAX77620_REG_CFG_SD4 0x21 +#define MAX77620_SD_SR_MASK 0xC0 +#define MAX77620_SD_SR_SHIFT 6 +#define MAX77620_SD_POWER_MODE_MASK 0x30 +#define MAX77620_SD_POWER_MODE_SHIFT 4 +#define MAX77620_SD_FPWM_MASK 0x04 +#define MAX77620_SD_FPWM_SHIFT 2 +#define MAX77620_SD_FSRADE_MASK 0x01 +#define MAX77620_SD_FSRADE_SHIFT 0 + +#define MAX77620_REG_CFG2_SD 0x22 +#define MAX77620_REG_CFG_LDO0 0x23 +#define MAX77620_REG_CFG2_LDO0 0x24 +#define MAX77620_REG_CFG_LDO1 0x25 +#define MAX77620_REG_CFG2_LDO1 0x26 +#define MAX77620_REG_CFG_LDO2 0x27 +#define MAX77620_REG_CFG2_LDO2 0x28 +#define MAX77620_REG_CFG_LDO3 0x29 +#define MAX77620_REG_CFG2_LDO3 0x2A +#define MAX77620_REG_CFG_LDO4 0x2B +#define MAX77620_REG_CFG2_LDO4 0x2C +#define MAX77620_REG_CFG_LDO5 0x2D +#define MAX77620_REG_CFG2_LDO5 0x2E +#define MAX77620_REG_CFG_LDO6 0x2F +#define MAX77620_REG_CFG2_LDO6 0x30 +#define MAX77620_REG_CFG_LDO7 0x31 +#define MAX77620_REG_CFG2_LDO7 0x32 +#define MAX77620_REG_CFG_LDO8 0x33 +#define MAX77620_LDO_POWER_MODE_MASK 0xC0 +#define MAX77620_LDO_POWER_MODE_SHIFT 6 +#define MAX77620_LDO_VSEL_MASK 0x3F + +#define MAX77620_REG_CFG2_LDO8 0x34 +#define MAX77620_LDO_SLEW_RATE_MASK 0x1 +#define MAX77620_LDO_SLEW_RATE_SHIFT 0x0 + +#define MAX77620_REG_CFG3_LDO 0x35 + +#define MAX77620_REG_GPIO0 0x36 +#define MAX77620_REG_GPIO1 0x37 +#define MAX77620_REG_GPIO2 0x38 +#define MAX77620_REG_GPIO3 0x39 +#define MAX77620_REG_GPIO4 0x3A +#define MAX77620_REG_GPIO5 0x3B +#define MAX77620_REG_GPIO6 0x3C +#define MAX77620_REG_GPIO7 0x3D +#define MAX77620_REG_GPIO_INT_GET(x) (((x) >> 5) & 0x3) +#define MAX77620_REG_GPIO_INT(x) (((x) & 0x3) << 5) +#define MAX77620_REG_GPIO_INT_NONE 0 +#define MAX77620_REG_GPIO_INT_FALLING 1 +#define MAX77620_REG_GPIO_INT_RISING 2 +#define MAX77620_REG_GPIO_INT_BOTH 3 +#define MAX77620_REG_GPIO_OUTPUT_VAL_GET(x) (((x) >> 3) & 0x1) +#define MAX77620_REG_GPIO_OUTPUT_VAL(x) (((x) & 0x1) << 3) +#define MAX77620_REG_GPIO_INPUT_VAL_GET(x) (((x) << 2) & 0x1) +#define MAX77620_REG_GPIO_INPUT_VAL (1 << 2) +#define MAX77620_REG_GPIO_DRV_GET(x) (((x) >> 0) & 0x1) +#define MAX77620_REG_GPIO_DRV(x) (((x) & 0x1) << 0) +#define MAX77620_REG_GPIO_DRV_PUSHPULL 1 +#define MAX77620_REG_GPIO_DRV_OPENDRAIN 0 + +#define MAX77620_REG_PUE_GPIO 0x3E +#define MAX77620_REG_PDE_GPIO 0x3F +#define MAX77620_REG_AME_GPIO 0x40 +#define MAX77620_REG_ONOFFCNFG1 0x41 +#define MAX77620_REG_ONOFFCNFG2 0x42 + +#define MAX77620_REG_FPS_CFG0 0x43 +#define MAX77620_REG_FPS_CFG1 0x44 +#define MAX77620_REG_FPS_CFG2 0x45 +#define MAX77620_FPS_TIME_PERIOD_MASK 0x38 +#define MAX77620_FPS_TIME_PERIOD_SHIFT 3 +#define MAX77620_FPS_EN_SRC_MASK 0x06 +#define MAX77620_FPS_EN_SRC_SHIFT 1 +#define MAX77620_FPS_ENFPS_SW_MASK 0x01 +#define MAX77620_FPS_ENFPS_SW 0x01 + +#define MAX77620_REG_FPS_LDO0 0x46 +#define MAX77620_REG_FPS_LDO1 0x47 +#define MAX77620_REG_FPS_LDO2 0x48 +#define MAX77620_REG_FPS_LDO3 0x49 +#define MAX77620_REG_FPS_LDO4 0x4A +#define MAX77620_REG_FPS_LDO5 0x4B +#define MAX77620_REG_FPS_LDO6 0x4C +#define MAX77620_REG_FPS_LDO7 0x4D +#define MAX77620_REG_FPS_LDO8 0x4E +#define MAX77620_REG_FPS_SD0 0x4F +#define MAX77620_REG_FPS_SD1 0x50 +#define MAX77620_REG_FPS_SD2 0x51 +#define MAX77620_REG_FPS_SD3 0x52 +#define MAX77620_REG_FPS_SD4 0x53 +#define MAX77620_REG_FPS_GPIO1 0x54 +#define MAX77620_REG_FPS_GPIO2 0x55 +#define MAX77620_REG_FPS_GPIO3 0x56 +#define MAX77620_REG_FPS_RSO 0x57 +#define MAX77620_FPS_SRC_MASK 0xC0 +#define MAX77620_FPS_SRC_SHIFT 6 +#define MAX77620_FPS_PU_PERIOD_MASK 0x38 +#define MAX77620_FPS_PU_PERIOD_SHIFT 3 +#define MAX77620_FPS_PD_PERIOD_MASK 0x07 +#define MAX77620_FPS_PD_PERIOD_SHIFT 0 + +#define MAX77620_REG_CID0 0x58 +#define MAX77620_REG_CID1 0x59 +#define MAX77620_REG_CID2 0x5A +#define MAX77620_REG_CID3 0x5B +#define MAX77620_REG_CID4 0x5C +#define MAX77620_REG_CID5 0x5D +#define MAX77620_REG_DVSSD4 0x5E +#define MAX20024_REG_MAX_ADD 0x70 + +/* MIsc FPS definitions. */ +#define MAX77620_FPS_COUNT 3 +#define MAX77620_FPS_PERIOD_MIN_US 40 +#define MAX77620_FPS_PERIOD_MAX_US 2560 + +/* Power modes */ +#define MAX77620_POWER_MODE_NORMAL 3 +#define MAX77620_POWER_MODE_LPM 2 +#define MAX77620_POWER_MODE_GLPM 1 +#define MAX77620_POWER_MODE_DISABLE 0 + + +struct max77620_reg_sc; +struct max77620_gpio_pin; + +struct max77620_softc { + device_t dev; + struct sx lock; + int bus_addr; + struct resource *irq_res; + void *irq_h; + + int shutdown_fps[MAX77620_FPS_COUNT]; + int suspend_fps[MAX77620_FPS_COUNT]; + int event_source[MAX77620_FPS_COUNT]; + + /* Regulators. */ + struct max77620_reg_sc **regs; + int nregs; + + /* GPIO */ + device_t gpio_busdev; + struct max77620_gpio_pin **gpio_pins; + int gpio_npins; + struct sx gpio_lock; + uint8_t gpio_reg_pue; /* pull-up enables */ + uint8_t gpio_reg_pde; /* pull-down enables */ + uint8_t gpio_reg_ame; /* alternate fnc */ + + +}; + +#define RD1(sc, reg, val) max77620_read(sc, reg, val) +#define WR1(sc, reg, val) max77620_write(sc, reg, val) +#define RM1(sc, reg, clr, set) max77620_modify(sc, reg, clr, set) + +int max77620_read(struct max77620_softc *sc, uint8_t reg, uint8_t *val); +int max77620_write(struct max77620_softc *sc, uint8_t reg, uint8_t val); +int max77620_modify(struct max77620_softc *sc, uint8_t reg, uint8_t clear, + uint8_t set); +int max77620_read_buf(struct max77620_softc *sc, uint8_t reg, uint8_t *buf, + size_t size); +int max77620_write_buf(struct max77620_softc *sc, uint8_t reg, uint8_t *buf, + size_t size); + +/* Regulators */ +int max77620_regulator_attach(struct max77620_softc *sc, phandle_t node); +int max77620_regulator_map(device_t dev, phandle_t xref, int ncells, + pcell_t *cells, intptr_t *num); + +/* RTC */ +int max77620_rtc_create(struct max77620_softc *sc, phandle_t node); + +/* GPIO */ +device_t max77620_gpio_get_bus(device_t dev); +int max77620_gpio_pin_max(device_t dev, int *maxpin); +int max77620_gpio_pin_getname(device_t dev, uint32_t pin, char *name); +int max77620_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags); +int max77620_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps); +int max77620_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags); +int max77620_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value); +int max77620_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val); +int max77620_gpio_pin_toggle(device_t dev, uint32_t pin); +int max77620_gpio_map_gpios(device_t dev, phandle_t pdev, phandle_t gparent, + int gcells, pcell_t *gpios, uint32_t *pin, uint32_t *flags); +int max77620_gpio_attach(struct max77620_softc *sc, phandle_t node); +int max77620_pinmux_configure(device_t dev, phandle_t cfgxref); + +#endif /* _MAX77620_H_ */ diff --git a/sys/arm64/nvidia/tegra210/max77620_gpio.c b/sys/arm64/nvidia/tegra210/max77620_gpio.c new file mode 100644 index 000000000000..2e9156801d97 --- /dev/null +++ b/sys/arm64/nvidia/tegra210/max77620_gpio.c @@ -0,0 +1,715 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright 2020 Michal Meloun + * + * 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 "max77620.h" + +MALLOC_DEFINE(M_MAX77620_GPIO, "MAX77620 gpio", "MAX77620 GPIO"); + +#define NGPIO 8 + +#define GPIO_LOCK(_sc) sx_slock(&(_sc)->gpio_lock) +#define GPIO_UNLOCK(_sc) sx_unlock(&(_sc)->gpio_lock) +#define GPIO_ASSERT(_sc) sx_assert(&(_sc)->gpio_lock, SA_LOCKED) + +enum prop_id { + CFG_BIAS_PULL_UP, + CFG_BIAS_PULL_DOWN, + CFG_OPEN_DRAIN, + CFG_PUSH_PULL, + + CFG_ACTIVE_FPS_SRC, + CFG_ACTIVE_PWRUP_SLOT, + CFG_ACTIVE_PWRDOWN_SLOT, + CFG_SUSPEND_FPS_SRC, + CFG_SUSPEND_PWRUP_SLOT, + CFG_SUSPEND_PWRDOWN_SLOT, + + PROP_ID_MAX_ID +}; + +static const struct { + const char *name; + enum prop_id id; +} max77620_prop_names[] = { + {"bias-pull-up", CFG_BIAS_PULL_UP}, + {"bias-pull-down", CFG_BIAS_PULL_DOWN}, + {"drive-open-drain", CFG_OPEN_DRAIN}, + {"drive-push-pull", CFG_PUSH_PULL}, + {"maxim,active-fps-source", CFG_ACTIVE_FPS_SRC}, + {"maxim,active-fps-power-up-slot", CFG_ACTIVE_PWRUP_SLOT}, + {"maxim,active-fps-power-down-slot", CFG_ACTIVE_PWRDOWN_SLOT}, + {"maxim,suspend-fps-source", CFG_SUSPEND_FPS_SRC}, + {"maxim,suspend-fps-power-up-slot", CFG_SUSPEND_PWRUP_SLOT}, + {"maxim,suspend-fps-power-down-slot", CFG_SUSPEND_PWRDOWN_SLOT}, +}; + +/* Configuration for one pin group. */ +struct max77620_pincfg { + bool alt_func; + int params[PROP_ID_MAX_ID]; +}; + +static char *altfnc_table[] = { + "lpm-control-in", + "fps-out", + "32k-out1", + "sd0-dvs-in", + "sd1-dvs-in", + "reference-out", +}; + +struct max77620_gpio_pin { + int pin_caps; + char pin_name[GPIOMAXNAME]; + uint8_t reg; + + /* Runtime data */ + bool alt_func; /* GPIO or alternate function */ +}; + +/* -------------------------------------------------------------------------- + * + * Pinmux functions. + */ +static int +max77620_pinmux_get_function(struct max77620_softc *sc, char *name, + struct max77620_pincfg *cfg) +{ + int i; + + if (strcmp("gpio", name) == 0) { + cfg->alt_func = false; + return (0); + } + for (i = 0; i < nitems(altfnc_table); i++) { + if (strcmp(altfnc_table[i], name) == 0) { + cfg->alt_func = true; + return (0); + } + } + return (-1); +} + +static int +max77620_pinmux_set_fps(struct max77620_softc *sc, int pin_num, + struct max77620_gpio_pin *pin) +{ +#if 0 + struct max77620_fps_config *fps_config = &mpci->fps_config[pin]; + int addr, ret; + int param_val; + int mask, shift; + + if ((pin < 1) || (pin > 3)) + return (0); + + switch (param) { + case MAX77620_ACTIVE_FPS_SOURCE: + case MAX77620_SUSPEND_FPS_SOURCE: + mask = MAX77620_FPS_SRC_MASK; + shift = MAX77620_FPS_SRC_SHIFT; + param_val = fps_config->active_fps_src; + if (param == MAX77620_SUSPEND_FPS_SOURCE) + param_val = fps_config->suspend_fps_src; + break; + + case MAX77620_ACTIVE_FPS_POWER_ON_SLOTS: + case MAX77620_SUSPEND_FPS_POWER_ON_SLOTS: + mask = MAX77620_FPS_PU_PERIOD_MASK; + shift = MAX77620_FPS_PU_PERIOD_SHIFT; + param_val = fps_config->active_power_up_slots; + if (param == MAX77620_SUSPEND_FPS_POWER_ON_SLOTS) + param_val = fps_config->suspend_power_up_slots; *** 9957 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Mon Dec 28 13:20:34 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB7304B4937; Mon, 28 Dec 2020 13:20:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4J825Qvnz3R28; Mon, 28 Dec 2020 13:20:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD48A1A39D; Mon, 28 Dec 2020 13:20:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSDKYbW043073; Mon, 28 Dec 2020 13:20:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSDKY9u043072; Mon, 28 Dec 2020 13:20:34 GMT (envelope-from git) Date: Mon, 28 Dec 2020 13:20:34 GMT Message-Id: <202012281320.0BSDKY9u043072@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 20a930e44db4 - stable/12 - MFC r368406: Prefer using the MIN() function macro over the min() inline function in the LinuxKPI. Linux defines min() to be a macro, while in FreeBSD min() is a static inline function clamping its arguments to "unsigned int". MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 20a930e44db4f6e89c6ee950081b8d1d0f39998a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 13:20:34 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=20a930e44db4f6e89c6ee950081b8d1d0f39998a commit 20a930e44db4f6e89c6ee950081b8d1d0f39998a Author: Hans Petter Selasky AuthorDate: 2020-12-07 09:48:06 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 13:19:47 +0000 MFC r368406: Prefer using the MIN() function macro over the min() inline function in the LinuxKPI. Linux defines min() to be a macro, while in FreeBSD min() is a static inline function clamping its arguments to "unsigned int". Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/compat/linuxkpi/common/include/linux/bitops.h | 2 +- sys/compat/linuxkpi/common/include/linux/scatterlist.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h index 7e259760f7c3..3bcfd69ba5c5 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitops.h +++ b/sys/compat/linuxkpi/common/include/linux/bitops.h @@ -364,7 +364,7 @@ linux_reg_op(unsigned long *bitmap, int pos, int order, int reg_op) index = pos / BITS_PER_LONG; offset = pos - (index * BITS_PER_LONG); nlongs_reg = BITS_TO_LONGS(nbits_reg); - nbitsinlong = min(nbits_reg, BITS_PER_LONG); + nbitsinlong = MIN(nbits_reg, BITS_PER_LONG); mask = (1UL << (nbitsinlong - 1)); mask += mask - 1; diff --git a/sys/compat/linuxkpi/common/include/linux/scatterlist.h b/sys/compat/linuxkpi/common/include/linux/scatterlist.h index a23edfb0b4de..2d4b05ba5cb1 100644 --- a/sys/compat/linuxkpi/common/include/linux/scatterlist.h +++ b/sys/compat/linuxkpi/common/include/linux/scatterlist.h @@ -343,7 +343,7 @@ __sg_alloc_table_from_pages(struct sg_table *sgt, } seg_size = ((j - cur) << PAGE_SHIFT) - off; - sg_set_page(s, pages[cur], min(size, seg_size), off); + sg_set_page(s, pages[cur], MIN(size, seg_size), off); size -= seg_size; off = 0; cur = j; From owner-dev-commits-src-all@freebsd.org Mon Dec 28 13:22:02 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5B44E4B4C3C; Mon, 28 Dec 2020 13:22:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4J9k250Zz3R5c; Mon, 28 Dec 2020 13:22:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A1F21A336; Mon, 28 Dec 2020 13:22:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSDM2Q6046453; Mon, 28 Dec 2020 13:22:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSDM29x046452; Mon, 28 Dec 2020 13:22:02 GMT (envelope-from git) Date: Mon, 28 Dec 2020 13:22:02 GMT Message-Id: <202012281322.0BSDM29x046452@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: cabe7f05fa0d - stable/11 - MFC r368406: Prefer using the MIN() function macro over the min() inline function in the LinuxKPI. Linux defines min() to be a macro, while in FreeBSD min() is a static inline function clamping its arguments to "unsigned int". MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: cabe7f05fa0d7e6c65c2ed2836e66b2237647de8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 13:22:02 -0000 The branch stable/11 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=cabe7f05fa0d7e6c65c2ed2836e66b2237647de8 commit cabe7f05fa0d7e6c65c2ed2836e66b2237647de8 Author: Hans Petter Selasky AuthorDate: 2020-12-07 09:48:06 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 13:21:05 +0000 MFC r368406: Prefer using the MIN() function macro over the min() inline function in the LinuxKPI. Linux defines min() to be a macro, while in FreeBSD min() is a static inline function clamping its arguments to "unsigned int". Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/compat/linuxkpi/common/include/linux/bitops.h | 2 +- sys/compat/linuxkpi/common/include/linux/scatterlist.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h index f3c62596bcf5..f93c6e002247 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitops.h +++ b/sys/compat/linuxkpi/common/include/linux/bitops.h @@ -357,7 +357,7 @@ linux_reg_op(unsigned long *bitmap, int pos, int order, int reg_op) index = pos / BITS_PER_LONG; offset = pos - (index * BITS_PER_LONG); nlongs_reg = BITS_TO_LONGS(nbits_reg); - nbitsinlong = min(nbits_reg, BITS_PER_LONG); + nbitsinlong = MIN(nbits_reg, BITS_PER_LONG); mask = (1UL << (nbitsinlong - 1)); mask += mask - 1; diff --git a/sys/compat/linuxkpi/common/include/linux/scatterlist.h b/sys/compat/linuxkpi/common/include/linux/scatterlist.h index 2531bbb42c73..8a7a38351331 100644 --- a/sys/compat/linuxkpi/common/include/linux/scatterlist.h +++ b/sys/compat/linuxkpi/common/include/linux/scatterlist.h @@ -341,7 +341,7 @@ __sg_alloc_table_from_pages(struct sg_table *sgt, } seg_size = ((j - cur) << PAGE_SHIFT) - off; - sg_set_page(s, pages[cur], min(size, seg_size), off); + sg_set_page(s, pages[cur], MIN(size, seg_size), off); size -= seg_size; off = 0; cur = j; From owner-dev-commits-src-all@freebsd.org Mon Dec 28 13:23:53 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D2D264B4BEE; Mon, 28 Dec 2020 13:23:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4JCs5ghBz3h44; Mon, 28 Dec 2020 13:23:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B5CFB1A348; Mon, 28 Dec 2020 13:23:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSDNrsw046596; Mon, 28 Dec 2020 13:23:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSDNrl6046595; Mon, 28 Dec 2020 13:23:53 GMT (envelope-from git) Date: Mon, 28 Dec 2020 13:23:53 GMT Message-Id: <202012281323.0BSDNrl6046595@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 08e90940e777 - stable/12 - MFC r368182: Use function macro for sema_init() in the LinuxKPI to limit macro expansion scope. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 08e90940e7774937164f47632a1a736505bc92b5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 13:23:53 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=08e90940e7774937164f47632a1a736505bc92b5 commit 08e90940e7774937164f47632a1a736505bc92b5 Author: Hans Petter Selasky AuthorDate: 2020-11-30 09:47:53 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 13:23:13 +0000 MFC r368182: Use function macro for sema_init() in the LinuxKPI to limit macro expansion scope. Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/compat/linuxkpi/common/include/linux/semaphore.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/semaphore.h b/sys/compat/linuxkpi/common/include/linux/semaphore.h index 59a35311a5cc..e4a72fd9b47a 100644 --- a/sys/compat/linuxkpi/common/include/linux/semaphore.h +++ b/sys/compat/linuxkpi/common/include/linux/semaphore.h @@ -65,6 +65,6 @@ init_MUTEX(struct semaphore *sem) sema_init(&sem->sema, 1, "lnxsema"); } -#define sema_init linux_sema_init +#define sema_init(...) linux_sema_init(__VA_ARGS__) #endif /* _LINUX_SEMAPHORE_H_ */ From owner-dev-commits-src-all@freebsd.org Mon Dec 28 13:24:37 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 56FA14B4950; Mon, 28 Dec 2020 13:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4JDj1yn1z3hCK; Mon, 28 Dec 2020 13:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3625F1A349; Mon, 28 Dec 2020 13:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSDObIg046715; Mon, 28 Dec 2020 13:24:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSDObut046714; Mon, 28 Dec 2020 13:24:37 GMT (envelope-from git) Date: Mon, 28 Dec 2020 13:24:37 GMT Message-Id: <202012281324.0BSDObut046714@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: a703dd3cb841 - stable/11 - MFC r368182: Use function macro for sema_init() in the LinuxKPI to limit macro expansion scope. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: a703dd3cb8418252ce0af0db0eba928db3388b6b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 13:24:37 -0000 The branch stable/11 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=a703dd3cb8418252ce0af0db0eba928db3388b6b commit a703dd3cb8418252ce0af0db0eba928db3388b6b Author: Hans Petter Selasky AuthorDate: 2020-11-30 09:47:53 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 13:24:04 +0000 MFC r368182: Use function macro for sema_init() in the LinuxKPI to limit macro expansion scope. Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/compat/linuxkpi/common/include/linux/semaphore.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/semaphore.h b/sys/compat/linuxkpi/common/include/linux/semaphore.h index 59a35311a5cc..e4a72fd9b47a 100644 --- a/sys/compat/linuxkpi/common/include/linux/semaphore.h +++ b/sys/compat/linuxkpi/common/include/linux/semaphore.h @@ -65,6 +65,6 @@ init_MUTEX(struct semaphore *sem) sema_init(&sem->sema, 1, "lnxsema"); } -#define sema_init linux_sema_init +#define sema_init(...) linux_sema_init(__VA_ARGS__) #endif /* _LINUX_SEMAPHORE_H_ */ From owner-dev-commits-src-all@freebsd.org Mon Dec 28 13:37:45 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0D7D54B5078; Mon, 28 Dec 2020 13:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4JWr71T5z3hlg; Mon, 28 Dec 2020 13:37:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E3EED1A783; Mon, 28 Dec 2020 13:37:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSDbiTA058257; Mon, 28 Dec 2020 13:37:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSDbiUw058256; Mon, 28 Dec 2020 13:37:44 GMT (envelope-from git) Date: Mon, 28 Dec 2020 13:37:44 GMT Message-Id: <202012281337.0BSDbiUw058256@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: aca12148b113 - main - Improve error message printing in krping. Don't print completion queue flush as an error. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aca12148b113b618afc19028c656a7ac4434231d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 13:37:45 -0000 The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=aca12148b113b618afc19028c656a7ac4434231d commit aca12148b113b618afc19028c656a7ac4434231d Author: Hans Petter Selasky AuthorDate: 2020-12-09 12:59:01 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 13:37:09 +0000 Improve error message printing in krping. Don't print completion queue flush as an error. MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/contrib/rdma/krping/krping.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/contrib/rdma/krping/krping.c b/sys/contrib/rdma/krping/krping.c index c734da36247f..e9a379984dec 100644 --- a/sys/contrib/rdma/krping/krping.c +++ b/sys/contrib/rdma/krping/krping.c @@ -362,10 +362,6 @@ static void krping_cq_event_handler(struct ib_cq *cq, void *ctx) int ret; BUG_ON(cb->cq != cq); - if (cb->state == ERROR) { - printk(KERN_ERR PFX "cq completion in ERROR state\n"); - return; - } if (cb->frtest) { printk(KERN_ERR PFX "cq completion event in frtest!\n"); return; @@ -384,7 +380,10 @@ static void krping_cq_event_handler(struct ib_cq *cq, void *ctx) goto error; } } - + if (cb->state == ERROR) { + printk(KERN_ERR PFX "cq completion in ERROR state\n"); + return; + } switch (wc.opcode) { case IB_WC_SEND: DEBUG_LOG("send completion\n"); From owner-dev-commits-src-all@freebsd.org Mon Dec 28 13:41:25 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6A5C04B51B0; Mon, 28 Dec 2020 13:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4Jc51WPzz3jD4; Mon, 28 Dec 2020 13:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F94B1A455; Mon, 28 Dec 2020 13:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSDfPRW066573; Mon, 28 Dec 2020 13:41:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSDfPNU066572; Mon, 28 Dec 2020 13:41:25 GMT (envelope-from git) Date: Mon, 28 Dec 2020 13:41:25 GMT Message-Id: <202012281341.0BSDfPNU066572@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 9e7fa1e66c1e - main - Collect statistics from all rate-limit queues in mlx5en(4). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e7fa1e66c1e13d426e684bb24d07457522ef3d7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 13:41:25 -0000 The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=9e7fa1e66c1e13d426e684bb24d07457522ef3d7 commit 9e7fa1e66c1e13d426e684bb24d07457522ef3d7 Author: Hans Petter Selasky AuthorDate: 2020-10-12 08:18:48 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 13:39:51 +0000 Collect statistics from all rate-limit queues in mlx5en(4). MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 6fe04b260e4f..c23335eb712e 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -911,6 +911,30 @@ mlx5e_update_stats_locked(struct mlx5e_priv *priv) } } +#ifdef RATELIMIT + /* Collect statistics from all rate-limit queues */ + for (j = 0; j < priv->rl.param.tx_worker_threads_def; j++) { + struct mlx5e_rl_worker *rlw = priv->rl.workers + j; + + for (i = 0; i < priv->rl.param.tx_channels_per_worker_def; i++) { + struct mlx5e_rl_channel *channel = rlw->channels + i; + struct mlx5e_sq *sq = channel->sq; + + if (sq == NULL) + continue; + + sq_stats = &sq->stats; + + tso_packets += sq_stats->tso_packets; + tso_bytes += sq_stats->tso_bytes; + tx_queue_dropped += sq_stats->dropped; + tx_queue_dropped += sq_stats->enobuf; + tx_defragged += sq_stats->defragged; + tx_offload_none += sq_stats->csum_offload_none; + } + } +#endif + /* update counters */ s->tso_packets = tso_packets; s->tso_bytes = tso_bytes; From owner-dev-commits-src-all@freebsd.org Mon Dec 28 14:46:18 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7D7964B6EFE; Mon, 28 Dec 2020 14:46:18 +0000 (UTC) (envelope-from rebecca@bsdio.com) Received: from out03.mta.xmission.com (out03.mta.xmission.com [166.70.13.233]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4L2y2N2dz3njF; Mon, 28 Dec 2020 14:46:18 +0000 (UTC) (envelope-from rebecca@bsdio.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=bsdio.com; s=xmission; h=Subject:Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Sender:Reply-To:Cc:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe :List-Post:List-Owner:List-Archive; bh=MvWAhA6EySSgax2RI1Zj60FIspxh+3aKSsfg2R/k2Yc=; b=HAwTlc6+cMfAhDAMD0JtMD5OyP 5cOsV3qe+9huijLdbZdPtfBiqGJHCLgrJ76uo7j9pf68V41IKh4kliuLdjYvGS0ztpGulYA6XPLLm RiC3r/S90hcJOApuGHPlyYHH845o1K7lQ0J0KRpNl7HbOq50DoMqFXVShOVDk6+GXuj8=; Received: from in02.mta.xmission.com ([166.70.13.52]) by out03.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kttmq-005yup-4o; Mon, 28 Dec 2020 07:46:16 -0700 Received: from mta4.zcs.xmission.com ([166.70.13.68]) by in02.mta.xmission.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kttmp-000oE3-69; Mon, 28 Dec 2020 07:46:15 -0700 Received: from localhost (localhost [127.0.0.1]) by mta4.zcs.xmission.com (Postfix) with ESMTP id DE32E50095F; Mon, 28 Dec 2020 07:46:14 -0700 (MST) X-Amavis-Modified: Mail body modified (using disclaimer) - mta4.zcs.xmission.com Received: from mta4.zcs.xmission.com ([127.0.0.1]) by localhost (mta4.zcs.xmission.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Sy5cdhXj_f7K; Mon, 28 Dec 2020 07:46:14 -0700 (MST) Received: from [10.0.10.142] (c-174-52-16-57.hsd1.ut.comcast.net [174.52.16.57]) by mta4.zcs.xmission.com (Postfix) with ESMTPSA id A99585008A2; Mon, 28 Dec 2020 07:46:14 -0700 (MST) To: Kevin Lo , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202012280231.0BS2VK7m034750@gitrepo.freebsd.org> From: Rebecca Cran Message-ID: <7042e1bd-121f-ef28-11c6-5a35a0a4829d@bsdio.com> Date: Mon, 28 Dec 2020 07:46:14 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <202012280231.0BS2VK7m034750@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-XM-SPF: eid=1kttmp-000oE3-69; ; ; mid=<7042e1bd-121f-ef28-11c6-5a35a0a4829d@bsdio.com>; ; ; hst=in02.mta.xmission.com; ; ; ip=166.70.13.68; ; ; frm=rebecca@bsdio.com; ; ; spf=none X-SA-Exim-Connect-IP: 166.70.13.68 X-SA-Exim-Mail-From: rebecca@bsdio.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on sa06.xmission.com X-Spam-Level: **** X-Spam-Status: No, score=4.7 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,NICE_REPLY_A,T_TM2_M_HEADER_IN_MSG,TooManyTo_001, TooManyTo_002,TooManyTo_003,XMSubLong,XMSubMetaSxObfu_03, XMSubMetaSx_00,XM_S_SubURI autolearn=disabled version=3.4.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5012] * 0.5 XM_S_SubURI URI in subject line * 0.7 XMSubLong Long Subject * 0.3 TooManyTo_001 Multiple "To" Header Recipients 2x (uncommon) * 0.6 TooManyTo_003 Multiple "To" Header Recipients 4x (uncommon) * 0.5 TooManyTo_002 Multiple "To" Header Recipients 3x (uncommon) * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; IP=ok Body=1 Fuz1=1] [Fuz2=1] * 1.2 XMSubMetaSxObfu_03 Obfuscated Sexy Noun-People * 1.0 XMSubMetaSx_00 1+ Sexy Words * -0.0 NICE_REPLY_A Looks like a legit reply (A) X-Spam-DCC: XMission; sa06 1397; IP=ok Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ****;Kevin Lo , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org X-Spam-Relay-Country: X-Spam-Timing: total 515 ms - load_scoreonly_sql: 0.06 (0.0%), signal_user_changed: 11 (2.1%), b_tie_ro: 9 (1.8%), parse: 1.00 (0.2%), extract_message_metadata: 6 (1.1%), get_uri_detail_list: 1.37 (0.3%), tests_pri_-1000: 2.7 (0.5%), tests_pri_-950: 1.40 (0.3%), tests_pri_-900: 1.22 (0.2%), tests_pri_-90: 295 (57.2%), check_bayes: 293 (56.8%), b_tokenize: 6 (1.2%), b_tok_get_all: 6 (1.1%), b_comp_prob: 2.6 (0.5%), b_tok_touch_all: 273 (53.1%), b_finish: 1.45 (0.3%), tests_pri_0: 185 (35.9%), check_dkim_signature: 0.58 (0.1%), check_dkim_adsp: 40 (7.7%), poll_dns_idle: 32 (6.3%), tests_pri_10: 2.1 (0.4%), tests_pri_500: 8 (1.6%), rewrite_mail: 0.00 (0.0%) Subject: Re: git: a8ec81e79871 - main - Mention boot1.efi since it is an image of 800KB FAT filesystem stored as /EFI/BOOT/BOOTX64.EFI. Differential Revision: https://reviews.freebsd.org/D27782 X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) X-Rspamd-Queue-Id: 4D4L2y2N2dz3njF X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 14:46:18 -0000 On 12/27/20 7:31 PM, Kevin Lo wrote: > The branch main has been updated by kevlo: > > URL: https://cgit.FreeBSD.org/src/commit/?id=a8ec81e79871de98e30ce572a313f3f8d059ce7b > > commit a8ec81e79871de98e30ce572a313f3f8d059ce7b > Author: Kevin Lo > AuthorDate: 2020-12-28 02:30:21 +0000 > Commit: Kevin Lo > CommitDate: 2020-12-28 02:30:21 +0000 > > Mention boot1.efi since it is an image of 800KB FAT filesystem stored as > /EFI/BOOT/BOOTX64.EFI. > Differential Revision: https://reviews.freebsd.org/D27782 I also mentioned this on the review, but: 1. The file is /boot/boot1.efifat, not /boot/boot1.efi : the latter is the EFI application. 2. /boot/boot1.efifat is no longer included in -CURRENT. -- Rebecca Cran From owner-dev-commits-src-all@freebsd.org Mon Dec 28 15:35:39 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7EBB14B8C82; Mon, 28 Dec 2020 15:35:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4M7v388bz3rD2; Mon, 28 Dec 2020 15:35:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 543541BF21; Mon, 28 Dec 2020 15:35:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSFZd9B088970; Mon, 28 Dec 2020 15:35:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSFZdNf088969; Mon, 28 Dec 2020 15:35:39 GMT (envelope-from git) Date: Mon, 28 Dec 2020 15:35:39 GMT Message-Id: <202012281535.0BSFZdNf088969@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 63fb0d3bc3fd - main - Remove misleading macros from -width arguments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 63fb0d3bc3fdd5163051ec35bc2f1e1837bc603e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 15:35:39 -0000 The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=63fb0d3bc3fdd5163051ec35bc2f1e1837bc603e commit 63fb0d3bc3fdd5163051ec35bc2f1e1837bc603e Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2020-12-28 15:29:35 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2020-12-28 15:30:55 +0000 Remove misleading macros from -width arguments Also, remove $FreeBSD$ tag from manual page examples. MFC after: 1 week --- share/examples/mdoc/example.1 | 4 +--- share/examples/mdoc/example.3 | 2 -- share/examples/mdoc/example.4 | 4 +--- share/examples/mdoc/example.9 | 2 -- 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/share/examples/mdoc/example.1 b/share/examples/mdoc/example.1 index e149b0f4a816..c574b7f0f849 100644 --- a/share/examples/mdoc/example.1 +++ b/share/examples/mdoc/example.1 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .\" Note: The date here should be updated whenever a non-trivial .\" change is made to the manual page. .Dd December 8, 1999 @@ -47,7 +45,7 @@ It is intended that this example can be used as a template when writing a new manual page. .Pp The options are as follows: -.Bl -tag -width "-d Ar argument" +.Bl -tag -width "-d argument" .It Fl a Example optional .Fl a diff --git a/share/examples/mdoc/example.3 b/share/examples/mdoc/example.3 index cfe7e011525b..52efbf9ca45b 100644 --- a/share/examples/mdoc/example.3 +++ b/share/examples/mdoc/example.3 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .\" Note: The date here should be updated whenever a non-trivial .\" change is made to the manual page. .Dd July 30, 2004 diff --git a/share/examples/mdoc/example.4 b/share/examples/mdoc/example.4 index d2bc40b4ead6..1d93ae90f26c 100644 --- a/share/examples/mdoc/example.4 +++ b/share/examples/mdoc/example.4 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .\" Note: The date here should be updated whenever a non-trivial .\" change is made to the manual page. .Dd July 31, 2015 @@ -81,7 +79,7 @@ Example device 4201 Example device 4202 .El .Sh FILES -.Bl -tag -width ".Pa /dev/null" -compact +.Bl -tag -width "/dev/null" -compact .It Pa /dev/null Example of a file in the .Sx FILES diff --git a/share/examples/mdoc/example.9 b/share/examples/mdoc/example.9 index 639a8d2ca7e8..7e61a64cdc2e 100644 --- a/share/examples/mdoc/example.9 +++ b/share/examples/mdoc/example.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .\" Note: The date here should be updated whenever a non-trivial .\" change is made to the manual page. .Dd September 27, 2006 From owner-dev-commits-src-all@freebsd.org Mon Dec 28 15:48:15 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F2444B8C62; Mon, 28 Dec 2020 15:48:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4MQR1P8Wz3rpK; Mon, 28 Dec 2020 15:48:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E4F41BF59; Mon, 28 Dec 2020 15:48:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSFmEO0099885; Mon, 28 Dec 2020 15:48:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSFmE2f099884; Mon, 28 Dec 2020 15:48:14 GMT (envelope-from git) Date: Mon, 28 Dec 2020 15:48:14 GMT Message-Id: <202012281548.0BSFmE2f099884@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: e13534d54a1b - main - newfs(8): Fix unusual Xr order MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e13534d54a1b2b03defbd603859ac5cad141997e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 15:48:15 -0000 The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=e13534d54a1b2b03defbd603859ac5cad141997e commit e13534d54a1b2b03defbd603859ac5cad141997e Author: Gordon Bergling AuthorDate: 2020-12-28 15:46:28 +0000 Commit: Gordon Bergling CommitDate: 2020-12-28 15:46:28 +0000 newfs(8): Fix unusual Xr order - unusual Xr order: gjournal after gpart MFC after: 3 days --- sbin/newfs/newfs.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/newfs/newfs.8 b/sbin/newfs/newfs.8 index 985d0557044e..9565929664c5 100644 --- a/sbin/newfs/newfs.8 +++ b/sbin/newfs/newfs.8 @@ -314,8 +314,8 @@ on file systems that contain many small files. .Xr dump 8 , .Xr dumpfs 8 , .Xr fsck 8 , -.Xr gpart 8 , .Xr gjournal 8 , +.Xr gpart 8 , .Xr growfs 8 , .Xr gvinum 8 , .Xr makefs 8 , From owner-dev-commits-src-all@freebsd.org Mon Dec 28 15:49:29 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 625504B8DF6; Mon, 28 Dec 2020 15:49:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4MRs2L2zz3sH6; Mon, 28 Dec 2020 15:49:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 42F9C1BF5A; Mon, 28 Dec 2020 15:49:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSFnTZN000111; Mon, 28 Dec 2020 15:49:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSFnTpJ000110; Mon, 28 Dec 2020 15:49:29 GMT (envelope-from git) Date: Mon, 28 Dec 2020 15:49:29 GMT Message-Id: <202012281549.0BSFnTpJ000110@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: e5a84dc8a755 - main - dumpon(8): Add missing section arguments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e5a84dc8a7556ccbda079f648455a42460c10a6e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 15:49:29 -0000 The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=e5a84dc8a7556ccbda079f648455a42460c10a6e commit e5a84dc8a7556ccbda079f648455a42460c10a6e Author: Gordon Bergling AuthorDate: 2020-12-28 15:48:58 +0000 Commit: Gordon Bergling CommitDate: 2020-12-28 15:48:58 +0000 dumpon(8): Add missing section arguments MFC after: 3 days --- sbin/dumpon/dumpon.8 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sbin/dumpon/dumpon.8 b/sbin/dumpon/dumpon.8 index f2a1728ec30e..acdc554ae546 100644 --- a/sbin/dumpon/dumpon.8 +++ b/sbin/dumpon/dumpon.8 @@ -333,18 +333,18 @@ The .Xr rc 8 script runs early during boot, typically before networking is configured. This makes it unsuitable for configuring -.Xr netdump +.Xr netdump 4 when the client address is dynamic. To configure -.Xr netdump +.Xr netdump 4 when -.Xr dhclient +.Xr dhclient 8 binds to a server, -.Xr dhclient-script +.Xr dhclient-script 8 can be used to run -.Xr dumpon . +.Xr dumpon 8 . For example, to automatically configure -.Xr netdump +.Xr netdump 4 on the vtnet0 interface, add the following to .Pa /etc/dhclient-exit-hooks . .Bd -literal From owner-dev-commits-src-all@freebsd.org Mon Dec 28 17:47:46 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D71F24BC759; Mon, 28 Dec 2020 17:47:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4Q4L5Wm9z4W0j; Mon, 28 Dec 2020 17:47:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AC5AA1D675; Mon, 28 Dec 2020 17:47:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSHlkmU031248; Mon, 28 Dec 2020 17:47:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSHlkIF031247; Mon, 28 Dec 2020 17:47:46 GMT (envelope-from git) Date: Mon, 28 Dec 2020 17:47:46 GMT Message-Id: <202012281747.0BSHlkIF031247@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: c37a66937407 - main - Correct font.h comment describing vfnt font maps MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c37a6693740748d8534ebdb49acbdd05cc21b5f2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 17:47:46 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c37a6693740748d8534ebdb49acbdd05cc21b5f2 commit c37a6693740748d8534ebdb49acbdd05cc21b5f2 Author: Ed Maste AuthorDate: 2020-12-28 16:56:00 +0000 Commit: Ed Maste CommitDate: 2020-12-28 17:47:12 +0000 Correct font.h comment describing vfnt font maps Commit 41fb06651122 doubled the number of glyph maps in the vfnt format from 2 to 4 to support double-width characters, but a comment describing the maps was not updated to match. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/sys/font.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/sys/font.h b/sys/sys/font.h index 73b6d39683a6..f8bf151c5f52 100644 --- a/sys/sys/font.h +++ b/sys/sys/font.h @@ -42,11 +42,13 @@ /* * Fonts. * - * Remapping tables are used to map Unicode points to glyphs. They need - * to be sorted, because vtfont_lookup() performs a binary search. Each - * font has two remapping tables, for normal and bold. When a character - * is not present in bold, it uses a normal glyph. When no glyph is - * available, it uses glyph 0, which is normally equal to U+FFFD. + * Fonts support normal and bold weights, and single and double width glyphs. + * Mapping tables are used to map Unicode points to glyphs. They are sorted by + * code point, and vtfont_lookup() uses this to perform a binary search. Each + * font has four mapping tables: two weights times two halves (left/single, + * right). When a character is not present in a bold map the glyph from the + * normal map is used. When no glyph is available, it uses glyph 0, which is + * normally equal to U+FFFD. */ enum vfnt_map_type { From owner-dev-commits-src-all@freebsd.org Mon Dec 28 18:45:23 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC0264BDD18; Mon, 28 Dec 2020 18:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4RLq6K98z4Ytw; Mon, 28 Dec 2020 18:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CBBE51DED1; Mon, 28 Dec 2020 18:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSIjNUt097141; Mon, 28 Dec 2020 18:45:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSIjN15097140; Mon, 28 Dec 2020 18:45:23 GMT (envelope-from git) Date: Mon, 28 Dec 2020 18:45:23 GMT Message-Id: <202012281845.0BSIjN15097140@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 69d73d07bae6 - stable/12 - MFC r339889 (by glebius): MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 69d73d07bae61be453cc08aa60a62e68cba2e7ed Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 18:45:24 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=69d73d07bae61be453cc08aa60a62e68cba2e7ed commit 69d73d07bae61be453cc08aa60a62e68cba2e7ed Author: Gleb Smirnoff AuthorDate: 2018-10-29 22:10:52 +0000 Commit: Gordon Bergling CommitDate: 2020-12-28 18:40:52 +0000 MFC r339889 (by glebius): Add a note that epoch(9) may change, to untie our hands for any future MFCs. Approved by: glebius (cherry picked from commit 24929e2cccdc62b19edb66d5f71c62562a051c8c) --- share/man/man9/epoch.9 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/man/man9/epoch.9 b/share/man/man9/epoch.9 index da3345f5c181..48ad09d2e249 100644 --- a/share/man/man9/epoch.9 +++ b/share/man/man9/epoch.9 @@ -200,6 +200,10 @@ free would have to follow a call to .Fn epoch_wait . .Sh ERRORS None. +.Sh NOTES +The +.Nm +kernel programming interface is under development and is subject to change. .El .Sh SEE ALSO .Xr locking 9 , From owner-dev-commits-src-all@freebsd.org Mon Dec 28 18:50:29 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F40D44BDCC0; Mon, 28 Dec 2020 18:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4RSh6b7bz4YyC; Mon, 28 Dec 2020 18:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D107F1E34B; Mon, 28 Dec 2020 18:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSIoSY5004895; Mon, 28 Dec 2020 18:50:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSIoSgm004894; Mon, 28 Dec 2020 18:50:28 GMT (envelope-from git) Date: Mon, 28 Dec 2020 18:50:28 GMT Message-Id: <202012281850.0BSIoSgm004894@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: e5f0664b1f33 - stable/12 - MFC r360492 (by bcr): MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: e5f0664b1f3311846e321595dfb96254c7ae8696 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 18:50:29 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=e5f0664b1f3311846e321595dfb96254c7ae8696 commit e5f0664b1f3311846e321595dfb96254c7ae8696 Author: Benedict Reuschling AuthorDate: 2020-04-30 11:17:29 +0000 Commit: Gordon Bergling CommitDate: 2020-12-28 18:48:09 +0000 MFC r360492 (by bcr): Add HISTORY sections to disk(9), driver(9), and epoch(9). Submitted by: gbergling_gmail.com Differential Revision: https://reviews.freebsd.org/D24243 (cherry picked from commit 8c63b2db53862c523bc2cb3f7c4d0243018eb3de) --- share/man/man9/disk.9 | 7 ++++++- share/man/man9/driver.9 | 7 ++++++- share/man/man9/epoch.9 | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/share/man/man9/disk.9 b/share/man/man9/disk.9 index e65dc889b50e..081e63c67000 100644 --- a/share/man/man9/disk.9 +++ b/share/man/man9/disk.9 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 3, 2017 +.Dd April 30, 2020 .Dt DISK 9 .Os .Sh NAME @@ -241,6 +241,11 @@ Typically used to store a pointer to the drivers .Vt softc structure for this disk device. .El +.Sh HISTORY +The +.Nm kernel disk storage API +first appeard in +.Fx 4.9 . .Sh SEE ALSO .Xr GEOM 4 , .Xr devfs 5 , diff --git a/share/man/man9/driver.9 b/share/man/man9/driver.9 index a23b1ac41543..5dba1b94a6bb 100644 --- a/share/man/man9/driver.9 +++ b/share/man/man9/driver.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2011 +.Dd April 30, 2020 .Dt DRIVER 9 .Os .Sh NAME @@ -102,6 +102,11 @@ macro will also create the devclass with the name of the driver and can optionally call extra initialisation code in the driver by specifying an extra module event handler and argument as the last two arguments. +.Sh HISTORY +The +.Nm +framework first appeared in +.Fx 2.2.7 . .Sh SEE ALSO .Xr devclass 9 , .Xr device 9 , diff --git a/share/man/man9/epoch.9 b/share/man/man9/epoch.9 index 48ad09d2e249..bb16980da2da 100644 --- a/share/man/man9/epoch.9 +++ b/share/man/man9/epoch.9 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 28, 2019 +.Dd April 30, 2020 .Dt EPOCH 9 .Os .Sh NAME @@ -205,6 +205,11 @@ The .Nm kernel programming interface is under development and is subject to change. .El +.Sh HISTORY +The +.Nm +framework first appeard in +.Fx 11.0 . .Sh SEE ALSO .Xr locking 9 , .Xr mtx_pool 9 , From owner-dev-commits-src-all@freebsd.org Mon Dec 28 18:52:12 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F6334BDF6D; Mon, 28 Dec 2020 18:52:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4RVh39Llz4ZTn; Mon, 28 Dec 2020 18:52:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5FBAB1E81F; Mon, 28 Dec 2020 18:52:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSIqCr8008186; Mon, 28 Dec 2020 18:52:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSIqCba008185; Mon, 28 Dec 2020 18:52:12 GMT (envelope-from git) Date: Mon, 28 Dec 2020 18:52:12 GMT Message-Id: <202012281852.0BSIqCba008185@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 7d69f46f6474 - stable/12 - MFC r368791: disk(9): Fix a few mandoc related errors MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 7d69f46f6474d3d225fd7e1d6711c610db75eb55 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 18:52:12 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=7d69f46f6474d3d225fd7e1d6711c610db75eb55 commit 7d69f46f6474d3d225fd7e1d6711c610db75eb55 Author: Gordon Bergling AuthorDate: 2020-12-19 09:55:02 +0000 Commit: Gordon Bergling CommitDate: 2020-12-28 18:51:29 +0000 MFC r368791: disk(9): Fix a few mandoc related errors - function name without markup: g_io_deliver() - function name without markup: disk_gone() - sections out of conventional order: Sh SEE ALSO - referenced manual not found: Xr MAKE_DEV 9 Actually the man page of MAKE_DEV has never existed. (cherry picked from commit 9512f75fa8608d150178116ad63672672331b5e8) --- share/man/man9/disk.9 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/share/man/man9/disk.9 b/share/man/man9/disk.9 index 081e63c67000..32c659c0a8e6 100644 --- a/share/man/man9/disk.9 +++ b/share/man/man9/disk.9 @@ -172,9 +172,11 @@ kernel panic to record a copy of the system RAM to the disk. Optional: if this method is provided, it gives the disk driver the opportunity to override the default GEOM response to BIO_GETATTR requests. This function should return -1 if the attribute is not handled, 0 if the -attribute is handled, or an errno to be passed to g_io_deliver(). +attribute is handled, or an errno to be passed to +.Fn g_io_deliver . .It Vt "disk_gone_t *" Va d_gone -Optional: if this method is provided, it will be called after disk_gone() +Optional: if this method is provided, it will be called after +.Fn disk_gone is called, once GEOM has finished its cleanup process. Once this callback is called, it is safe for the disk driver to free all of its resources, as it will not be receiving further calls from GEOM. @@ -241,15 +243,14 @@ Typically used to store a pointer to the drivers .Vt softc structure for this disk device. .El +.Sh SEE ALSO +.Xr GEOM 4 , +.Xr devfs 5 .Sh HISTORY The .Nm kernel disk storage API first appeard in .Fx 4.9 . -.Sh SEE ALSO -.Xr GEOM 4 , -.Xr devfs 5 , -.Xr MAKE_DEV 9 .Sh AUTHORS This manual page was written by .An Robert Watson . From owner-dev-commits-src-all@freebsd.org Mon Dec 28 18:57:18 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5C0F4BE084; Mon, 28 Dec 2020 18:57:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4RcZ5ld0z4ZgN; Mon, 28 Dec 2020 18:57:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B82F41E36E; Mon, 28 Dec 2020 18:57:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSIvIl8008483; Mon, 28 Dec 2020 18:57:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSIvI0w008482; Mon, 28 Dec 2020 18:57:18 GMT (envelope-from git) Date: Mon, 28 Dec 2020 18:57:18 GMT Message-Id: <202012281857.0BSIvI0w008482@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: f928dbcb167c - main - fusefs: fix the tests for a wider range of maxphys MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f928dbcb167c7440212e420687de813fc92c06a4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 18:57:18 -0000 The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=f928dbcb167c7440212e420687de813fc92c06a4 commit f928dbcb167c7440212e420687de813fc92c06a4 Author: Alan Somers AuthorDate: 2020-12-24 06:03:06 +0000 Commit: Alan Somers CommitDate: 2020-12-28 18:56:17 +0000 fusefs: fix the tests for a wider range of maxphys maxphys is now a tunable, ever since r368124. The default value is also larger than it used to be. That broke several fusefs tests that made assumptions about maxphys. * WriteCluster.clustering used the MAXPHYS compile-time constant. * WriteBackAsync.direct_io_partially_overlaps_cached_block implicitly depended on the default value of maxphys. Fix it by making the dependency explicit. * Write.write_large implicitly assumed that maxphys would be no more than twice maxbcachebuf. Fix it by explicitly setting m_max_write. * WriteCluster.clustering and several others failed because the MockFS module did not work for max_write > 128KB (which most tests would set when maxphys > 256KB). Limit max_write accordingly. This is the same as fusefs-libs's behavior. * Bmap's tests were originally written for MAXPHYS=128KB. With larger values, the simulated file size was too small. PR: 252096 Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D27769 --- tests/sys/fs/fusefs/bmap.cc | 12 ++++++++---- tests/sys/fs/fusefs/mockfs.cc | 2 +- tests/sys/fs/fusefs/mockfs.hh | 21 +++++++++++++++++++-- tests/sys/fs/fusefs/utils.cc | 13 ++++++------- tests/sys/fs/fusefs/utils.hh | 3 +-- tests/sys/fs/fusefs/write.cc | 18 +++++++++++++++++- 6 files changed, 52 insertions(+), 17 deletions(-) diff --git a/tests/sys/fs/fusefs/bmap.cc b/tests/sys/fs/fusefs/bmap.cc index b41aeb4f08dd..3f392a4447f2 100644 --- a/tests/sys/fs/fusefs/bmap.cc +++ b/tests/sys/fs/fusefs/bmap.cc @@ -83,10 +83,14 @@ void expect_lookup(const char *relpath, uint64_t ino, off_t size) TEST_F(Bmap, bmap) { struct fiobmap2_arg arg; - const off_t filesize = 1 << 20; - const ino_t ino = 42; - int64_t lbn = 10; + /* + * Pick fsize and lbn large enough that max length runs won't reach + * either beginning or end of file + */ + const off_t filesize = 1 << 30; + int64_t lbn = 100; int64_t pbn = 12345; + const ino_t ino = 42; int fd; expect_lookup(RELPATH, 42, filesize); @@ -112,7 +116,7 @@ TEST_F(Bmap, bmap) TEST_F(Bmap, default_) { struct fiobmap2_arg arg; - const off_t filesize = 1 << 20; + const off_t filesize = 1 << 30; const ino_t ino = 42; int64_t lbn; int fd; diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc index f43afd247502..f977c705331f 100644 --- a/tests/sys/fs/fusefs/mockfs.cc +++ b/tests/sys/fs/fusefs/mockfs.cc @@ -365,7 +365,7 @@ MockFS::MockFS(int max_readahead, bool allow_other, bool default_permissions, m_daemon_id = NULL; m_kernel_minor_version = kernel_minor_version; m_maxreadahead = max_readahead; - m_maxwrite = max_write; + m_maxwrite = MIN(max_write, max_max_write); m_nready = -1; m_pm = pm; m_time_gran = time_gran; diff --git a/tests/sys/fs/fusefs/mockfs.hh b/tests/sys/fs/fusefs/mockfs.hh index 4cf6daea7e76..138c125649fd 100644 --- a/tests/sys/fs/fusefs/mockfs.hh +++ b/tests/sys/fs/fusefs/mockfs.hh @@ -72,6 +72,14 @@ extern "C" { extern int verbosity; +/* + * The maximum that a test case can set max_write, limited by the buffer + * supplied when reading from /dev/fuse. This limitation is imposed by + * fusefs-libs, but not by the FUSE protocol. + */ +const uint32_t max_max_write = 0x20000; + + /* This struct isn't defined by fuse_kernel.h or libfuse, but it should be */ struct fuse_create_out { struct fuse_entry_out entry; @@ -138,8 +146,17 @@ struct fuse_init_out_7_22 { union fuse_payloads_in { fuse_access_in access; fuse_bmap_in bmap; - /* value is from fuse_kern_chan.c in fusefs-libs */ - uint8_t bytes[0x21000 - sizeof(struct fuse_in_header)]; + /* + * In fusefs-libs 3.4.2 and below the buffer size is fixed at 0x21000 + * minus the header sizes. fusefs-libs 3.4.3 (and FUSE Protocol 7.29) + * add a FUSE_MAX_PAGES option that allows it to be greater. + * + * See fuse_kern_chan.c in fusefs-libs 2.9.9 and below, or + * FUSE_DEFAULT_MAX_PAGES_PER_REQ in fusefs-libs 3.4.3 and above. + */ + uint8_t bytes[ + max_max_write + 0x1000 - sizeof(struct fuse_in_header) + ]; fuse_create_in create; fuse_flush_in flush; fuse_fsync_in fsync; diff --git a/tests/sys/fs/fusefs/utils.cc b/tests/sys/fs/fusefs/utils.cc index 6e24d9c7b62d..7e9b97c2f228 100644 --- a/tests/sys/fs/fusefs/utils.cc +++ b/tests/sys/fs/fusefs/utils.cc @@ -59,13 +59,6 @@ using namespace testing; */ const uint32_t libfuse_max_write = 32 * getpagesize() + 0x1000 - 4096; -/* - * Set the default max_write to a distinct value from MAXPHYS to catch bugs - * that confuse the two. - */ -const uint32_t default_max_write = MIN(libfuse_max_write, MAXPHYS / 2); - - /* Check that fusefs(4) is accessible and the current user can mount(2) */ void check_environment() { @@ -156,6 +149,12 @@ void FuseTest::SetUp() { ASSERT_EQ(0, sysctlbyname(maxphys_node, &val, &size, NULL, 0)) << strerror(errno); m_maxphys = val; + /* + * Set the default max_write to a distinct value from MAXPHYS to catch + * bugs that confuse the two. + */ + if (m_maxwrite == 0) + m_maxwrite = MIN(libfuse_max_write, (uint32_t)m_maxphys / 2); try { m_mock = new MockFS(m_maxreadahead, m_allow_other, diff --git a/tests/sys/fs/fusefs/utils.hh b/tests/sys/fs/fusefs/utils.hh index 7ec80258ee4e..5d5c5290a60d 100644 --- a/tests/sys/fs/fusefs/utils.hh +++ b/tests/sys/fs/fusefs/utils.hh @@ -55,7 +55,6 @@ const char *cache_mode_to_s(enum cache_mode cm); bool is_unsafe_aio_enabled(void); extern const uint32_t libfuse_max_write; -extern const uint32_t default_max_write; class FuseTest : public ::testing::Test { protected: uint32_t m_maxreadahead; @@ -80,7 +79,7 @@ class FuseTest : public ::testing::Test { FuseTest(): m_maxreadahead(0), - m_maxwrite(default_max_write), + m_maxwrite(0), m_init_flags(0), m_allow_other(false), m_default_permissions(false), diff --git a/tests/sys/fs/fusefs/write.cc b/tests/sys/fs/fusefs/write.cc index e9bf17c5c4d6..78d82805470f 100644 --- a/tests/sys/fs/fusefs/write.cc +++ b/tests/sys/fs/fusefs/write.cc @@ -166,6 +166,7 @@ class WriteBackAsync: public WriteBack { public: virtual void SetUp() { m_async = true; + m_maxwrite = 65536; WriteBack::SetUp(); } }; @@ -194,6 +195,19 @@ virtual void SetUp() { } }; +/* Tests relating to the server's max_write property */ +class WriteMaxWrite: public Write { +public: +virtual void SetUp() { + /* + * For this test, m_maxwrite must be less than either m_maxbcachebuf or + * maxphys. + */ + m_maxwrite = 32768; + Write::SetUp(); +} +}; + void sigxfsz_handler(int __unused sig) { Write::s_sigxfsz = 1; } @@ -643,7 +657,7 @@ TEST_F(Write, write) } /* fuse(4) should not issue writes of greater size than the daemon requests */ -TEST_F(Write, write_large) +TEST_F(WriteMaxWrite, write) { const char FULLPATH[] = "mountpoint/some_file.txt"; const char RELPATH[] = "some_file.txt"; @@ -653,6 +667,8 @@ TEST_F(Write, write_large) ssize_t halfbufsize, bufsize; halfbufsize = m_mock->m_maxwrite; + if (halfbufsize >= m_maxbcachebuf || halfbufsize >= m_maxphys) + GTEST_SKIP() << "Must lower m_maxwrite for this test"; bufsize = halfbufsize * 2; contents = (int*)malloc(bufsize); ASSERT_NE(nullptr, contents); From owner-dev-commits-src-all@freebsd.org Mon Dec 28 19:03:48 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A39FF4BE294; Mon, 28 Dec 2020 19:03:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4Rm44ClGz4ZtV; Mon, 28 Dec 2020 19:03:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83B131E910; Mon, 28 Dec 2020 19:03:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSJ3mB8019258; Mon, 28 Dec 2020 19:03:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSJ3mb9019257; Mon, 28 Dec 2020 19:03:48 GMT (envelope-from git) Date: Mon, 28 Dec 2020 19:03:48 GMT Message-Id: <202012281903.0BSJ3mb9019257@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 58b2ed467245 - main - eventfd.2: Add the mail address of the submitter into copyright. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 58b2ed467245d64adc68eb9d4e8b16b087b08d16 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 19:03:48 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=58b2ed467245d64adc68eb9d4e8b16b087b08d16 commit 58b2ed467245d64adc68eb9d4e8b16b087b08d16 Author: Konstantin Belousov AuthorDate: 2020-12-28 19:01:26 +0000 Commit: Konstantin Belousov CommitDate: 2020-12-28 19:03:16 +0000 eventfd.2: Add the mail address of the submitter into copyright. Requested by: rgrimes MFC after: 13 days --- lib/libc/sys/eventfd.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/sys/eventfd.2 b/lib/libc/sys/eventfd.2 index 597c58122033..ae9e44efc853 100644 --- a/lib/libc/sys/eventfd.2 +++ b/lib/libc/sys/eventfd.2 @@ -1,6 +1,6 @@ .\" SPDX-License-Identifier: BSD-2-Clause .\" -.\" Copyright (c) 2020 Greg V +.\" Copyright (c) 2020 Greg V .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions From owner-dev-commits-src-all@freebsd.org Mon Dec 28 19:05:43 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D439F4BE405; Mon, 28 Dec 2020 19:05:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4RpH5jdXz4b4v; Mon, 28 Dec 2020 19:05:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B69B51EB38; Mon, 28 Dec 2020 19:05:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSJ5hBp019451; Mon, 28 Dec 2020 19:05:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSJ5hj9019450; Mon, 28 Dec 2020 19:05:43 GMT (envelope-from git) Date: Mon, 28 Dec 2020 19:05:43 GMT Message-Id: <202012281905.0BSJ5hj9019450@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 4f4111d2c5ab - main - fusefs: delete some dead code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f4111d2c5ab64591b9e15dab4257d8187458fd1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 19:05:43 -0000 The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=4f4111d2c5ab64591b9e15dab4257d8187458fd1 commit 4f4111d2c5ab64591b9e15dab4257d8187458fd1 Author: Alan Somers AuthorDate: 2020-12-24 19:21:00 +0000 Commit: Alan Somers CommitDate: 2020-12-28 19:05:35 +0000 fusefs: delete some dead code The original fusefs GSoC project seems to have envisioned exchanging two types of messages with FUSE servers. Perhaps vectored and non-vectored? But in practice only one type has ever been used. Delete the other type. Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D27770 --- sys/fs/fuse/fuse_device.c | 64 ++++++++++++++++------------------------------- sys/fs/fuse/fuse_ipc.c | 33 ++---------------------- sys/fs/fuse/fuse_ipc.h | 7 ------ 3 files changed, 24 insertions(+), 80 deletions(-) diff --git a/sys/fs/fuse/fuse_device.c b/sys/fs/fuse/fuse_device.c index 1698f962415f..cab5925c91de 100644 --- a/sys/fs/fuse/fuse_device.c +++ b/sys/fs/fuse/fuse_device.c @@ -287,9 +287,8 @@ fuse_device_read(struct cdev *dev, struct uio *uio, int ioflag) int err; struct fuse_data *data; struct fuse_ticket *tick; - void *buf[] = {NULL, NULL, NULL}; - int buflen[3]; - int i; + void *buf; + int buflen; SDT_PROBE2(fusefs, , device, trace, 1, "fuse device read"); @@ -352,46 +351,27 @@ again: SDT_PROBE2(fusefs, , device, trace, 1, "fuse device read message successfully"); - KASSERT(tick->tk_ms_bufdata || tick->tk_ms_bufsize == 0, - ("non-null buf pointer with positive size")); - - switch (tick->tk_ms_type) { - case FT_M_FIOV: - buf[0] = tick->tk_ms_fiov.base; - buflen[0] = tick->tk_ms_fiov.len; - break; - case FT_M_BUF: - buf[0] = tick->tk_ms_fiov.base; - buflen[0] = tick->tk_ms_fiov.len; - buf[1] = tick->tk_ms_bufdata; - buflen[1] = tick->tk_ms_bufsize; - break; - default: - panic("unknown message type for fuse_ticket %p", tick); - } + buf = tick->tk_ms_fiov.base; + buflen = tick->tk_ms_fiov.len; - for (i = 0; buf[i]; i++) { - /* - * Why not ban mercilessly stupid daemons who can't keep up - * with us? (There is no much use of a partial read here...) - */ - /* - * XXX note that in such cases Linux FUSE throws EIO at the - * syscall invoker and stands back to the message queue. The - * rationale should be made clear (and possibly adopt that - * behaviour). Keeping the current scheme at least makes - * fallacy as loud as possible... - */ - if (uio->uio_resid < buflen[i]) { - fdata_set_dead(data); - SDT_PROBE2(fusefs, , device, trace, 2, - "daemon is stupid, kick it off..."); - err = ENODEV; - break; - } - err = uiomove(buf[i], buflen[i], uio); - if (err) - break; + /* + * Why not ban mercilessly stupid daemons who can't keep up + * with us? (There is no much use of a partial read here...) + */ + /* + * XXX note that in such cases Linux FUSE throws EIO at the + * syscall invoker and stands back to the message queue. The + * rationale should be made clear (and possibly adopt that + * behaviour). Keeping the current scheme at least makes + * fallacy as loud as possible... + */ + if (uio->uio_resid < buflen) { + fdata_set_dead(data); + SDT_PROBE2(fusefs, , device, trace, 2, + "daemon is stupid, kick it off..."); + err = ENODEV; + } else { + err = uiomove(buf, buflen, uio); } FUSE_ASSERT_MS_DONE(tick); diff --git a/sys/fs/fuse/fuse_ipc.c b/sys/fs/fuse/fuse_ipc.c index 8d82cc492b4c..776a4ecd11d7 100644 --- a/sys/fs/fuse/fuse_ipc.c +++ b/sys/fs/fuse/fuse_ipc.c @@ -356,11 +356,9 @@ fticket_init(void *mem, int size, int flags) bzero(ftick, sizeof(struct fuse_ticket)); fiov_init(&ftick->tk_ms_fiov, sizeof(struct fuse_in_header)); - ftick->tk_ms_type = FT_M_FIOV; mtx_init(&ftick->tk_aw_mtx, "fuse answer delivery mutex", NULL, MTX_DEF); fiov_init(&ftick->tk_aw_fiov, 0); - ftick->tk_aw_type = FT_A_FIOV; return 0; } @@ -395,18 +393,11 @@ fticket_refresh(struct fuse_ticket *ftick) FUSE_ASSERT_AW_DONE(ftick); fiov_refresh(&ftick->tk_ms_fiov); - ftick->tk_ms_bufdata = NULL; - ftick->tk_ms_bufsize = 0; - ftick->tk_ms_type = FT_M_FIOV; bzero(&ftick->tk_aw_ohead, sizeof(struct fuse_out_header)); fiov_refresh(&ftick->tk_aw_fiov); ftick->tk_aw_errno = 0; - ftick->tk_aw_bufdata = NULL; - ftick->tk_aw_bufsize = 0; - ftick->tk_aw_type = FT_A_FIOV; - ftick->tk_flag = 0; } @@ -417,17 +408,9 @@ fticket_reset(struct fuse_ticket *ftick) FUSE_ASSERT_MS_DONE(ftick); FUSE_ASSERT_AW_DONE(ftick); - ftick->tk_ms_bufdata = NULL; - ftick->tk_ms_bufsize = 0; - ftick->tk_ms_type = FT_M_FIOV; - bzero(&ftick->tk_aw_ohead, sizeof(struct fuse_out_header)); ftick->tk_aw_errno = 0; - ftick->tk_aw_bufdata = NULL; - ftick->tk_aw_bufsize = 0; - ftick->tk_aw_type = FT_A_FIOV; - ftick->tk_flag = 0; } @@ -546,20 +529,8 @@ fticket_aw_pull_uio(struct fuse_ticket *ftick, struct uio *uio) size_t len = uio_resid(uio); if (len) { - switch (ftick->tk_aw_type) { - case FT_A_FIOV: - fiov_adjust(fticket_resp(ftick), len); - err = uiomove(fticket_resp(ftick)->base, len, uio); - break; - - case FT_A_BUF: - ftick->tk_aw_bufsize = len; - err = uiomove(ftick->tk_aw_bufdata, len, uio); - break; - - default: - panic("FUSE: unknown answer type for ticket %p", ftick); - } + fiov_adjust(fticket_resp(ftick), len); + err = uiomove(fticket_resp(ftick)->base, len, uio); } return err; } diff --git a/sys/fs/fuse/fuse_ipc.h b/sys/fs/fuse/fuse_ipc.h index 980a52052218..c8a665abded7 100644 --- a/sys/fs/fuse/fuse_ipc.h +++ b/sys/fs/fuse/fuse_ipc.h @@ -123,17 +123,10 @@ struct fuse_ticket { /* fields for initiating an upgoing message */ struct fuse_iov tk_ms_fiov; - void *tk_ms_bufdata; - size_t tk_ms_bufsize; - enum { FT_M_FIOV, FT_M_BUF } tk_ms_type; STAILQ_ENTRY(fuse_ticket) tk_ms_link; /* fields for handling answers coming from userspace */ struct fuse_iov tk_aw_fiov; - void *tk_aw_bufdata; - size_t tk_aw_bufsize; - enum { FT_A_FIOV, FT_A_BUF } tk_aw_type; - struct fuse_out_header tk_aw_ohead; int tk_aw_errno; struct mtx tk_aw_mtx; From owner-dev-commits-src-all@freebsd.org Mon Dec 28 21:39:33 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A778E4C223E; Mon, 28 Dec 2020 21:39:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4WCn4DdVz4m8V; Mon, 28 Dec 2020 21:39:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8438E2080C; Mon, 28 Dec 2020 21:39:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSLdXlI083087; Mon, 28 Dec 2020 21:39:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSLdXRR083086; Mon, 28 Dec 2020 21:39:33 GMT (envelope-from git) Date: Mon, 28 Dec 2020 21:39:33 GMT Message-Id: <202012282139.0BSLdXRR083086@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 0c09f4b0cc63 - main - cache: work around corner case of dvp == tvp in cache_fplookup_final_modifying MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c09f4b0cc633750a3cbf724e8590ed9d4ef92e1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 21:39:33 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0c09f4b0cc633750a3cbf724e8590ed9d4ef92e1 commit 0c09f4b0cc633750a3cbf724e8590ed9d4ef92e1 Author: Mateusz Guzik AuthorDate: 2020-12-28 21:24:53 +0000 Commit: Mateusz Guzik CommitDate: 2020-12-28 21:38:20 +0000 cache: work around corner case of dvp == tvp in cache_fplookup_final_modifying Fixes a panic where the kernel would unlock an unheld lock coming from rename looking up "foo/." as the source. Reported by: markj (syzkaller) --- sys/kern/vfs_cache.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 4513e4dc970f..94d622867425 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4063,6 +4063,19 @@ cache_fplookup_final_modifying(struct cache_fpl *fpl) return (cache_fpl_handled(fpl, 0)); } + /* + * There are very hairy corner cases concerning various flag combinations + * and locking state. In particular here we only hold one lock instead of + * two. + * + * Skip the complexity as it is of no significance for normal workloads. + */ + if (__predict_false(tvp == dvp)) { + vput(dvp); + vrele(tvp); + return (cache_fpl_aborted(fpl)); + } + /* * Check if the target is either a symlink or a mount point. * Since we expect this to be the terminal vnode it should From owner-dev-commits-src-all@freebsd.org Mon Dec 28 21:57:14 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9AFDE4C2C9E; Mon, 28 Dec 2020 21:57:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4WcB3rYsz4n6w; Mon, 28 Dec 2020 21:57:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 72A632084D; Mon, 28 Dec 2020 21:57:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSLvE59005347; Mon, 28 Dec 2020 21:57:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSLvElX005346; Mon, 28 Dec 2020 21:57:14 GMT (envelope-from git) Date: Mon, 28 Dec 2020 21:57:14 GMT Message-Id: <202012282157.0BSLvElX005346@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Guangyuan Yang Subject: git: 70a2e109bd48 - main - dump(8): clarify the recommended use of cache and snapshots MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ygy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 70a2e109bd486f97e6fa5f969be9d90e404de016 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 21:57:14 -0000 The branch main has been updated by ygy (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=70a2e109bd486f97e6fa5f969be9d90e404de016 commit 70a2e109bd486f97e6fa5f969be9d90e404de016 Author: Guangyuan Yang AuthorDate: 2020-12-28 21:54:36 +0000 Commit: Guangyuan Yang CommitDate: 2020-12-28 21:56:58 +0000 dump(8): clarify the recommended use of cache and snapshots PR: 131626 MFC after: 1 week Submitted by: Andrew Hamilton-Wright Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D27775 --- sbin/dump/dump.8 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sbin/dump/dump.8 b/sbin/dump/dump.8 index 56aea04551f8..80e8eae21d19 100644 --- a/sbin/dump/dump.8 +++ b/sbin/dump/dump.8 @@ -29,7 +29,7 @@ .\" @(#)dump.8 8.3 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd June 13, 2019 +.Dd December 28, 2020 .Dt DUMP 8 .Os .Sh NAME @@ -134,9 +134,11 @@ Specify the cache size in megabytes. This will greatly improve performance at the cost of .Nm -possibly not noticing changes in the file system between passes. -It is -recommended that you always use this option when dumping a snapshot. +possibly not noticing changes in the file system between passes +unless a snapshot is being used. +The potential for performance improvement indicates that +use of this option together with snapshots is the recommended +course of action. Beware that .Nm forks, and the actual memory use may be larger than the specified cache From owner-dev-commits-src-all@freebsd.org Mon Dec 28 22:04:24 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E1E884C2EB5; Mon, 28 Dec 2020 22:04:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4WmS5xWtz4nnd; Mon, 28 Dec 2020 22:04:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE15F20F04; Mon, 28 Dec 2020 22:04:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSM4OdF016095; Mon, 28 Dec 2020 22:04:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSM4Orv016094; Mon, 28 Dec 2020 22:04:24 GMT (envelope-from git) Date: Mon, 28 Dec 2020 22:04:24 GMT Message-Id: <202012282204.0BSM4Orv016094@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 629c4aeacefe - main - kern.mk: drop flag only patched in-tree gcc understood MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 629c4aeacefeecdd8ea36de52cc035e6fb0fd615 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 22:04:24 -0000 The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=629c4aeacefeecdd8ea36de52cc035e6fb0fd615 commit 629c4aeacefeecdd8ea36de52cc035e6fb0fd615 Author: Ryan Libby AuthorDate: 2020-12-28 22:03:36 +0000 Commit: Ryan Libby CommitDate: 2020-12-28 22:03:36 +0000 kern.mk: drop flag only patched in-tree gcc understood -mno-align-long-strings was a flag maintained by FreeBSD for the now-deleted in-tree gcc. Upstream gcc has no such flag, so just drop it. The flag was originally submitted by bde and committed in 2002 (svn r97911 & r104455). However, upstream gcc did address this same issue in 2004 (gcc svn r76694 / git 4137ba7ab7a), reducing long string alignment in general, and to 1 with -Os. Reviewed by: kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27768 --- sys/conf/kern.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index a162c018d9cf..e897249c32e6 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -104,7 +104,7 @@ FORMAT_EXTENSIONS= -fformat-extensions # Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42 # .if ${MACHINE_CPUARCH} == "i386" -CFLAGS.gcc+= -mno-align-long-strings -mpreferred-stack-boundary=2 +CFLAGS.gcc+= -mpreferred-stack-boundary=2 CFLAGS.clang+= -mno-aes -mno-avx CFLAGS+= -mno-mmx -mno-sse -msoft-float INLINE_LIMIT?= 8000 From owner-dev-commits-src-all@freebsd.org Tue Dec 29 00:37:18 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E4F3E4C6804; Tue, 29 Dec 2020 00:37:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4b8t69cQz4wCP; Tue, 29 Dec 2020 00:37:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6CAB22AB4; Tue, 29 Dec 2020 00:37:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BT0bIAO080303; Tue, 29 Dec 2020 00:37:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BT0bIqW080302; Tue, 29 Dec 2020 00:37:18 GMT (envelope-from git) Date: Tue, 29 Dec 2020 00:37:18 GMT Message-Id: <202012290037.0BT0bIqW080302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: ead01bfe8618 - main - Move cp(4) module enable to SOURCELESS_HOST MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ead01bfe8618e879b3b23c6cf9f026eadcc7d2b3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 00:37:19 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ead01bfe8618e879b3b23c6cf9f026eadcc7d2b3 commit ead01bfe8618e879b3b23c6cf9f026eadcc7d2b3 Author: Ed Maste AuthorDate: 2020-12-29 00:36:13 +0000 Commit: Ed Maste CommitDate: 2020-12-29 00:36:51 +0000 Move cp(4) module enable to SOURCELESS_HOST cp contains obfuscated code that runs on the host's processor --- sys/modules/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/modules/Makefile b/sys/modules/Makefile index e26e074e09d7..2a294aa68462 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -757,7 +757,7 @@ _3dfx_linux= 3dfx_linux .if ${MK_SOURCELESS_HOST} != "no" _ce= ce .endif -.if ${MK_SOURCELESS_UCODE} != "no" +.if ${MK_SOURCELESS_HOST} != "no" _cp= cp .endif _glxiic= glxiic From owner-dev-commits-src-all@freebsd.org Tue Dec 29 04:11:31 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A8FA34CF64A; Tue, 29 Dec 2020 04:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4gw34PyVz3DF2; Tue, 29 Dec 2020 04:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A278255C5; Tue, 29 Dec 2020 04:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BT4BVGT021202; Tue, 29 Dec 2020 04:11:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BT4BVlw021201; Tue, 29 Dec 2020 04:11:31 GMT (envelope-from git) Date: Tue, 29 Dec 2020 04:11:31 GMT Message-Id: <202012290411.0BT4BVlw021201@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Lo Subject: git: e9556246be68 - main - Revert "uefi.8: mention boot1.efi" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevlo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e9556246be68c5fb9b805b6451366a700fd409bf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 04:11:31 -0000 The branch main has been updated by kevlo: URL: https://cgit.FreeBSD.org/src/commit/?id=e9556246be68c5fb9b805b6451366a700fd409bf commit e9556246be68c5fb9b805b6451366a700fd409bf Author: Kevin Lo AuthorDate: 2020-12-29 04:08:19 +0000 Commit: Kevin Lo CommitDate: 2020-12-29 04:08:19 +0000 Revert "uefi.8: mention boot1.efi" This reverts commit a8ec81e79871de98e30ce572a313f3f8d059ce7b Revert D27782. imp@ pointed out that bsdinstall has been updated, and gpart bootcode isn't used with EFI. --- share/man/man8/uefi.8 | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/share/man/man8/uefi.8 b/share/man/man8/uefi.8 index 9214dec8e20d..4224af835738 100644 --- a/share/man/man8/uefi.8 +++ b/share/man/man8/uefi.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 28, 2020 +.Dd May 9, 2020 .Dt UEFI 8 .Os .Sh NAME @@ -118,15 +118,6 @@ system console is automatically selected when booting via .Bl -tag -width /boot/loader -compact .Nm bootstrap -.It Pa /boot/boot1.efi -.Xr msdosfs 5 -FAT file system image -used by -.Xr bsdinstall 8 -and the -.Ar bootcode -argument of -.Xr gpart 8 . .It Pa /boot/loader.efi Final stage bootstrap .It Pa /boot/kernel/kernel From owner-dev-commits-src-all@freebsd.org Tue Dec 29 14:06:26 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1422E4C02F5; Tue, 29 Dec 2020 14:06:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4x6V03RLz4c7b; Tue, 29 Dec 2020 14:06:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E890B51A7; Tue, 29 Dec 2020 14:06:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTE6PuT069604; Tue, 29 Dec 2020 14:06:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTE6Px0069603; Tue, 29 Dec 2020 14:06:25 GMT (envelope-from git) Date: Tue, 29 Dec 2020 14:06:25 GMT Message-Id: <202012291406.0BTE6Px0069603@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 4ddb3cc5973b - main - devfs(4): defer freeing until we drop devmtx ("cdev") MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ddb3cc5973b94b0502e1683accac87998235857 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 14:06:26 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=4ddb3cc5973b94b0502e1683accac87998235857 commit 4ddb3cc5973b94b0502e1683accac87998235857 Author: Edward Tomasz Napierala AuthorDate: 2020-12-29 13:45:53 +0000 Commit: Edward Tomasz Napierala CommitDate: 2020-12-29 13:47:36 +0000 devfs(4): defer freeing until we drop devmtx ("cdev") Before r332974 the old code would sometimes cause a rare lock order reversal against pagequeue, which looked roughly like this: witness_checkorder() __mtx_lock-flags() vm_page_alloc() uma_small_alloc() keg_alloc_slab() keg_fetch-slab() zone_fetch-slab() zone_import() zone_alloc_bucket() uma_zalloc_arg() bucket_alloc() uma_zfree_arg() free() devfs_metoo() devfs_populate_loop() devfs_populate() devfs_rioctl() VOP_IOCTL_APV() VOP_IOCTL() vn_ioctl() fo_ioctl() kern_ioctl() sys_ioctl() Since r332974 the original problem no longer exists, but it still makes sense to move things out of the - often congested - lock. Reviewed By: kib, markj Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27334 --- sys/fs/devfs/devfs_devs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c index cb2db0c1b8b5..19619d94ba1c 100644 --- a/sys/fs/devfs/devfs_devs.c +++ b/sys/fs/devfs/devfs_devs.c @@ -482,7 +482,7 @@ devfs_purge(struct devfs_mount *dm, struct devfs_dirent *dd) static void devfs_metoo(struct cdev_priv *cdp, struct devfs_mount *dm) { - struct devfs_dirent **dep; + struct devfs_dirent **dep, **olddep; int siz; siz = (dm->dm_idx + 1) * sizeof *dep; @@ -495,8 +495,7 @@ devfs_metoo(struct cdev_priv *cdp, struct devfs_mount *dm) return; } memcpy(dep, cdp->cdp_dirents, (cdp->cdp_maxdirent + 1) * sizeof *dep); - if (cdp->cdp_maxdirent > 0) - free(cdp->cdp_dirents, M_DEVFS2); + olddep = cdp->cdp_maxdirent > 0 ? cdp->cdp_dirents : NULL; cdp->cdp_dirents = dep; /* * XXX: if malloc told us how much we actually got this could @@ -504,6 +503,7 @@ devfs_metoo(struct cdev_priv *cdp, struct devfs_mount *dm) */ cdp->cdp_maxdirent = dm->dm_idx; dev_unlock(); + free(olddep, M_DEVFS2); } /* From owner-dev-commits-src-all@freebsd.org Tue Dec 29 14:28:37 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3E7F84C0B4A; Tue, 29 Dec 2020 14:28:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4xc51Kx3z4d0B; Tue, 29 Dec 2020 14:28:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 20CAE57D4; Tue, 29 Dec 2020 14:28:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTESb4E091225; Tue, 29 Dec 2020 14:28:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTESbJR091224; Tue, 29 Dec 2020 14:28:37 GMT (envelope-from git) Date: Tue, 29 Dec 2020 14:28:37 GMT Message-Id: <202012291428.0BTESbJR091224@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 3e404b8c53db - main - libcam(3): make cam_getccb(3) zero the whole ccb, not just the header MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3e404b8c53db56bdb0aca6a491b095266326211c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 14:28:37 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=3e404b8c53db56bdb0aca6a491b095266326211c commit 3e404b8c53db56bdb0aca6a491b095266326211c Author: Edward Tomasz Napierala AuthorDate: 2020-12-29 14:25:46 +0000 Commit: Edward Tomasz Napierala CommitDate: 2020-12-29 14:26:06 +0000 libcam(3): make cam_getccb(3) zero the whole ccb, not just the header Leaving zeroing to the clients leads to error-prone pointer tricks (zeroing needs to preserve the CCB header), and this code is not performance-critical, so there's really no reason to not do it. Reviewed By: imp, rpokala (manpages) Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27333 --- lib/libcam/cam.3 | 6 +++--- lib/libcam/camlib.c | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/libcam/cam.3 b/lib/libcam/cam.3 index a13b580f847e..5e8eb61698c4 100644 --- a/lib/libcam/cam.3 +++ b/lib/libcam/cam.3 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 6, 2020 +.Dd November 23, 2020 .Dt CAM 3 .Os .Sh NAME @@ -285,9 +285,9 @@ This function should be called when the structure was allocated by the caller, rather than the CAM library. .Pp .Fn cam_getccb -allocates a CCB +allocates a prezeroed CCB using -.Xr malloc 3 +.Xr calloc 3 and sets fields in the CCB header using values from the .Va cam_device structure. diff --git a/lib/libcam/camlib.c b/lib/libcam/camlib.c index 40242958bfaf..438b0e502fe0 100644 --- a/lib/libcam/camlib.c +++ b/lib/libcam/camlib.c @@ -79,9 +79,8 @@ cam_getccb(struct cam_device *dev) { union ccb *ccb; - ccb = (union ccb *)malloc(sizeof(union ccb)); + ccb = calloc(1, sizeof(*ccb)); if (ccb != NULL) { - bzero(&ccb->ccb_h, sizeof(struct ccb_hdr)); ccb->ccb_h.path_id = dev->path_id; ccb->ccb_h.target_id = dev->target_id; ccb->ccb_h.target_lun = dev->target_lun; From owner-dev-commits-src-all@freebsd.org Tue Dec 29 14:36:17 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7AE754C111F; Tue, 29 Dec 2020 14:36:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4xmx36PGz4dWb; Tue, 29 Dec 2020 14:36:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5DC015A06; Tue, 29 Dec 2020 14:36:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTEaHrA002146; Tue, 29 Dec 2020 14:36:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTEaHU8002145; Tue, 29 Dec 2020 14:36:17 GMT (envelope-from git) Date: Tue, 29 Dec 2020 14:36:17 GMT Message-Id: <202012291436.0BTEaHU8002145@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 123019739c90 - main - geom(4): make g_newprovider_event() return if G_P_WITHER is set MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 123019739c905a0d3b3c8b47ab62817f5938b684 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 14:36:17 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=123019739c905a0d3b3c8b47ab62817f5938b684 commit 123019739c905a0d3b3c8b47ab62817f5938b684 Author: Edward Tomasz Napierala AuthorDate: 2020-12-29 14:29:54 +0000 Commit: Edward Tomasz Napierala CommitDate: 2020-12-29 14:29:59 +0000 geom(4): make g_newprovider_event() return if G_P_WITHER is set This fixes a failed assertion in scenario where the provider disappears, disk_gone() gets called, and at the exact same time something else closes the device node triggering a retaste. Reviewed By: mav Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27330 --- sys/geom/geom_subr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c index c46eebf9e329..2f7ea7754f7b 100644 --- a/sys/geom/geom_subr.c +++ b/sys/geom/geom_subr.c @@ -575,8 +575,8 @@ g_new_provider_event(void *arg, int flag) return; pp = arg; G_VALID_PROVIDER(pp); - KASSERT(!(pp->flags & G_PF_WITHER), - ("g_new_provider_event but withered")); + if ((pp->flags & G_PF_WITHER) != 0) + return; LIST_FOREACH_SAFE(cp, &pp->consumers, consumers, next_cp) { if ((cp->flags & G_CF_ORPHAN) == 0 && cp->geom->attrchanged != NULL) From owner-dev-commits-src-all@freebsd.org Tue Dec 29 14:41:01 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6FDA44C1164; Tue, 29 Dec 2020 14:41:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4xtP2p8cz4fC2; Tue, 29 Dec 2020 14:41:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 485D158B3; Tue, 29 Dec 2020 14:41:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTEf1RC009765; Tue, 29 Dec 2020 14:41:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTEf1X9009764; Tue, 29 Dec 2020 14:41:01 GMT (envelope-from git) Date: Tue, 29 Dec 2020 14:41:01 GMT Message-Id: <202012291441.0BTEf1X9009764@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Glen Barber Subject: git: 70e64ba44941 - main - release.sh: Update GITROOT URL MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 70e64ba4494190e64ab8faa04d744182d420c275 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 14:41:01 -0000 The branch main has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=70e64ba4494190e64ab8faa04d744182d420c275 commit 70e64ba4494190e64ab8faa04d744182d420c275 Author: Glen Barber AuthorDate: 2020-12-29 14:34:05 +0000 Commit: Glen Barber CommitDate: 2020-12-29 14:40:28 +0000 release.sh: Update GITROOT URL Hard-code the GITROOT for the ports tree to use cgit-beta until the ports repository is converted. While here, remove $FreeBSD$ RCS IDs. Sponsored by: Rubicon Communications, LLC (netgate.com) --- release/release.conf.sample | 4 +--- release/release.sh | 7 +++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/release/release.conf.sample b/release/release.conf.sample index 615953adb111..bb9c8acb1b87 100644 --- a/release/release.conf.sample +++ b/release/release.conf.sample @@ -1,7 +1,5 @@ #!/bin/sh # -# $FreeBSD$ -# ## Redefine environment variables here to override prototypes ## defined in release.sh. @@ -15,7 +13,7 @@ CHROOTDIR="/scratch" ## Do not explicitly require the devel/git port to be installed. #NOGIT=1 ## Set the version control system host. -GITROOT="https://cgit-beta.freebsd.org/" +GITROOT="https://git.freebsd.org/" GITSRC="src.git" GITPORTS="ports.git" GITDOC="doc.git" diff --git a/release/release.sh b/release/release.sh index 2ed76fa31c61..0975bdfed6b3 100755 --- a/release/release.sh +++ b/release/release.sh @@ -34,8 +34,6 @@ # totally clean, fresh trees. # Based on release/generate-release.sh written by Nathan Whitehorn # -# $FreeBSD$ -# export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin" @@ -75,7 +73,7 @@ env_setup() { # The default git checkout server, and branches for src/, doc/, # and ports/. - GITROOT="https://cgit-beta.FreeBSD.org/" + GITROOT="https://git.FreeBSD.org/" SRCBRANCH="main" DOCBRANCH="main" PORTBRANCH="main" @@ -137,7 +135,8 @@ env_check() { # Prefix the branches with the GITROOT for the full checkout URL. SRC="${GITROOT}${GITSRC}" DOC="${GITROOT}${GITDOC}" - PORT="${GITROOT}${GITPORTS}" + #PORT="${GITROOT}${GITPORTS}" + PORT="https://cgit-beta.freebsd.org/ports.git" if [ -n "${EMBEDDEDBUILD}" ]; then WITH_DVD= From owner-dev-commits-src-all@freebsd.org Tue Dec 29 14:52:31 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0F55C4C1A3C; Tue, 29 Dec 2020 14:52:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4y7f6qD5z4fby; Tue, 29 Dec 2020 14:52:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DCF6356F3; Tue, 29 Dec 2020 14:52:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTEqUlX024508; Tue, 29 Dec 2020 14:52:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTEqUpX024507; Tue, 29 Dec 2020 14:52:30 GMT (envelope-from git) Date: Tue, 29 Dec 2020 14:52:30 GMT Message-Id: <202012291452.0BTEqUpX024507@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 7db3d97e0ffd - main - iscsid(8): free data allocated by getaddrinfo(3) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7db3d97e0ffd59985b68b30faa012d40da99faa4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 14:52:31 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=7db3d97e0ffd59985b68b30faa012d40da99faa4 commit 7db3d97e0ffd59985b68b30faa012d40da99faa4 Author: Edward Tomasz Napierala AuthorDate: 2020-12-29 14:47:35 +0000 Commit: Edward Tomasz Napierala CommitDate: 2020-12-29 14:52:23 +0000 iscsid(8): free data allocated by getaddrinfo(3) Reviewed By: mav Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27329 --- usr.sbin/iscsid/iscsid.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/usr.sbin/iscsid/iscsid.c b/usr.sbin/iscsid/iscsid.c index 7c8e556510ab..a9c68825fb0a 100644 --- a/usr.sbin/iscsid/iscsid.c +++ b/usr.sbin/iscsid/iscsid.c @@ -253,6 +253,10 @@ connection_new(int iscsi_fd, const struct iscsi_daemon_request *request) "using ICL kernel proxy: ISCSIDCONNECT", to_addr); } + if (from_ai != NULL) + freeaddrinfo(from_ai); + freeaddrinfo(to_ai); + return (conn); } #endif /* ICL_KERNEL_PROXY */ @@ -330,6 +334,10 @@ connection_new(int iscsi_fd, const struct iscsi_daemon_request *request) log_err(1, "failed to connect to %s", to_addr); } + if (from_ai != NULL) + freeaddrinfo(from_ai); + freeaddrinfo(to_ai); + return (conn); } From owner-dev-commits-src-all@freebsd.org Tue Dec 29 14:54:34 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DFBB24C1A97; Tue, 29 Dec 2020 14:54:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4yB260Zwz4fx1; Tue, 29 Dec 2020 14:54:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C0D215CA9; Tue, 29 Dec 2020 14:54:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTEsYxe024663; Tue, 29 Dec 2020 14:54:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTEsYnt024662; Tue, 29 Dec 2020 14:54:34 GMT (envelope-from git) Date: Tue, 29 Dec 2020 14:54:34 GMT Message-Id: <202012291454.0BTEsYnt024662@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: a7972b49044f - main - iscsid(8): fix memory leak by freeing the 'addr' MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7972b49044f58665fbd7e2aee0516a3cf0aa1ce Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 14:54:34 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=a7972b49044f58665fbd7e2aee0516a3cf0aa1ce commit a7972b49044f58665fbd7e2aee0516a3cf0aa1ce Author: Edward Tomasz Napierala AuthorDate: 2020-12-29 14:53:03 +0000 Commit: Edward Tomasz Napierala CommitDate: 2020-12-29 14:53:06 +0000 iscsid(8): fix memory leak by freeing the 'addr' Reviewed By: mav Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27328 --- usr.sbin/iscsid/iscsid.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/iscsid/iscsid.c b/usr.sbin/iscsid/iscsid.c index a9c68825fb0a..797a7561f79c 100644 --- a/usr.sbin/iscsid/iscsid.c +++ b/usr.sbin/iscsid/iscsid.c @@ -150,6 +150,8 @@ resolve_addr(const struct connection *conn, const char *address, log_errx(1, "getaddrinfo for %s failed: %s", address, gai_strerror(error)); } + + free(addr); } static struct connection * From owner-dev-commits-src-all@freebsd.org Tue Dec 29 15:00:57 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E49B34C1D11; Tue, 29 Dec 2020 15:00:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4yKP6BtRz4gNg; Tue, 29 Dec 2020 15:00:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C55655CB6; Tue, 29 Dec 2020 15:00:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTF0v08034595; Tue, 29 Dec 2020 15:00:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTF0vGw034594; Tue, 29 Dec 2020 15:00:57 GMT (envelope-from git) Date: Tue, 29 Dec 2020 15:00:57 GMT Message-Id: <202012291500.0BTF0vGw034594@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 89e3d5671ba1 - main - bsnmpclient(3): make it thread-safe MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89e3d5671ba13dceca272d5b159c9bd805f3f504 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 15:00:58 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=89e3d5671ba13dceca272d5b159c9bd805f3f504 commit 89e3d5671ba13dceca272d5b159c9bd805f3f504 Author: Edward Tomasz Napierala AuthorDate: 2020-12-29 14:59:31 +0000 Commit: Edward Tomasz Napierala CommitDate: 2020-12-29 14:59:37 +0000 bsnmpclient(3): make it thread-safe Reviewed By: harti Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27336 --- contrib/bsnmp/lib/asn1.c | 2 +- contrib/bsnmp/lib/snmpclient.c | 4 ++-- contrib/bsnmp/lib/snmpclient.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/bsnmp/lib/asn1.c b/contrib/bsnmp/lib/asn1.c index f1f9267c0226..a03dac70c529 100644 --- a/contrib/bsnmp/lib/asn1.c +++ b/contrib/bsnmp/lib/asn1.c @@ -1019,7 +1019,7 @@ asn_oid2str_r(const struct asn_oid *oid, char *buf) char * asn_oid2str(const struct asn_oid *oid) { - static char str[ASN_OIDSTRLEN]; + __thread static char str[ASN_OIDSTRLEN]; return (asn_oid2str_r(oid, str)); } diff --git a/contrib/bsnmp/lib/snmpclient.c b/contrib/bsnmp/lib/snmpclient.c index c22d8e125a14..e49105918416 100644 --- a/contrib/bsnmp/lib/snmpclient.c +++ b/contrib/bsnmp/lib/snmpclient.c @@ -71,7 +71,7 @@ #define DEBUG_PARSE 0 /* global context */ -struct snmp_client snmp_client; +__thread struct snmp_client snmp_client; /* List of all outstanding requests */ struct sent_pdu { @@ -86,7 +86,7 @@ struct sent_pdu { }; LIST_HEAD(sent_pdu_list, sent_pdu); -static struct sent_pdu_list sent_pdus; +__thread static struct sent_pdu_list sent_pdus; /* * Prototype table entry. All C-structure produced by the table function must diff --git a/contrib/bsnmp/lib/snmpclient.h b/contrib/bsnmp/lib/snmpclient.h index a19bdb2ea653..1bc3780de038 100644 --- a/contrib/bsnmp/lib/snmpclient.h +++ b/contrib/bsnmp/lib/snmpclient.h @@ -114,7 +114,7 @@ struct snmp_client { }; /* the global context */ -extern struct snmp_client snmp_client; +extern __thread struct snmp_client snmp_client; /* initizialies a snmp_client structure */ void snmp_client_init(struct snmp_client *); From owner-dev-commits-src-all@freebsd.org Tue Dec 29 15:11:59 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 823DB4C25CC for ; Tue, 29 Dec 2020 15:11:59 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (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 4D4yZ733Xvz4hng for ; Tue, 29 Dec 2020 15:11:59 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f44.google.com with SMTP id i9so14927119wrc.4 for ; Tue, 29 Dec 2020 07:11:59 -0800 (PST) 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=9lKPZYnTOHd99mALxriWJ2Eh05/ip9YBseH1Gtql1FY=; b=ShDqpsRTbLr9pd0zw4+AepRBRmO+TWb/0dmi6NrHKNsg8pIylE0qA2WLAvRioHfX1C faB/QNgUtyqj3VicMsVxIW2dq98rW5eO5hq91vrMZr6hlCbPSEXRgjDpgS0fk0Axjyvo 0pmECNXavk67Z6c7N7dt0HT+jAV6HfN4woZMdlkS10+Pgru6p68NTmr7EV8YnHkdiQD6 ulLa+Nj7o0QVPwdGdFV/Wxa+hAT7lZBdZup6Pt+1KetyfkebYqosChstLZS7pNvs7Dwf zU4NOHrtzPmggwWOVUSb5LpG1Reh0f3EbqRu/9b4aAaEyNB+lpyEbW2jvC4NpucU7wF+ g/Vw== X-Gm-Message-State: AOAM531UYoh1mharH2rMGyUOQW1U2F2GIZQANupSgu/jiPdEMLxZMo9p xVNf+nwKUzYhle6Vb7jLs/cL9w== X-Google-Smtp-Source: ABdhPJzL2VJfALkQ2021CtQXfldYVA/UgBVKaL8wFDOvKXD8U/mrLIMKwsZ4bJYIWNf1NP4NfIWKmw== X-Received: by 2002:adf:97dd:: with SMTP id t29mr56190809wrb.357.1609254718101; Tue, 29 Dec 2020 07:11:58 -0800 (PST) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id a62sm4184990wmh.40.2020.12.29.07.11.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Dec 2020 07:11:57 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: git: 89e3d5671ba1 - main - bsnmpclient(3): make it thread-safe From: Jessica Clarke In-Reply-To: <202012291500.0BTF0vGw034594@gitrepo.freebsd.org> Date: Tue, 29 Dec 2020 15:11:55 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202012291500.0BTF0vGw034594@gitrepo.freebsd.org> To: Edward Tomasz Napierala X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4D4yZ733Xvz4hng X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 15:11:59 -0000 On 29 Dec 2020, at 15:00, Edward Tomasz Napierala = wrote: > diff --git a/contrib/bsnmp/lib/snmpclient.c = b/contrib/bsnmp/lib/snmpclient.c > index c22d8e125a14..e49105918416 100644 > --- a/contrib/bsnmp/lib/snmpclient.c > +++ b/contrib/bsnmp/lib/snmpclient.c > @@ -71,7 +71,7 @@ > #define DEBUG_PARSE 0 >=20 > /* global context */ > -struct snmp_client snmp_client; > +__thread struct snmp_client snmp_client; That comment is no longer true. > /* List of all outstanding requests */ > struct sent_pdu { > @@ -86,7 +86,7 @@ struct sent_pdu { > }; > LIST_HEAD(sent_pdu_list, sent_pdu); >=20 > -static struct sent_pdu_list sent_pdus; > +__thread static struct sent_pdu_list sent_pdus; >=20 > /* > * Prototype table entry. All C-structure produced by the table = function must > diff --git a/contrib/bsnmp/lib/snmpclient.h = b/contrib/bsnmp/lib/snmpclient.h > index a19bdb2ea653..1bc3780de038 100644 > --- a/contrib/bsnmp/lib/snmpclient.h > +++ b/contrib/bsnmp/lib/snmpclient.h > @@ -114,7 +114,7 @@ struct snmp_client { > }; >=20 > /* the global context */ > -extern struct snmp_client snmp_client; > +extern __thread struct snmp_client snmp_client; Ditto. Is there really a documented requirement for everything to be called from the same thread? I can see consumers of the library that already use proper locking breaking because of this. Jess From owner-dev-commits-src-all@freebsd.org Tue Dec 29 15:37:11 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5050D4C302D; Tue, 29 Dec 2020 15:37:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D4z7C1nN4z4k2V; Tue, 29 Dec 2020 15:37:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3056964C1; Tue, 29 Dec 2020 15:37:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTFbBgU068724; Tue, 29 Dec 2020 15:37:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTFbBKo068723; Tue, 29 Dec 2020 15:37:11 GMT (envelope-from git) Date: Tue, 29 Dec 2020 15:37:11 GMT Message-Id: <202012291537.0BTFbBKo068723@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 3dc739019319 - stable/12 - libi386: remove CLANG_NO_IAS workaround MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 3dc739019319c8dae539affe6294c30caed89321 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 15:37:11 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3dc739019319c8dae539affe6294c30caed89321 commit 3dc739019319c8dae539affe6294c30caed89321 Author: Ed Maste AuthorDate: 2018-10-20 22:35:06 +0000 Commit: Ed Maste CommitDate: 2020-12-29 15:35:40 +0000 libi386: remove CLANG_NO_IAS workaround Clang's Integrated Assembler was previously disabled for i386 with the note that it "doesn't grok .codeNN directives yet." This is no longer the case (and hasn't been for some time), and the assembled output .text is identical between gas and IAS. MFC after: 2 months Sponsored by: The FreeBSD Foundation (cherry picked from commit 188b0da1ce6708f4168309f5b925f1c9df836bc7) --- stand/i386/libi386/Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/stand/i386/libi386/Makefile b/stand/i386/libi386/Makefile index 9e25f7815cf3..58128e962822 100644 --- a/stand/i386/libi386/Makefile +++ b/stand/i386/libi386/Makefile @@ -51,7 +51,3 @@ CFLAGS+= -I${BOOTSRC}/ficl -I${BOOTSRC}/ficl/i386 \ CFLAGS+= ${FORMAT_EXTENSIONS} .include - -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS.amd64_tramp.S= ${CLANG_NO_IAS} -CFLAGS.multiboot_tramp.S= ${CLANG_NO_IAS} From owner-dev-commits-src-all@freebsd.org Tue Dec 29 16:28:59 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 11F0D4C45E3; Tue, 29 Dec 2020 16:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D50Gy6wBJz4mvL; Tue, 29 Dec 2020 16:28:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E002C6E26; Tue, 29 Dec 2020 16:28:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTGSw9N023588; Tue, 29 Dec 2020 16:28:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTGSwSi023587; Tue, 29 Dec 2020 16:28:58 GMT (envelope-from git) Date: Tue, 29 Dec 2020 16:28:58 GMT Message-Id: <202012291628.0BTGSwSi023587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 1d316b008577 - stable/12 - src.conf(5): regenerate after GNU_GREP_COMPAT default change MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 1d316b008577909f7c2d5ebd4408c301f1d75ba9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 16:28:59 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=1d316b008577909f7c2d5ebd4408c301f1d75ba9 commit 1d316b008577909f7c2d5ebd4408c301f1d75ba9 Author: Kyle Evans AuthorDate: 2020-12-29 15:58:21 +0000 Commit: Kyle Evans CommitDate: 2020-12-29 15:58:21 +0000 src.conf(5): regenerate after GNU_GREP_COMPAT default change --- share/man/man5/src.conf.5 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 34df02c632f1..0e36281c78df 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd December 2, 2020 +.Dd December 29, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -827,10 +827,9 @@ and .It Va WITHOUT_GNU_GREP Set to not build GNU .Xr grep 1 . -.It Va WITH_GNU_GREP_COMPAT -Set this option to include GNU extensions in -.Xr bsdgrep 1 -by linking against libgnuregex. +.It Va WITHOUT_GNU_GREP_COMPAT +Set this option to omit the gnu extensions to grep from being included in +BSD grep. .It Va WITHOUT_GOOGLETEST Set to neither build nor install .Lb libgmock , From owner-dev-commits-src-all@freebsd.org Tue Dec 29 16:28:59 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E5CE4C41CB; Tue, 29 Dec 2020 16:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D50Gz0t5mz4msJ; Tue, 29 Dec 2020 16:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E51A6F0E; Tue, 29 Dec 2020 16:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTGSw7j023622; Tue, 29 Dec 2020 16:28:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTGSw7M023621; Tue, 29 Dec 2020 16:28:58 GMT (envelope-from git) Date: Tue, 29 Dec 2020 16:28:58 GMT Message-Id: <202012291628.0BTGSw7M023621@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: cadd3b8fcb41 - stable/12 - bsdgrep: switch to libregex for GNU_GREP_COMPAT MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: cadd3b8fcb416b8474b91f237671b49bc7b834e6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 16:28:59 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=cadd3b8fcb416b8474b91f237671b49bc7b834e6 commit cadd3b8fcb416b8474b91f237671b49bc7b834e6 Author: Kyle Evans AuthorDate: 2020-08-04 02:47:24 +0000 Commit: Kyle Evans CommitDate: 2020-12-29 15:49:42 +0000 bsdgrep: switch to libregex for GNU_GREP_COMPAT libregex is incomplete, but it's a bit less buggy than the in-base libgnuregex and mostly OK. While here, rename -DIWTH_GNU -> -DWITH_GNU_COMPAT; the option implies that we're compatible with the GNU counterpart, not that we're including GNU anything. (cherry picked from commit cab7d341dcd98138443bbdb51649f966093a3a84) --- usr.bin/grep/Makefile | 4 ++-- usr.bin/grep/grep.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/grep/Makefile b/usr.bin/grep/Makefile index c3b07b9252c6..b51f51c8bd5e 100644 --- a/usr.bin/grep/Makefile +++ b/usr.bin/grep/Makefile @@ -61,8 +61,8 @@ MLINKS+= grep.1 egrep.1 \ .endif .if ${MK_GNU_GREP_COMPAT} != "no" -CFLAGS+= -I${SYSROOT:U${DESTDIR}}/usr/include/gnu -DWITH_GNU -LIBADD+= gnuregex +CFLAGS+= -DWITH_GNU_COMPAT +LIBADD+= regex .endif HAS_TESTS= diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c index a7ecc2015571..96be836601ad 100644 --- a/usr.bin/grep/grep.c +++ b/usr.bin/grep/grep.c @@ -555,7 +555,7 @@ main(int argc, char *argv[]) filebehave = FILE_MMAP; break; case 'V': -#ifdef WITH_GNU +#ifdef WITH_GNU_COMPAT printf(errstr[9], getprogname(), VERSION); #else printf(errstr[8], getprogname(), VERSION); From owner-dev-commits-src-all@freebsd.org Tue Dec 29 16:28:59 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E1DE4C460F; Tue, 29 Dec 2020 16:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D50Gz0NRHz4mYG; Tue, 29 Dec 2020 16:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F04C76B4E; Tue, 29 Dec 2020 16:28:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTGSwNA023605; Tue, 29 Dec 2020 16:28:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTGSw7a023604; Tue, 29 Dec 2020 16:28:58 GMT (envelope-from git) Date: Tue, 29 Dec 2020 16:28:58 GMT Message-Id: <202012291628.0BTGSw7a023604@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: c0e78ec7ff15 - stable/12 - build: flip the bsdgrep default back to WITH_GNU_GREP_COMPAT MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c0e78ec7ff1523be5bcd4ec67933b71d6c2f779c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 16:28:59 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=c0e78ec7ff1523be5bcd4ec67933b71d6c2f779c commit c0e78ec7ff1523be5bcd4ec67933b71d6c2f779c Author: Kyle Evans AuthorDate: 2020-12-29 15:50:31 +0000 Commit: Kyle Evans CommitDate: 2020-12-29 15:50:31 +0000 build: flip the bsdgrep default back to WITH_GNU_GREP_COMPAT libregex is a more functional provider of gnugrep compatibility. Turn the option back on by default for folks that opt to use bsdgrep. This is a direct commit to stable/12, because the option was removed from 13.0 rather than cycling back through default-on. --- share/mk/src.opts.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index ef816e274a16..58c3ebb4cf0f 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -109,6 +109,7 @@ __DEFAULT_YES_OPTIONS = \ GDB \ GNU_DIFF \ GNU_GREP \ + GNU_GREP_COMPAT \ GOOGLETEST \ GPIO \ HAST \ @@ -202,7 +203,6 @@ __DEFAULT_NO_OPTIONS = \ CLANG_FORMAT \ DTRACE_TESTS \ GH_BC \ - GNU_GREP_COMPAT \ HESIOD \ LIBSOFT \ LLVM_ASSERTIONS \ From owner-dev-commits-src-all@freebsd.org Tue Dec 29 16:35:28 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A81064C42CD; Tue, 29 Dec 2020 16:35:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D50QS4Kd5z4nF2; Tue, 29 Dec 2020 16:35:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8359370B2; Tue, 29 Dec 2020 16:35:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTGZSGo034520; Tue, 29 Dec 2020 16:35:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTGZSfP034519; Tue, 29 Dec 2020 16:35:28 GMT (envelope-from git) Date: Tue, 29 Dec 2020 16:35:28 GMT Message-Id: <202012291635.0BTGZSfP034519@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 19ecb5e8dabe - main - Fix for IPoIB over lagg(4). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 19ecb5e8dabe9342a573ca3d3e1a80435f4d0123 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 16:35:28 -0000 The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=19ecb5e8dabe9342a573ca3d3e1a80435f4d0123 commit 19ecb5e8dabe9342a573ca3d3e1a80435f4d0123 Author: Hans Petter Selasky AuthorDate: 2020-12-29 16:34:01 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-29 16:35:06 +0000 Fix for IPoIB over lagg(4). Need to update both link layer address and broadcast address when active link changes for IP over infiniband. This is because the broadcast address contains the so-called P-key, which is interface dependent. Reviewed by: kib @ Differential Revision: https://reviews.freebsd.org/D27658 MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/net/if_lagg.c | 12 +++++------- sys/net/if_lagg.h | 5 +++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index 304bfa7bfe50..3144f86901b2 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -511,11 +511,6 @@ lagg_clone_create(struct if_clone *ifc, int unit, caddr_t params) int if_type; int error; static const uint8_t eaddr[LAGG_ADDR_LEN]; - static const uint8_t ib_bcast_addr[INFINIBAND_ADDR_LEN] = { - 0x00, 0xff, 0xff, 0xff, - 0xff, 0x12, 0x40, 0x1b, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff - }; if (params != NULL) { error = copyin(params, &iflp, sizeof(iflp)); @@ -603,7 +598,7 @@ lagg_clone_create(struct if_clone *ifc, int unit, caddr_t params) ether_ifattach(ifp, eaddr); break; case IFT_INFINIBAND: - infiniband_ifattach(ifp, eaddr, ib_bcast_addr); + infiniband_ifattach(ifp, eaddr, sc->sc_bcast_addr); break; default: break; @@ -1239,8 +1234,11 @@ lagg_watchdog_infiniband(void *arg) lp_ifp = lp->lp_ifp; if (ifp != NULL && lp_ifp != NULL && - memcmp(IF_LLADDR(ifp), IF_LLADDR(lp_ifp), ifp->if_addrlen) != 0) { + (memcmp(IF_LLADDR(ifp), IF_LLADDR(lp_ifp), ifp->if_addrlen) != 0 || + memcmp(sc->sc_bcast_addr, lp_ifp->if_broadcastaddr, ifp->if_addrlen) != 0)) { memcpy(IF_LLADDR(ifp), IF_LLADDR(lp_ifp), ifp->if_addrlen); + memcpy(sc->sc_bcast_addr, lp_ifp->if_broadcastaddr, ifp->if_addrlen); + CURVNET_SET(ifp->if_vnet); EVENTHANDLER_INVOKE(iflladdr_event, ifp); CURVNET_RESTORE(); diff --git a/sys/net/if_lagg.h b/sys/net/if_lagg.h index fc3e782d4444..94f3487af6f7 100644 --- a/sys/net/if_lagg.h +++ b/sys/net/if_lagg.h @@ -258,13 +258,14 @@ struct lagg_softc { int flowid_shift; /* shift the flowid */ struct lagg_counters detached_counters; /* detached ports sum */ struct callout sc_watchdog; /* watchdog timer */ +#define LAGG_ADDR_LEN \ + MAX(INFINIBAND_ADDR_LEN, ETHER_ADDR_LEN) + uint8_t sc_bcast_addr[LAGG_ADDR_LEN]; }; struct lagg_port { struct ifnet *lp_ifp; /* physical interface */ struct lagg_softc *lp_softc; /* parent lagg */ -#define LAGG_ADDR_LEN \ - MAX(INFINIBAND_ADDR_LEN, ETHER_ADDR_LEN) uint8_t lp_lladdr[LAGG_ADDR_LEN]; u_char lp_iftype; /* interface type */ From owner-dev-commits-src-all@freebsd.org Tue Dec 29 16:43:02 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F3904C4A2B; Tue, 29 Dec 2020 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D50bB1JnXz4p5v; Tue, 29 Dec 2020 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1FC3371DB; Tue, 29 Dec 2020 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTGh2RD045927; Tue, 29 Dec 2020 16:43:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTGh2Wo045926; Tue, 29 Dec 2020 16:43:02 GMT (envelope-from git) Date: Tue, 29 Dec 2020 16:43:02 GMT Message-Id: <202012291643.0BTGh2Wo045926@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 929eb23231d5 - stable/12 - Lift scope of buf[] to make it extend to a potential access via *basename MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 929eb23231d5e5b19b57b7a514c7ff99d79967dc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 16:43:02 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=929eb23231d5e5b19b57b7a514c7ff99d79967dc commit 929eb23231d5e5b19b57b7a514c7ff99d79967dc Author: Stefan Eßer AuthorDate: 2020-12-10 09:31:05 +0000 Commit: Kyle Evans CommitDate: 2020-12-29 16:37:32 +0000 Lift scope of buf[] to make it extend to a potential access via *basename It can be assumed that the contents of the buffer was still allocated and valid at the point of the out-of-scope access, so there was no security issue in practice. (cherry picked from commit 7483b9e4dcfb4c444f8b5d54117fb6c8c48c20e9) --- usr.sbin/crunch/crunchgen/crunched_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/crunch/crunchgen/crunched_main.c b/usr.sbin/crunch/crunchgen/crunched_main.c index 5ce4416a137f..45f61baae23e 100644 --- a/usr.sbin/crunch/crunchgen/crunched_main.c +++ b/usr.sbin/crunch/crunchgen/crunched_main.c @@ -114,6 +114,7 @@ main(int argc, char **argv, char **envp) { struct stub *ep = NULL; const char *basename = NULL; + char buf[MAXPATHLEN]; /* * Look at __progname first (this will be set if the crunched binary is @@ -141,7 +142,6 @@ main(int argc, char **argv, char **envp) * try AT_EXECPATH to get the actual binary that was executed. */ if (ep == NULL) { - char buf[MAXPATHLEN]; int error = elf_aux_info(AT_EXECPATH, &buf, sizeof(buf)); if (error == 0) { From owner-dev-commits-src-all@freebsd.org Tue Dec 29 16:43:02 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F7F94C4A2C; Tue, 29 Dec 2020 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D50bB1r0Sz4p89; Tue, 29 Dec 2020 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 31F5373AE; Tue, 29 Dec 2020 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTGh2I4045944; Tue, 29 Dec 2020 16:43:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTGh29d045943; Tue, 29 Dec 2020 16:43:02 GMT (envelope-from git) Date: Tue, 29 Dec 2020 16:43:02 GMT Message-Id: <202012291643.0BTGh29d045943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 7e436c56ca38 - stable/12 - crunchgen: fix NULL-deref bug introduced in r364647 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 7e436c56ca3814a899d0ad04433fa1b1ed7f5570 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 16:43:02 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=7e436c56ca3814a899d0ad04433fa1b1ed7f5570 commit 7e436c56ca3814a899d0ad04433fa1b1ed7f5570 Author: Alex Richardson AuthorDate: 2020-12-04 15:53:37 +0000 Commit: Kyle Evans CommitDate: 2020-12-29 16:37:32 +0000 crunchgen: fix NULL-deref bug introduced in r364647 While porting over the local changes from CheriBSD for upstreaming, I accidentally committed a broken version of find_entry_point(): we have to return NULL if the value is not found instead of a value with ep->name == NULL, since the checks in main were changed to check ep instead of ep->name for NULL. This only matters if the crunched tool cannot be found using normal lookup and one of the fallback paths is used, so it's unlikely to be triggered in rescue. However, I noticed that one of our CheriBSD test scripts was failing to run commands under `su` on minimal disk images where all binaries are hardlinks to a `cheribsdbox` tool generated with crunchgen. This also updates the bootstrapping check in Makefile.inc1 to bootstrap crunchgen up to the next version bump. (cherry picked from commit f7ff7baaf62dd2e7b1f7b00c584cd4b968b4de1d) --- usr.sbin/crunch/crunchgen/crunched_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/crunch/crunchgen/crunched_main.c b/usr.sbin/crunch/crunchgen/crunched_main.c index 1b9ff1708538..5ce4416a137f 100644 --- a/usr.sbin/crunch/crunchgen/crunched_main.c +++ b/usr.sbin/crunch/crunchgen/crunched_main.c @@ -97,9 +97,9 @@ find_entry_point(const char *basename) for (ep = entry_points; ep->name != NULL; ep++) if (!strcmp(basename, ep->name)) - break; + return (ep); - return (ep); + return (NULL); } static const char * From owner-dev-commits-src-all@freebsd.org Tue Dec 29 16:43:02 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62C414C4B24; Tue, 29 Dec 2020 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D50bB2PSxz4p8B; Tue, 29 Dec 2020 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4564871DC; Tue, 29 Dec 2020 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTGh20T045961; Tue, 29 Dec 2020 16:43:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTGh2to045960; Tue, 29 Dec 2020 16:43:02 GMT (envelope-from git) Date: Tue, 29 Dec 2020 16:43:02 GMT Message-Id: <202012291643.0BTGh2to045960@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 51f54754d53e - stable/12 - [rcorder] [crunch] Fix C function declarations to include void MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 51f54754d53ea255c901d4bdca18a3619f2ba496 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 16:43:02 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=51f54754d53ea255c901d4bdca18a3619f2ba496 commit 51f54754d53ea255c901d4bdca18a3619f2ba496 Author: Adrian Chadd AuthorDate: 2020-09-21 17:59:45 +0000 Commit: Kyle Evans CommitDate: 2020-12-29 16:37:29 +0000 [rcorder] [crunch] Fix C function declarations to include void This fixes a compile issue under gcc6 which complains about legacy style C function declarations. (cherry picked from commit 0dcdda0984d779cd2024030535a7d270b18b273d) --- sbin/rcorder/rcorder.c | 6 +++--- usr.sbin/crunch/crunchgen/crunched_main.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/rcorder/rcorder.c b/sbin/rcorder/rcorder.c index efcb7e261fdb..a8d4f4fdc3e1 100644 --- a/sbin/rcorder/rcorder.c +++ b/sbin/rcorder/rcorder.c @@ -990,7 +990,7 @@ do_file(filenode *fnode, strnodelist *stack_ptr) } static void -generate_graphviz_header() +generate_graphviz_header(void) { if (do_graphviz != true) @@ -1003,7 +1003,7 @@ generate_graphviz_header() } static void -generate_graphviz_footer() +generate_graphviz_footer(void) { if (do_graphviz == true) @@ -1011,7 +1011,7 @@ generate_graphviz_footer() } static void -generate_graphviz_providers() +generate_graphviz_providers(void) { Hash_Entry *entry; Hash_Search psearch; diff --git a/usr.sbin/crunch/crunchgen/crunched_main.c b/usr.sbin/crunch/crunchgen/crunched_main.c index d32589451260..1b9ff1708538 100644 --- a/usr.sbin/crunch/crunchgen/crunched_main.c +++ b/usr.sbin/crunch/crunchgen/crunched_main.c @@ -183,7 +183,7 @@ crunched_main(int argc, char **argv, char **envp) } static void -crunched_usage() +crunched_usage(void) { int columns, len; struct stub *ep; From owner-dev-commits-src-all@freebsd.org Tue Dec 29 17:03:04 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 65FA44C52DC; Tue, 29 Dec 2020 17:03:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D512J2TJ6z4qL0; Tue, 29 Dec 2020 17:03:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 47E3F762A; Tue, 29 Dec 2020 17:03:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTH34hf067628; Tue, 29 Dec 2020 17:03:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTH345t067627; Tue, 29 Dec 2020 17:03:04 GMT (envelope-from git) Date: Tue, 29 Dec 2020 17:03:04 GMT Message-Id: <202012291703.0BTH345t067627@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: ec52ff6d1411 - main - Streamline the infiniband code according to the ethernet code. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ec52ff6d14117573afef970604d5bf6b9691bc88 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 17:03:04 -0000 The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=ec52ff6d14117573afef970604d5bf6b9691bc88 commit ec52ff6d14117573afef970604d5bf6b9691bc88 Author: Hans Petter Selasky AuthorDate: 2020-12-29 17:01:57 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-29 17:01:57 +0000 Streamline the infiniband code according to the ethernet code. Specifically implement the if_requestencap callback function for infiniband. Most of the changes are simply a cut and paste of the equivalent ethernet part. Reviewed by: melifaro @ Differential Revision: https://reviews.freebsd.org/D27631 MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/net/if_infiniband.c | 303 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 201 insertions(+), 102 deletions(-) diff --git a/sys/net/if_infiniband.c b/sys/net/if_infiniband.c index 1d6d561c4d83..bf33457b0a4f 100644 --- a/sys/net/if_infiniband.c +++ b/sys/net/if_infiniband.c @@ -143,141 +143,240 @@ infiniband_bpf_mtap(struct ifnet *ifp, struct mbuf *mb) mb->m_pkthdr.len += sizeof(*ibh); } +static void +update_mbuf_csumflags(struct mbuf *src, struct mbuf *dst) +{ + int csum_flags = 0; + + if (src->m_pkthdr.csum_flags & CSUM_IP) + csum_flags |= (CSUM_IP_CHECKED|CSUM_IP_VALID); + if (src->m_pkthdr.csum_flags & CSUM_DELAY_DATA) + csum_flags |= (CSUM_DATA_VALID|CSUM_PSEUDO_HDR); + if (src->m_pkthdr.csum_flags & CSUM_SCTP) + csum_flags |= CSUM_SCTP_VALID; + dst->m_pkthdr.csum_flags |= csum_flags; + if (csum_flags & CSUM_DATA_VALID) + dst->m_pkthdr.csum_data = 0xffff; +} + /* - * Infiniband output routine. + * Handle link-layer encapsulation requests. */ static int -infiniband_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, - struct route *ro) +infiniband_requestencap(struct ifnet *ifp, struct if_encap_req *req) { - uint8_t edst[INFINIBAND_ADDR_LEN]; -#if defined(INET) || defined(INET6) - struct llentry *lle = NULL; -#endif - struct infiniband_header *ibh; - int error = 0; - uint16_t type; - bool is_gw; + struct infiniband_header *ih; + struct arphdr *ah; + uint16_t etype; + const uint8_t *lladdr; - NET_EPOCH_ASSERT(); - - is_gw = ((ro != NULL) && (ro->ro_flags & RT_HAS_GW) != 0); + if (req->rtype != IFENCAP_LL) + return (EOPNOTSUPP); -#ifdef MAC - error = mac_ifnet_check_transmit(ifp, m); - if (error) - goto bad; -#endif + if (req->bufsize < INFINIBAND_HDR_LEN) + return (ENOMEM); - M_PROFILE(m); - if (ifp->if_flags & IFF_MONITOR) { - error = ENETDOWN; - goto bad; - } - if (!((ifp->if_flags & IFF_UP) && - (ifp->if_drv_flags & IFF_DRV_RUNNING))) { - error = ENETDOWN; - goto bad; - } + ih = (struct infiniband_header *)req->buf; + lladdr = req->lladdr; + req->lladdr_off = 0; - switch (dst->sa_family) { - case AF_LINK: - goto output; -#ifdef INET + switch (req->family) { case AF_INET: - if (lle != NULL && (lle->la_flags & LLE_VALID)) { - memcpy(edst, lle->ll_addr, sizeof(edst)); - } else if (m->m_flags & M_MCAST) { - infiniband_ipv4_multicast_map( - ((const struct sockaddr_in *)dst)->sin_addr.s_addr, - ifp->if_broadcastaddr, edst); - } else { - error = arpresolve(ifp, is_gw, m, dst, edst, NULL, NULL); - if (error) { - if (error == EWOULDBLOCK) - error = 0; - m = NULL; /* mbuf is consumed by resolver */ - goto bad; - } - } - type = htons(ETHERTYPE_IP); + etype = htons(ETHERTYPE_IP); break; - case AF_ARP: { - struct arphdr *ah; - - if (m->m_len < sizeof(*ah)) { - error = EINVAL; - goto bad; - } - - ah = mtod(m, struct arphdr *); - - if (m->m_len < arphdr_len(ah)) { - error = EINVAL; - goto bad; - } + case AF_INET6: + etype = htons(ETHERTYPE_IPV6); + break; + case AF_ARP: + ah = (struct arphdr *)req->hdata; ah->ar_hrd = htons(ARPHRD_INFINIBAND); switch (ntohs(ah->ar_op)) { case ARPOP_REVREQUEST: case ARPOP_REVREPLY: - type = htons(ETHERTYPE_REVARP); + etype = htons(ETHERTYPE_REVARP); break; case ARPOP_REQUEST: case ARPOP_REPLY: default: - type = htons(ETHERTYPE_ARP); + etype = htons(ETHERTYPE_ARP); break; } - if (m->m_flags & M_BCAST) { - memcpy(edst, ifp->if_broadcastaddr, INFINIBAND_ADDR_LEN); + if (req->flags & IFENCAP_FLAG_BROADCAST) + lladdr = ifp->if_broadcastaddr; + break; + default: + return (EAFNOSUPPORT); + } + + ih->ib_protocol = etype; + ih->ib_reserved = 0; + memcpy(ih->ib_hwaddr, lladdr, INFINIBAND_ADDR_LEN); + req->bufsize = sizeof(struct infiniband_header); + + return (0); +} + +static int +infiniband_resolve_addr(struct ifnet *ifp, struct mbuf *m, + const struct sockaddr *dst, struct route *ro, uint8_t *phdr, + uint32_t *pflags, struct llentry **plle) +{ + struct infiniband_header *ih; + uint32_t lleflags = 0; + int error = 0; + + if (plle) + *plle = NULL; + ih = (struct infiniband_header *)phdr; + + switch (dst->sa_family) { +#ifdef INET + case AF_INET: + if ((m->m_flags & (M_BCAST | M_MCAST)) == 0) { + error = arpresolve(ifp, 0, m, dst, phdr, &lleflags, plle); } else { - if (ah->ar_hln != INFINIBAND_ADDR_LEN) { - error = EINVAL; - goto bad; + if (m->m_flags & M_BCAST) { + memcpy(ih->ib_hwaddr, ifp->if_broadcastaddr, + INFINIBAND_ADDR_LEN); + } else { + infiniband_ipv4_multicast_map( + ((const struct sockaddr_in *)dst)->sin_addr.s_addr, + ifp->if_broadcastaddr, ih->ib_hwaddr); } - memcpy(edst, ar_tha(ah), INFINIBAND_ADDR_LEN); + ih->ib_protocol = htons(ETHERTYPE_IP); + ih->ib_reserved = 0; } break; - } #endif #ifdef INET6 - case AF_INET6: { - const struct ip6_hdr *ip6; - - ip6 = mtod(m, const struct ip6_hdr *); - if (m->m_len < sizeof(*ip6)) { - error = EINVAL; - goto bad; - } else if (lle != NULL && (lle->la_flags & LLE_VALID)) { - memcpy(edst, lle->ll_addr, sizeof(edst)); - } else if (m->m_flags & M_MCAST) { + case AF_INET6: + if ((m->m_flags & M_MCAST) == 0) { + error = nd6_resolve(ifp, 0, m, dst, phdr, &lleflags, plle); + } else { infiniband_ipv6_multicast_map( &((const struct sockaddr_in6 *)dst)->sin6_addr, - ifp->if_broadcastaddr, edst); - } else if (ip6->ip6_nxt == IPPROTO_ICMPV6) { - memcpy(edst, ifp->if_broadcastaddr, INFINIBAND_ADDR_LEN); - } else { - error = nd6_resolve(ifp, is_gw, m, dst, edst, NULL, NULL); - if (error) { - if (error == EWOULDBLOCK) - error = 0; - m = NULL; /* mbuf is consumed by resolver */ - goto bad; - } + ifp->if_broadcastaddr, ih->ib_hwaddr); + ih->ib_protocol = htons(ETHERTYPE_IPV6); + ih->ib_reserved = 0; } - type = htons(ETHERTYPE_IPV6); break; - } #endif default: - error = EAFNOSUPPORT; + if_printf(ifp, "can't handle af%d\n", dst->sa_family); + if (m != NULL) + m_freem(m); + return (EAFNOSUPPORT); + } + + if (error == EHOSTDOWN) { + if (ro != NULL && (ro->ro_flags & RT_HAS_GW) != 0) + error = EHOSTUNREACH; + } + + if (error != 0) + return (error); + + *pflags = RT_MAY_LOOP; + if (lleflags & LLE_IFADDR) + *pflags |= RT_L2_ME; + + return (0); +} + +/* + * Infiniband output routine. + */ +static int +infiniband_output(struct ifnet *ifp, struct mbuf *m, + const struct sockaddr *dst, struct route *ro) +{ + uint8_t linkhdr[INFINIBAND_HDR_LEN]; + uint8_t *phdr; +#if defined(INET) || defined(INET6) + struct llentry *lle = NULL; +#endif + struct infiniband_header *ih; + int error = 0; + int hlen; /* link layer header length */ + uint32_t pflags; + bool addref; + + NET_EPOCH_ASSERT(); + + addref = false; + phdr = NULL; + pflags = 0; + if (ro != NULL) { + /* XXX BPF uses ro_prepend */ + if (ro->ro_prepend != NULL) { + phdr = ro->ro_prepend; + hlen = ro->ro_plen; + } else if (!(m->m_flags & (M_BCAST | M_MCAST))) { + if ((ro->ro_flags & RT_LLE_CACHE) != 0) { + lle = ro->ro_lle; + if (lle != NULL && + (lle->la_flags & LLE_VALID) == 0) { + LLE_FREE(lle); + lle = NULL; /* redundant */ + ro->ro_lle = NULL; + } + if (lle == NULL) { + /* if we lookup, keep cache */ + addref = 1; + } else + /* + * Notify LLE code that + * the entry was used + * by datapath. + */ + llentry_mark_used(lle); + } + if (lle != NULL) { + phdr = lle->r_linkdata; + hlen = lle->r_hdrlen; + pflags = lle->r_flags; + } + } + } + +#ifdef MAC + error = mac_ifnet_check_transmit(ifp, m); + if (error) + goto bad; +#endif + + M_PROFILE(m); + if (ifp->if_flags & IFF_MONITOR) { + error = ENETDOWN; + goto bad; + } + if (!((ifp->if_flags & IFF_UP) && + (ifp->if_drv_flags & IFF_DRV_RUNNING))) { + error = ENETDOWN; goto bad; } + if (phdr == NULL) { + /* No prepend data supplied. Try to calculate ourselves. */ + phdr = linkhdr; + hlen = INFINIBAND_HDR_LEN; + error = infiniband_resolve_addr(ifp, m, dst, ro, phdr, &pflags, + addref ? &lle : NULL); + if (addref && lle != NULL) + ro->ro_lle = lle; + if (error != 0) + return (error == EWOULDBLOCK ? 0 : error); + } + + if ((pflags & RT_L2_ME) != 0) { + update_mbuf_csumflags(m, m); + return (if_simloop(ifp, m, dst->sa_family, 0)); + } + /* - * Add local net header. If no space in first mbuf, + * Add local infiniband header. If no space in first mbuf, * allocate another. */ M_PREPEND(m, INFINIBAND_HDR_LEN, M_NOWAIT); @@ -285,16 +384,15 @@ infiniband_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, error = ENOBUFS; goto bad; } - ibh = mtod(m, struct infiniband_header *); - - ibh->ib_protocol = type; - memcpy(ibh->ib_hwaddr, edst, sizeof(edst)); + if ((pflags & RT_HAS_HEADER) == 0) { + ih = mtod(m, struct infiniband_header *); + memcpy(ih, phdr, hlen); + } /* * Queue message on interface, update output statistics if * successful, and start output if interface not yet active. */ -output: return (ifp->if_transmit(ifp, m)); bad: if (m != NULL) @@ -484,6 +582,7 @@ infiniband_ifattach(struct ifnet *ifp, const uint8_t *lla, const uint8_t *llb) ifp->if_output = infiniband_output; ifp->if_input = infiniband_input; ifp->if_resolvemulti = infiniband_resolvemulti; + ifp->if_requestencap = infiniband_requestencap; if (ifp->if_baudrate == 0) ifp->if_baudrate = IF_Gbps(10); /* default value */ From owner-dev-commits-src-all@freebsd.org Tue Dec 29 17:38:55 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3EE1A4C5F32; Tue, 29 Dec 2020 17:38:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 4D51qf6TYFz4s70; Tue, 29 Dec 2020 17:38:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 0BTHcl75062674 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 29 Dec 2020 19:38:50 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 0BTHcl75062674 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 0BTHclVG062672; Tue, 29 Dec 2020 19:38:47 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 29 Dec 2020 19:38:47 +0200 From: Konstantin Belousov To: Jessica Clarke Cc: Edward Tomasz Napierala , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 89e3d5671ba1 - main - bsnmpclient(3): make it thread-safe Message-ID: References: <202012291500.0BTF0vGw034594@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4D51qf6TYFz4s70 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 17:38:55 -0000 On Tue, Dec 29, 2020 at 03:11:55PM +0000, Jessica Clarke wrote: > On 29 Dec 2020, at 15:00, Edward Tomasz Napierala wrote: > > diff --git a/contrib/bsnmp/lib/snmpclient.c b/contrib/bsnmp/lib/snmpclient.c > > index c22d8e125a14..e49105918416 100644 > > --- a/contrib/bsnmp/lib/snmpclient.c > > +++ b/contrib/bsnmp/lib/snmpclient.c > > @@ -71,7 +71,7 @@ > > #define DEBUG_PARSE 0 > > > > /* global context */ > > -struct snmp_client snmp_client; > > +__thread struct snmp_client snmp_client; > > That comment is no longer true. > > > /* List of all outstanding requests */ > > struct sent_pdu { > > @@ -86,7 +86,7 @@ struct sent_pdu { > > }; > > LIST_HEAD(sent_pdu_list, sent_pdu); > > > > -static struct sent_pdu_list sent_pdus; > > +__thread static struct sent_pdu_list sent_pdus; > > > > /* > > * Prototype table entry. All C-structure produced by the table function must > > diff --git a/contrib/bsnmp/lib/snmpclient.h b/contrib/bsnmp/lib/snmpclient.h > > index a19bdb2ea653..1bc3780de038 100644 > > --- a/contrib/bsnmp/lib/snmpclient.h > > +++ b/contrib/bsnmp/lib/snmpclient.h > > @@ -114,7 +114,7 @@ struct snmp_client { > > }; > > > > /* the global context */ > > -extern struct snmp_client snmp_client; > > +extern __thread struct snmp_client snmp_client; > > Ditto. > > Is there really a documented requirement for everything to be called > from the same thread? I can see consumers of the library that already > use proper locking breaking because of this. So this variable is supposed to be used by consumers ? The change requires the library version bump, at least. I suppose libsnmpclient does not use symbol versioning ? From owner-dev-commits-src-all@freebsd.org Tue Dec 29 17:39:06 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 850944C5EE8; Tue, 29 Dec 2020 17:39:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D51qp4JS1z4s54; Tue, 29 Dec 2020 17:39:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 626AC7F06; Tue, 29 Dec 2020 17:39:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTHd2Ox001070; Tue, 29 Dec 2020 17:39:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTHd2wX001069; Tue, 29 Dec 2020 17:39:02 GMT (envelope-from git) Date: Tue, 29 Dec 2020 17:39:02 GMT Message-Id: <202012291739.0BTHd2wX001069@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 0861c7d3e048 - main - kern: efirt: enter runtime environment to deref efi_cfgtbl MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0861c7d3e048556841fa5085173660dceadc5646 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 17:39:06 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=0861c7d3e048556841fa5085173660dceadc5646 commit 0861c7d3e048556841fa5085173660dceadc5646 Author: Kyle Evans AuthorDate: 2020-12-27 17:28:32 +0000 Commit: Kyle Evans CommitDate: 2020-12-29 17:38:14 +0000 kern: efirt: enter runtime environment to deref efi_cfgtbl This fixes an insta-panic when EFIIOC_GET_TABLE is used. Reviewed by: imp (earlier version), kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27669 --- sys/dev/efidev/efirt.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/efidev/efirt.c b/sys/dev/efidev/efirt.c index df1f62f39126..269eb67cf01f 100644 --- a/sys/dev/efidev/efirt.c +++ b/sys/dev/efidev/efirt.c @@ -314,18 +314,25 @@ efi_get_table(struct uuid *uuid, void **ptr) { struct efi_cfgtbl *ct; u_long count; + int error; if (efi_cfgtbl == NULL || efi_systbl == NULL) return (ENXIO); + error = efi_enter(); + if (error != 0) + return (error); count = efi_systbl->st_entries; ct = efi_cfgtbl; while (count--) { if (!bcmp(&ct->ct_uuid, uuid, sizeof(*uuid))) { *ptr = (void *)efi_phys_to_kva(ct->ct_data); + efi_leave(); return (0); } ct++; } + + efi_leave(); return (ENOENT); } From owner-dev-commits-src-all@freebsd.org Tue Dec 29 17:39:06 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7904B4C5EE5; Tue, 29 Dec 2020 17:39:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D51qp45KDz4s9c; Tue, 29 Dec 2020 17:39:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5138E7A44; Tue, 29 Dec 2020 17:39:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTHd2Qr001053; Tue, 29 Dec 2020 17:39:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTHd2ji001052; Tue, 29 Dec 2020 17:39:02 GMT (envelope-from git) Date: Tue, 29 Dec 2020 17:39:02 GMT Message-Id: <202012291739.0BTHd2ji001052@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: ee938b20335d - main - kern: efirt: correct configuration table entry size MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee938b20335d26ca652deac4a1a063e90cafa303 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 17:39:06 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=ee938b20335d26ca652deac4a1a063e90cafa303 commit ee938b20335d26ca652deac4a1a063e90cafa303 Author: Kyle Evans AuthorDate: 2020-12-27 17:26:45 +0000 Commit: Kyle Evans CommitDate: 2020-12-29 17:38:34 +0000 kern: efirt: correct configuration table entry size Each entry actually stores a native pointer, not a uint64_t quantity. While we're here, go ahead and export the pointer as-is rather than converting it to KVA. This may be more useful as consumers can map /dev/mem and observe the entry. For reference, see: sys/contrib/edk2/Include/Uefi/UefiSpec.h Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27669 --- sys/dev/efidev/efirt.c | 2 +- sys/sys/efi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/efidev/efirt.c b/sys/dev/efidev/efirt.c index 269eb67cf01f..fbb8f605c202 100644 --- a/sys/dev/efidev/efirt.c +++ b/sys/dev/efidev/efirt.c @@ -325,7 +325,7 @@ efi_get_table(struct uuid *uuid, void **ptr) ct = efi_cfgtbl; while (count--) { if (!bcmp(&ct->ct_uuid, uuid, sizeof(*uuid))) { - *ptr = (void *)efi_phys_to_kva(ct->ct_data); + *ptr = ct->ct_data; efi_leave(); return (0); } diff --git a/sys/sys/efi.h b/sys/sys/efi.h index b9f31454efff..220509853cb2 100644 --- a/sys/sys/efi.h +++ b/sys/sys/efi.h @@ -52,7 +52,7 @@ typedef unsigned long efi_status; struct efi_cfgtbl { struct uuid ct_uuid; - uint64_t ct_data; + void *ct_data; }; struct efi_md { From owner-dev-commits-src-all@freebsd.org Tue Dec 29 17:39:35 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC39F4C62E7 for ; Tue, 29 Dec 2020 17:39:35 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 4D51rR5T0Nz4sGS for ; Tue, 29 Dec 2020 17:39:35 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wm1-f45.google.com with SMTP id v14so3096345wml.1 for ; Tue, 29 Dec 2020 09:39:35 -0800 (PST) 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=qPjf58qEwfir+v6FB4mZQ5EygngGGuSCAMjRmthgywU=; b=ji/blma5uOyDANmnfP1X7bQ1vYh8/Hyeyh5212ge8+6OdE1H7buazhvDf4dyg0WBaR jZHY0Wh+CxfhVcJGAV0Cho7xBojJpE3iYJyi+RF6rJ3zSvLm3/ihplD7obsMJsfPZXtX xkejDsqZeoUcAEGfl/uktVOExOAeUjpMdbONROWUNlgryfWPf7mPRs59ePZ8vHTIl4+x d91gGAKz7tdcBlTYKpUtZE4H+CSRdZxmPI71Rphfsl66x2zal/t8dlcHnkDRoh2swcTN 5yzOLlTqaExF3WwP0H4yIh11Abd7TPtnb/IbvlNkqVp6YUTT5ePjsNmi1i9cQxbBc38/ wHPA== X-Gm-Message-State: AOAM532GKjhmyx4tfhAJk5w/FkAC77XPo/kCzfdw6LreORswYaT3lauz Xyq4wNFPnzBzkkDnLcf2jYuWKg== X-Google-Smtp-Source: ABdhPJx8T8Cg98yTGEBQHFTYuNDXbeaHB/MrLkOx5Xyu7QSf7t1KErnpMosSOrwAYP9/i/rYf1xQRg== X-Received: by 2002:a1c:4d12:: with SMTP id o18mr4438746wmh.114.1609263574412; Tue, 29 Dec 2020 09:39:34 -0800 (PST) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id u10sm3911102wmd.43.2020.12.29.09.39.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Dec 2020 09:39:33 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: git: 89e3d5671ba1 - main - bsnmpclient(3): make it thread-safe From: Jessica Clarke In-Reply-To: Date: Tue, 29 Dec 2020 17:39:32 +0000 Cc: Edward Tomasz Napierala , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202012291500.0BTF0vGw034594@gitrepo.freebsd.org> To: Konstantin Belousov X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4D51rR5T0Nz4sGS X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 17:39:35 -0000 On 29 Dec 2020, at 17:38, Konstantin Belousov = wrote: > On Tue, Dec 29, 2020 at 03:11:55PM +0000, Jessica Clarke wrote: >> On 29 Dec 2020, at 15:00, Edward Tomasz Napierala = wrote: >>> diff --git a/contrib/bsnmp/lib/snmpclient.c = b/contrib/bsnmp/lib/snmpclient.c >>> index c22d8e125a14..e49105918416 100644 >>> --- a/contrib/bsnmp/lib/snmpclient.c >>> +++ b/contrib/bsnmp/lib/snmpclient.c >>> @@ -71,7 +71,7 @@ >>> #define DEBUG_PARSE 0 >>>=20 >>> /* global context */ >>> -struct snmp_client snmp_client; >>> +__thread struct snmp_client snmp_client; >>=20 >> That comment is no longer true. >>=20 >>> /* List of all outstanding requests */ >>> struct sent_pdu { >>> @@ -86,7 +86,7 @@ struct sent_pdu { >>> }; >>> LIST_HEAD(sent_pdu_list, sent_pdu); >>>=20 >>> -static struct sent_pdu_list sent_pdus; >>> +__thread static struct sent_pdu_list sent_pdus; >>>=20 >>> /* >>> * Prototype table entry. All C-structure produced by the table = function must >>> diff --git a/contrib/bsnmp/lib/snmpclient.h = b/contrib/bsnmp/lib/snmpclient.h >>> index a19bdb2ea653..1bc3780de038 100644 >>> --- a/contrib/bsnmp/lib/snmpclient.h >>> +++ b/contrib/bsnmp/lib/snmpclient.h >>> @@ -114,7 +114,7 @@ struct snmp_client { >>> }; >>>=20 >>> /* the global context */ >>> -extern struct snmp_client snmp_client; >>> +extern __thread struct snmp_client snmp_client; >>=20 >> Ditto. >>=20 >> Is there really a documented requirement for everything to be called >> from the same thread? I can see consumers of the library that already >> use proper locking breaking because of this. >=20 > So this variable is supposed to be used by consumers ? > The change requires the library version bump, at least. > I suppose libsnmpclient does not use symbol versioning ? The exported functions implicitly use them to track state. Jess From owner-dev-commits-src-all@freebsd.org Tue Dec 29 17:48:28 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5BDBD4C6691 for ; Tue, 29 Dec 2020 17:48:28 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 4D522h201rz4sj4 for ; Tue, 29 Dec 2020 17:48:27 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f52.google.com with SMTP id d26so15257407wrb.12 for ; Tue, 29 Dec 2020 09:48:27 -0800 (PST) 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=48pfkgaZO3pUJS3SgSMUx8uXYBWh2I8UdwogqxxRONc=; b=gQnOReIhZFBbPUPWtJglQGsIljcdDVMKOkLWII/Pq68RAE8wo9+5ZmPJ/j2ubjTG2t mi+KCFGK0M4oPkFmz5C9oc92DOEf7I1OIyfnVM4MlFmVZSkOSxEd/jahJxjQgdNAXj8g gm7NhOfrTi9hURtPo/rkly7sWDiY+/g0SSmziKv0T/dsi0GrXoV2f8nzGziaIUm9yKWZ PkXLxDo0QTA7LW6FfbROggF07CB+R3SOiz67R1B/95KnqWjPWuIzeYnmJd/GIdPEpTy1 rAL2uVE7liEmPz+f1OjWZRD4NVzxbmIpCgkVE3VE62f0z2iD527xkbPASXSUkdobOZGK VMXA== X-Gm-Message-State: AOAM530tOmYvGo8ZcqnMUhhSIaO9ylMC9qHVz6npAAes7aOEBPCk5Mo/ TPWsgyQWj6qZC5dLmzFOz3/5bw== X-Google-Smtp-Source: ABdhPJw8FmgZf+QlA2ZFmkSQ6t/OIZHtaka5PgFhfDaOxbAi/MaXraClf0dZd6ZJV4JP+i9IZXSU8Q== X-Received: by 2002:adf:fbd2:: with SMTP id d18mr57432396wrs.222.1609264106687; Tue, 29 Dec 2020 09:48:26 -0800 (PST) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id c7sm69082425wro.16.2020.12.29.09.48.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Dec 2020 09:48:26 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: git: ee938b20335d - main - kern: efirt: correct configuration table entry size From: Jessica Clarke In-Reply-To: <202012291739.0BTHd2ji001052@gitrepo.freebsd.org> Date: Tue, 29 Dec 2020 17:48:25 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: 7bit Message-Id: References: <202012291739.0BTHd2ji001052@gitrepo.freebsd.org> To: Kyle Evans X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4D522h201rz4sj4 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 17:48:28 -0000 On 29 Dec 2020, at 17:39, Kyle Evans wrote: > diff --git a/sys/sys/efi.h b/sys/sys/efi.h > index b9f31454efff..220509853cb2 100644 > --- a/sys/sys/efi.h > +++ b/sys/sys/efi.h > @@ -52,7 +52,7 @@ typedef unsigned long efi_status; > > struct efi_cfgtbl { > struct uuid ct_uuid; > - uint64_t ct_data; > + void *ct_data; Hm, this should probably be a u_long/vm_offset_t/vm_paddr_t (though the tables are unlikely to be in places where you need PAE so even if technically correct, vm_paddr_t probably just makes things more awkward for no gain) given it's not a real pointer that can be dereferenced. Jess From owner-dev-commits-src-all@freebsd.org Tue Dec 29 17:52:11 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A12AF4C6A56; Tue, 29 Dec 2020 17:52:11 +0000 (UTC) (envelope-from kevans@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 4D526z42B5z4t25; Tue, 29 Dec 2020 17:52:11 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) (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: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 7D4D12B8D5; Tue, 29 Dec 2020 17:52:11 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f174.google.com with SMTP id c7so12009416qke.1; Tue, 29 Dec 2020 09:52:11 -0800 (PST) X-Gm-Message-State: AOAM531jMRS7hlFhj3vqS6q/pfwfB/bHxCv2wwnhOSK0VdT1HqJk1HFf CtujEd3XhqMKMV+Ys6Bj+RQ+KtZZ+6iFCCsR2Vc= X-Google-Smtp-Source: ABdhPJxMbYFp6sSkgcFznEk7IIihWjEPKINuB0zR+MByIeS3+XJyC5cfWBMsKZVswF9nFL1urvD37uto9OOjf3qvr7s= X-Received: by 2002:a37:b442:: with SMTP id d63mr21569437qkf.430.1609264331076; Tue, 29 Dec 2020 09:52:11 -0800 (PST) MIME-Version: 1.0 References: <202012291739.0BTHd2ji001052@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Tue, 29 Dec 2020 11:51:57 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: ee938b20335d - main - kern: efirt: correct configuration table entry size To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 17:52:11 -0000 On Tue, Dec 29, 2020 at 11:48 AM Jessica Clarke wrote: > > On 29 Dec 2020, at 17:39, Kyle Evans wrote: > > diff --git a/sys/sys/efi.h b/sys/sys/efi.h > > index b9f31454efff..220509853cb2 100644 > > --- a/sys/sys/efi.h > > +++ b/sys/sys/efi.h > > @@ -52,7 +52,7 @@ typedef unsigned long efi_status; > > > > struct efi_cfgtbl { > > struct uuid ct_uuid; > > - uint64_t ct_data; > > + void *ct_data; > > Hm, this should probably be a u_long/vm_offset_t/vm_paddr_t (though the > tables are unlikely to be in places where you need PAE so even if > technically correct, vm_paddr_t probably just makes things more awkward > for no gain) given it's not a real pointer that can be dereferenced. > I don't really have strong feelings either way; I originally pushed it to void* to match edk2 because I was entertaining the thought of just using edk2's definitions instead anyways, but I got distracted and did not get back around to deciding if that was a reasonable idea or not. From owner-dev-commits-src-all@freebsd.org Tue Dec 29 18:25:13 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 25E1C4C772F; Tue, 29 Dec 2020 18:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D52s50crtz3CFx; Tue, 29 Dec 2020 18:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0763B109BE; Tue, 29 Dec 2020 18:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTIPCYI055849; Tue, 29 Dec 2020 18:25:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTIPC2n055848; Tue, 29 Dec 2020 18:25:12 GMT (envelope-from git) Date: Tue, 29 Dec 2020 18:25:12 GMT Message-Id: <202012291825.0BTIPC2n055848@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: ff7c2c5a3bc3 - main - [wlanstats] Fix warnings-as-errors on gcc-6.4 on mips MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff7c2c5a3bc3321ea7eeab824eff25257e7fbaae Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 18:25:13 -0000 The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=ff7c2c5a3bc3321ea7eeab824eff25257e7fbaae commit ff7c2c5a3bc3321ea7eeab824eff25257e7fbaae Author: Adrian Chadd AuthorDate: 2020-12-29 01:03:11 +0000 Commit: Adrian Chadd CommitDate: 2020-12-29 18:24:30 +0000 [wlanstats] Fix warnings-as-errors on gcc-6.4 on mips * use CLLADDR() to not try deconsting a const * Unsigned where they should be * static where it should be Tested: * freebsd/mips32, using gcc-6.4 --- tools/tools/net80211/wlanstats/main.c | 8 +++++--- tools/tools/net80211/wlanstats/wlanstats.c | 10 +++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tools/tools/net80211/wlanstats/main.c b/tools/tools/net80211/wlanstats/main.c index bd73053be976..36da5c6b8e51 100644 --- a/tools/tools/net80211/wlanstats/main.c +++ b/tools/tools/net80211/wlanstats/main.c @@ -70,7 +70,7 @@ static struct { static const char * getfmt(const char *tag) { - int i; + unsigned int i; for (i = 0; i < nitems(tags); i++) if (strcasecmp(tags[i].tag, tag) == 0) return tags[i].fmt; @@ -156,8 +156,10 @@ print_sta_stats(FILE *fd, const u_int8_t macaddr[IEEE80211_ADDR_LEN]) } #endif -void -usage(void) { +static void +usage(void) +{ + printf("wlanstats: [-ah] [-i ifname] [-l] [-m station MAC address] [-o fmt] [interval]\n"); } diff --git a/tools/tools/net80211/wlanstats/wlanstats.c b/tools/tools/net80211/wlanstats/wlanstats.c index b42d7312e519..2f362a60a836 100644 --- a/tools/tools/net80211/wlanstats/wlanstats.c +++ b/tools/tools/net80211/wlanstats/wlanstats.c @@ -463,7 +463,7 @@ getlladdr(struct wlanstatfoo_p *wf) errx(1, "did not find link layer address for interface %s", wf->ifr.ifr_name); sdl = (const struct sockaddr_dl *) p->ifa_addr; - IEEE80211_ADDR_COPY(wf->mac, LLADDR(sdl)); + IEEE80211_ADDR_COPY(wf->mac, CLLADDR(sdl)); freeifaddrs(ifp); } @@ -561,8 +561,8 @@ wlan_update_tot(struct bsdstat *sf) wf->ntotal = wf->ncur; } -void -setreason(char b[], size_t bs, int v) +static void +setreason(char b[], size_t bs, unsigned int v) { static const char *reasons[] = { [IEEE80211_REASON_UNSPECIFIED] = "unspecified", @@ -595,8 +595,8 @@ setreason(char b[], size_t bs, int v) snprintf(b, bs, "%u", v); } -void -setstatus(char b[], size_t bs, int v) +static void +setstatus(char b[], size_t bs, unsigned int v) { static const char *status[] = { [IEEE80211_STATUS_SUCCESS] = "success", From owner-dev-commits-src-all@freebsd.org Tue Dec 29 18:25:13 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 263844C7989; Tue, 29 Dec 2020 18:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D52s50TG2z3Bvy; Tue, 29 Dec 2020 18:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F38BE107AC; Tue, 29 Dec 2020 18:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTIPCTW055832; Tue, 29 Dec 2020 18:25:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTIPCtE055831; Tue, 29 Dec 2020 18:25:12 GMT (envelope-from git) Date: Tue, 29 Dec 2020 18:25:12 GMT Message-Id: <202012291825.0BTIPCtE055831@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 1fef838b913a - main - [wlanwds] Fix compiler warnings-as-errors on freebsd gcc-6.4 mips MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1fef838b913a3541cf11b6e412ce3e83381c921a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 18:25:13 -0000 The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=1fef838b913a3541cf11b6e412ce3e83381c921a commit 1fef838b913a3541cf11b6e412ce3e83381c921a Author: Adrian Chadd AuthorDate: 2020-12-29 01:04:43 +0000 Commit: Adrian Chadd CommitDate: 2020-12-29 18:24:33 +0000 [wlanwds] Fix compiler warnings-as-errors on freebsd gcc-6.4 mips * Remove unused verbose global; things are now done through syslog * Mark a variable as unused in handle_rtmsg() Tested: * FreeBSD/mips32 using gcc-6.4 --- tools/tools/net80211/wlanwds/wlanwds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/tools/net80211/wlanwds/wlanwds.c b/tools/tools/net80211/wlanwds/wlanwds.c index 86246c21f5c7..cf1335663388 100644 --- a/tools/tools/net80211/wlanwds/wlanwds.c +++ b/tools/tools/net80211/wlanwds/wlanwds.c @@ -84,7 +84,6 @@ static struct wds *wds; static const char *script = NULL; static char **ifnets; static int nifnets = 0; -static int verbose = 0; static int discover_on_join = 0; static void scanforvaps(int s); @@ -376,6 +375,8 @@ handle_rtmsg(struct rt_msghdr *rtm, ssize_t msglen) { struct if_announcemsghdr *ifan; + (void) msglen; /* UNUSED */ + if (rtm->rtm_version != RTM_VERSION) { syslog(LOG_ERR, "routing message version %d not understood", rtm->rtm_version); From owner-dev-commits-src-all@freebsd.org Tue Dec 29 18:25:13 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 05CAC4C7987; Tue, 29 Dec 2020 18:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D52s46hTWz3C4j; Tue, 29 Dec 2020 18:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D88C810A15; Tue, 29 Dec 2020 18:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTIPC1f055815; Tue, 29 Dec 2020 18:25:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTIPCIl055814; Tue, 29 Dec 2020 18:25:12 GMT (envelope-from git) Date: Tue, 29 Dec 2020 18:25:12 GMT Message-Id: <202012291825.0BTIPCIl055814@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 66585c3fe278 - main - [wlanwatch] fix compiler warnings-as-errors on gcc-6.4 mips MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 66585c3fe278c71ffa995c296a9a1e712482418e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 18:25:13 -0000 The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=66585c3fe278c71ffa995c296a9a1e712482418e commit 66585c3fe278c71ffa995c296a9a1e712482418e Author: Adrian Chadd AuthorDate: 2020-12-29 17:50:49 +0000 Commit: Adrian Chadd CommitDate: 2020-12-29 18:24:36 +0000 [wlanwatch] fix compiler warnings-as-errors on gcc-6.4 mips * argc/argv are currently unused * msglen is currently unused * "default" is a const buffer, but char *cp isn't, so change default string to be a non-const global string variable * Make 'cp' private to each context that's using it, which fixes a "variable shadows previous declaration" warning and makes it easier to track where it was being leaked between address family sections --- tools/tools/net80211/wlanwatch/wlanwatch.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tools/tools/net80211/wlanwatch/wlanwatch.c b/tools/tools/net80211/wlanwatch/wlanwatch.c index 254d3be24448..7ff81cc1253a 100644 --- a/tools/tools/net80211/wlanwatch/wlanwatch.c +++ b/tools/tools/net80211/wlanwatch/wlanwatch.c @@ -84,6 +84,9 @@ main(int argc, char *argv[]) int n, s; char msg[2048]; + (void) argc; /* UNUSED */ + (void) argv; /* UNUSED */ + s = socket(PF_ROUTE, SOCK_RAW, 0); if (s < 0) err(EX_OSERR, "socket"); @@ -135,16 +138,18 @@ char ifnetflags[] = char addrnames[] = "\1DST\2GATEWAY\3NETMASK\4GENMASK\5IFP\6IFA\7AUTHOR\010BRD"; +char defaultname[] = "default"; + static const char * routename(struct sockaddr *sa) { - char *cp; static char line[MAXHOSTNAMELEN + 1]; struct hostent *hp; static char domain[MAXHOSTNAMELEN + 1]; static int first = 1, n; if (first) { + char *cp = NULL; first = 0; if (gethostname(domain, MAXHOSTNAMELEN) == 0 && (cp = strchr(domain, '.'))) { @@ -160,12 +165,14 @@ routename(struct sockaddr *sa) case AF_INET: { struct in_addr in; + char *cp; + in = ((struct sockaddr_in *)sa)->sin_addr; - cp = 0; + cp = NULL; if (in.s_addr == INADDR_ANY || sa->sa_len < 4) - cp = "default"; - if (cp == 0 && !nflag) { + cp = defaultname; + if (cp == NULL && !nflag) { hp = gethostbyaddr((char *)&in, sizeof (struct in_addr), AF_INET); if (hp) { @@ -291,6 +298,8 @@ print_rtmsg(struct rt_msghdr *rtm, int msglen) time_t now = time(NULL); char *cnow = ctime(&now); + (void) msglen; /* UNUSED */ + if (rtm->rtm_version != RTM_VERSION) { (void) printf("routing message version %d not understood\n", rtm->rtm_version); From owner-dev-commits-src-all@freebsd.org Tue Dec 29 18:32:50 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E79CC4C7779; Tue, 29 Dec 2020 18:32:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D531t6DPMz3CYh; Tue, 29 Dec 2020 18:32:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C8B6F10D0A; Tue, 29 Dec 2020 18:32:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTIWop1067296; Tue, 29 Dec 2020 18:32:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTIWouf067295; Tue, 29 Dec 2020 18:32:50 GMT (envelope-from git) Date: Tue, 29 Dec 2020 18:32:50 GMT Message-Id: <202012291832.0BTIWouf067295@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: a3434cdc6b01 - main - Fix typo in ap_initator_portal. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a3434cdc6b01f23a6a2184923c4367c098ae084d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 18:32:51 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=a3434cdc6b01f23a6a2184923c4367c098ae084d commit a3434cdc6b01f23a6a2184923c4367c098ae084d Author: Alexander Motin AuthorDate: 2020-12-29 18:32:05 +0000 Commit: Alexander Motin CommitDate: 2020-12-29 18:32:05 +0000 Fix typo in ap_initator_portal. MFC after: 1 week --- usr.sbin/ctld/ctld.c | 6 +++--- usr.sbin/ctld/ctld.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/ctld/ctld.c b/usr.sbin/ctld/ctld.c index 247c8f9759ae..6c294f7c0cd9 100644 --- a/usr.sbin/ctld/ctld.c +++ b/usr.sbin/ctld/ctld.c @@ -362,7 +362,7 @@ auth_portal_new(struct auth_group *ag, const char *portal) if (ap == NULL) log_err(1, "calloc"); ap->ap_auth_group = ag; - ap->ap_initator_portal = checked_strdup(portal); + ap->ap_initiator_portal = checked_strdup(portal); mask = str = checked_strdup(portal); net = strsep(&mask, "/"); if (net[0] == '[') @@ -414,7 +414,7 @@ auth_portal_delete(struct auth_portal *ap) { TAILQ_REMOVE(&ap->ap_auth_group->ag_portals, ap, ap_next); - free(ap->ap_initator_portal); + free(ap->ap_initiator_portal); free(ap); } @@ -1683,7 +1683,7 @@ conf_print(struct conf *conf) auth_name->an_initator_name); TAILQ_FOREACH(auth_portal, &ag->ag_portals, ap_next) fprintf(stderr, "\t initiator-portal %s\n", - auth_portal->ap_initator_portal); + auth_portal->ap_initiator_portal); fprintf(stderr, "}\n"); } TAILQ_FOREACH(pg, &conf->conf_portal_groups, pg_next) { diff --git a/usr.sbin/ctld/ctld.h b/usr.sbin/ctld/ctld.h index fec7fb7c937d..2b485496d013 100644 --- a/usr.sbin/ctld/ctld.h +++ b/usr.sbin/ctld/ctld.h @@ -69,7 +69,7 @@ struct auth_name { struct auth_portal { TAILQ_ENTRY(auth_portal) ap_next; struct auth_group *ap_auth_group; - char *ap_initator_portal; + char *ap_initiator_portal; struct sockaddr_storage ap_sa; int ap_mask; }; From owner-dev-commits-src-all@freebsd.org Tue Dec 29 18:38:33 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9C00F4C818D; Tue, 29 Dec 2020 18:38:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D538T4110z3D4f; Tue, 29 Dec 2020 18:38:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7C6BA108D6; Tue, 29 Dec 2020 18:38:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTIcXFm067634; Tue, 29 Dec 2020 18:38:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTIcXer067633; Tue, 29 Dec 2020 18:38:33 GMT (envelope-from git) Date: Tue, 29 Dec 2020 18:38:33 GMT Message-Id: <202012291838.0BTIcXer067633@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Fernando Apesteguía Subject: git: 0ce6e534d372 - main - lsvfs(1): Add EXAMPLES section MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ce6e534d372df81743b1eb00e89d02b3597beb0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 18:38:33 -0000 The branch main has been updated by fernape (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=0ce6e534d372df81743b1eb00e89d02b3597beb0 commit 0ce6e534d372df81743b1eb00e89d02b3597beb0 Author: Fernando Apesteguía AuthorDate: 2020-12-29 20:35:24 +0000 Commit: Fernando Apesteguía CommitDate: 2020-12-29 20:35:24 +0000 lsvfs(1): Add EXAMPLES section Add one simple exapmle and contrast some of the information using mount(8) PR: Submitted by: Reported by: Reviewed by: gbe@, yuripv@ Approved by: manpages (bcr@) Obtained from: MFC after: MFH: Relnotes: Security: Sponsored by: Differential Revision: https://reviews.freebsd.org/D27544 --- usr.bin/lsvfs/lsvfs.1 | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/usr.bin/lsvfs/lsvfs.1 b/usr.bin/lsvfs/lsvfs.1 index 5bdb64eed1ca..c86be83ba3f9 100644 --- a/usr.bin/lsvfs/lsvfs.1 +++ b/usr.bin/lsvfs/lsvfs.1 @@ -2,7 +2,7 @@ .\" Garrett A. Wollman, September 1994 .\" This file is in the public domain. .\" -.Dd June 9, 2013 +.Dd December 28, 2020 .Dt LSVFS 1 .Os .Sh NAME @@ -44,6 +44,22 @@ mounted file systems of this type .It Flags flag bits. .El +.Sh EXAMPLES +Show information about the +.Ql ufs +and +.Xr devfs 5 +filesystems and check the number of mounts for the former: +.Bd -literal -offset indent +$ lsvfs ufs devfs +Filesystem Num Refs Flags +-------------------------------- ---------- ----- --------------- +ufs 0x00000035 2 +devfs 0x00000071 1 synthetic, jail + +$ mount -t ufs | wc -l + 2 +.Ed .Sh SEE ALSO .Xr mount 2 , .Xr getvfsbyname 3 , From owner-dev-commits-src-all@freebsd.org Tue Dec 29 18:55:23 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8D64A4C81E1; Tue, 29 Dec 2020 18:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D53Wv3frFz3F6p; Tue, 29 Dec 2020 18:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7080710CF4; Tue, 29 Dec 2020 18:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTItNnW089543; Tue, 29 Dec 2020 18:55:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTItNQ2089542; Tue, 29 Dec 2020 18:55:23 GMT (envelope-from git) Date: Tue, 29 Dec 2020 18:55:23 GMT Message-Id: <202012291855.0BTItNQ2089542@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Fernando Apesteguía Subject: git: f3f16c31fea2 - main - look(1): Add EXAMPLES section MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f3f16c31fea258b2b1ec51ddd1bceb6207b66198 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 18:55:23 -0000 The branch main has been updated by fernape (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=f3f16c31fea258b2b1ec51ddd1bceb6207b66198 commit f3f16c31fea258b2b1ec51ddd1bceb6207b66198 Author: Fernando Apesteguía AuthorDate: 2020-12-29 20:48:12 +0000 Commit: Fernando Apesteguía CommitDate: 2020-12-29 20:48:12 +0000 look(1): Add EXAMPLES section Add two simple examples. In this case I opted to show a small portion of the output since it helps to understand what the tool does. It shows the use of the -t flag too. PR: Submitted by: Reported by: Reviewed by: gbe@ Approved by: manpages (bcr@) Obtained from: MFC after: MFH: Relnotes: Security: Sponsored by: Differential Revision: https://reviews.freebsd.org/D27543 --- usr.bin/look/look.1 | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/usr.bin/look/look.1 b/usr.bin/look/look.1 index b2f7100da530..177306e4eb09 100644 --- a/usr.bin/look/look.1 +++ b/usr.bin/look/look.1 @@ -28,7 +28,7 @@ .\" @(#)look.1 8.1 (Berkeley) 6/14/93 .\" $FreeBSD$ .\" -.Dd July 17, 2004 +.Dd December 29, 2020 .Dt LOOK 1 .Os .Sh NAME @@ -96,6 +96,35 @@ The .Nm utility exits 0 if one or more lines were found and displayed, 1 if no lines were found, and >1 if an error occurred. +.Sh EXAMPLES +Look for lines starting with +.Ql xylene +in the file +.Pa /usr/share/dict/words : +.Bd -literal -offset indent +$ look xylen +xylene +xylenol +xylenyl +.Ed +.Pp +Same as above, but do not consider any characters in +.Ar string +beyond the first +.Ql e . +Note that +.Fl f +is implicit since we are searching the default file +.Pa /usr/share/dict/words : +.Bd -literal -offset indent +$ look -t e xylen +Xyleborus +xylem +xylene +xylenol +xylenyl +xyletic +.Ed .Sh COMPATIBILITY The original manual page stated that tabs and blank characters participated in comparisons when the From owner-dev-commits-src-all@freebsd.org Tue Dec 29 19:05:10 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F39B4C89EC; Tue, 29 Dec 2020 19:05:10 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (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 4D53lB33Cpz3G9T; Tue, 29 Dec 2020 19:05:10 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qk1-x72c.google.com with SMTP id 19so12153148qkm.8; Tue, 29 Dec 2020 11:05:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sZZa9gM8BHkPqrtQeJX6v8p3VrxTzc+sXTgLUe7aslc=; b=qVhbYvf18xYVfui6GEAk9r2peAA5N2/IsHBYNIqwCWxTptgFTzx8SV5crXJ2ZWnMoO A72kLsnFi4dv6v9vLYPQkDxsXI6KVl6Vr0vGE+vFueOYjz0TJ9znPRf9rBL6fPvOnexv yaNEeQl585V9uubtorN9WQttp2O0AitAfUYiwJteu1nHyjKu/hOzpIfIP9mgopZhVB0h R5u/XME260rv42zgr+RosuSNFmXha8PwdWnlYXbGCTzZsGFF1qAIdW6uAjwK5Jk4eudZ PCKWthQ5N8krXQFJnwEHtQP2uFQiGLuBof1zX6j5rMwpFAFsfrgIqgKMnY0wEuIP9uzT XUEQ== 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=sZZa9gM8BHkPqrtQeJX6v8p3VrxTzc+sXTgLUe7aslc=; b=P7zQjcoFjl4al+9fT7Haj9muTFjuSxY7dpiRsgNNjVbImgy/J53JQUvPMsg/U0WO33 wzVTT/fqkpGfWLRA6F1ppStzmYCyWFB3OfJww5TzCHGP1/GkcUTdrUQRLZBfRa13ZjYO 96VaDD2qQ8OtMjT7zrc+EgEhpEbo4u+lFEVlwI5RH3yHGXGsIZsqdj1e8lxkoRIMXF9P vsDUFL73nMRfvLmEU7ubNGPdz2AIoLLoHMaEilLvjWRiuiOI+3Q/SD+b4Q0RXDGULJJR C9kgyr9m/XgQN7kauzoBGjiCzIFihIkr09ZpZvZg5g0GoL/qhG7qQrYN3li8M5g47F5i hSaw== X-Gm-Message-State: AOAM531ZEGdbS+i/GEOMVDkMo9s+TxTYTIPPz6FXK0wlAdCedAHrDzuf XCd6h/9HzaLF3rNkupYNgvg8aOn5Y196yA8N1+A77H8VCuOGZg== X-Google-Smtp-Source: ABdhPJxH7OcYBiDhokgg4gC/TWPEdRH8aJG/1DmfX5KL9WhBikZmkLFB8XULbF191G+Qw31SnaadHxwb3p5wIf9D9+E= X-Received: by 2002:a05:620a:4047:: with SMTP id i7mr49576911qko.3.1609268709241; Tue, 29 Dec 2020 11:05:09 -0800 (PST) MIME-Version: 1.0 References: <202012291500.0BTF0vGw034594@gitrepo.freebsd.org> In-Reply-To: <202012291500.0BTF0vGw034594@gitrepo.freebsd.org> From: Ryan Libby Date: Tue, 29 Dec 2020 11:04:58 -0800 Message-ID: Subject: Re: git: 89e3d5671ba1 - main - bsnmpclient(3): make it thread-safe To: Edward Tomasz Napierala Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4D53lB33Cpz3G9T X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 19:05:10 -0000 On Tue, Dec 29, 2020 at 7:01 AM Edward Tomasz Napierala wrote: > > The branch main has been updated by trasz: > > URL: https://cgit.FreeBSD.org/src/commit/?id=89e3d5671ba13dceca272d5b159c9bd805f3f504 > > commit 89e3d5671ba13dceca272d5b159c9bd805f3f504 > Author: Edward Tomasz Napierala > AuthorDate: 2020-12-29 14:59:31 +0000 > Commit: Edward Tomasz Napierala > CommitDate: 2020-12-29 14:59:37 +0000 > > bsnmpclient(3): make it thread-safe > > Reviewed By: harti > Sponsored by: NetApp, Inc. > Sponsored by: Klara, Inc. > Differential Revision: https://reviews.freebsd.org/D27336 > --- > contrib/bsnmp/lib/asn1.c | 2 +- > contrib/bsnmp/lib/snmpclient.c | 4 ++-- > contrib/bsnmp/lib/snmpclient.h | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/contrib/bsnmp/lib/asn1.c b/contrib/bsnmp/lib/asn1.c > index f1f9267c0226..a03dac70c529 100644 > --- a/contrib/bsnmp/lib/asn1.c > +++ b/contrib/bsnmp/lib/asn1.c > @@ -1019,7 +1019,7 @@ asn_oid2str_r(const struct asn_oid *oid, char *buf) > char * > asn_oid2str(const struct asn_oid *oid) > { > - static char str[ASN_OIDSTRLEN]; > + __thread static char str[ASN_OIDSTRLEN]; gcc does not accept this spelling. It insists on `static __thread` instead. --- asn1.o --- /usr/src/freebsd/contrib/bsnmp/lib/asn1.c: In function 'asn_oid2str': /usr/src/freebsd/contrib/bsnmp/lib/asn1.c:1022:2: error: '__thread' before 'static' 1022 | __thread static char str[ASN_OIDSTRLEN]; | ^~~~~~~~ https://gcc.gnu.org/onlinedocs/gcc/Thread-Local.html > > return (asn_oid2str_r(oid, str)); > } > diff --git a/contrib/bsnmp/lib/snmpclient.c b/contrib/bsnmp/lib/snmpclient.c > index c22d8e125a14..e49105918416 100644 > --- a/contrib/bsnmp/lib/snmpclient.c > +++ b/contrib/bsnmp/lib/snmpclient.c > @@ -71,7 +71,7 @@ > #define DEBUG_PARSE 0 > > /* global context */ > -struct snmp_client snmp_client; > +__thread struct snmp_client snmp_client; > > /* List of all outstanding requests */ > struct sent_pdu { > @@ -86,7 +86,7 @@ struct sent_pdu { > }; > LIST_HEAD(sent_pdu_list, sent_pdu); > > -static struct sent_pdu_list sent_pdus; > +__thread static struct sent_pdu_list sent_pdus; Same here. > > /* > * Prototype table entry. All C-structure produced by the table function must > diff --git a/contrib/bsnmp/lib/snmpclient.h b/contrib/bsnmp/lib/snmpclient.h > index a19bdb2ea653..1bc3780de038 100644 > --- a/contrib/bsnmp/lib/snmpclient.h > +++ b/contrib/bsnmp/lib/snmpclient.h > @@ -114,7 +114,7 @@ struct snmp_client { > }; > > /* the global context */ > -extern struct snmp_client snmp_client; > +extern __thread struct snmp_client snmp_client; > > /* initizialies a snmp_client structure */ > void snmp_client_init(struct snmp_client *); From owner-dev-commits-src-all@freebsd.org Tue Dec 29 19:15:54 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 813EB4C87C9; Tue, 29 Dec 2020 19:15:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D53zZ3JrJz3Gqf; Tue, 29 Dec 2020 19:15:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6039710EE9; Tue, 29 Dec 2020 19:15:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTJFsFI012363; Tue, 29 Dec 2020 19:15:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTJFsWC012362; Tue, 29 Dec 2020 19:15:54 GMT (envelope-from git) Date: Tue, 29 Dec 2020 19:15:54 GMT Message-Id: <202012291915.0BTJFsWC012362@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 32cd91996213 - stable/12 - Add some non-default src.conf(5) knob descriptions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 32cd91996213ad11a6e10139fbc88e94b53b11b9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 19:15:54 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=32cd91996213ad11a6e10139fbc88e94b53b11b9 commit 32cd91996213ad11a6e10139fbc88e94b53b11b9 Author: Ed Maste AuthorDate: 2018-11-21 14:50:45 +0000 Commit: Ed Maste CommitDate: 2020-12-29 19:15:04 +0000 Add some non-default src.conf(5) knob descriptions Some WITH_/WITHOUT_ defaults will likey change in the future (e.g. as we migrate to copyfree base system components). Add non-default descriptions for the benefit of WIP branches. (cherry picked from commit 0161256ccc89660285140ea2056441ec8e882831) --- tools/build/options/WITHOUT_BSD_GREP | 2 ++ tools/build/options/WITH_GCOV | 4 ++++ tools/build/options/WITH_GNU_DIFF | 5 +++++ tools/build/options/WITH_GNU_GREP | 3 +++ tools/build/options/WITH_SENDMAIL | 4 ++++ tools/build/options/WITH_TCP_WRAPPERS | 4 ++++ 6 files changed, 22 insertions(+) diff --git a/tools/build/options/WITHOUT_BSD_GREP b/tools/build/options/WITHOUT_BSD_GREP new file mode 100644 index 000000000000..b598d8aca012 --- /dev/null +++ b/tools/build/options/WITHOUT_BSD_GREP @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Install GNU grep as '[ef]grep' instead of BSD grep. diff --git a/tools/build/options/WITH_GCOV b/tools/build/options/WITH_GCOV new file mode 100644 index 000000000000..a9f3eb68a82b --- /dev/null +++ b/tools/build/options/WITH_GCOV @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Build and install the GNU +.Xr gcov 1 +tool. diff --git a/tools/build/options/WITH_GNU_DIFF b/tools/build/options/WITH_GNU_DIFF new file mode 100644 index 000000000000..3741e440a9ba --- /dev/null +++ b/tools/build/options/WITH_GNU_DIFF @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Build and install GNU +.Xr diff 1 +and +.Xr diff3 1 . diff --git a/tools/build/options/WITH_GNU_GREP b/tools/build/options/WITH_GNU_GREP new file mode 100644 index 000000000000..1d19a7df092c --- /dev/null +++ b/tools/build/options/WITH_GNU_GREP @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Build and install GNU +.Xr grep 1 . diff --git a/tools/build/options/WITH_SENDMAIL b/tools/build/options/WITH_SENDMAIL new file mode 100644 index 000000000000..ca399c968fe1 --- /dev/null +++ b/tools/build/options/WITH_SENDMAIL @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Build and install +.Xr sendmail 8 +and related programs. diff --git a/tools/build/options/WITH_TCP_WRAPPERS b/tools/build/options/WITH_TCP_WRAPPERS new file mode 100644 index 000000000000..8fd8e2aa6c56 --- /dev/null +++ b/tools/build/options/WITH_TCP_WRAPPERS @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Build and install +.Xr tcpd 8 , +and related utilities. From owner-dev-commits-src-all@freebsd.org Tue Dec 29 19:15:54 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 784174C8A76; Tue, 29 Dec 2020 19:15:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D53zZ2zQFz3H17; Tue, 29 Dec 2020 19:15:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 58F7A11153; Tue, 29 Dec 2020 19:15:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTJFsvH012344; Tue, 29 Dec 2020 19:15:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTJFsAj012343; Tue, 29 Dec 2020 19:15:54 GMT (envelope-from git) Date: Tue, 29 Dec 2020 19:15:54 GMT Message-Id: <202012291915.0BTJFsAj012343@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 696db1d8624f - stable/12 - Update GNU_DIFF knob descriptions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 696db1d8624f7491e9ada5b1b162ea70fe88aa98 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 19:15:54 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=696db1d8624f7491e9ada5b1b162ea70fe88aa98 commit 696db1d8624f7491e9ada5b1b162ea70fe88aa98 Author: Ed Maste AuthorDate: 2020-05-20 17:20:48 +0000 Commit: Ed Maste CommitDate: 2020-12-29 19:15:31 +0000 Update GNU_DIFF knob descriptions After r317209 the WITH_/WITHOUT_GNU_DIFF knob controls only diff3; diff is always BSD diff. MFC after: 1 week (cherry picked from commit e578c8c3b51fdfa8dd4eafd113457d516d447984) --- tools/build/options/WITHOUT_GNU_DIFF | 2 -- tools/build/options/WITH_GNU_DIFF | 2 -- 2 files changed, 4 deletions(-) diff --git a/tools/build/options/WITHOUT_GNU_DIFF b/tools/build/options/WITHOUT_GNU_DIFF index de8667fe4d73..48d7361ff8ca 100644 --- a/tools/build/options/WITHOUT_GNU_DIFF +++ b/tools/build/options/WITHOUT_GNU_DIFF @@ -1,5 +1,3 @@ .\" $FreeBSD$ Set to not build GNU -.Xr diff 1 -and .Xr diff3 1 . diff --git a/tools/build/options/WITH_GNU_DIFF b/tools/build/options/WITH_GNU_DIFF index 3741e440a9ba..41827190aa94 100644 --- a/tools/build/options/WITH_GNU_DIFF +++ b/tools/build/options/WITH_GNU_DIFF @@ -1,5 +1,3 @@ .\" $FreeBSD$ Build and install GNU -.Xr diff 1 -and .Xr diff3 1 . From owner-dev-commits-src-all@freebsd.org Tue Dec 29 19:17:13 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 824A64C8AB3; Tue, 29 Dec 2020 19:17:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D54153F2sz3H9l; Tue, 29 Dec 2020 19:17:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6017F10EEA; Tue, 29 Dec 2020 19:17:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTJHDY6012659; Tue, 29 Dec 2020 19:17:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTJHDR9012658; Tue, 29 Dec 2020 19:17:13 GMT (envelope-from git) Date: Tue, 29 Dec 2020 19:17:13 GMT Message-Id: <202012291917.0BTJHDR9012658@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 2aa6c0802bce - stable/12 - uplcom: add ATen/Prolific USB-232 Controller D USB ID MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 2aa6c0802bce936a3f9a8f20515babdcf515c2b8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 19:17:13 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2aa6c0802bce936a3f9a8f20515babdcf515c2b8 commit 2aa6c0802bce936a3f9a8f20515babdcf515c2b8 Author: Ed Maste AuthorDate: 2020-11-17 18:28:20 +0000 Commit: Ed Maste CommitDate: 2020-12-29 19:16:59 +0000 uplcom: add ATen/Prolific USB-232 Controller D USB ID PR: 251166 Submitted by: marcus MFC after: 2 weeks (cherry picked from commit 46a5f8837dff05f6581b908170aeecb811f1e95e) --- share/man/man4/uplcom.4 | 4 ++++ sys/dev/usb/serial/uplcom.c | 1 + sys/dev/usb/usbdevs | 1 + 3 files changed, 6 insertions(+) diff --git a/share/man/man4/uplcom.4 b/share/man/man4/uplcom.4 index 66f3e59d9e12..b79aac28a80c 100644 --- a/share/man/man4/uplcom.4 +++ b/share/man/man4/uplcom.4 @@ -82,6 +82,8 @@ Anchor Serial adapter .It ATEN UC-232A .It +ATEN UC-232B +.It BAFO BF-800 and BF-810 .It Belkin F5U257 @@ -134,6 +136,8 @@ Prolific Generic USB-Serial Adapters .It Prolific Pharos USB-Serial Adapter .It +Prolific USB-Serial Controller D +.It RATOC REX-USB60 .It Radio Shack USB Serial Cable diff --git a/sys/dev/usb/serial/uplcom.c b/sys/dev/usb/serial/uplcom.c index 8c1f758a2e37..a054601cc8ea 100644 --- a/sys/dev/usb/serial/uplcom.c +++ b/sys/dev/usb/serial/uplcom.c @@ -260,6 +260,7 @@ static const STRUCT_USB_HOST_ID uplcom_devs[] = { UPLCOM_DEV(ALCOR, AU9720), /* Alcor AU9720 USB 2.0-RS232 */ UPLCOM_DEV(ANCHOR, SERIAL), /* Anchor Serial adapter */ UPLCOM_DEV(ATEN, UC232A), /* PLANEX USB-RS232 URS-03 */ + UPLCOM_DEV(ATEN, UC232B), /* Prolific USB-RS232 Controller D */ UPLCOM_DEV(BELKIN, F5U257), /* Belkin F5U257 USB to Serial */ UPLCOM_DEV(COREGA, CGUSBRS232R), /* Corega CG-USBRS232R */ UPLCOM_DEV(EPSON, CRESSI_EDY), /* Cressi Edy diving computer */ diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index ca7d7ee74f6b..b64526593c25 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1276,6 +1276,7 @@ product ATEN UC1284 0x2001 Parallel printer product ATEN UC10T 0x2002 10Mbps Ethernet product ATEN UC110T 0x2007 UC-110T Ethernet product ATEN UC232A 0x2008 Serial +product ATEN UC232B 0x2022 Serial product ATEN UC210T 0x2009 UC-210T Ethernet product ATEN DSB650C 0x4000 DSB-650C From owner-dev-commits-src-all@freebsd.org Tue Dec 29 19:41:24 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EEE504C929B; Tue, 29 Dec 2020 19:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D54Y06NNgz3JMd; Tue, 29 Dec 2020 19:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CDE8511665; Tue, 29 Dec 2020 19:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTJfObw048485; Tue, 29 Dec 2020 19:41:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTJfOPL048484; Tue, 29 Dec 2020 19:41:24 GMT (envelope-from git) Date: Tue, 29 Dec 2020 19:41:24 GMT Message-Id: <202012291941.0BTJfOPL048484@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hiroki Sato Subject: git: 916806472a8a - main - Fix generation of colldef source files for non-UTF-8 locales MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 916806472a8a245e8f2ddfeea4a1db652879a6f6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 19:41:25 -0000 The branch main has been updated by hrs: URL: https://cgit.FreeBSD.org/src/commit/?id=916806472a8a245e8f2ddfeea4a1db652879a6f6 commit 916806472a8a245e8f2ddfeea4a1db652879a6f6 Author: Hiroki Sato AuthorDate: 2020-12-29 19:21:19 +0000 Commit: Hiroki Sato CommitDate: 2020-12-29 19:40:27 +0000 Fix generation of colldef source files for non-UTF-8 locales - Files for colldef were generated by duplicating UTF-8 collation files for each language and included invalid characters in the non-UTF-8 encodings. localedef(1) does not allow those characters. cldr2def.pl now checks if the characters are valid based on charmap files. TODO: ja_JP.UTF-8 locale should not be generated solely from CLDR because it was standardized in a document "UI-OSF Application Platform Profile for Japanese Environment" which was incompatible with information in CLDR. Most of commercial Unix vendors adopt this pre-Unicode-era document as the reference even for UTF-8 locale. Newer versions of Solaris have added a CLDR version as ja_JP.UTF-8@cldr, and IBM AIX has used JA_JP.UTF-8 for the UI-OSF specification and ja_JP.UTF-8 for CLDR. Note that this commit does not change generation of ja_JP.UTF-8. Changes related to this issue will be committed separately later. - Generate POSIX charamap UTF-32 as a reference. It was confusing that charmap.xml used Unicode names defined in UnicodeData.txt though POSIX charmap used slightly different names for the same code points. cldr2def.pl now uses UTF-32.cm as single information source for Unicode symbol names and code points. Charset.xml is also updated to use them. - Fix a bug in get_encodings() in cldr2def.pl which did not understand 0x00+0x00 notation correctly in charmaps/ISCII-DEV.TXT. - Do not regenerate posix/xx_Comm_C.UTF-8.src every time when doing "make build". Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D27809 --- tools/tools/locale/Makefile | 6 +- tools/tools/locale/README | 9 +- tools/tools/locale/etc/charmaps.xml | 421 ++++++++++++++++++----------------- tools/tools/locale/tools/cldr2def.pl | 210 +++++++++++------ 4 files changed, 363 insertions(+), 283 deletions(-) diff --git a/tools/tools/locale/Makefile b/tools/tools/locale/Makefile index 27ff255d7f9a..92f890b2f4d3 100644 --- a/tools/tools/locale/Makefile +++ b/tools/tools/locale/Makefile @@ -168,7 +168,8 @@ ENCODINGS= Big5 \ KOI8-U \ SJIS \ US-ASCII \ - UTF-8 + UTF-8 \ + UTF-32 # CLDR files CLDRFILES_CORE= https://unicode.org/Public/cldr/35/core.zip @@ -211,9 +212,10 @@ ${UNIDIR}/posix: ln -s -f ../posix ${.TARGET} clean-posix: rm -rf posix ${UNIDIR}/posix -post-posixcm: ${UNIDIR}/posix +${UNIDIR}/posix/xx_Comm_C.UTF-8.src: ${UNIDIR}/posix perl -I ${TOOLSDIR} ${TOOLSDIR}/utf8-rollup.pl \ --unidir=${UNIDIR} +post-posixcm: ${UNIDIR}/posix/xx_Comm_C.UTF-8.src .for enc in ${ENCODINGS} posixcm: build-tools posix/${enc}.cm .ORDER: build-tools posix/${enc}.cm diff --git a/tools/tools/locale/README b/tools/tools/locale/README index 0b5ce24b51cd..380786929b7c 100644 --- a/tools/tools/locale/README +++ b/tools/tools/locale/README @@ -19,7 +19,7 @@ More details are as follows: Variables: LOCALESRCDIR Destination path for the generated locale files. - Default: $DESTDIR/usr/src/share. + Default: ${SRCTOP}/share. TMPDIR Temporary directory. Default: /tmp @@ -29,7 +29,12 @@ Targets: Create a temporary directory for building. make clean - Clean up the obj directories. + Clean up the obj directories. Note that this does not + clean up tools or posix locale source files generated + from the CLDR files because it takes a long time to generate + them and they are not changed as long as using the same + CLDR files. "make clean && make build" will + regenerate the locale source files for src/share/*def. make cleandir Remove the obj directories completely. diff --git a/tools/tools/locale/etc/charmaps.xml b/tools/tools/locale/etc/charmaps.xml index 78a344d6929e..52e80f2dee05 100644 --- a/tools/tools/locale/etc/charmaps.xml +++ b/tools/tools/locale/etc/charmaps.xml @@ -195,395 +195,404 @@ + - - - - + + + + + cldr="MINUS_SIGN" unicode="HYPHEN-MINUS" /> + cldr="EN_DASH" unicode="HYPHEN-MINUS" /> + cldr="CYRILLIC_CAPITAL_LETTER_JE" + unicode="LATIN_CAPITAL_LETTER_J" /> + cldr="CYRILLIC_SMALL_LETTER_JE" unicode="LATIN_SMALL_LETTER_J" /> + cldr="CYRILLIC_CAPITAL_LETTER_LJE" string="lj" /> + cldr="CYRILLIC_SMALL_LETTER_LJE" string="lj" /> + cldr="CYRILLIC_CAPITAL_LETTER_A" unicode="LATIN_CAPITAL_LETTER_A" /> + cldr="CYRILLIC_SMALL_LETTER_A" unicode="LATIN_SMALL_LETTER_A" /> + cldr="CYRILLIC_CAPITAL_LETTER_BE" + unicode="LATIN_CAPITAL_LETTER_B" /> + cldr="CYRILLIC_SMALL_LETTER_BE" unicode="LATIN_SMALL_LETTER_B" /> + cldr="CYRILLIC_CAPITAL_LETTER_VE" + unicode="LATIN_CAPITAL_LETTER_B" /> + cldr="CYRILLIC_SMALL_LETTER_VE" unicode="LATIN_SMALL_LETTER_B" /> + cldr="CYRILLIC_CAPITAL_LETTER_GHE" + unicode="LATIN_CAPITAL_LETTER_G" /> + cldr="CYRILLIC_SMALL_LETTER_GHE" unicode="LATIN_SMALL_LETTER_G" /> + cldr="CYRILLIC_CAPITAL_LETTER_DE" string="D" /> + cldr="CYRILLIC_SMALL_LETTER_DE" string="d" /> + cldr="CYRILLIC_CAPITAL_LETTER_IE" + unicode="LATIN_CAPITAL_LETTER_E" /> + cldr="CYRILLIC_SMALL_LETTER_IE" unicode="LATIN_SMALL_LETTER_E" /> + cldr="CYRILLIC_CAPITAL_LETTER_ZHE" string="ZH" /> + cldr="CYRILLIC_SMALL_LETTER_ZHE" string="zh" /> + cldr="CYRILLIC_CAPITAL_LETTER_ZE" string="z" /> + cldr="CYRILLIC_SMALL_LETTER_ZE" string="z" /> + cldr="CYRILLIC_CAPITAL_LETTER_I" unicode="LATIN_CAPITAL_LETTER_J" /> + cldr="CYRILLIC_SMALL_LETTER_I" unicode="LATIN_CAPITAL_LETTER_J" /> + cldr="CYRILLIC_CAPITAL_LETTER_I" unicode="LATIN_SMALL_LETTER_J" /> + cldr="CYRILLIC_SMALL_LETTER_I" unicode="LATIN_SMALL_LETTER_J" /> + cldr="CYRILLIC_CAPITAL_LETTER_KA" + unicode="LATIN_CAPITAL_LETTER_K" /> + cldr="CYRILLIC_SMALL_LETTER_KA" unicode="LATIN_SMALL_LETTER_K" /> + cldr="CYRILLIC_CAPITAL_LETTER_EL" + unicode="LATIN_CAPITAL_LETTER_L" /> + cldr="CYRILLIC_SMALL_LETTER_EL" unicode="LATIN_SMALL_LETTER_L" /> + cldr="CYRILLIC_CAPITAL_LETTER_EM" + unicode="LATIN_CAPITAL_LETTER_M" /> + cldr="CYRILLIC_SMALL_LETTER_EM" unicode="LATIN_SMALL_LETTER_M" /> + cldr="CYRILLIC_CAPITAL_LETTER_EN" + unicode="LATIN_CAPITAL_LETTER_H" /> + cldr="CYRILLIC_SMALL_LETTER_EN" unicode="LATIN_SMALL_LETTER_H" /> + cldr="CYRILLIC_CAPITAL_LETTER_O" unicode="LATIN_CAPITAL_LETTER_O" /> + cldr="CYRILLIC_SMALL_LETTER_O" unicode="LATIN_SMALL_LETTER_O" /> + cldr="CYRILLIC_CAPITAL_LETTER_PE" + unicode="LATIN_CAPITAL_LETTER_P" /> + cldr="CYRILLIC_SMALL_LETTER_PE" unicode="LATIN_SMALL_LETTER_P" /> + cldr="CYRILLIC_CAPITAL_LETTER_ER" + unicode="LATIN_CAPITAL_LETTER_R" /> + cldr="CYRILLIC_SMALL_LETTER_ER" unicode="LATIN_SMALL_LETTER_R" /> + cldr="CYRILLIC_CAPITAL_LETTER_ES" + unicode="LATIN_CAPITAL_LETTER_C" /> + cldr="CYRILLIC_SMALL_LETTER_ES" unicode="LATIN_SMALL_LETTER_C" /> + cldr="CYRILLIC_CAPITAL_LETTER_TE" + unicode="LATIN_CAPITAL_LETTER_T" /> + cldr="CYRILLIC_SMALL_LETTER_TE" unicode="LATIN_SMALL_LETTER_T" /> + cldr="CYRILLIC_CAPITAL_LETTER_U" unicode="LATIN_CAPITAL_LETTER_U" /> + cldr="CYRILLIC_SMALL_LETTER_U" unicode="LATIN_SMALL_LETTER_U" /> + cldr="CYRILLIC_CAPITAL_LETTER_EF" + unicode="LATIN_CAPITAL_LETTER_F" /> + cldr="CYRILLIC_SMALL_LETTER_EF" unicode="LATIN_SMALL_LETTER_F" /> + cldr="CYRILLIC_CAPITAL_LETTER_HA" + unicode="LATIN_CAPITAL_LETTER_H" /> + cldr="CYRILLIC_SMALL_LETTER_HA" unicode="LATIN_SMALL_LETTER_H" /> + cldr="CYRILLIC_CAPITAL_LETTER_TSE" + unicode="LATIN_CAPITAL_LETTER_C" /> + cldr="CYRILLIC_SMALL_LETTER_TSE" unicode="LATIN_SMALL_LETTER_C" /> + cldr="CYRILLIC_CAPITAL_LETTER_CHE" + unicode="LATIN_CAPITAL_LETTER_C_WITH_CARON" /> + cldr="CYRILLIC_SMALL_LETTER_CHE" + unicode="LATIN_SMALL_LETTER_C_WITH_CARON" /> + cldr="CYRILLIC_CAPITAL_LETTER_SHA" + unicode="LATIN_CAPITAL_LETTER_S_WITH_CARON" /> + cldr="CYRILLIC_SMALL_LETTER_SHA" + unicode="LATIN_SMALL_LETTER_S_WITH_CARON" /> + cldr="CYRILLIC_CAPITAL_LETTER_SHCHA" + unicode="LATIN_CAPITAL_LETTER_S_WITH_CIRCUMFLEX" /> + cldr="CYRILLIC_SMALL_LETTER_SHCHA" + unicode="LATIN_SMALL_LETTER_S_WITH_CIRCUMFLEX" /> + cldr="?CYRILLIC_CAPITAL_LETTER_HARD_SIGN" unicode="?" /> + cldr="?CYRILLIC_SMALL_LETTER_HARD_SIGN" unicode="?" /> + cldr="?CYRILLIC_CAPITAL_LETTER_YERU" unicode="?" /> + cldr="?CYRILLIC_SMALL_LETTER_YERU" unicode="?" /> + cldr="?CYRILLIC_CAPITAL_LETTER_SOFT_SIGN" unicode="?" /> + cldr="?CYRILLIC_SMALL_LETTER_SOFT_SIGN" unicode="?" /> + cldr="CYRILLIC_CAPITAL_LETTER_E" + unicode="LATIN_CAPITAL_LETTER_E_WITH_GRAVE" /> + cldr="CYRILLIC_SMALL_LETTER_E" + unicode="LATIN_SMALL_LETTER_E_WITH_GRAVE" /> + cldr="?CYRILLIC_CAPITAL_LETTER_YU" unicode="?" /> + cldr="?CYRILLIC_SMALL_LETTER_YU" unicode="?" /> + cldr="CYRILLIC_CAPITAL_LETTER_YA" + unicode="LATIN_CAPITAL_LETTER_A_WITH_CIRCUMFLEX" /> + cldr="CYRILLIC_SMALL_LETTER_YA" + unicode="LATIN_SMALL_LETTER_A_WITH_CIRCUMFLEX" /> + cldr="LATIN_SMALL_LETTER_T_WITH_COMMA_BELOW" + unicode="LATIN_SMALL_LETTER_T" /> + cldr="MODIFIER_LETTER_APOSTROPHE" unicode="APOSTROPHE" /> + cldr="LATIN_SMALL_LETTER_C_WITH_CARON" + unicode="LATIN_SMALL_LETTER_C" /> + cldr="MODIFIER_LETTER_APOSTROPHE" unicode="APOSTROPHE" /> + cldr="MODIFIER_LETTER_APOSTROPHE" unicode="APOSTROPHE" /> - - - - - - - + + + + + + + - - + + + unicode="FULLWIDTH_LATIN_CAPITAL_LETTER_C" /> + unicode="FULLWIDTH_LATIN_CAPITAL_LETTER_D" /> + unicode="FULLWIDTH_LATIN_CAPITAL_LETTER_N" /> + unicode="FULLWIDTH_LATIN_CAPITAL_LETTER_T" /> + unicode="FULLWIDTH_LATIN_CAPITAL_LETTER_W" /> + unicode="FULLWIDTH_LATIN_CAPITAL_LETTER_Y" /> + unicode="FULLWIDTH_DIGIT_ONE" /> + unicode="FULLWIDTH_DIGIT_TWO" /> + unicode="FULLWIDTH_DIGIT_THREE" /> + unicode="FULLWIDTH_DIGIT_FOUR" /> + unicode="FULLWIDTH_DIGIT_FIVE" /> + unicode="FULLWIDTH_DIGIT_SIX" /> + unicode="FULLWIDTH_DIGIT_SEVEN" /> + unicode="FULLWIDTH_DIGIT_EIGHT" /> + unicode="FULLWIDTH_DIGIT_NINE" /> + unicode="FULLWIDTH_DIGIT_ZERO" /> - + unicode="IDEOGRAPHIC_SPACE" /> + + unicode="FULLWIDTH_SOLIDUS" /> + unicode="FULLWIDTH_COMMA" /> - + unicode="FULLWIDTH_HYPHEN-MINUS" /> + + cldr="CJK_UNIFIED_IDEOGRAPH-4E00" ucc="4E00" /> + cldr="CJK_UNIFIED_IDEOGRAPH-4E03" ucc="4E03" /> + cldr="CJK_UNIFIED_IDEOGRAPH-4E09" ucc="4E09" /> + cldr="CJK_UNIFIED_IDEOGRAPH-4E0A" ucc="4E0A" /> + cldr="CJK_UNIFIED_IDEOGRAPH-4E0B" ucc="4E0B" /> + cldr="CJK_UNIFIED_IDEOGRAPH-4E0D" ucc="4E0D" /> + cldr="CJK_UNIFIED_IDEOGRAPH-4E5D" ucc="4E5D" /> + cldr="CJK_UNIFIED_IDEOGRAPH-4E8C" ucc="4E8C" /> + cldr="CJK_UNIFIED_IDEOGRAPH-4E94" ucc="4E94" /> + cldr="CJK_UNIFIED_IDEOGRAPH-516B" ucc="516B" /> + cldr="CJK_UNIFIED_IDEOGRAPH-516D" ucc="516D" /> + cldr="CJK_UNIFIED_IDEOGRAPH-5206" ucc="5206" /> + cldr="CJK_UNIFIED_IDEOGRAPH-524D" ucc="524D" /> + cldr="CJK_UNIFIED_IDEOGRAPH-5341" ucc="5341" /> + cldr="CJK_UNIFIED_IDEOGRAPH-5348" ucc="5348" /> + cldr="CJK_UNIFIED_IDEOGRAPH-5426" ucc="5426" /> + cldr="CJK_UNIFIED_IDEOGRAPH-5468" ucc="5468" /> + cldr="CJK_UNIFIED_IDEOGRAPH-56DB" ucc="56DB" /> + cldr="CJK_UNIFIED_IDEOGRAPH-571F" ucc="571F" /> + cldr="CJK_UNIFIED_IDEOGRAPH-5B9A" ucc="5B9A" /> + cldr="CJK_UNIFIED_IDEOGRAPH-5E74" ucc="5E74" /> + cldr="CJK_UNIFIED_IDEOGRAPH-5F8C" ucc="5F8C" /> + cldr="CJK_UNIFIED_IDEOGRAPH-65E5" ucc="65E5" /> + cldr="CJK_UNIFIED_IDEOGRAPH-65F6" ucc="65F6" /> + cldr="CJK_UNIFIED_IDEOGRAPH-661F" ucc="661F" /> + cldr="CJK_UNIFIED_IDEOGRAPH-662F" ucc="662F" /> + cldr="CJK_UNIFIED_IDEOGRAPH-6642" ucc="6642" /> + cldr="CJK_UNIFIED_IDEOGRAPH-66DC" ucc="66DC" /> + cldr="CJK_UNIFIED_IDEOGRAPH-6708" ucc="6708" /> + cldr="CJK_UNIFIED_IDEOGRAPH-671F" ucc="671F" /> + cldr="CJK_UNIFIED_IDEOGRAPH-6728" ucc="6728" /> + cldr="CJK_UNIFIED_IDEOGRAPH-6C34" ucc="6C34" /> + cldr="CJK_UNIFIED_IDEOGRAPH-706B" ucc="706B" /> + cldr="CJK_UNIFIED_IDEOGRAPH-786E" ucc="786E" /> + cldr="CJK_UNIFIED_IDEOGRAPH-78BA" ucc="78BA" /> + cldr="CJK_UNIFIED_IDEOGRAPH-79D2" ucc="79D2" /> + cldr="CJK_UNIFIED_IDEOGRAPH-9031" ucc="9031" /> + cldr="CJK_UNIFIED_IDEOGRAPH-91D1" ucc="91D1" /> + cldr="HANGUL_SYLLABLE_GEUM" ucc="AE08" /> + cldr="HANGUL_SYLLABLE_NYEON" ucc="B144" /> + cldr="HANGUL_SYLLABLE_NI" ucc="B2C8" /> + cldr="HANGUL_SYLLABLE_MOG" ucc="BAA9" /> + cldr="HANGUL_SYLLABLE_BUN" ucc="BD84" /> + cldr="HANGUL_SYLLABLE_SU" ucc="C218" /> + cldr="HANGUL_SYLLABLE_SI" ucc="C2DC" /> + cldr="HANGUL_SYLLABLE_A" ucc="C544" /> + cldr="HANGUL_SYLLABLE_YE" ucc="C608" /> + cldr="HANGUL_SYLLABLE_O" ucc="C624" /> + cldr="HANGUL_SYLLABLE_YO" ucc="C694" /> + cldr="HANGUL_SYLLABLE_WEOL" ucc="C6D4" /> + cldr="HANGUL_SYLLABLE_IL" ucc="C77C" /> + cldr="HANGUL_SYLLABLE_JEON" ucc="C804" /> + cldr="HANGUL_SYLLABLE_CO" ucc="CD08" /> + cldr="HANGUL_SYLLABLE_TO" ucc="D1A0" /> + cldr="HANGUL_SYLLABLE_HWA" ucc="D654" /> + cldr="HANGUL_SYLLABLE_HU" ucc="D6C4" /> + cldr="ONE_DOT_LEADER" unicode="FULL_STOP" /> - + + cldr="NO-BREAK_SPACE" unicode="SPACE" /> + cldr="NARROW_NO-BREAK_SPACE" unicode="NO-BREAK_SPACE" /> + cldr="RIGHT_SINGLE_QUOTATION_MARK" unicode="APOSTROPHE" /> - - - - + + + - diff --git a/tools/tools/locale/tools/cldr2def.pl b/tools/tools/locale/tools/cldr2def.pl index 8617ca81ca40..fd475db714a0 100755 --- a/tools/tools/locale/tools/cldr2def.pl +++ b/tools/tools/locale/tools/cldr2def.pl @@ -4,6 +4,7 @@ # # Copyright 2009 Edwin Groothuis # Copyright 2015 John Marino +# Copyright 2020 Hiroki Sato # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -38,7 +39,6 @@ use Getopt::Long; use Digest::SHA qw(sha1_hex); require "charmaps.pm"; - if ($#ARGV < 2) { print "Usage: $0 --unidir= --etc= --type=\n"; exit(1); @@ -69,10 +69,11 @@ my %encodings = (); my %alternativemonths = (); get_languages(); -my %utf8map = (); -my %utf8aliases = (); -get_unidata($UNIDIR); -get_utf8map("$UNIDIR/posix/$DEFENCODING.cm"); +my %utfmap = (); +$utfmap{'UTF-8'} = {}; +$utfmap{'UTF-32'} = {}; +get_utfmap("$UNIDIR/posix/$DEFENCODING.cm", $utfmap{'UTF-8'}); +get_utfmap("$UNIDIR/posix/UTF-32.cm", $utfmap{'UTF-32'}); get_encodings("$ETCDIR/charmaps"); my %keys = (); @@ -334,25 +335,8 @@ sub callback_abmon { ############################ -sub get_unidata { - my $directory = shift; - - open(FIN, "$directory/UnicodeData.txt") - or die("Cannot open $directory/UnicodeData.txt");; - my @lines = ; - chomp(@lines); - close(FIN); - - foreach my $l (@lines) { - my @a = split(/;/, $l); - - $ucd{code2name}{"$a[0]"} = $a[1]; # Unicode name - $ucd{name2code}{"$a[1]"} = $a[0]; # Unicode code - } -} - -sub get_utf8map { - my $file = shift; +sub get_utfmap { + my ($file, $db) = @_; open(FIN, $file); my @lines = ; @@ -363,7 +347,7 @@ sub get_utf8map { my $prev_v = ""; my $incharmap = 0; foreach my $l (@lines) { - $l =~ s/\r//; + chomp($l); next if ($l =~ /^\#/); next if ($l eq ""); @@ -378,17 +362,28 @@ sub get_utf8map { $l =~ /^<([^\s]+)>\s+(.*)/; my $k = $1; my $v = $2; - $k =~ s/_/ /g; # unicode char string $v =~ s/\\x//g; # UTF-8 char code - $utf8map{$k} = $v; + $db->{$k} = $v; +# print STDERR "UTF $k = $v\n"; - $utf8aliases{$k} = $prev_k if ($prev_v eq $v); + # XXX: no longer needed + # $db_alias->{$k} = $prev_k if ($prev_v eq $v); $prev_v = $v; $prev_k = $k; } } +sub resolve_enc_addition { + my $ret = ''; + + foreach my $t (split(/\+/, $_[0])) { + $t =~ s/^0[xX]//; + $ret .= $t; + } + return $ret; +} + sub get_encodings { my $dir = shift; foreach my $e (sort(keys(%encodings))) { @@ -403,14 +398,20 @@ sub get_encodings { chomp(@lines); foreach my $l (@lines) { $l =~ s/\r//; - next if ($l =~ /^\#/); next if ($l eq ""); my @a = split(" ", $l); next if ($#a < 1); - $a[0] =~ s/^0[xX]//; # local char code - $a[1] =~ s/^0[xX]//; # unicode char code - $convertors{$e}{uc($a[1])} = uc($a[0]); + next if ($a[0] =~ /^\#/ or $a[1] =~ /^\#/); + next if ($a[0] eq '' or $a[1] eq ''); + + $a[0] = resolve_enc_addition($a[0]); # local + $a[1] = resolve_enc_addition($a[1]); # UTF-32 + my $u32 = sprintf("%08X", hex($a[1])); +# print STDERR "$a[1] => $u32\n"; + + # Use UTF-32 as the indices. + $convertors{$e}{$u32} = uc($a[0]); } } } @@ -565,8 +566,75 @@ EOF foreach my $enc (sort keys(%{$languages{$l}{$f}{data}{$c}})) { next if ($enc eq $DEFENCODING); - copy ("$TYPE.draft/$actfile.$DEFENCODING.src", - "$TYPE.draft/$actfile.$enc.src"); + + open FIN, "<$TYPE.draft/$actfile.$DEFENCODING.src"; + open FOUT, ">$TYPE.draft/$actfile.$enc.src"; + my $order_start = 0; + my $print_p = 0; + # + # %c_elem: collation elements + # + # undef: not defined + # 1: defined + # 2: invalid in this encoding + # + my %c_elem = (); + while () { # XXX: this loop should be refactored. + chomp; + $print_p = 1; + if ($order_start) { + $order_start = 0 if (m/^order_end/); + if (m/^<([^>]+)>/) { + if (not defined $c_elem{$1}) { +# print STDERR "$1:\n"; + + my $u32 = $utfmap{'UTF-32'}->{$1}; + die "order, $1\n" if (not defined $u32); +# print STDERR "u32 for $1 = $u32\n"; + if (not defined $convertors{$enc}{$u32}) { +# print STDERR "$1 - $u32 not defined in $enc\n"; + $print_p = 0; + } + } elsif ($c_elem{$1} == 2) { +# print STDERR "$1 is marked as invalid in $enc\n"; + $print_p = 0; + } + } + } elsif (m/^collating-element/) { + my ($elem, $l); + if (m/<([^>]+)> from (.+)/) { + ($elem, $l) = ($1, $2); + } +# print STDERR "$elem: enter ($print_p, $l,)\n"; + while ($print_p and + defined $l and + $l =~ m/<([^>]+)>/g) { +# print STDERR "$elem: $1\n"; + my $u32 = $utfmap{'UTF-32'}->{$1}; + die "collating-element, $1\n" if (not defined $u32); +# print STDERR "u32 for $1 = $u32\n"; + if (not $convertors{$enc}{$u32}) { +# print STDERR "$1 - $u32 not defined in $enc\n"; + $print_p = 0; +# print STDERR "Mark $elem as invalid\n"; + $c_elem{$elem} = 2; + } + } + if ($print_p) { +# print STDERR "Add $elem\n"; + $c_elem{$elem} = 1; + } + } elsif (m/^collating-symbol <([^>]+)>/) { +# print STDERR "Add $1\n"; + $c_elem{$1} = 1; + } elsif (m/^order_start/) { + $order_start = 1; + # do nothing + } + print FOUT $_, "\n" if ($print_p); + } + close FOUT; + close FIN; $languages{$l}{$f}{data}{$c}{$enc} = $shex; $hashtable{$shex}{"${l}_${f}_${c}.$enc"} = 1; } @@ -626,11 +694,11 @@ sub get_fields { $continue = ($line =~ /\/$/); $line =~ s/\/$// if ($continue); - while ($line =~ /_/) { - $line =~ - s/\<([^>_]+)_([^>]+)\>/<$1 $2>/; - } - die "_ in data - $line" if ($line =~ /_/); +# while ($line =~ /_/) { +# $line =~ +# s/\<([^>_]+)_([^>]+)\>/<$1 $2>/; +# } +# die "_ in data - $line" if ($line =~ /_/); $values{$l}{$f}{$c}{$k} .= $line; last if (!$continue); @@ -652,56 +720,52 @@ sub decodecldr { # Conversion to UTF-8 can be done from the Unicode name to # the UTF-8 character code. # - $v = $utf8map{$s}; + $v = $utfmap{'UTF-8'}->{$s}; die "Cannot convert $s in $e (charmap)" if (!defined $v); } else { # # Conversion to these encodings can be done from the Unicode # name to Unicode code to the encodings code. # - my $ucc = undef; - $ucc = $ucd{name2code}{$s} if (defined $ucd{name2code}{$s}); - $ucc = $ucd{name2code}{$utf8aliases{$s}} - if (!defined $ucc - && $utf8aliases{$s} - && defined $ucd{name2code}{$utf8aliases{$s}}); - - if (!defined $ucc) { - if (defined $translations{$e}{$s}{hex}) { - $v = $translations{$e}{$s}{hex}; - $ucc = 0; - } elsif (defined $translations{$e}{$s}{ucc}) { - $ucc = $translations{$e}{$s}{ucc}; + # hex - hex or string attr + # unicode - unicode attr + # ucc - ucc attr + my $hex = $translations{$e}{$s}{hex}; + my $ucc = $utfmap{'UTF-32'}->{$s}; + my $ucc_attr = $translations{$e}{$s}{ucc}; + my $unicode = $translations{$e}{$s}{unicode}; + + if (defined $hex) { # hex is in local encoding + $v = $hex; + } elsif (defined $unicode) { # unicode is in name + $v = $convertors{$e}{$utfmap{'UTF-32'}->{$unicode}}; + } elsif (defined $ucc_attr) { # ucc is in code point + if (defined $ucc) { +# print STDERR "INFO: ucc=$ucc_attr ", +# "overrides $ucc in UTF-32\n"; } - } - - die "Cannot convert $s in $e (ucd string)" if (!defined $ucc); *** 42 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Tue Dec 29 19:59:17 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1BBFA4C98E2; Tue, 29 Dec 2020 19:59:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D54xd0Cnwz3KnF; Tue, 29 Dec 2020 19:59:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E9F0E11CB3; Tue, 29 Dec 2020 19:59:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTJxGr4061039; Tue, 29 Dec 2020 19:59:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTJxGFh061037; Tue, 29 Dec 2020 19:59:16 GMT (envelope-from git) Date: Tue, 29 Dec 2020 19:59:16 GMT Message-Id: <202012291959.0BTJxGFh061037@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: f53120073b32 - main - Revert "bsnmpclient(3): make it thread-safe" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f53120073b321c1d2e42641ca22414992ddbe0ff Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 19:59:17 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=f53120073b321c1d2e42641ca22414992ddbe0ff commit f53120073b321c1d2e42641ca22414992ddbe0ff Author: Edward Tomasz Napierala AuthorDate: 2020-12-29 19:55:05 +0000 Commit: Edward Tomasz Napierala CommitDate: 2020-12-29 19:55:05 +0000 Revert "bsnmpclient(3): make it thread-safe" This reverts commit 89e3d5671ba13dceca272d5b159c9bd805f3f504. As pointed out, there are several problems with that commit: 1. The new semantics, while useful for clients where multiple threads use separate contexts, breaks clients which correctly share a single one 2. Change in semantics would require a library version bump 3. It doesn't build with GCC --- contrib/bsnmp/lib/asn1.c | 2 +- contrib/bsnmp/lib/snmpclient.c | 4 ++-- contrib/bsnmp/lib/snmpclient.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/bsnmp/lib/asn1.c b/contrib/bsnmp/lib/asn1.c index a03dac70c529..f1f9267c0226 100644 --- a/contrib/bsnmp/lib/asn1.c +++ b/contrib/bsnmp/lib/asn1.c @@ -1019,7 +1019,7 @@ asn_oid2str_r(const struct asn_oid *oid, char *buf) char * asn_oid2str(const struct asn_oid *oid) { - __thread static char str[ASN_OIDSTRLEN]; + static char str[ASN_OIDSTRLEN]; return (asn_oid2str_r(oid, str)); } diff --git a/contrib/bsnmp/lib/snmpclient.c b/contrib/bsnmp/lib/snmpclient.c index e49105918416..c22d8e125a14 100644 --- a/contrib/bsnmp/lib/snmpclient.c +++ b/contrib/bsnmp/lib/snmpclient.c @@ -71,7 +71,7 @@ #define DEBUG_PARSE 0 /* global context */ -__thread struct snmp_client snmp_client; +struct snmp_client snmp_client; /* List of all outstanding requests */ struct sent_pdu { @@ -86,7 +86,7 @@ struct sent_pdu { }; LIST_HEAD(sent_pdu_list, sent_pdu); -__thread static struct sent_pdu_list sent_pdus; +static struct sent_pdu_list sent_pdus; /* * Prototype table entry. All C-structure produced by the table function must diff --git a/contrib/bsnmp/lib/snmpclient.h b/contrib/bsnmp/lib/snmpclient.h index 1bc3780de038..a19bdb2ea653 100644 --- a/contrib/bsnmp/lib/snmpclient.h +++ b/contrib/bsnmp/lib/snmpclient.h @@ -114,7 +114,7 @@ struct snmp_client { }; /* the global context */ -extern __thread struct snmp_client snmp_client; +extern struct snmp_client snmp_client; /* initizialies a snmp_client structure */ void snmp_client_init(struct snmp_client *); From owner-dev-commits-src-all@freebsd.org Tue Dec 29 20:03:58 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 554344C9D12; Tue, 29 Dec 2020 20:03:58 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (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 4D55321fwtz3LK6; Tue, 29 Dec 2020 20:03:58 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wr1-x436.google.com with SMTP id c5so15595976wrp.6; Tue, 29 Dec 2020 12:03:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to; bh=VsFeMplfd2mLri5rvahdtG5Udoy8MtxqdbkpV3WFLPc=; b=h4gjdrIHptKcBIKRxzio8nL2O5oVn7YapDrJ6L4OTw7/VmbF0+cD9/h7oUH86EfOdN nkxcoecYN1F19knEZ9bqMk6eD/7Pv+uRNDAQ8sQXgF3WGZHWdYaaJpN3Do3ZBoED4vvm K3MSlAEpeIEQrM7zvx/kDE96WasZWPf8jPb8c+ntAJjqEw+wFjrF+RZaA/ZBIFGliooJ GWNM/8A4xKLvGjC8r2vl7wti1dTLTRUyaOw//62B72YVGx6XqEd03J8Sk9xA69AwOQCp 4L1OF5Uz7uPt7a7Zaj7HqMYWFzsIj5uV92WleFcT28RnjcUUXO8KtE4jHt1o+sHwmhU6 9ntA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=VsFeMplfd2mLri5rvahdtG5Udoy8MtxqdbkpV3WFLPc=; b=MrDTK6hm5bv66rm9AKZf2CoVEPJ0O108mr8F1pZ+2VBTYj3HQLSx8DC1EM3LaTY+lf SCEGackEvveDQxFhqhmstZ8sD2ljigZZ1Gt3rQ8NYc+jb16zN2ZLxDQX6/M1iJQKohfU wzzORScwVkS0dY/4yqV0tCbKAgdicP/Y3s7EAZEb+lxFjJiQe4ZezpWZh7Y2Rut3Knq0 5WamOMqSx6QJqgCrhdng8AaXWxqRUtWb+TQD6LfINieGg198eIdBXr/yinjELAA0bwOJ 4eBDgn6IOGJYsQVD1hhlkSMhQ66/DrHSBsR1q/2g9ecaStNiiSO2vr3iKzMNj355E8Jz k/DQ== X-Gm-Message-State: AOAM533D8ctktkN0VvIuwT9yF3U+UuJO2soHvFhq4zUp0JTfX88nJvaX TAxmSKcmYMUHbfwClDzDhej104ZGDhY= X-Google-Smtp-Source: ABdhPJxJtxHY8Cm7fsIhptd019tC++81WsdOt3P+iwuyTdTNCuy/bXgqCagXKLjP3piqpYmZZRVQKw== X-Received: by 2002:a5d:68c9:: with SMTP id p9mr56877412wrw.139.1609272236918; Tue, 29 Dec 2020 12:03:56 -0800 (PST) Received: from brick (cpc159423-cmbg20-2-0-cust338.5-4.cable.virginm.net. [86.7.147.83]) by smtp.gmail.com with ESMTPSA id h5sm63275436wrp.56.2020.12.29.12.03.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Dec 2020 12:03:56 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Tue, 29 Dec 2020 20:03:54 +0000 From: Edward Tomasz Napierala To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 89e3d5671ba1 - main - bsnmpclient(3): make it thread-safe Message-ID: Mail-Followup-To: Jessica Clarke , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202012291500.0BTF0vGw034594@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4D55321fwtz3LK6 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 20:03:58 -0000 On 1229T1511, Jessica Clarke wrote: [..] > Is there really a documented requirement for everything to be called > from the same thread? I can see consumers of the library that already > use proper locking breaking because of this. I'm not aware of such requirement being documented; guess I was bit too much fixated on the one use case this patch fixes. Given that harti@ mentioned he's planning to get rid of global data, and other problems pointed out here, I think it's best to just revert it. From owner-dev-commits-src-all@freebsd.org Tue Dec 29 21:07:37 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AA5144CB505; Tue, 29 Dec 2020 21:07:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D56ST4Qb8z3Ptt; Tue, 29 Dec 2020 21:07:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8AB0C122E6; Tue, 29 Dec 2020 21:07:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTL7b59046377; Tue, 29 Dec 2020 21:07:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTL7bwf046376; Tue, 29 Dec 2020 21:07:37 GMT (envelope-from git) Date: Tue, 29 Dec 2020 21:07:37 GMT Message-Id: <202012292107.0BTL7bwf046376@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: 3db1b221edab - main - Set stdout & stderr unbuffered, so that the "telnet>" prompt also shows up when output is redirected: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3db1b221edab9bada79da4f825347ce1772f5ee8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 21:07:37 -0000 The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=3db1b221edab9bada79da4f825347ce1772f5ee8 commit 3db1b221edab9bada79da4f825347ce1772f5ee8 Author: Poul-Henning Kamp AuthorDate: 2020-12-29 21:05:48 +0000 Commit: Poul-Henning Kamp CommitDate: 2020-12-29 21:05:48 +0000 Set stdout & stderr unbuffered, so that the "telnet>" prompt also shows up when output is redirected: telnet |& tee _log --- contrib/telnet/telnet/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/telnet/telnet/main.c b/contrib/telnet/telnet/main.c index 8703968efe10..befb3eecee66 100644 --- a/contrib/telnet/telnet/main.c +++ b/contrib/telnet/telnet/main.c @@ -121,6 +121,8 @@ main(int argc, char *argv[]) extern int forward_flags; #endif /* FORWARD */ + setbuf(stdout, NULL); + setbuf(stderr, NULL); tninit(); /* Clear out things */ TerminalSaveState(); From owner-dev-commits-src-all@freebsd.org Tue Dec 29 21:30:37 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CCA3C4CB932; Tue, 29 Dec 2020 21:30:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D56z151Yvz3Qmf; Tue, 29 Dec 2020 21:30:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9F3C712AFB; Tue, 29 Dec 2020 21:30:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTLUb6o078921; Tue, 29 Dec 2020 21:30:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTLUbGo078920; Tue, 29 Dec 2020 21:30:37 GMT (envelope-from git) Date: Tue, 29 Dec 2020 21:30:37 GMT Message-Id: <202012292130.0BTLUbGo078920@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: 40c4557bee27 - main - cxgbe: replace zero sized array by flexible array MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 40c4557bee27adb15bb376803dffbcd6de323b8a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 21:30:37 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=40c4557bee27adb15bb376803dffbcd6de323b8a commit 40c4557bee27adb15bb376803dffbcd6de323b8a Author: Toomas Soome AuthorDate: 2020-12-29 20:59:01 +0000 Commit: Toomas Soome CommitDate: 2020-12-29 21:09:15 +0000 cxgbe: replace zero sized array by flexible array The issue was found while building cxgbe with gcc 10 (in illumos), the array subscription check is warning us about outside the bounds access. See also: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html --- sys/dev/cxgbe/common/t4_msg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/cxgbe/common/t4_msg.h b/sys/dev/cxgbe/common/t4_msg.h index 447cc07b7dc5..143cec216423 100644 --- a/sys/dev/cxgbe/common/t4_msg.h +++ b/sys/dev/cxgbe/common/t4_msg.h @@ -2862,7 +2862,7 @@ struct ulptx_sgl { __be32 len0; __be64 addr0; #if !(defined C99_NOT_SUPPORTED) - struct ulptx_sge_pair sge[0]; + struct ulptx_sge_pair sge[]; #endif }; @@ -2876,7 +2876,7 @@ struct ulptx_isgl { __be32 cmd_nisge; __be32 rsvd; #if !(defined C99_NOT_SUPPORTED) - struct ulptx_isge sge[0]; + struct ulptx_isge sge[]; #endif }; From owner-dev-commits-src-all@freebsd.org Tue Dec 29 22:22:06 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B21604CC7BC; Tue, 29 Dec 2020 22:22:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D586Q4ks4z3jl7; Tue, 29 Dec 2020 22:22:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95AFE13A2D; Tue, 29 Dec 2020 22:22:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTMM6OI043182; Tue, 29 Dec 2020 22:22:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTMM6HN043181; Tue, 29 Dec 2020 22:22:06 GMT (envelope-from git) Date: Tue, 29 Dec 2020 22:22:06 GMT Message-Id: <202012292222.0BTMM6HN043181@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 2ff66a915526 - main - bsdcat, cpio, tar: derive version string from archive.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ff66a915526b6509ca57f2046bc7b20b0de8a61 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 22:22:06 -0000 The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=2ff66a915526b6509ca57f2046bc7b20b0de8a61 commit 2ff66a915526b6509ca57f2046bc7b20b0de8a61 Author: Xin LI AuthorDate: 2020-12-29 21:38:47 +0000 Commit: Xin LI CommitDate: 2020-12-29 22:21:50 +0000 bsdcat,cpio,tar: derive version string from archive.h Reviewed by: mm MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D27823 --- usr.bin/bsdcat/Makefile | 3 ++- usr.bin/cpio/Makefile | 3 ++- usr.bin/tar/Makefile | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.bin/bsdcat/Makefile b/usr.bin/bsdcat/Makefile index 483875a01a57..2e625cf553e5 100644 --- a/usr.bin/bsdcat/Makefile +++ b/usr.bin/bsdcat/Makefile @@ -6,7 +6,8 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive _LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive PROG= bsdcat -BSDCAT_VERSION_STRING= 3.5.1 +BSDCAT_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ + ${_LIBARCHIVEDIR}/libarchive/archive.h .PATH: ${_LIBARCHIVEDIR}/cat SRCS= bsdcat.c cmdline.c diff --git a/usr.bin/cpio/Makefile b/usr.bin/cpio/Makefile index 6855e3e2d77e..f9f344429a91 100644 --- a/usr.bin/cpio/Makefile +++ b/usr.bin/cpio/Makefile @@ -6,7 +6,8 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive _LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive PROG= bsdcpio -BSDCPIO_VERSION_STRING= 3.5.1 +BSDCPIO_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ + ${_LIBARCHIVEDIR}/libarchive/archive.h .PATH: ${_LIBARCHIVEDIR}/cpio SRCS= cpio.c cmdline.c diff --git a/usr.bin/tar/Makefile b/usr.bin/tar/Makefile index d6154dc3b30d..c58671d59aa0 100644 --- a/usr.bin/tar/Makefile +++ b/usr.bin/tar/Makefile @@ -5,7 +5,8 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive PACKAGE= runtime PROG= bsdtar -BSDTAR_VERSION_STRING= 3.5.1 +BSDTAR_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ + ${_LIBARCHIVEDIR}/libarchive/archive.h .PATH: ${_LIBARCHIVEDIR}/tar SRCS= bsdtar.c \ From owner-dev-commits-src-all@freebsd.org Tue Dec 29 22:27:01 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 892D94CCA6B; Tue, 29 Dec 2020 22:27:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D58D53W33z3kZh; Tue, 29 Dec 2020 22:27:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B7781375C; Tue, 29 Dec 2020 22:27:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTMR1mM044027; Tue, 29 Dec 2020 22:27:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTMR1DK044026; Tue, 29 Dec 2020 22:27:01 GMT (envelope-from git) Date: Tue, 29 Dec 2020 22:27:01 GMT Message-Id: <202012292227.0BTMR1DK044026@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hiroki Sato Subject: git: 6338833c50a7 - stable/12 - Add MODULE_PNP_INFO() to vmci(4). This allows devd(8) to load the kernel module automatically when FreeBSD is running on VMware. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hrs X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 6338833c50a7566d006b722c791a6a92071309b8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 22:27:01 -0000 The branch stable/12 has been updated by hrs: URL: https://cgit.FreeBSD.org/src/commit/?id=6338833c50a7566d006b722c791a6a92071309b8 commit 6338833c50a7566d006b722c791a6a92071309b8 Author: Hiroki Sato AuthorDate: 2019-08-25 18:46:10 +0000 Commit: Hiroki Sato CommitDate: 2020-12-29 21:48:32 +0000 Add MODULE_PNP_INFO() to vmci(4). This allows devd(8) to load the kernel module automatically when FreeBSD is running on VMware. Reviewed by: mp Differential Revision: https://reviews.freebsd.org/D21182 (cherry picked from commit 639eac208771e9eb3d1141882514be35377abeee) --- sys/dev/vmware/vmci/vmci.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/sys/dev/vmware/vmci/vmci.c b/sys/dev/vmware/vmci/vmci.c index dc029419e20d..82e23daa4c71 100644 --- a/sys/dev/vmware/vmci/vmci.c +++ b/sys/dev/vmware/vmci/vmci.c @@ -73,6 +73,16 @@ static driver_t vmci_driver = { static devclass_t vmci_devclass; DRIVER_MODULE(vmci, pci, vmci_driver, vmci_devclass, 0, 0); MODULE_VERSION(vmci, VMCI_VERSION); +const struct { + uint16_t vendor; + uint16_t device; + const char *desc; +} vmci_ids[] = { + { VMCI_VMWARE_VENDOR_ID, VMCI_VMWARE_DEVICE_ID, + "VMware Virtual Machine Communication Interface" }, +}; +MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, vmci, vmci_ids, + nitems(vmci_ids)); MODULE_DEPEND(vmci, pci, 1, 1, 1); @@ -112,10 +122,9 @@ static int vmci_probe(device_t dev) { - if (pci_get_vendor(dev) == VMCI_VMWARE_VENDOR_ID && - pci_get_device(dev) == VMCI_VMWARE_DEVICE_ID) { - device_set_desc(dev, - "VMware Virtual Machine Communication Interface"); + if (pci_get_vendor(dev) == vmci_ids[0].vendor && + pci_get_device(dev) == vmci_ids[0].device) { + device_set_desc(dev, vmci_ids[0].desc); return (BUS_PROBE_DEFAULT); } From owner-dev-commits-src-all@freebsd.org Tue Dec 29 23:06:44 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F025A4CD7BA; Tue, 29 Dec 2020 23:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D595w6X9fz3mWD; Tue, 29 Dec 2020 23:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D39461421E; Tue, 29 Dec 2020 23:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTN6ieP093342; Tue, 29 Dec 2020 23:06:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTN6i9k093341; Tue, 29 Dec 2020 23:06:44 GMT (envelope-from git) Date: Tue, 29 Dec 2020 23:06:44 GMT Message-Id: <202012292306.0BTN6i9k093341@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ryan Libby Subject: git: 62a77bb7edb2 - stable/12 - [libsa] Fix typecast of pointer for st_dev MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 62a77bb7edb28d572c8642edce974631037119bb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 23:06:45 -0000 The branch stable/12 has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=62a77bb7edb28d572c8642edce974631037119bb commit 62a77bb7edb28d572c8642edce974631037119bb Author: Adrian Chadd AuthorDate: 2020-04-16 23:29:49 +0000 Commit: Ryan Libby CommitDate: 2020-12-29 23:04:40 +0000 [libsa] Fix typecast of pointer for st_dev This code was trying to use a pointer value for st_dev, which is definitely not a pointer. Instead, cast to uintptr_t so it becomes a non-pointer value before casting it. Tested: mips-gcc cross compile, mips32 build (cherry picked from commit 6c88ef1c81fce18d6545c4ee8d0df32a25098770) --- stand/libsa/pkgfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/libsa/pkgfs.c b/stand/libsa/pkgfs.c index d4794963b2c1..4f52b6bb6b9b 100644 --- a/stand/libsa/pkgfs.c +++ b/stand/libsa/pkgfs.c @@ -399,7 +399,7 @@ pkg_stat(struct open_file *f, struct stat *sb) sb->st_size = tf->tf_size; sb->st_blocks = (tf->tf_size + 511) / 512; sb->st_mtime = pkg_atol(tf->tf_hdr.ut_mtime, 12); - sb->st_dev = (off_t)tf->tf_pkg; + sb->st_dev = (off_t)((uintptr_t)tf->tf_pkg); sb->st_ino = tf->tf_ofs; /* unique per tf_pkg */ return (0); } From owner-dev-commits-src-all@freebsd.org Tue Dec 29 23:06:44 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D1F334CD7B9; Tue, 29 Dec 2020 23:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D595w5W2zz3mKl; Tue, 29 Dec 2020 23:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AF4FF14481; Tue, 29 Dec 2020 23:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTN6iFe093308; Tue, 29 Dec 2020 23:06:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTN6iKH093307; Tue, 29 Dec 2020 23:06:44 GMT (envelope-from git) Date: Tue, 29 Dec 2020 23:06:44 GMT Message-Id: <202012292306.0BTN6iKH093307@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ryan Libby Subject: git: f728bcf204ee - stable/12 - [nvmecontrol] Fix type signedness warning-to-error on gcc-6.4 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f728bcf204ee0e956c54ed896141e3469a8f62a7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 23:06:44 -0000 The branch stable/12 has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=f728bcf204ee0e956c54ed896141e3469a8f62a7 commit f728bcf204ee0e956c54ed896141e3469a8f62a7 Author: Adrian Chadd AuthorDate: 2020-11-17 17:12:28 +0000 Commit: Ryan Libby CommitDate: 2020-12-29 23:04:40 +0000 [nvmecontrol] Fix type signedness warning-to-error on gcc-6.4 This fixes a type signedness comparison warning-to-error on gcc-6.4. The ternary operation casts it right but the actual assignment doesn't. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D26791 (cherry picked from commit 44c52406ced4cbba704f9bec588a8238d5a5ef32) --- sbin/nvmecontrol/firmware.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/nvmecontrol/firmware.c b/sbin/nvmecontrol/firmware.c index ec7e54afc57e..e6ebc9b70321 100644 --- a/sbin/nvmecontrol/firmware.c +++ b/sbin/nvmecontrol/firmware.c @@ -159,8 +159,9 @@ static void update_firmware(int fd, uint8_t *payload, int32_t payload_size, uint8_t fwug) { struct nvme_pt_command pt; - uint64_t max_xfer_size; - int32_t off, resid, size; + uint64_t max_xfer_size; + int32_t off; + uint32_t resid, size; void *chunk; off = 0; @@ -175,8 +176,7 @@ update_firmware(int fd, uint8_t *payload, int32_t payload_size, uint8_t fwug) errx(EX_OSERR, "unable to malloc %zd bytes", (size_t)max_xfer_size); while (resid > 0) { - size = (resid >= (int32_t)max_xfer_size) ? - max_xfer_size : resid; + size = (resid >= max_xfer_size) ? max_xfer_size : resid; memcpy(chunk, payload + off, size); memset(&pt, 0, sizeof(pt)); From owner-dev-commits-src-all@freebsd.org Tue Dec 29 23:06:44 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE0314CD4D8; Tue, 29 Dec 2020 23:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D595w6Qtpz3mN2; Tue, 29 Dec 2020 23:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB164141A1; Tue, 29 Dec 2020 23:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTN6iMn093325; Tue, 29 Dec 2020 23:06:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTN6igT093324; Tue, 29 Dec 2020 23:06:44 GMT (envelope-from git) Date: Tue, 29 Dec 2020 23:06:44 GMT Message-Id: <202012292306.0BTN6igT093324@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ryan Libby Subject: git: 0286ee71041c - stable/12 - [libnetmap] Fix 32 bit compilation under gcc-6.4 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 0286ee71041c8b831aeb1abe75b9d4f555c88a97 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 23:06:45 -0000 The branch stable/12 has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=0286ee71041c8b831aeb1abe75b9d4f555c88a97 commit 0286ee71041c8b831aeb1abe75b9d4f555c88a97 Author: Adrian Chadd AuthorDate: 2020-11-02 15:01:37 +0000 Commit: Ryan Libby CommitDate: 2020-12-29 23:04:40 +0000 [libnetmap] Fix 32 bit compilation under gcc-6.4 Use uintptr_t to cast a uint64_t to a pointer type. Yeah, it isn't technically correct for platforms with pointers > 64 bits, but it's fine here. This fixes 32 bit compat library builds on amd64 and also mips32 builds. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D26790 (cherry picked from commit 26c29e743bbdbb82762540f72d4bc449bae2e092) --- lib/libnetmap/nmreq.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/libnetmap/nmreq.c b/lib/libnetmap/nmreq.c index 259056de37b4..7f4b2703d22d 100644 --- a/lib/libnetmap/nmreq.c +++ b/lib/libnetmap/nmreq.c @@ -603,10 +603,9 @@ nmreq_options_decode(const char *opt, struct nmreq_opt_parser parsers[], struct nmreq_option * nmreq_find_option(struct nmreq_header *h, uint32_t t) { - struct nmreq_option *o; + struct nmreq_option *o = NULL; - for (o = (struct nmreq_option *)h->nr_options; o != NULL; - o = (struct nmreq_option *)o->nro_next) { + nmreq_foreach_option(h, o) { if (o->nro_reqtype == t) break; } @@ -633,8 +632,14 @@ nmreq_free_options(struct nmreq_header *h) { struct nmreq_option *o, *next; - for (o = (struct nmreq_option *)h->nr_options; o != NULL; o = next) { - next = (struct nmreq_option *)o->nro_next; + /* + * Note: can't use nmreq_foreach_option() here; it frees the + * list as it's walking and nmreq_foreach_option() isn't + * modification-safe. + */ + for (o = (struct nmreq_option *)(uintptr_t)h->nr_options; o != NULL; + o = next) { + next = (struct nmreq_option *)(uintptr_t)o->nro_next; free(o); } } From owner-dev-commits-src-all@freebsd.org Tue Dec 29 23:06:45 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1AAA54CD634; Tue, 29 Dec 2020 23:06:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D595x0JTlz3mWF; Tue, 29 Dec 2020 23:06:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFC4114482; Tue, 29 Dec 2020 23:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTN6irg093359; Tue, 29 Dec 2020 23:06:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTN6ivw093358; Tue, 29 Dec 2020 23:06:44 GMT (envelope-from git) Date: Tue, 29 Dec 2020 23:06:44 GMT Message-Id: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ryan Libby Subject: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 269b7d8ac1e533a1f214904ab7bce50f5c14fe3e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 23:06:45 -0000 The branch stable/12 has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=269b7d8ac1e533a1f214904ab7bce50f5c14fe3e commit 269b7d8ac1e533a1f214904ab7bce50f5c14fe3e Author: Kyle Evans AuthorDate: 2020-03-05 22:45:16 +0000 Commit: Ryan Libby CommitDate: 2020-12-29 23:04:40 +0000 tftpd: tests: raise targeted cstd to c11 r358556 added alignas() use to the functional tests, which isn't defined until C11. Raise the -std to C11 to fix the build under freebsd-gcc{6,9}. Reported by: mhorne, Jenkins/CI (cherry picked from commit 924e10b809a9fcbc8688c1b5848f60b48e6103fe) --- libexec/tftpd/tests/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/tftpd/tests/Makefile b/libexec/tftpd/tests/Makefile index 06c5537372a7..9aa420cec1a5 100644 --- a/libexec/tftpd/tests/Makefile +++ b/libexec/tftpd/tests/Makefile @@ -10,5 +10,6 @@ TEST_METADATA.functional+= timeout=15 LIBADD= util WARNS?= 6 +CSTD= c11 .include From owner-dev-commits-src-all@freebsd.org Tue Dec 29 23:32:53 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C8714CE4B7; Tue, 29 Dec 2020 23:32:53 +0000 (UTC) (envelope-from kevans@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 4D59h50WJvz3nlY; Tue, 29 Dec 2020 23:32:53 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (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: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 043E32DDF7; Tue, 29 Dec 2020 23:32:53 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f181.google.com with SMTP id v5so9994659qtv.7; Tue, 29 Dec 2020 15:32:53 -0800 (PST) X-Gm-Message-State: AOAM531Da3rull9z259xldBHH9uwj+YDdZPH7hkdf1B0RIMOhHeci7wN 8/NKVulZWegRbbDS5fCWojmu1KNzxlyR3Cmu5DY= X-Google-Smtp-Source: ABdhPJx43GpNZv3ehczfD9EyEaFNDlzUimF6k4Ck95EGHucYESFzS6DvrcE7nL07F25SilD2txSFBW1VJEh8+TaIAQY= X-Received: by 2002:ac8:7141:: with SMTP id h1mr50340234qtp.211.1609284772412; Tue, 29 Dec 2020 15:32:52 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> In-Reply-To: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> From: Kyle Evans Date: Tue, 29 Dec 2020 17:32:40 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Ryan Libby Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 23:32:53 -0000 Hmm, I hadn't done this because we still have in-tree GCC4.2. Might want to go ahead and skip these tests entirely a level up for 4.2. On Tue, Dec 29, 2020, 17:07 Ryan Libby wrote: > The branch stable/12 has been updated by rlibby: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=269b7d8ac1e533a1f214904ab7bce50f5c14fe3e > > commit 269b7d8ac1e533a1f214904ab7bce50f5c14fe3e > Author: Kyle Evans > AuthorDate: 2020-03-05 22:45:16 +0000 > Commit: Ryan Libby > CommitDate: 2020-12-29 23:04:40 +0000 > > tftpd: tests: raise targeted cstd to c11 > > r358556 added alignas() use to the functional tests, which isn't > defined > until C11. Raise the -std to C11 to fix the build under > freebsd-gcc{6,9}. > > Reported by: mhorne, Jenkins/CI > > (cherry picked from commit 924e10b809a9fcbc8688c1b5848f60b48e6103fe) > --- > libexec/tftpd/tests/Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libexec/tftpd/tests/Makefile b/libexec/tftpd/tests/Makefile > index 06c5537372a7..9aa420cec1a5 100644 > --- a/libexec/tftpd/tests/Makefile > +++ b/libexec/tftpd/tests/Makefile > @@ -10,5 +10,6 @@ TEST_METADATA.functional+= timeout=15 > > LIBADD= util > WARNS?= 6 > +CSTD= c11 > > .include > From owner-dev-commits-src-all@freebsd.org Wed Dec 30 00:18:18 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C0724CEFA5; Wed, 30 Dec 2020 00:18:18 +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 4D5BhT4Y66z3r8D; Wed, 30 Dec 2020 00:18:17 +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 0BU0I770079534; Tue, 29 Dec 2020 16:18:07 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 0BU0I7gn079533; Tue, 29 Dec 2020 16:18:07 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202012300018.0BU0I7gn079533@gndrsh.dnsmgr.net> Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL In-Reply-To: <202012291441.0BTEf1X9009764@gitrepo.freebsd.org> To: Glen Barber Date: Tue, 29 Dec 2020 16:18:07 -0800 (PST) CC: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4D5BhT4Y66z3r8D X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 00:18:18 -0000 > The branch main has been updated by gjb: > > URL: https://cgit.FreeBSD.org/src/commit/?id=70e64ba4494190e64ab8faa04d744182d420c275 > > commit 70e64ba4494190e64ab8faa04d744182d420c275 > Author: Glen Barber > AuthorDate: 2020-12-29 14:34:05 +0000 > Commit: Glen Barber > CommitDate: 2020-12-29 14:40:28 +0000 > > release.sh: Update GITROOT URL > > Hard-code the GITROOT for the ports tree to use cgit-beta > until the ports repository is converted. > > While here, remove $FreeBSD$ RCS IDs. So how do I know what version of some file I am looking at once it has been dis-associated from a git clone? Is there some new mechanism that can give me the cadence of say, /etc/pkg/FreeBSD.conf once its FreBSD ID is riped out? Also if $FreeBSD$ needs to be removed, can we please just do it in one massive tree wide commit rather than have this random piece wise needless noise in 1000's of commits? Thanks for information, Rod > > Sponsored by: Rubicon Communications, LLC (netgate.com) > --- > release/release.conf.sample | 4 +--- > release/release.sh | 7 +++---- > 2 files changed, 4 insertions(+), 7 deletions(-) > > diff --git a/release/release.conf.sample b/release/release.conf.sample > index 615953adb111..bb9c8acb1b87 100644 > --- a/release/release.conf.sample > +++ b/release/release.conf.sample > @@ -1,7 +1,5 @@ > #!/bin/sh > # > -# $FreeBSD$ > -# > > ## Redefine environment variables here to override prototypes > ## defined in release.sh. > @@ -15,7 +13,7 @@ CHROOTDIR="/scratch" > ## Do not explicitly require the devel/git port to be installed. > #NOGIT=1 > ## Set the version control system host. > -GITROOT="https://cgit-beta.freebsd.org/" > +GITROOT="https://git.freebsd.org/" > GITSRC="src.git" > GITPORTS="ports.git" > GITDOC="doc.git" > diff --git a/release/release.sh b/release/release.sh > index 2ed76fa31c61..0975bdfed6b3 100755 > --- a/release/release.sh > +++ b/release/release.sh > @@ -34,8 +34,6 @@ > # totally clean, fresh trees. > # Based on release/generate-release.sh written by Nathan Whitehorn > # > -# $FreeBSD$ > -# > > export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin" > > @@ -75,7 +73,7 @@ env_setup() { > > # The default git checkout server, and branches for src/, doc/, > # and ports/. > - GITROOT="https://cgit-beta.FreeBSD.org/" > + GITROOT="https://git.FreeBSD.org/" > SRCBRANCH="main" > DOCBRANCH="main" > PORTBRANCH="main" > @@ -137,7 +135,8 @@ env_check() { > # Prefix the branches with the GITROOT for the full checkout URL. > SRC="${GITROOT}${GITSRC}" > DOC="${GITROOT}${GITDOC}" > - PORT="${GITROOT}${GITPORTS}" > + #PORT="${GITROOT}${GITPORTS}" > + PORT="https://cgit-beta.freebsd.org/ports.git" > > if [ -n "${EMBEDDEDBUILD}" ]; then > WITH_DVD= > -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-all@freebsd.org Wed Dec 30 00:36:57 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F32C54CF96D; Wed, 30 Dec 2020 00:36:57 +0000 (UTC) (envelope-from kevans@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 4D5C616YWVz3s1B; Wed, 30 Dec 2020 00:36:57 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (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: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id CED262E8FF; Wed, 30 Dec 2020 00:36:57 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f172.google.com with SMTP id f26so12896619qka.0; Tue, 29 Dec 2020 16:36:57 -0800 (PST) X-Gm-Message-State: AOAM533O0iAmapeLQQ1j9Ym9nkS/QbRBWXfqc8rA9Utveqi9ZQdVyZhk HS8gzbgozuWT+EdaShKP7mvkcVC3/L1itfZBcBE= X-Google-Smtp-Source: ABdhPJy3H6D4gg5dIgHsReUWXto12vKZSzN9Z09rHfyj0HmEfWgYASzvaaKPvdOFCuf4fmDA8Y+TIcBoJOQKQ9dvYAU= X-Received: by 2002:ae9:e517:: with SMTP id w23mr51967649qkf.34.1609288617505; Tue, 29 Dec 2020 16:36:57 -0800 (PST) MIME-Version: 1.0 References: <202012291441.0BTEf1X9009764@gitrepo.freebsd.org> <202012300018.0BU0I7gn079533@gndrsh.dnsmgr.net> In-Reply-To: <202012300018.0BU0I7gn079533@gndrsh.dnsmgr.net> From: Kyle Evans Date: Tue, 29 Dec 2020 18:36:45 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL To: "Rodney W. Grimes" Cc: Glen Barber , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 00:36:58 -0000 On Tue, Dec 29, 2020, 18:18 Rodney W. Grimes wrote: > > The branch main has been updated by gjb: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=70e64ba4494190e64ab8faa04d744182d420c275 > > > > commit 70e64ba4494190e64ab8faa04d744182d420c275 > > Author: Glen Barber > > AuthorDate: 2020-12-29 14:34:05 +0000 > > Commit: Glen Barber > > CommitDate: 2020-12-29 14:40:28 +0000 > > > > release.sh: Update GITROOT URL > > > > Hard-code the GITROOT for the ports tree to use cgit-beta > > until the ports repository is converted. > > > > While here, remove $FreeBSD$ RCS IDs. > > So how do I know what version of some file I am looking at > once it has been dis-associated from a git clone? > > Is there some new mechanism that can give me the cadence of > say, /etc/pkg/FreeBSD.conf once its FreBSD ID is riped out? > > Also if $FreeBSD$ needs to be removed, can we please just do > it in one massive tree wide commit rather than have this > random piece wise needless noise in 1000's of commits? I don't see any particularly compelling reason to strip these tags, personally. I stripped them from caroot because we embedded them in generated files and it creates a lot of noise on updatecerts that I do not need/want, while providing no value to justify the noise for a purely generated file. From owner-dev-commits-src-all@freebsd.org Wed Dec 30 00:38:21 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 15CA54CFBAE; Wed, 30 Dec 2020 00:38:21 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (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 4D5C7c73kZz3sSK; Wed, 30 Dec 2020 00:38:20 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qk1-f170.google.com with SMTP id f26so12898689qka.0; Tue, 29 Dec 2020 16:38:20 -0800 (PST) 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=r13nv4a05Q2iJbQkkcE3kjogHS5DVaTt5ul/RV1ChMI=; b=dUGV/v246Vl+QdwCH2MJ44Gj4/mcFN5lbKG2VjSu2ZbgXDZeVtGVwFYylFN2UOh5zV GcvRvIkjJVVaijaINgXrxLG8gyAFQ2G0WSLtVYITfo6BeHRcW8lPD6QP9gX0tZkULawf Ct9zYTwnKW8fYxu5xwwUtcuZF8OklIaw0JQxOOgSiCbfCvGypkSq4mPheOUhswa+/YRC TGUD2uz+3xR2y33lC7oVLoBzl7i2zWn89iaCArlbxggX7aNOyRj6Kk1zCdMhNW1b4WAR U+XNlxnJokM2GfmJxHsk0Np4CH3COQxxz4kG0dHzgLgZgsRccx7knCHlU27QPqMxk2qv d1gA== X-Gm-Message-State: AOAM5306d+VP6YGaMBlOh9tASaMQf5XK8MyL7hUUSJY2TjbCcyhQ63b9 Szdj21cQpw1FQZami3Uc5XK7eESwDBZbNQ== X-Google-Smtp-Source: ABdhPJxzcz2fHcqjl10TyseRi6/IanYe72JJIxkoqIJkj0UYc7QxcPAAFmr6YGdg/BM3UDXimbhKIQ== X-Received: by 2002:a37:63c3:: with SMTP id x186mr52708317qkb.361.1609288699799; Tue, 29 Dec 2020 16:38:19 -0800 (PST) Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com. [209.85.222.179]) by smtp.gmail.com with ESMTPSA id c139sm25643196qke.24.2020.12.29.16.38.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Dec 2020 16:38:19 -0800 (PST) Received: by mail-qk1-f179.google.com with SMTP id z11so12842839qkj.7; Tue, 29 Dec 2020 16:38:19 -0800 (PST) X-Received: by 2002:a37:6189:: with SMTP id v131mr49752730qkb.337.1609288699044; Tue, 29 Dec 2020 16:38:19 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> In-Reply-To: From: Ryan Libby Date: Tue, 29 Dec 2020 16:38:08 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Kyle Evans Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4D5C7c73kZz3sSK X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 00:38:21 -0000 On Tue, Dec 29, 2020 at 3:32 PM Kyle Evans wrote: > > Hmm, I hadn't done this because we still have in-tree GCC4.2. Might want to go ahead and skip these tests entirely a level up for 4.2. > Ah, thanks for the reminder. I'll take another look re in-tree gcc. Based on the other commits I've MFC'd, I'm pretty sure it's been broken for months anyway, but I'll see what I can do if the fixes are easy. > On Tue, Dec 29, 2020, 17:07 Ryan Libby wrote: >> >> The branch stable/12 has been updated by rlibby: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=269b7d8ac1e533a1f214904ab7bce50f5c14fe3e >> >> commit 269b7d8ac1e533a1f214904ab7bce50f5c14fe3e >> Author: Kyle Evans >> AuthorDate: 2020-03-05 22:45:16 +0000 >> Commit: Ryan Libby >> CommitDate: 2020-12-29 23:04:40 +0000 >> >> tftpd: tests: raise targeted cstd to c11 >> >> r358556 added alignas() use to the functional tests, which isn't defined >> until C11. Raise the -std to C11 to fix the build under freebsd-gcc{6,9}. >> >> Reported by: mhorne, Jenkins/CI >> >> (cherry picked from commit 924e10b809a9fcbc8688c1b5848f60b48e6103fe) >> --- >> libexec/tftpd/tests/Makefile | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/libexec/tftpd/tests/Makefile b/libexec/tftpd/tests/Makefile >> index 06c5537372a7..9aa420cec1a5 100644 >> --- a/libexec/tftpd/tests/Makefile >> +++ b/libexec/tftpd/tests/Makefile >> @@ -10,5 +10,6 @@ TEST_METADATA.functional+= timeout=15 >> >> LIBADD= util >> WARNS?= 6 >> +CSTD= c11 >> >> .include From owner-dev-commits-src-all@freebsd.org Wed Dec 30 00:50:24 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 21F1F4D0289; Wed, 30 Dec 2020 00:50:24 +0000 (UTC) (envelope-from kevans@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 4D5CPX06ftz3ssh; Wed, 30 Dec 2020 00:50:24 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) (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: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id E40C42EB80; Wed, 30 Dec 2020 00:50:23 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f180.google.com with SMTP id c7so12883084qke.1; Tue, 29 Dec 2020 16:50:23 -0800 (PST) X-Gm-Message-State: AOAM530C0IDPdH82YaS4+dPru+RWlg/fskjZPat2EbgutJe5P/Defl23 jdDjsmzdHem3D14RfTDYuYjhucEL6w83iQowy8w= X-Google-Smtp-Source: ABdhPJzFeCD7EnDXXRpQJFEWlIC3LZFW692Gp+mbEnEDKIq+Cqj5lMic6WMqqpvBjeSJRivZsFTMvuf2dCCOu5z4AWo= X-Received: by 2002:a05:620a:14a:: with SMTP id e10mr49364383qkn.103.1609289423405; Tue, 29 Dec 2020 16:50:23 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Tue, 29 Dec 2020 18:50:12 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Ryan Libby Cc: Kyle Evans , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 00:50:24 -0000 On Tue, Dec 29, 2020 at 6:38 PM Ryan Libby wrote: > > On Tue, Dec 29, 2020 at 3:32 PM Kyle Evans wrote: > > > > Hmm, I hadn't done this because we still have in-tree GCC4.2. Might want to go ahead and skip these tests entirely a level up for 4.2. > > > > Ah, thanks for the reminder. I'll take another look re in-tree gcc. > Based on the other commits I've MFC'd, I'm pretty sure it's been > broken for months anyway, but I'll see what I can do if the fixes are > easy. > This should not be the case, we've been running arm/mips/etc. in CI up until the git transition. From owner-dev-commits-src-all@freebsd.org Wed Dec 30 00:53:07 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 91DA44D06FE; Wed, 30 Dec 2020 00:53:07 +0000 (UTC) (envelope-from kevans@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 4D5CSg3jhDz3tKZ; Wed, 30 Dec 2020 00:53:07 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (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: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 7272C2E77D; Wed, 30 Dec 2020 00:53:07 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f180.google.com with SMTP id j26so10101049qtq.8; Tue, 29 Dec 2020 16:53:07 -0800 (PST) X-Gm-Message-State: AOAM5321FCxADTHK6FqcZKmP8Kh24Pnnxz4tWE4wSAmgmj7iXAUwJ3DF PYnIhEZpIFktHwp9CsphTmU1kikvWlEHEaz2zI4= X-Google-Smtp-Source: ABdhPJzIW2LkzhBPl0GeGOv2j0QpfkFHran+nskWUirJ6LfXgVKCE6VLsAQEj9iqiKq4lpx9efSZ4Shai+/PFLvvzAM= X-Received: by 2002:ac8:44cb:: with SMTP id b11mr50138712qto.60.1609289587090; Tue, 29 Dec 2020 16:53:07 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Tue, 29 Dec 2020 18:52:56 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Kyle Evans Cc: Ryan Libby , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 00:53:07 -0000 On Tue, Dec 29, 2020 at 6:50 PM Kyle Evans wrote: > > On Tue, Dec 29, 2020 at 6:38 PM Ryan Libby wrote: > > > > On Tue, Dec 29, 2020 at 3:32 PM Kyle Evans wrote: > > > > > > Hmm, I hadn't done this because we still have in-tree GCC4.2. Might want to go ahead and skip these tests entirely a level up for 4.2. > > > > > > > Ah, thanks for the reminder. I'll take another look re in-tree gcc. > > Based on the other commits I've MFC'd, I'm pretty sure it's been > > broken for months anyway, but I'll see what I can do if the fixes are > > easy. > > > > This should not be the case, we've been running arm/mips/etc. in CI up > until the git transition. Sorry, arm is irrelevant for this branch- but mips/powerpc/sparc64. From owner-dev-commits-src-all@freebsd.org Wed Dec 30 01:00:38 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E69D14D0AA8; Wed, 30 Dec 2020 01:00:38 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (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 4D5CdL61gnz3thp; Wed, 30 Dec 2020 01:00:38 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qk1-f169.google.com with SMTP id h4so12905239qkk.4; Tue, 29 Dec 2020 17:00:38 -0800 (PST) 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=+yNFOdVgGztdWkwFYLFx4xuyZCRAGIxeDgb8udcbaqU=; b=L3XzXqp1VlF301BYlQjrbXssoAcIc1uD/EM2Ii6QrGJtAv7cyoES1SXsQ5yVyx7KBV d2uTO+HVGlaQKVzCySFkeJLozqnSCfWxSfuH92y1mZUCi8x3umc5qPqBtdiqmkD432nX JHj3ZSQAJL+j5Ek/XdJFXPGad7GJRv0GZWQH/t79FqGtaNtLqQYfIX7XbXzj2qsbVCGH FxpQYwBwknqETm40TT33hiHRMc0ignI6X3q8IUIF0Jq0iVsCpRniXvFo+xuhapQVZ3si s9ohjHZDR1KmlkwqzE6jqi0xvLBVd+P3pAmhaldEKOUwEalVgVaf7Zgqf6MVy7VUJ11l bbFQ== X-Gm-Message-State: AOAM531Q8mhWD0tuc7j9Cm2R8RfuOn0YrFdseoG/KT67V+NnV4oC6uJJ +d18HMFqm/GHiYMxBUl2A/YNV/y0trjPPQ== X-Google-Smtp-Source: ABdhPJzDrSByZwcp6OFvmua5VkSSNiTitjWLAkME5ATPNVO/MCkAHrM2AcqFiV0eiUQ3ZeE0J2UQug== X-Received: by 2002:a37:aa42:: with SMTP id t63mr50325564qke.271.1609290037331; Tue, 29 Dec 2020 17:00:37 -0800 (PST) Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com. [209.85.219.42]) by smtp.gmail.com with ESMTPSA id r6sm27469862qkk.127.2020.12.29.17.00.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Dec 2020 17:00:37 -0800 (PST) Received: by mail-qv1-f42.google.com with SMTP id l14so7144328qvh.2; Tue, 29 Dec 2020 17:00:37 -0800 (PST) X-Received: by 2002:ad4:57ab:: with SMTP id g11mr54673920qvx.38.1609290036929; Tue, 29 Dec 2020 17:00:36 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> In-Reply-To: From: Ryan Libby Date: Tue, 29 Dec 2020 17:00:26 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Kyle Evans Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4D5CdL61gnz3thp X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 01:00:39 -0000 On Tue, Dec 29, 2020 at 4:53 PM Kyle Evans wrote: > > On Tue, Dec 29, 2020 at 6:50 PM Kyle Evans wrote: > > > > On Tue, Dec 29, 2020 at 6:38 PM Ryan Libby wrote: > > > > > > On Tue, Dec 29, 2020 at 3:32 PM Kyle Evans wrote: > > > > > > > > Hmm, I hadn't done this because we still have in-tree GCC4.2. Might want to go ahead and skip these tests entirely a level up for 4.2. > > > > > > > > > > Ah, thanks for the reminder. I'll take another look re in-tree gcc. > > > Based on the other commits I've MFC'd, I'm pretty sure it's been > > > broken for months anyway, but I'll see what I can do if the fixes are > > > easy. > > > > > > > This should not be the case, we've been running arm/mips/etc. in CI up > > until the git transition. > > Sorry, arm is irrelevant for this branch- but mips/powerpc/sparc64. Perhaps only x86 was broken... How was tftpd/tests not already broken with alignas from r367305 which MFC'd r358556? In any case my plan right now is to try to remember the gcc 4.2 voodoo, assess, and fix. Please let me know if you think this needs immediate revert before then. Ryan From owner-dev-commits-src-all@freebsd.org Wed Dec 30 01:21:35 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E3414D1301; Wed, 30 Dec 2020 01:21:35 +0000 (UTC) (envelope-from kevans@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 4D5D5W2X3Hz3vmd; Wed, 30 Dec 2020 01:21:35 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.45]) (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: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 43A4F2EE08; Wed, 30 Dec 2020 01:21:35 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f45.google.com with SMTP id bd6so7135103qvb.9; Tue, 29 Dec 2020 17:21:35 -0800 (PST) X-Gm-Message-State: AOAM530pyC6sq/KbgzRDSYItHWgsR98ppFH9bCvhRwEQBSf0FkjyysWl jMhebEoZn3YoRjazBbYoMMkTtGb6TTiS4HSawi0= X-Google-Smtp-Source: ABdhPJw1o1c1Qc/dvlnIXKe+DSLj41GahcSKe2HhZ6IvrSoY2C5g67ckZoQ0Y+26LCk6t330X9jlkcfzi0GlVsBbRIs= X-Received: by 2002:a0c:8b60:: with SMTP id d32mr54586011qvc.60.1609291294779; Tue, 29 Dec 2020 17:21:34 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Tue, 29 Dec 2020 19:21:23 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Ryan Libby Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 01:21:35 -0000 On Tue, Dec 29, 2020 at 7:00 PM Ryan Libby wrote: > > On Tue, Dec 29, 2020 at 4:53 PM Kyle Evans wrote: > > > > On Tue, Dec 29, 2020 at 6:50 PM Kyle Evans wrote: > > > > > > On Tue, Dec 29, 2020 at 6:38 PM Ryan Libby wrote: > > > > > > > > On Tue, Dec 29, 2020 at 3:32 PM Kyle Evans wrote: > > > > > > > > > > Hmm, I hadn't done this because we still have in-tree GCC4.2. Might want to go ahead and skip these tests entirely a level up for 4.2. > > > > > > > > > > > > > Ah, thanks for the reminder. I'll take another look re in-tree gcc. > > > > Based on the other commits I've MFC'd, I'm pretty sure it's been > > > > broken for months anyway, but I'll see what I can do if the fixes are > > > > easy. > > > > > > > > > > This should not be the case, we've been running arm/mips/etc. in CI up > > > until the git transition. > > > > Sorry, arm is irrelevant for this branch- but mips/powerpc/sparc64. > > Perhaps only x86 was broken... > > How was tftpd/tests not already broken with alignas from r367305 which > MFC'd r358556? > That is an incredibly good question. The latest build for powerpc shows that it did in-fact descend into and build libexec/tftpd/tests > In any case my plan right now is to try to remember the gcc 4.2 > voodoo, assess, and fix. Please let me know if you think this needs > immediate revert before then. > Nah, I wouldn't expend the energy on a revert, tbh. If you don't get it figured out by tomorrow or so, I'll re-test and smack it. From owner-dev-commits-src-all@freebsd.org Wed Dec 30 02:20:51 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A45C44D1E7C; Wed, 30 Dec 2020 02:20:51 +0000 (UTC) (envelope-from gjb@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5FPv4K96z4SHY; Wed, 30 Dec 2020 02:20:51 +0000 (UTC) (envelope-from gjb@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1609294851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bM/23NrZGr8EJt8S4He5FZF3/GYXHnlX4L1r0bM507g=; b=gMPpB6G4XyJUqoUQTUiQlRm0Jkrn/1xYbpStPKREVY3Kswb6o+Tk9AzESF7dwIkuelOHsa bTnJQPK/WYz2CJWXIxULYJSE7jKO8EgrEVXDBy4GoHOk44wg4Td1Tsaxh7e1zptrlm4ivk av+NiXVZmkhSmxUo90gneWb+cP3CKNxQSukCu71mDT3sBN4qN+JMqVLs1KiUTkdRRtUBOg d3V623ImxZiX03N+JdFpFLtYYECLuMoxB4ZP0nuneQ7iJwhMTeE1ZVg2Km19625tIJjNvg lVplD0JvZVchvWR8rkNcmRy06S1wmePhyW9guT+3CUAPOI6NI3WhZ+FzG/nZRA== Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 1E0E5110D4; Wed, 30 Dec 2020 02:20:51 +0000 (UTC) (envelope-from gjb@freebsd.org) Date: Wed, 30 Dec 2020 02:20:48 +0000 From: Glen Barber To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL Message-ID: <20201230022048.GD1206@FreeBSD.org> References: <202012291441.0BTEf1X9009764@gitrepo.freebsd.org> <202012300018.0BU0I7gn079533@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="zaRBsRFn0XYhEU69" Content-Disposition: inline In-Reply-To: <202012300018.0BU0I7gn079533@gndrsh.dnsmgr.net> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1609294851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bM/23NrZGr8EJt8S4He5FZF3/GYXHnlX4L1r0bM507g=; b=tsfseX0kwEcPYVbVnBQxaGQERt+wtK5g6CdC/9M4g5JI+5M2lu85ZUcXDcfSjD2QQXnHa6 JdPs+ZARmzXCCwZ4J2I+APzMPb6hn5s7DZ7FuqxhTiKfPdVdLlXpu+w8PF5IVIeL+7ISRc jsbIiMhXIBkABFqhaSS+GbLzt4pWHRlrZCpRgQ8IAIiSXpFF8G+n7sNFmuAT6XI97Ce6cN MMeNpMW/PUf7yZf3vpVkikJGRh1afh638F+N1J2psGgpJERlZNbw+/6WsDl7eXQ7FVbayk fVbXqTM3qCWEQCxQjlh2TtoNyfvlcXEMPKz4VdCt2kHcvFRoKDhC0gLqqdviMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1609294851; a=rsa-sha256; cv=none; b=IlHfWh2VvjvcGfuYEBxLl4T/TOLbqXfjW0YooOePIEs22mObHbH2hJiJY0UwUdLqP5pM93 2p8oMEfWQJMARdZmDHYX1cdq0x/oJnfNKqUeiuUNqiJ9s07LcasC7EEG0ibWjgBuFx+FkE ZxCyMspAOVO20u5j2PDHVm8xJaGDaOXYgoSyvoOQPRN+1CRBwzsiCuJWAjB2s9U5tML0hQ agpsMTQhwtDm6A5GVDsGcFH0/W8K7N8D1Ffgr8Ut+Vga/F8aVlNpDO911polfpSbfVFwce UQeaVVvcLqRaxtI0Hvs6odfK0uleRwfwWF6P5alYL/lXRizWDrBmWzbySf6rXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 02:20:51 -0000 --zaRBsRFn0XYhEU69 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 29, 2020 at 04:18:07PM -0800, Rodney W. Grimes wrote: > > The branch main has been updated by gjb: > >=20 > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D70e64ba4494190e64ab8faa0= 4d744182d420c275 > >=20 > > commit 70e64ba4494190e64ab8faa04d744182d420c275 > > Author: Glen Barber > > AuthorDate: 2020-12-29 14:34:05 +0000 > > Commit: Glen Barber > > CommitDate: 2020-12-29 14:40:28 +0000 > >=20 > > release.sh: Update GITROOT URL > > =20 > > Hard-code the GITROOT for the ports tree to use cgit-beta > > until the ports repository is converted. > > =20 > > While here, remove $FreeBSD$ RCS IDs. >=20 > So how do I know what version of some file I am looking at > once it has been dis-associated from a git clone? >=20 You can't. Git does not expand the tags. > Is there some new mechanism that can give me the cadence of > say, /etc/pkg/FreeBSD.conf once its FreBSD ID is riped out? >=20 > Also if $FreeBSD$ needs to be removed, can we please just do > it in one massive tree wide commit rather than have this > random piece wise needless noise in 1000's of commits? >=20 Please, no. There is no benefit to prune these in one fell swoop as opposed to, for example, bumping Copyright dates. Glen --zaRBsRFn0XYhEU69 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAl/r4/oACgkQAxRYpUeP 4pNgPQ/+JnyQYEdR96LOcxG+IgRo6cGrv7yAsjWwQELzl1ZWqaB2pbZrpr6Qt//m LPxZZhYEIXxrPQwis+UNudIB3lCDBA8VM+JwXN8deAVFN+tj0n3YvRlxfWB8iLHM 3Ln8WfIre+j+y4BalJZhT47zAfHYXfyLWsf6hrp+YdTqyztNG7ZJ9Knsmvaunc1G qp6xyjh2L2LOiY/8PlLHc9e35EVQfUHApMg5SHLPHurisxK2S4dBzmFyfGCbBc7U Wh34jXApHxzMej30AE8c7lYYpHaQx7YVLlTZDY3TGbSGKOV70joV8Gn/29Dff6iY IMF693oy/SqvrYezB3ztMqrZTxQsp5QG4ddh1U0ljbgAtYK6qSoD5J6GRZ6dEebk cgotW/vEuDokoVDfAClLf/34XnCZeVLftEgEw8u6kD+B6Ge7AI/3juRVY1xEsLS6 w+S3p0gnS6p67NhDzmAyM2eKMh3FXvTkqJgIJe9v0XmN7m2fgXvGrBwGHybGr6x0 wstMFMDUDPWRmOE9LqbbYirx+wWhVvRZv35wU5sqRWoFk4sD93ipwGOaHHraG4YI CgFpwlnwtp1M039htV+cCzV4cCL4aOj3AAcrOOXEjjTXg2mWtn8zX972l3ZMlLW+ m5X0ktoBG816rKuetH/ZbLGlH52M8FkTa7CWQJzkFoKMwF3rTs8= =Lqp7 -----END PGP SIGNATURE----- --zaRBsRFn0XYhEU69-- From owner-dev-commits-src-all@freebsd.org Wed Dec 30 02:21:30 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B76974D219F; Wed, 30 Dec 2020 02:21:30 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5FQf4nrwz4Sd5; Wed, 30 Dec 2020 02:21:30 +0000 (UTC) (envelope-from gjb@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1609294890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pxJI3rGtGH5t6uzbxjcc0F0EvLvZSkvJpYBab3AH1Gg=; b=GkKXKPVGzrhDVtToujB49WxJrQYRWUR6osdybzDghNnwdVULOetTxYPGV+NnctAKbfnkZg edL8xRUvf8X1lN1rSjzwxuusc2ngg5yshF9+devJq8MkE2AB+fLUkWtsj9ZDj9Ldvc+3pE V2u0Lrx7XXxHQjfn023/BrMq5zxVDW0+5NdL+0T9FXR/1vfyol+8MeHFJwCOLG6Skwyctc V2q8sPrvSu+70oH/awxLoOVz5q7eX+P4d2FWT4V6Uamyz85mPBhxsxYTloXG5w5ggvtqEj lbuEp9S2yk3TRUkohip7SgeI7UKvxB2JAG8FGloezyoovTOjysX5jQNGaNlAgw== Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 2E33C1138F; Wed, 30 Dec 2020 02:21:30 +0000 (UTC) (envelope-from gjb@freebsd.org) Date: Wed, 30 Dec 2020 02:21:28 +0000 From: Glen Barber To: Kyle Evans Cc: "Rodney W. Grimes" , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL Message-ID: <20201230022128.GE1206@FreeBSD.org> References: <202012291441.0BTEf1X9009764@gitrepo.freebsd.org> <202012300018.0BU0I7gn079533@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="XStn23h1fwudRqtG" Content-Disposition: inline In-Reply-To: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1609294890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pxJI3rGtGH5t6uzbxjcc0F0EvLvZSkvJpYBab3AH1Gg=; b=OoORbVIBAIW4Z3FIDz2mvZQ0qGq2yK86vJ48I0ddw9qHW3I1KwbcYBl8vNfX/mie48rJ3j VbDS6Q2DyllD9h0fiKR/R9pc/Otq2nV0qlTxvT9lfVZ3PIPSenxHR+Cn6NXzZw3zywUJ4T sbcnAswO/vL4TGXLsWywcilDUQ+/JH9Qh+hV43eHSqe9AQqe6HhEiPRuu3VEthfF4y9eRt 3fxp9nrjuSrF1MsiPpQl9BgrYDjT+UPU7EHSomBgFdpFrq+5j3hZJfO3Uwy+PJnt0aCRlr 4dZSHIv/GpeeqqWgaIcwGKUT+ZB8tGCoyADr6QGAlu7IUoNgg34/t6mrLYFltQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1609294890; a=rsa-sha256; cv=none; b=TeRatdxyrACpE/bMl/S+cf2gqmHMHsf7OZKIYku5e/X/Lfamv9OsZkp9p/vELblDVGVWI8 pV7YclJmjAxzG253/WHeUr7xdbPz6JWgahuqPI5Mgf+VIv5S4VGpDGSVtgU0HocRgU8ltd xVPb+y+fr/tw28jhDko7Tcyg4LZCytzRt0f8332Zonz/xXGaiBdL8qTeBx88FJ1Yokk4ui oWsk8VvpZLY8ggfHYHtl+MUFRL5VsmJRxrc5psWVOmYXmIW5OKe+IdB62BtTEFuW4+gWb8 sWSZMla7JVwNXUvFqYtNf9QH3akv8+arGXu/W27xrPZcXfCDrz85cLSI4uDbLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 02:21:30 -0000 --XStn23h1fwudRqtG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 29, 2020 at 06:36:45PM -0600, Kyle Evans wrote: > On Tue, Dec 29, 2020, 18:18 Rodney W. Grimes > wrote: >=20 > > > The branch main has been updated by gjb: > > > > > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=3D70e64ba4494190e64ab8faa04d744= 182d420c275 > > > > > > commit 70e64ba4494190e64ab8faa04d744182d420c275 > > > Author: Glen Barber > > > AuthorDate: 2020-12-29 14:34:05 +0000 > > > Commit: Glen Barber > > > CommitDate: 2020-12-29 14:40:28 +0000 > > > > > > release.sh: Update GITROOT URL > > > > > > Hard-code the GITROOT for the ports tree to use cgit-beta > > > until the ports repository is converted. > > > > > > While here, remove $FreeBSD$ RCS IDs. > > > > So how do I know what version of some file I am looking at > > once it has been dis-associated from a git clone? > > > > Is there some new mechanism that can give me the cadence of > > say, /etc/pkg/FreeBSD.conf once its FreBSD ID is riped out? > > > > Also if $FreeBSD$ needs to be removed, can we please just do > > it in one massive tree wide commit rather than have this > > random piece wise needless noise in 1000's of commits? >=20 >=20 >=20 > I don't see any particularly compelling reason to strip these tags, > personally. I stripped them from caroot because we embedded them in > generated files and it creates a lot of noise on updatecerts that I do not > need/want, while providing no value to justify the noise for a purely > generated file. They are not used/updated, so why keep a tag that does not expand to any useful information? Glen --XStn23h1fwudRqtG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAl/r5CgACgkQAxRYpUeP 4pNqdRAAmUnk8o5BjEGdJAgGOvhD7YNed6cMC827x+kt0PifeNhai3iUyW2Lu2vw N4XpRXYQ4gPHRP4HJacZHFTu86FFJwTs/vFrRcRtcymvHGd+57qr0eoRJ6+725Ro ODEVxCmjTmU75rBHOh+WnPJtNeeKvDtAcHsCksIU1dLl48dcCBIayTlH90A2Vlsa 5ViUDtFTlnNgG2sASH7ASaUJbCM+bfvCtFqnkaKgHk+AEUKcDt2iiu/qAVjSAZ72 YpUIJez+KsbhqKE/PQelyt5w6wDhp1QPrd/GLfTCKzJyhVpJ/Ffp9e4bw4CfSkA3 K4s8xCVWzXsqtnvBeznZdb599Ds/7/+3wFzoEmc0wQUOYAJO/aGqaTEvPl1j5sRE TEmc8vKpYu3hmRO4z+nQe8+EfxqQu5w2zg7sgq6ErERlCYHQ7gQPfSX5hB24ZgEw MlsLHWcmOWkfohFiQoDvIHocfemSrcvLQioCk1zYLNDPBRTAAyM3ct6J0yDRK1XW w2PD5mraBFreLM9gacsgBg3dm9xX02LWFWeW075yF/Bnq+js5+hB5OgQ+izMFBTB uafL8mjRSlMpFRqQWvBKESjR6veloPO/RbgT5cRkCad0FwUq+KeLh8oO82LC0HCa ty8DaxpZVN/OY1zHpkvospxPInaJTf99xDVlB7zb69hcrP2aRiE= =tp9G -----END PGP SIGNATURE----- --XStn23h1fwudRqtG-- From owner-dev-commits-src-all@freebsd.org Wed Dec 30 03:02:54 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B60274D28D7; Wed, 30 Dec 2020 03:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5GLQ4Hm5z4VrY; Wed, 30 Dec 2020 03:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8662917165; Wed, 30 Dec 2020 03:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BU32s5F086848; Wed, 30 Dec 2020 03:02:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BU32snB086847; Wed, 30 Dec 2020 03:02:54 GMT (envelope-from git) Date: Wed, 30 Dec 2020 03:02:54 GMT Message-Id: <202012300302.0BU32snB086847@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 0efb22eebbbb - stable/12 - MFC r356352, r368272 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 0efb22eebbbbd5f164cab39dca72a78cce82afe3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 03:02:54 -0000 The branch stable/12 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=0efb22eebbbbd5f164cab39dca72a78cce82afe3 commit 0efb22eebbbbd5f164cab39dca72a78cce82afe3 Author: Alan Somers AuthorDate: 2020-01-04 18:59:46 +0000 Commit: Alan Somers CommitDate: 2020-12-30 03:02:47 +0000 MFC r356352, r368272 lio_listio_empty_nowait_thread sometimes does *not* hang. The other tests consistently do hang though. Sponsored by: DellEMC (cherry picked from commit 0cb4586a0be3b1b5909b73b24798032ddf2f4002) AIO tests: update expected failure messages after r368265 PR: 220398, 251515 (cherry picked from commit 23693bd8f3e36b4721d7b59d52154d3e3f49e3cd) --- tests/sys/aio/lio_test.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/sys/aio/lio_test.c b/tests/sys/aio/lio_test.c index 383d80bc0c3f..b6965cc9a4ee 100644 --- a/tests/sys/aio/lio_test.c +++ b/tests/sys/aio/lio_test.c @@ -143,8 +143,8 @@ ATF_TC_BODY(lio_listio_empty_nowait_kevent, tc) int kq, result; void *udata = (void*)0xdeadbeefdeadbeef; - atf_tc_expect_timeout("Bug 220398 - lio_listio(2) never sends" - " asynchronous notification if nent==0"); + atf_tc_expect_timeout("Bug 251515 - lio_listio(2) never sends" + " kevent if nent==0"); kq = kqueue(); ATF_REQUIRE(kq > 0); sev.sigev_notify = SIGEV_KEVENT; @@ -168,8 +168,6 @@ ATF_TC_BODY(lio_listio_empty_nowait_signal, tc) struct aiocb *list = NULL; struct sigevent sev; - atf_tc_expect_timeout("Bug 220398 - lio_listio(2) never sends" - " asynchronous notification if nent==0"); ATF_REQUIRE_EQ(0, sem_init(&completions, false, 0)); sev.sigev_notify = SIGEV_SIGNAL; sev.sigev_signo = SIGUSR1; @@ -189,8 +187,6 @@ ATF_TC_BODY(lio_listio_empty_nowait_thread, tc) struct aiocb *list = NULL; struct sigevent sev; - atf_tc_expect_timeout("Bug 220398 - lio_listio(2) never sends" - " asynchronous notification if nent==0"); ATF_REQUIRE_EQ(0, sem_init(&completions, false, 0)); bzero(&sev, sizeof(sev)); sev.sigev_notify = SIGEV_THREAD; From owner-dev-commits-src-all@freebsd.org Wed Dec 30 03:10:15 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 328834D3818; Wed, 30 Dec 2020 03:10:15 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (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 4D5GVv0kptz4W4H; Wed, 30 Dec 2020 03:10:14 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qt1-f176.google.com with SMTP id z3so10224163qtw.9; Tue, 29 Dec 2020 19:10:14 -0800 (PST) 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=Xg8am78M2YOGiEQVPEXH22ENvr1qsE039C11ZTQJa/A=; b=etk7bwhRqwS+7QI4WgHCxCKx676AtgMmm1xd7eg5xM0Rwm2EV7Jb9YjpQ/jOfMasxN RoXkMkXszlhmwAtaIHkO/bmVjKQY0v+CRX1fZEUytJWcSW6TvQjrHVmV/aqOkyct/8HF Jz8QpvsrWBqTyoJfwVHtj1Gi27rGGq1vOGZu4EaIuJmCmGCmf7tusje/l0jw3F5POPVW DRMgpY6HUjAS6G9ilooX4XFDHvaednWjccbcu+Io4q6zGp5YrcYh1YJozfPf1+CB+/ht NEi5hXe8LoGZxDEhb5s6vT3Rj89C96DHhefssHPVFF8Z3AFuYHoG+BPHkipVtSGwdccm zzrg== X-Gm-Message-State: AOAM533PZ89qdAg2iPKuYFcWGqtoELvOqyiWAjZza8m+LS2HFYMxiwWc 2YT2XBFl7Fj4+98nM2Hkcd2LWn+kHyqFSw== X-Google-Smtp-Source: ABdhPJw6hiMWs0tmYmOuzfLaStxV55fwri2H0Cqlst8q8zOebbH23zDmlVLTDW28ts+i9SlxrGvKyA== X-Received: by 2002:ac8:6659:: with SMTP id j25mr52137321qtp.322.1609297813651; Tue, 29 Dec 2020 19:10:13 -0800 (PST) Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com. [209.85.219.41]) by smtp.gmail.com with ESMTPSA id u20sm27248963qtb.9.2020.12.29.19.10.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Dec 2020 19:10:13 -0800 (PST) Received: by mail-qv1-f41.google.com with SMTP id bd6so7211999qvb.9; Tue, 29 Dec 2020 19:10:13 -0800 (PST) X-Received: by 2002:ad4:5762:: with SMTP id r2mr55275016qvx.45.1609297813071; Tue, 29 Dec 2020 19:10:13 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> In-Reply-To: From: Ryan Libby Date: Tue, 29 Dec 2020 19:10:02 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Kyle Evans Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4D5GVv0kptz4W4H X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 03:10:15 -0000 On Tue, Dec 29, 2020 at 5:21 PM Kyle Evans wrote: > > On Tue, Dec 29, 2020 at 7:00 PM Ryan Libby wrote: > > > > On Tue, Dec 29, 2020 at 4:53 PM Kyle Evans wrote: > > > > > > On Tue, Dec 29, 2020 at 6:50 PM Kyle Evans wrote: > > > > > > > > On Tue, Dec 29, 2020 at 6:38 PM Ryan Libby wrote: > > > > > > > > > > On Tue, Dec 29, 2020 at 3:32 PM Kyle Evans wrote: > > > > > > > > > > > > Hmm, I hadn't done this because we still have in-tree GCC4.2. Might want to go ahead and skip these tests entirely a level up for 4.2. > > > > > > > > > > > > > > > > Ah, thanks for the reminder. I'll take another look re in-tree gcc. > > > > > Based on the other commits I've MFC'd, I'm pretty sure it's been > > > > > broken for months anyway, but I'll see what I can do if the fixes are > > > > > easy. > > > > > > > > > > > > > This should not be the case, we've been running arm/mips/etc. in CI up > > > > until the git transition. > > > > > > Sorry, arm is irrelevant for this branch- but mips/powerpc/sparc64. > > > > Perhaps only x86 was broken... > > > > How was tftpd/tests not already broken with alignas from r367305 which > > MFC'd r358556? > > > > That is an incredibly good question. The latest build for powerpc > shows that it did in-fact descend into and build libexec/tftpd/tests > > > In any case my plan right now is to try to remember the gcc 4.2 > > voodoo, assess, and fix. Please let me know if you think this needs > > immediate revert before then. > > > > Nah, I wouldn't expend the energy on a revert, tbh. If you don't get > it figured out by tomorrow or so, I'll re-test and smack it. Okay, what's going on is that the tftpd/tests/Makefile was already not building the test for gcc < 4.3, due to lack of __COUNTER__. The use of _Alignas and -std=c11 would require gcc 4.7. If we cared, we would bump the minimum gcc version required accordingly. However, since there's no reason to build with gcc >= 4.3 and < 4.7, I don't think we care and I think the current state of affairs on stable/12 is acceptable. I checked powerpc.powerpc64 with in-tree gcc 4.2.1 and buildworld succeeded. Hopefully ci will be up again soon too. I checked amd64 and it failed due to pkru. I don't think we care to fix that either, but we technically could of course. For amd64 the external toolchain with gcc 6.4 is broken at the moment but will be fixed after a few more MFCs. Thanks for reviewing this MFC! From owner-dev-commits-src-all@freebsd.org Wed Dec 30 03:17:59 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 210C84D3A8B; Wed, 30 Dec 2020 03:17:59 +0000 (UTC) (envelope-from bdragon@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 4D5Ggq0Dzsz4Wbs; Wed, 30 Dec 2020 03:17:59 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id E96852FAEE; Wed, 30 Dec 2020 03:17:58 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 9FB8527C0054; Tue, 29 Dec 2020 22:17:58 -0500 (EST) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Tue, 29 Dec 2020 22:17:58 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvvddgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepjefhfedtuddtleegkeeg tdegjeekffdvjedttdehgffgveeugffgfeelvdeghffgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepsggurhgrghhonhdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidquddtgedvfeehkeeigedqudekuddtkeehuddqsggurh grghhonheppefhrhgvvgeuufffrdhorhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id E03C7C200A5; Tue, 29 Dec 2020 22:17:58 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.1-61-gb52c239-fm-20201210.001-gb52c2396 Mime-Version: 1.0 Message-Id: <3b4bc9dc-e868-4171-829e-682d8aab7369@www.fastmail.com> In-Reply-To: References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> Date: Tue, 29 Dec 2020 21:17:37 -0600 From: "Brandon Bergren" To: "Kyle Evans" , "Ryan Libby" Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: =?UTF-8?Q?Re:_git:_269b7d8ac1e5_-_stable/12_-_tftpd:_tests:_raise_target?= =?UTF-8?Q?ed_cstd_to_c11?= Content-Type: text/plain X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 03:17:59 -0000 On Tue, Dec 29, 2020, at 7:21 PM, Kyle Evans wrote: > > That is an incredibly good question. The latest build for powerpc > shows that it did in-fact descend into and build libexec/tftpd/tests The tests need to get *built* since they're part of the sets, even if they aren't currently *run* nightly on the CI. -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-all@freebsd.org Wed Dec 30 03:20:10 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B074B4D38AB; Wed, 30 Dec 2020 03:20:10 +0000 (UTC) (envelope-from kevans@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 4D5GkL4WWzz4WwJ; Wed, 30 Dec 2020 03:20:10 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (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: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 88FDE2FBF8; Wed, 30 Dec 2020 03:20:10 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f180.google.com with SMTP id v5so10248936qtv.7; Tue, 29 Dec 2020 19:20:10 -0800 (PST) X-Gm-Message-State: AOAM533tZ1XgBd1SBI2YLk/EuROTU/j1co9LXH/4qdDGEo3PMue/9nnj KGuX8CBYktvh0v0la/4Xtd+8Fl2DpFNvmVqtkeg= X-Google-Smtp-Source: ABdhPJzZhgRK813mBdod4uCN4jn+0y7kqKCSEQRhZNSWgSQT7pkqRukcuOK+ZuBwLg99+6puJtyeY3lqQsz+x2gJdYU= X-Received: by 2002:ac8:44cb:: with SMTP id b11mr50494483qto.60.1609298410179; Tue, 29 Dec 2020 19:20:10 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Tue, 29 Dec 2020 21:19:59 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Ryan Libby Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 03:20:10 -0000 On Tue, Dec 29, 2020 at 9:10 PM Ryan Libby wrote: > > On Tue, Dec 29, 2020 at 5:21 PM Kyle Evans wrote: > > > > On Tue, Dec 29, 2020 at 7:00 PM Ryan Libby wrote: > > > > > > On Tue, Dec 29, 2020 at 4:53 PM Kyle Evans wrote: > > > > > > > > On Tue, Dec 29, 2020 at 6:50 PM Kyle Evans wrote: > > > > > > > > > > On Tue, Dec 29, 2020 at 6:38 PM Ryan Libby wrote: > > > > > > > > > > > > On Tue, Dec 29, 2020 at 3:32 PM Kyle Evans wrote: > > > > > > > > > > > > > > Hmm, I hadn't done this because we still have in-tree GCC4.2. Might want to go ahead and skip these tests entirely a level up for 4.2. > > > > > > > > > > > > > > > > > > > Ah, thanks for the reminder. I'll take another look re in-tree gcc. > > > > > > Based on the other commits I've MFC'd, I'm pretty sure it's been > > > > > > broken for months anyway, but I'll see what I can do if the fixes are > > > > > > easy. > > > > > > > > > > > > > > > > This should not be the case, we've been running arm/mips/etc. in CI up > > > > > until the git transition. > > > > > > > > Sorry, arm is irrelevant for this branch- but mips/powerpc/sparc64. > > > > > > Perhaps only x86 was broken... > > > > > > How was tftpd/tests not already broken with alignas from r367305 which > > > MFC'd r358556? > > > > > > > That is an incredibly good question. The latest build for powerpc > > shows that it did in-fact descend into and build libexec/tftpd/tests > > > > > In any case my plan right now is to try to remember the gcc 4.2 > > > voodoo, assess, and fix. Please let me know if you think this needs > > > immediate revert before then. > > > > > > > Nah, I wouldn't expend the energy on a revert, tbh. If you don't get > > it figured out by tomorrow or so, I'll re-test and smack it. > > Okay, what's going on is that the tftpd/tests/Makefile was already not > building the test for gcc < 4.3, due to lack of __COUNTER__. The use of > _Alignas and -std=c11 would require gcc 4.7. If we cared, we would bump > the minimum gcc version required accordingly. However, since there's > no reason to build with gcc >= 4.3 and < 4.7, I don't think we care and > I think the current state of affairs on stable/12 is acceptable. > > I checked powerpc.powerpc64 with in-tree gcc 4.2.1 and buildworld > succeeded. Hopefully ci will be up again soon too. > > I checked amd64 and it failed due to pkru. I don't think we care to fix > that either, but we technically could of course. For amd64 the external > toolchain with gcc 6.4 is broken at the moment but will be fixed after a > few more MFCs. > > Thanks for reviewing this MFC! Excellent, thanks for taking a look (and merging this back)! From owner-dev-commits-src-all@freebsd.org Wed Dec 30 03:20:58 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 501534D3847; Wed, 30 Dec 2020 03:20:58 +0000 (UTC) (envelope-from bdragon@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 4D5GlG1bgWz4WyY; Wed, 30 Dec 2020 03:20:58 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 294412FE1F; Wed, 30 Dec 2020 03:20:58 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 04D8327C0054; Tue, 29 Dec 2020 22:20:58 -0500 (EST) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Tue, 29 Dec 2020 22:20:58 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvvddgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepjefhfedtuddtleegkeeg tdegjeekffdvjedttdehgffgveeugffgfeelvdeghffgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepsggurhgrghhonhdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidquddtgedvfeehkeeigedqudekuddtkeehuddqsggurh grghhonheppefhrhgvvgeuufffrdhorhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 32650C200A5; Tue, 29 Dec 2020 22:20:58 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.1-61-gb52c239-fm-20201210.001-gb52c2396 Mime-Version: 1.0 Message-Id: <210fcf35-150f-46dd-981c-30e77b843716@www.fastmail.com> In-Reply-To: References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> Date: Tue, 29 Dec 2020 21:20:37 -0600 From: "Brandon Bergren" To: "Ryan Libby" , "Kyle Evans" Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: =?UTF-8?Q?Re:_git:_269b7d8ac1e5_-_stable/12_-_tftpd:_tests:_raise_target?= =?UTF-8?Q?ed_cstd_to_c11?= Content-Type: text/plain X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 03:20:58 -0000 On Tue, Dec 29, 2020, at 9:10 PM, Ryan Libby wrote: > I checked powerpc.powerpc64 with in-tree gcc 4.2.1 and buildworld > succeeded. Hopefully ci will be up again soon too. > OK, as long as buildworld is still working, I'm happy. -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-all@freebsd.org Wed Dec 30 03:23:04 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2957F4D3BB6; Wed, 30 Dec 2020 03:23:04 +0000 (UTC) (envelope-from kevans@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 4D5Gnh0Qrgz4XBQ; Wed, 30 Dec 2020 03:23:04 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (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: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id F01B52FAF1; Wed, 30 Dec 2020 03:23:03 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f170.google.com with SMTP id z9so10274308qtn.4; Tue, 29 Dec 2020 19:23:03 -0800 (PST) X-Gm-Message-State: AOAM532qNSwV8IrqE6MY8Mk5B7prVN1hHGP2rCwVPTvHpOGicKlYd8vH WBli5MdnnNadeazunasvAhpN7WFX6cUiRBAYX10= X-Google-Smtp-Source: ABdhPJx0P4gE0v4YVSpg9LzEbRgV1LgQ5O0ZGnW8k5hS4OiogNz0UDz9wvirFNVBrYbETm3bITdfvitgmuhkX2ff3/Q= X-Received: by 2002:ac8:729a:: with SMTP id v26mr50929603qto.53.1609298583516; Tue, 29 Dec 2020 19:23:03 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> <3b4bc9dc-e868-4171-829e-682d8aab7369@www.fastmail.com> In-Reply-To: <3b4bc9dc-e868-4171-829e-682d8aab7369@www.fastmail.com> From: Kyle Evans Date: Tue, 29 Dec 2020 21:22:52 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Brandon Bergren Cc: Ryan Libby , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 03:23:04 -0000 On Tue, Dec 29, 2020 at 9:18 PM Brandon Bergren wrote: > > On Tue, Dec 29, 2020, at 7:21 PM, Kyle Evans wrote: > > > > That is an incredibly good question. The latest build for powerpc > > shows that it did in-fact descend into and build libexec/tftpd/tests > > The tests need to get *built* since they're part of the sets, even if they aren't currently *run* nightly on the CI. > Ryan already pointed out the flaw in my logic (they didn't actually get built, I should have checked libexec/tftpd/tests/Makefile), but the fact that they're not run wasn't significant to this discussion -- the problem observed would have been at compile-time due to an unknown standard or because we weren't specifying the appropriate standard (pre-merge). From owner-dev-commits-src-all@freebsd.org Wed Dec 30 04:02:33 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BFBE04D4475 for ; Wed, 30 Dec 2020 04:02:33 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) (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 4D5HgD5P0vz4YfZ for ; Wed, 30 Dec 2020 04:02:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x829.google.com with SMTP id b9so10331981qtr.2 for ; Tue, 29 Dec 2020 20:02:32 -0800 (PST) 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=dTvmhSF5k0pTNyRVZQ8S43L1h29JS9zFP+DvKovHujc=; b=hbyCT/im9LT7xzjoARfAM0+Uwr47iiuRlKlpOsPtd+AyVKaRzw2qiMUhG5RBozFKoq 3CJ9EZqCwf67MViS/S7Okoo5LxPurGboQ3xuYKvelj0CuEJb3OadvxA06uVLwQN/tKgJ 3J3oX057ENyC2DcjMqWeVhxwVSkG7XEdeXDEY4kTZeBWaav/TYZdpVXm+JdB08hqYLJw 7Y1jjju769YiYbYPn2BCI3GJxeEkRFJQ/GXe/6TChxdv3N6UnEbjIDVsjK3DAWUA2cB1 XRDBgF0haSTOXQpOF7eP5g/7UEMw355Q35zB4gSVDcteKg/LmSIAncQzok9ie8tUSGQT UYGw== 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=dTvmhSF5k0pTNyRVZQ8S43L1h29JS9zFP+DvKovHujc=; b=ovVG2GAjeMrQY0yHKvIYbq30O1q5NBscSdml9QHtITdDCwkIKrw41Bu008EZKdQNBm 0oGdDRKcOficXWsxlCcB4CTf/63VmoJhrnddgateU4/oRTDcZNorQgpJHC4WfGFF0mgZ pcie1s93e7lkw58hlDO2L62ESQ0bEwXirqRd9bQE06rTDh3xxk52Gq77pZVWCu+AXhn0 ygCqYev7mVWO1I6rA2Ia5BCX5oggsH18CQZG2ydl/Uo/aov03oo0cc4FJ76Ut0TpfRlT VM2184uTm2kp8aPRredrNT44Oj0l2a9CtbGxdJl9IOcejwrNOOSia78noc4Wg5UwQ616 4xaw== X-Gm-Message-State: AOAM533t5cIAlhacb1TZ1QJPbMSKN0DtwrDAvncDIF1k15X3yn2qdKnU E9Y0/Dw0LjPLZ2nIzz0mr/hHPjXga5LZaxRP9ndIow== X-Google-Smtp-Source: ABdhPJyhkZwGY0jq9Z3ZwUAxMUsVlMSDBNmf+bMJ9kM/9I3zzCQEz7Rto1FIUCLLS8Ty2abUIp7NXlbOWNetViGkKQw= X-Received: by 2002:ac8:51d8:: with SMTP id d24mr50267605qtn.73.1609300951746; Tue, 29 Dec 2020 20:02:31 -0800 (PST) MIME-Version: 1.0 References: <202012291441.0BTEf1X9009764@gitrepo.freebsd.org> <202012300018.0BU0I7gn079533@gndrsh.dnsmgr.net> <20201230022128.GE1206@FreeBSD.org> In-Reply-To: <20201230022128.GE1206@FreeBSD.org> From: Warner Losh Date: Tue, 29 Dec 2020 21:02:19 -0700 Message-ID: Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL To: Glen Barber Cc: Kyle Evans , "Rodney W. Grimes" , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4D5HgD5P0vz4YfZ X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=hbyCT/im; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::829) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.00 / 15.00]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[6]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::829:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::829:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::829:from]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-all] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 04:02:33 -0000 On Tue, Dec 29, 2020, 7:21 PM Glen Barber wrote: > On Tue, Dec 29, 2020 at 06:36:45PM -0600, Kyle Evans wrote: > > On Tue, Dec 29, 2020, 18:18 Rodney W. Grimes > > wrote: > > > > > > The branch main has been updated by gjb: > > > > > > > > URL: > > > > https://cgit.FreeBSD.org/src/commit/?id=70e64ba4494190e64ab8faa04d744182d420c275 > > > > > > > > commit 70e64ba4494190e64ab8faa04d744182d420c275 > > > > Author: Glen Barber > > > > AuthorDate: 2020-12-29 14:34:05 +0000 > > > > Commit: Glen Barber > > > > CommitDate: 2020-12-29 14:40:28 +0000 > > > > > > > > release.sh: Update GITROOT URL > > > > > > > > Hard-code the GITROOT for the ports tree to use cgit-beta > > > > until the ports repository is converted. > > > > > > > > While here, remove $FreeBSD$ RCS IDs. > > > > > > So how do I know what version of some file I am looking at > > > once it has been dis-associated from a git clone? > > > > > > Is there some new mechanism that can give me the cadence of > > > say, /etc/pkg/FreeBSD.conf once its FreBSD ID is riped out? > > > > > > Also if $FreeBSD$ needs to be removed, can we please just do > > > it in one massive tree wide commit rather than have this > > > random piece wise needless noise in 1000's of commits? > > > > > > > > I don't see any particularly compelling reason to strip these tags, > > personally. I stripped them from caroot because we embedded them in > > generated files and it creates a lot of noise on updatecerts that I do > not > > need/want, while providing no value to justify the noise for a purely > > generated file. > > They are not used/updated, so why keep a tag that does not expand to any > useful information? > Deleting all the $FreeBSD$ in on go is massively unwise (or as the British might say, "a very brave plan"). It will screw up MFCs on an epic scale for years for no real benefit to pay for that extra developer time. It itself can't be MFCd. It's a terrible idea. We should not be deleting them, except judiciously for things that cannot be MFCd. With the subversion exporter, they will live on in stable/12. Warner > From owner-dev-commits-src-all@freebsd.org Wed Dec 30 04:49:20 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 356F84D670E for ; Wed, 30 Dec 2020 04:49:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5JjD0rkpz4bsX; Wed, 30 Dec 2020 04:49:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DFE4818753; Wed, 30 Dec 2020 04:49:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BU4nJFR010031; Wed, 30 Dec 2020 04:49:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BU4nJDU010030; Wed, 30 Dec 2020 04:49:19 GMT (envelope-from git) Date: Wed, 30 Dec 2020 04:49:19 GMT Message-Id: <202012300449.0BU4nJDU010030@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Philip Paeps Subject: git: 96b88ac701b3 - vendor/tzdata - Import tzdata 2020f MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/vendor/tzdata X-Git-Reftype: branch X-Git-Commit: 96b88ac701b35ce68425046d4be8f51cb75b5d5b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 04:49:20 -0000 The branch vendor/tzdata has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=96b88ac701b35ce68425046d4be8f51cb75b5d5b commit 96b88ac701b35ce68425046d4be8f51cb75b5d5b Author: Philip Paeps AuthorDate: 2020-12-30 04:45:24 +0000 Commit: Philip Paeps CommitDate: 2020-12-30 04:45:24 +0000 Import tzdata 2020f --- Makefile | 5 ++++- NEWS | 8 ++++++++ version | 2 +- ziguard.awk | 9 +++++---- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 5064a190c5a5..1136af9298f1 100644 --- a/Makefile +++ b/Makefile @@ -945,7 +945,10 @@ check_public: $(VERSION_DEPS) mkdir public.dir ln $(VERSION_DEPS) public.dir cd public.dir && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL - for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi; do \ + for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi \ + public.dir/vanguard.zi public.dir/main.zi \ + public.dir/rearguard.zi; \ + do \ public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \ done public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK) diff --git a/NEWS b/NEWS index 6014b45a0b4a..19470cc41c3d 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,13 @@ News for the tz database +Release 2020f - 2020-12-29 00:17:46 -0800 + + Change to build procedure + + 'make rearguard_tarballs' no longer generates a bad rearguard.zi, + fixing a 2020e bug. (Problem reported by Deborah Goldsmith.) + + Release 2020e - 2020-12-22 15:14:34 -0800 Briefly: diff --git a/version b/version index e788a597fa7b..a481df8cb9d4 100644 --- a/version +++ b/version @@ -1 +1 @@ -2020e +2020f diff --git a/ziguard.awk b/ziguard.awk index e27e799392ec..7d6f7c99c952 100644 --- a/ziguard.awk +++ b/ziguard.awk @@ -37,7 +37,7 @@ DATAFORM != "main" { # If this line should differ due to Czechoslovakia using negative SAVE values, # uncomment the desired version and comment out the undesired one. - if (zone == "Europe/Prague" && /1947 Feb 23/) { + if (zone == "Europe/Prague" && /^#?[\t ]+[01]:00[\t ]/ && /1947 Feb 23/) { if (($(in_comment + 2) != "-") == vanguard) { uncomment = in_comment } else { @@ -65,10 +65,11 @@ DATAFORM != "main" { # uncomment the desired version and comment out the undesired one. Rule_Namibia = /^#?Rule[\t ]+Namibia[\t ]/ Zone_using_Namibia_rule \ - = (zone == "Africa/Windhoek" \ + = (zone == "Africa/Windhoek" && /^#?[\t ]+[12]:00[\t ]/ \ && ($(in_comment + 2) == "Namibia" \ - || (1994 <= $(in_comment + 4) && $(in_comment + 4) <= 2017) \ - || in_comment + 3 == NF)) + || ($(in_comment + 2) == "-" && $(in_comment + 3) == "CAT" \ + && ((1994 <= $(in_comment + 4) && $(in_comment + 4) <= 2017) \ + || in_comment + 3 == NF)))) if (Rule_Namibia || Zone_using_Namibia_rule) { if ((Rule_Namibia \ ? ($(in_comment + 9) ~ /^-/ \ From owner-dev-commits-src-all@freebsd.org Wed Dec 30 04:49:20 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3948D4D65A4 for ; Wed, 30 Dec 2020 04:49:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5JjD12r1z4byC; Wed, 30 Dec 2020 04:49:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EDC1D18801; Wed, 30 Dec 2020 04:49:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BU4nJKW010054; Wed, 30 Dec 2020 04:49:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BU4nJsQ010053; Wed, 30 Dec 2020 04:49:19 GMT (envelope-from git) Date: Wed, 30 Dec 2020 04:49:19 GMT Message-Id: <202012300449.0BU4nJsQ010053@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Philip Paeps Subject: git: 0abc43e4f71f - Create tag vendor/tzdata/tzdata2020f MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/tags/vendor/tzdata/tzdata2020f X-Git-Reftype: annotated tag X-Git-Commit: 0abc43e4f71ff46b182d5783121e42b3e90f8151 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 04:49:20 -0000 The annotated tag vendor/tzdata/tzdata2020f has been created by philip: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/tzdata/tzdata2020f tag vendor/tzdata/tzdata2020f Tagger: Philip Paeps TaggerDate: 2020-12-30 04:46:46 +0000 Tag import of tzdata 2020f commit 96b88ac701b35ce68425046d4be8f51cb75b5d5b Author: Philip Paeps AuthorDate: 2020-12-30 04:45:24 +0000 Commit: Philip Paeps CommitDate: 2020-12-30 04:45:24 +0000 Import tzdata 2020f From owner-dev-commits-src-all@freebsd.org Wed Dec 30 04:53:00 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1D5124D6827; Wed, 30 Dec 2020 04:53:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5JnS09cNz4c7C; Wed, 30 Dec 2020 04:53:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED34518817; Wed, 30 Dec 2020 04:52:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BU4qxu4021785; Wed, 30 Dec 2020 04:52:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BU4qx7C021782; Wed, 30 Dec 2020 04:52:59 GMT (envelope-from git) Date: Wed, 30 Dec 2020 04:52:59 GMT Message-Id: <202012300452.0BU4qx7C021782@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Philip Paeps Subject: git: e35a01eec692 - main - contrib/tzdata: import tzdata 2020f MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e35a01eec6926bfb5c088ca8961079b51a067bf3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 04:53:00 -0000 The branch main has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=e35a01eec6926bfb5c088ca8961079b51a067bf3 commit e35a01eec6926bfb5c088ca8961079b51a067bf3 Merge: 2ff66a915526 96b88ac701b3 Author: Philip Paeps AuthorDate: 2020-12-30 04:50:26 +0000 Commit: Philip Paeps CommitDate: 2020-12-30 04:50:26 +0000 contrib/tzdata: import tzdata 2020f Merge commit '96b88ac701b35ce68425046d4be8f51cb75b5d5b' into main Changes: https://github.com/eggert/tz/blob/2020f/NEWS MFC after: 1 day contrib/tzdata/Makefile | 5 ++++- contrib/tzdata/NEWS | 8 ++++++++ contrib/tzdata/version | 2 +- contrib/tzdata/ziguard.awk | 9 +++++---- 4 files changed, 18 insertions(+), 6 deletions(-) diff --cc contrib/tzdata/Makefile index 5064a190c5a5,000000000000..1136af9298f1 mode 100644,000000..100644 --- a/contrib/tzdata/Makefile +++ b/contrib/tzdata/Makefile @@@ -1,1127 -1,0 +1,1130 @@@ +# Make and install tzdb code and data. + +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. + +# Package name for the code distribution. +PACKAGE= tzcode + +# Version number for the distribution, overridden in the 'tarballs' rule below. +VERSION= unknown + +# Email address for bug reports. +BUGEMAIL= tz@iana.org + +# DATAFORM selects the data format. +# Available formats represent essentially the same data, albeit +# possibly with minor discrepancies that users are not likely to notice. +# To get new features and the best data right away, use: +# DATAFORM= vanguard +# To wait a while before using new features, to give downstream users +# time to upgrade zic (the default), use: +# DATAFORM= main +# To wait even longer for new features, use: +# DATAFORM= rearguard +# Rearguard users might also want "ZFLAGS = -b fat"; see below. +DATAFORM= main + +# Change the line below for your timezone (after finding the one you want in +# one of the $(TDATA) source files, or adding it to a source file). +# Alternatively, if you discover you've got the wrong timezone, you can just +# 'zic -l -' to remove it, or 'zic -l rightzone' to change it. +# Use the command +# make zonenames +# to get a list of the values you can use for LOCALTIME. + +LOCALTIME= GMT + +# The POSIXRULES macro controls interpretation of nonstandard and obsolete +# POSIX-like TZ settings like TZ='EET-2EEST' that lack DST transition rules. +# Such a setting uses the rules in a template file to determine +# "spring forward" and "fall back" days and times; the environment +# variable itself specifies UT offsets of standard and daylight saving time. +# +# If POSIXRULES is '-', no template is installed; this is the default. +# +# Any other value for POSIXRULES is obsolete and should not be relied on, as: +# * It does not work correctly in popular implementations such as GNU/Linux. +# * It does not work in the tzdb implementation for timestamps after 2037. +# * It is incompatible with 'zic -b slim' if POSIXRULES specifies transitions +# at standard time or UT rather than at local time. +# In short, software should avoid ruleless settings like TZ='EET-2EEST' +# and so should not depend on the value of POSIXRULES. +# +# If, despite the above, you want a template for handling these settings, +# you can change the line below (after finding the timezone you want in the +# one of the $(TDATA) source files, or adding it to a source file). +# Alternatively, if you discover you've got the wrong timezone, you can just +# 'zic -p -' to remove it, or 'zic -p rightzone' to change it. +# Use the command +# make zonenames +# to get a list of the values you can use for POSIXRULES. + +POSIXRULES= - + +# Also see TZDEFRULESTRING below, which takes effect only +# if the time zone files cannot be accessed. + + +# Installation locations. +# +# The defaults are suitable for Debian, except that if REDO is +# posix_right or right_posix then files that Debian puts under +# /usr/share/zoneinfo/posix and /usr/share/zoneinfo/right are instead +# put under /usr/share/zoneinfo-posix and /usr/share/zoneinfo-leaps, +# respectively. Problems with the Debian approach are discussed in +# the commentary for the right_posix rule (below). + +# Destination directory, which can be used for staging. +# 'make DESTDIR=/stage install' installs under /stage (e.g., to +# /stage/etc/localtime instead of to /etc/localtime). Files under +# /stage are not intended to work as-is, but can be copied by hand to +# the root directory later. If DESTDIR is empty, 'make install' does +# not stage, but installs directly into production locations. +DESTDIR = + +# Everything is installed into subdirectories of TOPDIR, and used there. +# TOPDIR should be empty (meaning the root directory), +# or a directory name that does not end in "/". +# TOPDIR should be empty or an absolute name unless you're just testing. +TOPDIR = + +# The default local timezone is taken from the file TZDEFAULT. +TZDEFAULT = $(TOPDIR)/etc/localtime + +# The subdirectory containing installed program and data files, and +# likewise for installed files that can be shared among architectures. +# These should be relative file names. +USRDIR = usr +USRSHAREDIR = $(USRDIR)/share + +# "Compiled" timezone information is placed in the "TZDIR" directory +# (and subdirectories). +# TZDIR_BASENAME should not contain "/" and should not be ".", ".." or empty. +TZDIR_BASENAME= zoneinfo +TZDIR = $(TOPDIR)/$(USRSHAREDIR)/$(TZDIR_BASENAME) + +# The "tzselect" and (if you do "make INSTALL") "date" commands go in: +BINDIR = $(TOPDIR)/$(USRDIR)/bin + +# The "zdump" command goes in: +ZDUMPDIR = $(BINDIR) + +# The "zic" command goes in: +ZICDIR = $(TOPDIR)/$(USRDIR)/sbin + +# Manual pages go in subdirectories of. . . +MANDIR = $(TOPDIR)/$(USRSHAREDIR)/man + +# Library functions are put in an archive in LIBDIR. +LIBDIR = $(TOPDIR)/$(USRDIR)/lib + + +# Types to try, as an alternative to time_t. +TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL) +TIME_T_ALTERNATIVES_HEAD = int64_t +TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t + +# What kind of TZif data files to generate. (TZif is the binary time +# zone data format that zic generates; see Internet RFC 8536.) +# If you want only POSIX time, with time values interpreted as +# seconds since the epoch (not counting leap seconds), use +# REDO= posix_only +# below. If you want only "right" time, with values interpreted +# as seconds since the epoch (counting leap seconds), use +# REDO= right_only +# below. If you want both sets of data available, with leap seconds not +# counted normally, use +# REDO= posix_right +# below. If you want both sets of data available, with leap seconds counted +# normally, use +# REDO= right_posix +# below. POSIX mandates that leap seconds not be counted; for compatibility +# with it, use "posix_only" or "posix_right". Use POSIX time on systems with +# leap smearing; this can work better than unsmeared "right" time with +# applications that are not leap second aware, and is closer to unsmeared +# "right" time than unsmeared POSIX time is (e.g., 0.5 vs 1.0 s max error). + +REDO= posix_right + +# Whether to put an "Expires" line in the leapseconds file. +# Use EXPIRES_LINE=1 to put the line in, 0 to omit it. +# The EXPIRES_LINE value matters only if REDO's value contains "right". +# If you change EXPIRES_LINE, remove the leapseconds file before running "make". +# zic's support for the Expires line was introduced in tzdb 2020a, +# and EXPIRES_LINE defaults to 0 for now so that the leapseconds file +# can be given to older zic implementations. +EXPIRES_LINE= 0 + +# To install data in text form that has all the information of the TZif data, +# (optionally incorporating leap second information), use +# TZDATA_TEXT= tzdata.zi leapseconds +# To install text data without leap second information (e.g., because +# REDO='posix_only'), use +# TZDATA_TEXT= tzdata.zi +# To avoid installing text data, use +# TZDATA_TEXT= + +TZDATA_TEXT= leapseconds tzdata.zi + +# For backward-compatibility links for old zone names, use +# BACKWARD= backward +# To omit these links, use +# BACKWARD= + +BACKWARD= backward + +# If you want out-of-scope and often-wrong data from the file 'backzone', use +# PACKRATDATA= backzone +# To omit this data, use +# PACKRATDATA= + +PACKRATDATA= + +# The name of a locale using the UTF-8 encoding, used during self-tests. +# The tests are skipped if the name does not appear to work on this system. + +UTF8_LOCALE= en_US.utf8 + +# Non-default libraries needed to link. +LDLIBS= + +# Add the following to the end of the "CFLAGS=" line as needed to override +# defaults specified in the source code. "-DFOO" is equivalent to "-DFOO=1". +# -DDEPRECATE_TWO_DIGIT_YEARS for optional runtime warnings about strftime +# formats that generate only the last two digits of year numbers +# -DEPOCH_LOCAL if the 'time' function returns local time not UT +# -DEPOCH_OFFSET=N if the 'time' function returns a value N greater +# than what POSIX specifies, assuming local time is UT. +# For example, N is 252460800 on AmigaOS. +# -DHAVE_DECL_ASCTIME_R=0 if does not declare asctime_r +# -DHAVE_DECL_ENVIRON if declares 'environ' +# -DHAVE_DIRECT_H if mkdir needs (MS-Windows) +# -DHAVE_GENERIC=0 if _Generic does not work +# -DHAVE_GETTEXT if 'gettext' works (e.g., GNU/Linux, FreeBSD, Solaris) +# -DHAVE_INCOMPATIBLE_CTIME_R if your system's time.h declares +# ctime_r and asctime_r incompatibly with the POSIX standard +# (Solaris when _POSIX_PTHREAD_SEMANTICS is not defined). +# -DHAVE_INTTYPES_H if you have a non-C99 compiler with +# -DHAVE_LINK=0 if your system lacks a link function +# -DHAVE_LOCALTIME_R=0 if your system lacks a localtime_r function +# -DHAVE_LOCALTIME_RZ=0 if you do not want zdump to use localtime_rz +# localtime_rz can make zdump significantly faster, but is nonstandard. +# -DHAVE_POSIX_DECLS=0 if your system's include files do not declare +# functions like 'link' or variables like 'tzname' required by POSIX +# -DHAVE_SNPRINTF=0 if your system lacks the snprintf function +# -DHAVE_STDBOOL_H if you have a non-C99 compiler with +# -DHAVE_STDINT_H if you have a non-C99 compiler with +# -DHAVE_STRFTIME_L if declares locale_t and strftime_l +# -DHAVE_STRDUP=0 if your system lacks the strdup function +# -DHAVE_STRTOLL=0 if your system lacks the strtoll function +# -DHAVE_SYMLINK=0 if your system lacks the symlink function +# -DHAVE_SYS_STAT_H=0 if your compiler lacks a +# -DHAVE_SYS_WAIT_H=0 if your compiler lacks a +# -DHAVE_TZSET=0 if your system lacks a tzset function +# -DHAVE_UNISTD_H=0 if your compiler lacks a +# -Dlocale_t=XXX if your system uses XXX instead of locale_t +# -DRESERVE_STD_EXT_IDS if your platform reserves standard identifiers +# with external linkage, e.g., applications cannot define 'localtime'. +# -Dssize_t=long on hosts like MS-Windows that lack ssize_t +# -DSUPPRESS_TZDIR to not prepend TZDIR to file names; this has +# security implications and is not recommended for general use +# -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires; +# not needed by the main-program tz code, which is single-threaded. +# Append other compiler flags as needed, e.g., -pthread on GNU/Linux. +# -Dtime_tz=\"T\" to use T as the time_t type, rather than the system time_t +# This is intended for internal use only; it mangles external names. +# -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz" +# -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory; +# the default is system-supplied, typically "/usr/lib/locale" +# -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified +# DST transitions if the time zone files cannot be accessed +# -DUNINIT_TRAP if reading uninitialized storage can cause problems +# other than simply getting garbage data +# -DUSE_LTZ=0 to build zdump with the system time zone library +# Also set TZDOBJS=zdump.o and CHECK_TIME_T_ALTERNATIVES= below. +# -DZIC_BLOAT_DEFAULT=\"fat\" to default zic's -b option to "fat", and +# similarly for "slim". Fat TZif files work around incompatibilities +# and bugs in some TZif readers, notably readers that mishandle 64-bit +# data in TZif files. Slim TZif files are more efficient and do not +# work around these incompatibilities and bugs. If not given, the +# default is "slim". +# -DZIC_MAX_ABBR_LEN_WO_WARN=3 +# (or some other number) to set the maximum time zone abbreviation length +# that zic will accept without a warning (the default is 6) +# $(GCC_DEBUG_FLAGS) if you are using recent GCC and want lots of checking +# Select instrumentation via "make GCC_INSTRUMENT='whatever'". +GCC_INSTRUMENT = \ + -fsanitize=undefined -fsanitize-address-use-after-scope \ + -fsanitize-undefined-trap-on-error -fstack-protector +GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ + $(GCC_INSTRUMENT) \ + -Wall -Wextra \ + -Walloc-size-larger-than=100000 -Warray-bounds=2 \ + -Wbad-function-cast -Wcast-align=strict -Wdate-time \ + -Wdeclaration-after-statement -Wdouble-promotion \ + -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \ + -Winit-self -Wjump-misses-init -Wlogical-op \ + -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ + -Wold-style-definition -Woverlength-strings -Wpointer-arith \ + -Wshadow -Wshift-overflow=2 -Wstrict-prototypes -Wstringop-overflow=4 \ + -Wstringop-truncation -Wsuggest-attribute=cold \ + -Wsuggest-attribute=const -Wsuggest-attribute=format \ + -Wsuggest-attribute=malloc \ + -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \ + -Wtrampolines -Wundef -Wuninitialized -Wunused \ + -Wvariadic-macros -Wvla -Wwrite-strings \ + -Wno-address -Wno-format-nonliteral -Wno-sign-compare \ + -Wno-type-limits -Wno-unused-parameter +# +# If your system has a "GMT offset" field in its "struct tm"s +# (or if you decide to add such a field in your system's "time.h" file), +# add the name to a define such as +# -DTM_GMTOFF=tm_gmtoff +# to the end of the "CFLAGS=" line. If not defined, the code attempts to +# guess TM_GMTOFF from other macros; define NO_TM_GMTOFF to suppress this. +# Similarly, if your system has a "zone abbreviation" field, define +# -DTM_ZONE=tm_zone +# and define NO_TM_ZONE to suppress any guessing. These two fields are not +# required by POSIX, but are widely available on GNU/Linux and BSD systems. +# +# The next batch of options control support for external variables +# exported by tzcode. In practice these variables are less useful +# than TM_GMTOFF and TM_ZONE. However, most of them are standardized. +# # +# # To omit or support the external variable "tzname", add one of: +# # -DHAVE_TZNAME=0 # do not support "tzname" +# # -DHAVE_TZNAME=1 # support "tzname", which is defined by system library +# # -DHAVE_TZNAME=2 # support and define "tzname" +# # to the "CFLAGS=" line. "tzname" is required by POSIX 1988 and later. +# # If not defined, the code attempts to guess HAVE_TZNAME from other macros. +# # Warning: unless time_tz is also defined, HAVE_TZNAME=1 can cause +# # crashes when combined with some platforms' standard libraries, +# # presumably due to memory allocation issues. +# # +# # To omit or support the external variables "timezone" and "daylight", add +# # -DUSG_COMPAT=0 # do not support +# # -DUSG_COMPAT=1 # support, and variables are defined by system library +# # -DUSG_COMPAT=2 # support and define variables +# # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by +# # Unix Systems Group code and are required by POSIX 2008 (with XSI) and later. +# # If not defined, the code attempts to guess USG_COMPAT from other macros. +# # +# # To support the external variable "altzone", add +# # -DALTZONE=0 # do not support +# # -DALTZONE=1 # support "altzone", which is defined by system library +# # -DALTZONE=2 # support and define "altzone" +# # to the end of the "CFLAGS=" line; although "altzone" appeared in +# # System V Release 3.1 it has not been standardized. +# # If not defined, the code attempts to guess ALTZONE from other macros. +# +# If you want functions that were inspired by early versions of X3J11's work, +# add +# -DSTD_INSPIRED +# to the end of the "CFLAGS=" line. This arranges for the functions +# "offtime", "timelocal", "timegm", "timeoff", +# "posix2time", and "time2posix" to be added to the time conversion library. +# "offtime" is like "gmtime" except that it accepts a second (long) argument +# that gives an offset to add to the time_t when converting it. +# "timelocal" is equivalent to "mktime". +# "timegm" is like "timelocal" except that it turns a struct tm into +# a time_t using UT (rather than local time as "timelocal" does). +# "timeoff" is like "timegm" except that it accepts a second (long) argument +# that gives an offset to use when converting to a time_t. +# "posix2time" and "time2posix" are described in an included manual page. +# X3J11's work does not describe any of these functions. +# These functions may well disappear in future releases of the time +# conversion package. +# +# If you don't want functions that were inspired by NetBSD, add +# -DNETBSD_INSPIRED=0 +# to the end of the "CFLAGS=" line. Otherwise, the functions +# "localtime_rz", "mktime_z", "tzalloc", and "tzfree" are added to the +# time library, and if STD_INSPIRED is also defined the functions +# "posix2time_z" and "time2posix_z" are added as well. +# The functions ending in "_z" (or "_rz") are like their unsuffixed +# (or suffixed-by-"_r") counterparts, except with an extra first +# argument of opaque type timezone_t that specifies the timezone. +# "tzalloc" allocates a timezone_t value, and "tzfree" frees it. +# +# If you want to allocate state structures in localtime, add +# -DALL_STATE +# to the end of the "CFLAGS=" line. Storage is obtained by calling malloc. +# +# NIST-PCTS:151-2, Version 1.4, (1993-12-03) is a test suite put +# out by the National Institute of Standards and Technology +# which claims to test C and Posix conformance. If you want to pass PCTS, add +# -DPCTS +# to the end of the "CFLAGS=" line. +# +# If you want strict compliance with XPG4 as of 1994-04-09, add +# -DXPG4_1994_04_09 +# to the end of the "CFLAGS=" line. This causes "strftime" to always return +# 53 as a week number (rather than 52 or 53) for January days before +# January's first Monday when a "%V" format is used and January 1 +# falls on a Friday, Saturday, or Sunday. + +CFLAGS= + +# Linker flags. Default to $(LFLAGS) for backwards compatibility +# to release 2012h and earlier. + +LDFLAGS= $(LFLAGS) + +# For leap seconds, this Makefile uses LEAPSECONDS='-L leapseconds' in +# submake command lines. The default is no leap seconds. + +LEAPSECONDS= + +# The zic command and its arguments. + +zic= ./zic +ZIC= $(zic) $(ZFLAGS) + +# To shrink the size of installed TZif files, +# append "-r @N" to omit data before N-seconds-after-the-Epoch. +# To grow the files and work around older application bugs, append "-b fat"; +# see ZIC_BLOAT_DEFAULT above. +# See the zic man page for more about -b and -r. +ZFLAGS= + +# How to use zic to install TZif files. + +ZIC_INSTALL= $(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS) + +# The name of a Posix-compliant 'awk' on your system. +# Older 'mawk' versions, such as the 'mawk' in Ubuntu 16.04, might dump core; +# on Ubuntu you can work around this with +# AWK= gawk +AWK= awk + +# The full path name of a Posix-compliant shell, preferably one that supports +# the Korn shell's 'select' statement as an extension. +# These days, Bash is the most popular. +# It should be OK to set this to /bin/sh, on platforms where /bin/sh +# lacks 'select' or doesn't completely conform to Posix, but /bin/bash +# is typically nicer if it works. +KSHELL= /bin/bash + +# Name of curl , used for HTML validation. +CURL= curl + +# Name of GNU Privacy Guard , used to sign distributions. +GPG= gpg + +# This expensive test requires USE_LTZ. +# To suppress it, define this macro to be empty. +CHECK_TIME_T_ALTERNATIVES = check_time_t_alternatives + +# SAFE_CHAR is a regular expression that matches a safe character. +# Some parts of this distribution are limited to safe characters; +# others can use any UTF-8 character. +# For now, the safe characters are a safe subset of ASCII. +# The caller must set the shell variable 'sharp' to the character '#', +# since Makefile macros cannot contain '#'. +# TAB_CHAR is a single tab character, in single quotes. +TAB_CHAR= ' ' +SAFE_CHARSET1= $(TAB_CHAR)' !\"'$$sharp'$$%&'\''()*+,./0123456789:;<=>?@' +SAFE_CHARSET2= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\^_`' +SAFE_CHARSET3= 'abcdefghijklmnopqrstuvwxyz{|}~' +SAFE_CHARSET= $(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3) +SAFE_CHAR= '[]'$(SAFE_CHARSET)'-]' + +# These characters are Latin-1, and so are likely to be displayable +# even in editors with limited character sets. +UNUSUAL_OK_LATIN_1 = «°±»½¾× +# This IPA symbol is represented in Unicode as the composition of +# U+0075 and U+032F, and U+032F is not considered alphabetic by some +# grep implementations that do not grok composition. +UNUSUAL_OK_IPA = u̯ +# Non-ASCII non-letters that OK_CHAR allows, as these characters are +# useful in commentary. +UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1)$(UNUSUAL_OK_IPA) + +# OK_CHAR matches any character allowed in the distributed files. +# This is the same as SAFE_CHAR, except that UNUSUAL_OK_CHARSET and +# multibyte letters are also allowed so that commentary can contain a +# few safe symbols and people's names and can quote non-English sources. +# Other non-letters are limited to ASCII renderings for the +# convenience of maintainers using XEmacs 21.5.34, which by default +# mishandles Unicode characters U+0100 and greater. +OK_CHAR= '[][:alpha:]$(UNUSUAL_OK_CHARSET)'$(SAFE_CHARSET)'-]' + +# SAFE_LINE matches a line of safe characters. +# SAFE_SHARP_LINE is similar, except any OK character can follow '#'; +# this is so that comments can contain non-ASCII characters. +# OK_LINE matches a line of OK characters. +SAFE_LINE= '^'$(SAFE_CHAR)'*$$' +SAFE_SHARP_LINE='^'$(SAFE_CHAR)'*('$$sharp$(OK_CHAR)'*)?$$' +OK_LINE= '^'$(OK_CHAR)'*$$' + +# Flags to give 'tar' when making a distribution. +# Try to use flags appropriate for GNU tar. +GNUTARFLAGS= --numeric-owner --owner=0 --group=0 --mode=go+u,go-w --sort=name +TARFLAGS= `if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; \ + then echo $(GNUTARFLAGS); \ + else :; \ + fi` + +# Flags to give 'gzip' when making a distribution. +GZIPFLAGS= -9n + +############################################################################### + +#MAKE= make + +cc= cc +CC= $(cc) -DTZDIR='"$(TZDIR)"' + +AR= ar + +# ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib. +RANLIB= : + +TZCOBJS= zic.o +TZDOBJS= zdump.o localtime.o asctime.o strftime.o +DATEOBJS= date.o localtime.o strftime.o asctime.o +LIBSRCS= localtime.c asctime.c difftime.c strftime.c +LIBOBJS= localtime.o asctime.o difftime.o strftime.o +HEADERS= tzfile.h private.h +NONLIBSRCS= zic.c zdump.c +NEWUCBSRCS= date.c +SOURCES= $(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) \ + tzselect.ksh workman.sh +MANS= newctime.3 newstrftime.3 newtzset.3 time2posix.3 \ + tzfile.5 tzselect.8 zic.8 zdump.8 +MANTXTS= newctime.3.txt newstrftime.3.txt newtzset.3.txt \ + time2posix.3.txt \ + tzfile.5.txt tzselect.8.txt zic.8.txt zdump.8.txt \ + date.1.txt +COMMON= calendars CONTRIBUTING LICENSE Makefile \ + NEWS README theory.html version +WEB_PAGES= tz-art.html tz-how-to.html tz-link.html +CHECK_WEB_PAGES=check_theory.html check_tz-art.html \ + check_tz-how-to.html check_tz-link.html +DOCS= $(MANS) date.1 $(MANTXTS) $(WEB_PAGES) +PRIMARY_YDATA= africa antarctica asia australasia \ + europe northamerica southamerica +YDATA= $(PRIMARY_YDATA) etcetera +NDATA= factory +TDATA_TO_CHECK= $(YDATA) $(NDATA) backward +TDATA= $(YDATA) $(NDATA) $(BACKWARD) +ZONETABLES= zone1970.tab zone.tab +TABDATA= iso3166.tab $(TZDATA_TEXT) $(ZONETABLES) +LEAP_DEPS= leapseconds.awk leap-seconds.list +TZDATA_ZI_DEPS= ziguard.awk zishrink.awk version $(TDATA) $(PACKRATDATA) +DSTDATA_ZI_DEPS= ziguard.awk $(TDATA) $(PACKRATDATA) +DATA= $(TDATA_TO_CHECK) backzone iso3166.tab leap-seconds.list \ + leapseconds $(ZONETABLES) +AWK_SCRIPTS= checklinks.awk checktab.awk leapseconds.awk \ + ziguard.awk zishrink.awk +MISC= $(AWK_SCRIPTS) zoneinfo2tdf.pl +TZS_YEAR= 2050 +TZS_CUTOFF_FLAG= -c $(TZS_YEAR) +TZS= to$(TZS_YEAR).tzs +TZS_NEW= to$(TZS_YEAR)new.tzs +TZS_DEPS= $(PRIMARY_YDATA) asctime.c localtime.c \ + private.h tzfile.h zdump.c zic.c +# EIGHT_YARDS is just a yard short of the whole ENCHILADA. +EIGHT_YARDS = $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) tzdata.zi +ENCHILADA = $(EIGHT_YARDS) $(TZS) + +# Consult these files when deciding whether to rebuild the 'version' file. +# This list is not the same as the output of 'git ls-files', since +# .gitignore is not distributed. +VERSION_DEPS= \ + calendars CONTRIBUTING LICENSE Makefile NEWS README \ + africa antarctica asctime.c asia australasia \ + backward backzone \ + checklinks.awk checktab.awk \ + date.1 date.c difftime.c \ + etcetera europe factory iso3166.tab \ + leap-seconds.list leapseconds.awk localtime.c \ + newctime.3 newstrftime.3 newtzset.3 northamerica \ + private.h southamerica strftime.c theory.html \ + time2posix.3 tz-art.html tz-how-to.html tz-link.html \ + tzfile.5 tzfile.h tzselect.8 tzselect.ksh \ + workman.sh zdump.8 zdump.c zic.8 zic.c \ + ziguard.awk zishrink.awk \ + zone.tab zone1970.tab zoneinfo2tdf.pl + +# And for the benefit of csh users on systems that assume the user +# shell should be used to handle commands in Makefiles. . . + +SHELL= /bin/sh + +all: tzselect zic zdump libtz.a $(TABDATA) \ + vanguard.zi main.zi rearguard.zi + +ALL: all date $(ENCHILADA) + +install: all $(DATA) $(REDO) $(MANS) + mkdir -p '$(DESTDIR)$(BINDIR)' \ + '$(DESTDIR)$(ZDUMPDIR)' '$(DESTDIR)$(ZICDIR)' \ + '$(DESTDIR)$(LIBDIR)' \ + '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \ + '$(DESTDIR)$(MANDIR)/man8' + $(ZIC_INSTALL) -l $(LOCALTIME) \ + `case '$(POSIXRULES)' in ?*) echo '-p';; esac \ + ` $(POSIXRULES) \ + -t '$(DESTDIR)$(TZDEFAULT)' + cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.' + cp tzselect '$(DESTDIR)$(BINDIR)/.' + cp zdump '$(DESTDIR)$(ZDUMPDIR)/.' + cp zic '$(DESTDIR)$(ZICDIR)/.' + cp libtz.a '$(DESTDIR)$(LIBDIR)/.' + $(RANLIB) '$(DESTDIR)$(LIBDIR)/libtz.a' + cp -f newctime.3 newtzset.3 '$(DESTDIR)$(MANDIR)/man3/.' + cp -f tzfile.5 '$(DESTDIR)$(MANDIR)/man5/.' + cp -f tzselect.8 zdump.8 zic.8 '$(DESTDIR)$(MANDIR)/man8/.' + +INSTALL: ALL install date.1 + mkdir -p '$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' + cp date '$(DESTDIR)$(BINDIR)/.' + cp -f date.1 '$(DESTDIR)$(MANDIR)/man1/.' + +# Calculate version number from git, if available. +# Otherwise, use $(VERSION) unless it is "unknown" and there is already +# a 'version' file, in which case reuse the existing 'version' contents +# and append "-dirty" if the contents do not already end in "-dirty". +version: $(VERSION_DEPS) + { (type git) >/dev/null 2>&1 && \ + V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \ + --abbrev=7 --dirty` || \ + if test '$(VERSION)' = unknown && V=`cat $@`; then \ + case $$V in *-dirty);; *) V=$$V-dirty;; esac; \ + else \ + V='$(VERSION)'; \ + fi; } && \ + printf '%s\n' "$$V" >$@.out + mv $@.out $@ + +# These files can be tailored by setting BACKWARD and PACKRATDATA. +vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS) + $(AWK) -v DATAFORM=`expr $@ : '\(.*\).zi'` -f ziguard.awk \ + $(TDATA) $(PACKRATDATA) >$@.out + mv $@.out $@ +# This file has a version comment that attempts to capture any tailoring +# via BACKWARD, DATAFORM, PACKRATDATA, and REDO. +tzdata.zi: $(DATAFORM).zi version zishrink.awk + version=`sed 1q version` && \ + LC_ALL=C $(AWK) \ + -v dataform='$(DATAFORM)' \ + -v deps='$(DSTDATA_ZI_DEPS) zishrink.awk' \ + -v redo='$(REDO)' \ + -v version="$$version" \ + -f zishrink.awk \ + $(DATAFORM).zi >$@.out + mv $@.out $@ + +version.h: version + VERSION=`cat version` && printf '%s\n' \ + 'static char const PKGVERSION[]="($(PACKAGE)) ";' \ + "static char const TZVERSION[]=\"$$VERSION\";" \ + 'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";' \ + >$@.out + mv $@.out $@ + +zdump: $(TZDOBJS) + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS) + +zic: $(TZCOBJS) + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS) + +leapseconds: $(LEAP_DEPS) + $(AWK) -v EXPIRES_LINE=$(EXPIRES_LINE) \ + -f leapseconds.awk leap-seconds.list >$@.out + mv $@.out $@ + +# Arguments to pass to submakes of install_data. +# They can be overridden by later submake arguments. +INSTALLARGS = \ + BACKWARD='$(BACKWARD)' \ + DESTDIR='$(DESTDIR)' \ + LEAPSECONDS='$(LEAPSECONDS)' \ + PACKRATDATA='$(PACKRATDATA)' \ + TZDEFAULT='$(TZDEFAULT)' \ + TZDIR='$(TZDIR)' \ + ZIC='$(ZIC)' + +INSTALL_DATA_DEPS = zic leapseconds tzdata.zi + +# 'make install_data' installs one set of TZif files. +install_data: $(INSTALL_DATA_DEPS) + $(ZIC_INSTALL) tzdata.zi + +posix_only: $(INSTALL_DATA_DEPS) + $(MAKE) $(INSTALLARGS) LEAPSECONDS= install_data + +right_only: $(INSTALL_DATA_DEPS) + $(MAKE) $(INSTALLARGS) LEAPSECONDS='-L leapseconds' \ + install_data + +# In earlier versions of this makefile, the other two directories were +# subdirectories of $(TZDIR). However, this led to configuration errors. +# For example, with posix_right under the earlier scheme, +# TZ='right/Australia/Adelaide' got you localtime with leap seconds, +# but gmtime without leap seconds, which led to problems with applications +# like sendmail that subtract gmtime from localtime. +# Therefore, the other two directories are now siblings of $(TZDIR). +# You must replace all of $(TZDIR) to switch from not using leap seconds +# to using them, or vice versa. +right_posix: right_only + rm -fr '$(DESTDIR)$(TZDIR)-leaps' + ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-leaps' || \ + $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only + $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only + +posix_right: posix_only + rm -fr '$(DESTDIR)$(TZDIR)-posix' + ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-posix' || \ + $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only + $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only + +# This obsolescent rule is present for backwards compatibility with +# tz releases 2014g through 2015g. It should go away eventually. +posix_packrat: $(INSTALL_DATA_DEPS) + $(MAKE) $(INSTALLARGS) PACKRATDATA=backzone posix_only + +zones: $(REDO) + +# dummy.zd is not a real file; it is mentioned here only so that the +# top-level 'make' does not have a syntax error. +ZDS = dummy.zd +# Rule used only by submakes invoked by the $(TZS_NEW) rule. +# It is separate so that GNU 'make -j' can run instances in parallel. +$(ZDS): zdump + ./zdump -i $(TZS_CUTOFF_FLAG) '$(wd)/'$$(expr $@ : '\(.*\).zd') \ + >$@ + +TZS_NEW_DEPS = tzdata.zi zdump zic +$(TZS_NEW): $(TZS_NEW_DEPS) + rm -fr tzs$(TZS_YEAR).dir + mkdir tzs$(TZS_YEAR).dir + $(zic) -d tzs$(TZS_YEAR).dir tzdata.zi + $(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \ + tzdata.zi | LC_ALL=C sort >$@.out + wd=`pwd` && \ + x=`$(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \ + tzdata.zi \ + | LC_ALL=C sort -t . -k 2,2` && \ + set x $$x && \ + shift && \ + ZDS=$$* && \ + $(MAKE) wd="$$wd" TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \ + ZDS="$$ZDS" $$ZDS && \ + sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@.out + rm -fr tzs$(TZS_YEAR).dir + mv $@.out $@ + +# If $(TZS) exists but 'make check_tzs' fails, a maintainer should inspect the +# failed output and fix the inconsistency, perhaps by running 'make force_tzs'. +$(TZS): + touch $@ + +force_tzs: $(TZS_NEW) + cp $(TZS_NEW) $(TZS) + +libtz.a: $(LIBOBJS) + rm -f $@ + $(AR) -rc $@ $(LIBOBJS) + $(RANLIB) $@ + +date: $(DATEOBJS) + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(DATEOBJS) $(LDLIBS) + +tzselect: tzselect.ksh version + VERSION=`cat version` && sed \ + -e 's|#!/bin/bash|#!$(KSHELL)|g' \ + -e 's|AWK=[^}]*|AWK=$(AWK)|g' \ + -e 's|\(PKGVERSION\)=.*|\1='\''($(PACKAGE)) '\''|' \ + -e 's|\(REPORT_BUGS_TO\)=.*|\1=$(BUGEMAIL)|' \ + -e 's|TZDIR=[^}]*|TZDIR=$(TZDIR)|' \ + -e 's|\(TZVERSION\)=.*|\1='"$$VERSION"'|' \ + <$@.ksh >$@.out + chmod +x $@.out + mv $@.out $@ + +check: check_character_set check_white_space check_links \ + check_name_lengths check_sorted \ + check_tables check_web check_zishrink check_tzs + +check_character_set: $(ENCHILADA) + test ! '$(UTF8_LOCALE)' || \ + ! printf 'A\304\200B\n' | \ + LC_ALL='$(UTF8_LOCALE)' grep -q '^A.B$$' >/dev/null 2>&1 || { \ + LC_ALL='$(UTF8_LOCALE)' && export LC_ALL && \ + sharp='#' && \ + ! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \ + $(MISC) $(SOURCES) $(WEB_PAGES) \ + CONTRIBUTING LICENSE README \ + version tzdata.zi && \ + ! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \ + Makefile && \ + ! grep -Env $(SAFE_SHARP_LINE) $(TDATA_TO_CHECK) backzone \ + leapseconds zone.tab && \ + ! grep -Env $(OK_LINE) $(ENCHILADA); \ + } + touch $@ + +check_white_space: $(ENCHILADA) + patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \ + ! grep -En "$$pat" \ + $$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list) + ! grep -n '[[:space:]]$$' \ + $$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list) + touch $@ + +PRECEDES_FILE_NAME = ^(Zone|Link[[:space:]]+[^[:space:]]+)[[:space:]]+ +FILE_NAME_COMPONENT_TOO_LONG = \ + $(PRECEDES_FILE_NAME)[^[:space:]]*[^/[:space:]]{15} + +check_name_lengths: $(TDATA_TO_CHECK) backzone + ! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \ + $(TDATA_TO_CHECK) backzone + touch $@ + +CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; } + +check_sorted: backward backzone iso3166.tab zone.tab zone1970.tab + $(AWK) '/^Link/ {print $$3}' backward | LC_ALL=C sort -cu + $(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu + touch $@ + +check_links: checklinks.awk $(TDATA_TO_CHECK) tzdata.zi + $(AWK) -f checklinks.awk $(TDATA_TO_CHECK) + $(AWK) -f checklinks.awk tzdata.zi + touch $@ + +check_tables: checktab.awk $(PRIMARY_YDATA) $(ZONETABLES) + for tab in $(ZONETABLES); do \ + $(AWK) -f checktab.awk -v zone_table=$$tab $(PRIMARY_YDATA) \ + || exit; \ + done + touch $@ + +check_tzs: $(TZS) $(TZS_NEW) + if test -s $(TZS); then \ + diff -u $(TZS) $(TZS_NEW); \ + else \ + cp $(TZS_NEW) $(TZS); \ + fi + touch $@ + +check_web: $(CHECK_WEB_PAGES) +check_theory.html: theory.html +check_tz-art.html: tz-art.html +check_tz-how-to.html: tz-how-to.html +check_tz-link.html: tz-link.html +check_theory.html check_tz-art.html check_tz-how-to.html check_tz-link.html: + $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \ + -F file=@$$(expr $@ : 'check_\(.*\)') -o $@.out && \ + test ! -s $@.out || { cat $@.out; exit 1; } + mv $@.out $@ + +# Check that zishrink.awk does not alter the data, and that ziguard.awk +# preserves main-format data. +check_zishrink: check_zishrink_posix check_zishrink_right +check_zishrink_posix check_zishrink_right: \ + zic leapseconds $(PACKRATDATA) $(TDATA) $(DATAFORM).zi tzdata.zi + rm -fr $@.dir $@-t.dir $@-shrunk.dir + mkdir $@.dir $@-t.dir $@-shrunk.dir + case $@ in \ + *_right) leap='-L leapseconds';; \ + *) leap=;; \ + esac && \ + $(ZIC) $$leap -d $@.dir $(DATAFORM).zi && \ + $(ZIC) $$leap -d $@-shrunk.dir tzdata.zi && \ + case $(DATAFORM) in \ + main) \ + $(ZIC) $$leap -d $@-t.dir $(TDATA) && \ + $(AWK) '/^Rule/' $(TDATA) | \ + $(ZIC) $$leap -d $@-t.dir - $(PACKRATDATA) && \ + diff -r $@.dir $@-t.dir;; \ + esac + diff -r $@.dir $@-shrunk.dir + rm -fr $@.dir $@-t.dir $@-shrunk.dir + touch $@ + +clean_misc: + rm -fr check_*.dir + rm -f *.o *.out $(TIME_T_ALTERNATIVES) \ + check_* core typecheck_* \ + date tzselect version.h zdump zic libtz.a +clean: clean_misc + rm -fr *.dir tzdb-*/ + rm -f *.zi $(TZS_NEW) + +maintainer-clean: clean + @echo 'This command is intended for maintainers to use; it' + @echo 'deletes files that may need special tools to rebuild.' + rm -f leapseconds version $(MANTXTS) $(TZS) *.asc *.tar.* + +names: + @echo $(ENCHILADA) + +public: check check_public $(CHECK_TIME_T_ALTERNATIVES) \ + tarballs signatures + +date.1.txt: date.1 +newctime.3.txt: newctime.3 +newstrftime.3.txt: newstrftime.3 +newtzset.3.txt: newtzset.3 +time2posix.3.txt: time2posix.3 +tzfile.5.txt: tzfile.5 +tzselect.8.txt: tzselect.8 +zdump.8.txt: zdump.8 +zic.8.txt: zic.8 + +$(MANTXTS): workman.sh + LC_ALL=C sh workman.sh `expr $@ : '\(.*\)\.txt$$'` >$@.out + mv $@.out $@ + +# Set file timestamps deterministically if possible, +# so that tarballs containing the timestamps are reproducible. +# +# '$(SET_TIMESTAMP_N) N DEST A B C ...' sets the timestamp of the +# file DEST to the maximum of the timestamps of the files A B C ..., +# plus N if GNU ls and touch are available. +SET_TIMESTAMP_N = sh -c '\ + n=$$0 dest=$$1; shift; \ + touch -cmr `ls -t "$$@" | sed 1q` "$$dest" && \ + if test $$n != 0 && \ + lsout=`ls -n --time-style="+%s" "$$dest" 2>/dev/null`; then \ + set x $$lsout && \ + touch -cmd @`expr $$7 + $$n` "$$dest"; \ + else :; fi' +# If DEST depends on A B C ... in this Makefile, callers should use +# $(SET_TIMESTAMP_DEP) DEST A B C ..., for the benefit of any +# downstream 'make' that considers equal timestamps to be out of date. +# POSIX allows this 'make' behavior, and HP-UX 'make' does it. +# If all that matters is that the timestamp be reproducible +# and plausible, use $(SET_TIMESTAMP). +SET_TIMESTAMP = $(SET_TIMESTAMP_N) 0 +SET_TIMESTAMP_DEP = $(SET_TIMESTAMP_N) 1 + +# Set the timestamps to those of the git repository, if available, +# and if the files have not changed since then. +# This uses GNU 'ls --time-style=+%s', which outputs the seconds count, +# and GNU 'touch -d@N FILE', where N is the number of seconds since 1970. +# If git or GNU is absent, don't bother to sync with git timestamps. +# Also, set the timestamp of each prebuilt file like 'leapseconds' +# to be the maximum of the files it depends on. +set-timestamps.out: $(EIGHT_YARDS) + rm -f $@ + if (type git) >/dev/null 2>&1 && \ + files=`git ls-files $(EIGHT_YARDS)` && \ + touch -md @1 test.out; then \ + rm -f test.out && \ + for file in $$files; do \ + if git diff --quiet $$file; then \ + time=`git log -1 --format='tformat:%ct' $$file` && \ + touch -cmd @$$time $$file; \ + else \ + echo >&2 "$$file: warning: does not match repository"; \ + fi || exit; \ + done; \ + fi + $(SET_TIMESTAMP_DEP) leapseconds $(LEAP_DEPS) + for file in `ls $(MANTXTS) | sed 's/\.txt$$//'`; do \ + $(SET_TIMESTAMP_DEP) $$file.txt $$file workman.sh || \ + exit; \ + done + $(SET_TIMESTAMP_DEP) version $(VERSION_DEPS) + $(SET_TIMESTAMP_DEP) tzdata.zi $(TZDATA_ZI_DEPS) + touch $@ +set-tzs-timestamp.out: $(TZS) + $(SET_TIMESTAMP_DEP) $(TZS) $(TZS_DEPS) + touch $@ + +# The zics below ensure that each data file can stand on its own. +# We also do an all-files run to catch links to links. + +check_public: $(VERSION_DEPS) + rm -fr public.dir + mkdir public.dir + ln $(VERSION_DEPS) public.dir + cd public.dir && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL - for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi; do \ ++ for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi \ ++ public.dir/vanguard.zi public.dir/main.zi \ ++ public.dir/rearguard.zi; \ ++ do \ + public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \ + done + public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK) + rm -fr public.dir *** 175 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Wed Dec 30 06:03:32 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 552034D7A47; Wed, 30 Dec 2020 06:03:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5LLr1vSpz4gZd; Wed, 30 Dec 2020 06:03:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 34895195A5; Wed, 30 Dec 2020 06:03:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BU63WPN007376; Wed, 30 Dec 2020 06:03:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BU63WT0007375; Wed, 30 Dec 2020 06:03:32 GMT (envelope-from git) Date: Wed, 30 Dec 2020 06:03:32 GMT Message-Id: <202012300603.0BU63WT0007375@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 2edcc10cb123 - main - Update leap-seconds to leap-seconds.3676924800. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2edcc10cb123ea845e00127f3241155dd98dac3b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 06:03:32 -0000 The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=2edcc10cb123ea845e00127f3241155dd98dac3b commit 2edcc10cb123ea845e00127f3241155dd98dac3b Author: Xin LI AuthorDate: 2020-12-30 06:01:46 +0000 Commit: Xin LI CommitDate: 2020-12-30 06:01:46 +0000 Update leap-seconds to leap-seconds.3676924800. Obtained from: ftp://ftp.nist.gov/pub/time/leap-seconds.3676924800 MFC after: 3 days --- usr.sbin/ntp/ntpd/leap-seconds | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/ntp/ntpd/leap-seconds b/usr.sbin/ntp/ntpd/leap-seconds index ac153daebf86..e897a867e164 100644 --- a/usr.sbin/ntp/ntpd/leap-seconds +++ b/usr.sbin/ntp/ntpd/leap-seconds @@ -204,10 +204,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C59 -# File expires on: 28 December 2020 +# Updated through IERS Bulletin C60 +# File expires on: 28 June 2021 # -#@ 3818102400 +#@ 3833827200 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -252,4 +252,4 @@ # the hash line is also ignored in the # computation. # -#h a1c168ae 27c79a7d 9dddcfc3 bcfe616b 2e2c44ea +#h 064356a8 39268b92 76e4d5ef 3e22fae1 0cca529c From owner-dev-commits-src-all@freebsd.org Wed Dec 30 09:02:27 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 030E64BB8B7; Wed, 30 Dec 2020 09:02:27 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) (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 4D5QKG60T5z4pdF; Wed, 30 Dec 2020 09:02:26 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (v-critter.freebsd.dk [192.168.55.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by phk.freebsd.dk (Postfix) with ESMTPS id A0DEA8A3C7; Wed, 30 Dec 2020 09:02:24 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.16.1/8.16.1) with ESMTPS id 0BU92Ovc015828 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 30 Dec 2020 09:02:24 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.16.1/8.16.1/Submit) id 0BU92NCY015827; Wed, 30 Dec 2020 09:02:23 GMT (envelope-from phk) To: Warner Losh cc: Glen Barber , Kyle Evans , "Rodney W. Grimes" , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL In-reply-to: From: "Poul-Henning Kamp" References: <202012291441.0BTEf1X9009764@gitrepo.freebsd.org> <202012300018.0BU0I7gn079533@gndrsh.dnsmgr.net> <20201230022128.GE1206@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15825.1609318943.1@critter.freebsd.dk> Date: Wed, 30 Dec 2020 09:02:23 +0000 Message-ID: <15826.1609318943@critter.freebsd.dk> X-Rspamd-Queue-Id: 4D5QKG60T5z4pdF X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 09:02:27 -0000 -------- Warner Losh writes: > Deleting all the $FreeBSD$ in on go is massively unwise (or as the British > might say, "a very brave plan"). It will screw up MFCs on an epic scale for > years for no real benefit to pay for that extra developer time. It itself > can't be MFCd. It's a terrible idea. We should not be deleting them, except > judiciously for things that cannot be MFCd. With the subversion exporter, > they will live on in stable/12. Does that imply that we should start to remove them once stable/12 is safely EOL'ed in a few years ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-dev-commits-src-all@freebsd.org Wed Dec 30 09:09:13 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A51324BB764; Wed, 30 Dec 2020 09:09:13 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5QT54KHwz4pnT; Wed, 30 Dec 2020 09:09:13 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1609319353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4EM/xYUD8KsA1nLrTb2kCsPVFrwS2u5GqowTASIRsDo=; b=Dqjyw8bpi1mINwJSsubUkHPrbL2Hgn3P2Rbu2+GHHeeXOu06OpMMFFBQ4HSu9KTm28/AxY G1ad7qec/MwnkADYr5IrD+89Ea28v3ribRrfmP2zEe2851vfcEDruY9doeHMH8WJivDBFa lKMCZ6q9VZSZKrGGpLg36s+27eF8rVxcHNUdKPXBtWRlW149QnuuBBhcsSVbaNIlc0Z6ol fc3uGvwr+rZxE5tkANpCR6Hm2kbj2l2DdAKxjd/soZaqi9xWh/crAUTW5NwJZ52p2xjbdB CuP5xyFdMNkVDcAL7unZOlBbgZoBIoGLsYlVNgTeOmVrCVm0HPP/3W04esreSQ== Received: by freefall.freebsd.org (Postfix, from userid 1033) id 84B6914916; Wed, 30 Dec 2020 09:09:13 +0000 (UTC) Date: Wed, 30 Dec 2020 09:09:13 +0000 From: Alexey Dokuchaev To: Poul-Henning Kamp Cc: Warner Losh , Glen Barber , Kyle Evans , "Rodney W. Grimes" , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL Message-ID: <20201230090913.GA90119@FreeBSD.org> References: <202012291441.0BTEf1X9009764@gitrepo.freebsd.org> <202012300018.0BU0I7gn079533@gndrsh.dnsmgr.net> <20201230022128.GE1206@FreeBSD.org> <15826.1609318943@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15826.1609318943@critter.freebsd.dk> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1609319353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4EM/xYUD8KsA1nLrTb2kCsPVFrwS2u5GqowTASIRsDo=; b=ADF/yXcrnMZU49qgGP+QWCnQTzv7NOR8bc3Uh/vDT+pEh4lkUvWnC4zia+k1NcHNQvq3eI dBpI6RWVapwl288HwkC2Gwh7qPcN/iPi5kn7jKvYC0JKT/fAUTqkeqgS0iZ/Bq2mOnhXDo aAec10n7D4vc+5pLA31I3VYbPzyeF10zcwX2jORWPUy87eRA22nwiHzqt40mqA16W3s1BU lOOj2S4ZxP38qmRjCZ0Tmg1E5iTog+CFBBP77a2tTWjTvsbUhrblq/m5G7sFQJ8xgnVTnN ttW+Mg6PBNIZMsfgcjm1T3gT8RZnGvLIqa6WS7IminUHMHjMj5llTp1GNfeXOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1609319353; a=rsa-sha256; cv=none; b=eYESz5fEmlORQI13FTDhnOzk6gBuTauimB2JC0q2H4iqCOE3QwuvrG90Vr4FLp5qi3lJ4a lEtCChOvAvPfrJbEPOiXHftqCVgrp0wdvz+S8UbgTZLr2fmrocynOj5mMcEcdPxdM9hazC gCJF9VWk+LlBeMMDbyRq9NTDju2ZxWCBYkRr2eSAligUiSqmQ1IHFkLiUPJkl6tPO+cLKB CHU42MNVrhieqGZkkXdzRC3zlLxyzWE0d3tUHfWpwsy+oxI0jsx6unrqONn0VoLxDoZAae HJ3JOqajFe9aD4aM0dPuuJbA/KVJv2f6WYIZmpMUrq8vxBz9pfrPSin5ncdIFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 09:09:13 -0000 On Wed, Dec 30, 2020 at 09:02:23AM +0000, Poul-Henning Kamp wrote: > -------- > Warner Losh writes: > > > Deleting all the $FreeBSD$ in on go is massively unwise (or as the British > > might say, "a very brave plan"). It will screw up MFCs on an epic scale for > > years for no real benefit to pay for that extra developer time. It itself > > can't be MFCd. It's a terrible idea. We should not be deleting them, except > > judiciously for things that cannot be MFCd. With the subversion exporter, > > they will live on in stable/12. > > Does that imply that we should start to remove them once stable/12 is safely > EOL'ed in a few years ? Shouldn't we keep them for the future, when we switch to a saner VCS which supports them? What about mergemaster -F, on a related note? ./danfe From owner-dev-commits-src-all@freebsd.org Wed Dec 30 10:02:15 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 64E634BD9B3; Wed, 30 Dec 2020 10:02:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5RfH27Zkz4t0k; Wed, 30 Dec 2020 10:02:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C2791BDFE; Wed, 30 Dec 2020 10:02:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUA2F2l001089; Wed, 30 Dec 2020 10:02:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUA2Fuj001088; Wed, 30 Dec 2020 10:02:15 GMT (envelope-from git) Date: Wed, 30 Dec 2020 10:02:15 GMT Message-Id: <202012301002.0BUA2Fuj001088@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michal Meloun Subject: git: 509a00620523 - main - Tegra210: Connect to GENERIC kernel. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 509a006205230e7092ec70d2def6665f592dc69a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 10:02:15 -0000 The branch main has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=509a006205230e7092ec70d2def6665f592dc69a commit 509a006205230e7092ec70d2def6665f592dc69a Author: Michal Meloun AuthorDate: 2020-12-29 09:46:49 +0000 Commit: Michal Meloun CommitDate: 2020-12-30 10:01:47 +0000 Tegra210: Connect to GENERIC kernel. --- sys/arm64/conf/GENERIC | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/arm64/conf/GENERIC b/sys/arm64/conf/GENERIC index 0f931dd37fd3..9b9b44ef3261 100644 --- a/sys/arm64/conf/GENERIC +++ b/sys/arm64/conf/GENERIC @@ -123,6 +123,7 @@ options SOC_INTEL_STRATIX10 options SOC_BRCM_BCM2837 options SOC_BRCM_BCM2838 options SOC_MARVELL_8K +options SOC_NVIDIA_TEGRA210 options SOC_NXP_LS options SOC_ROCKCHIP_RK3328 options SOC_ROCKCHIP_RK3399 @@ -171,7 +172,8 @@ device awg # Allwinner EMAC Gigabit Ethernet device axa # AMD Opteron A1100 integrated NIC device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet device neta # Marvell Armada 370/38x/XP/3700 NIC -device smc # SMSC LAN91C111 +device re # RealTek 8139C+/8169/8169S/8110S +device smc # SMSC LAN91C111 device vnic # Cavium ThunderX NIC device al_eth # Annapurna Alpine Ethernet NIC device dwc_rk # Rockchip Designware @@ -238,11 +240,13 @@ device rk_dwc3 # Rockchip DWC3 controller device usb # USB Bus (required) device ukbd # Keyboard device umass # Disks/Mass storage - Requires scbus and da +device tegra210_xusb_fw # Tegra XUSB firmware # USB ethernet support device muge device smcphy device smsc +device ure # Sound support device sound @@ -271,8 +275,12 @@ device a37x0_iic # Armada 37x0 I2C controller device aw_rsb # Allwinner Reduced Serial Bus device bcm2835_bsc # Broadcom BCM283x I2C bus device iicbus +device iicmux device iic +device icee # Generic IIC eeprom device twsi # Allwinner I2C controller +device pca9547 # NPX I2C bus multiplexer +device pcf8563 # NXP Real-time clock/calendar device rk_i2c # RockChip I2C controller device syr827 # Silergy SYR827 PMIC device sy8106a # SY8106A Buck Regulator @@ -368,4 +376,4 @@ options FDT device acpi # DTBs -makeoptions MODULES_EXTRA="dtb/allwinner dtb/freescale dtb/imx8 dtb/mv dtb/rockchip dtb/rpi" +makeoptions MODULES_EXTRA="dtb/allwinner dtb/freescale dtb/imx8 dtb/nvidia dtb/mv dtb/rockchip dtb/rpi" From owner-dev-commits-src-all@freebsd.org Wed Dec 30 10:02:15 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 64EBC4BDC20; Wed, 30 Dec 2020 10:02:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5RfH2LLyz4t3B; Wed, 30 Dec 2020 10:02:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43A761C17F; Wed, 30 Dec 2020 10:02:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUA2FDu001108; Wed, 30 Dec 2020 10:02:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUA2Fnp001107; Wed, 30 Dec 2020 10:02:15 GMT (envelope-from git) Date: Wed, 30 Dec 2020 10:02:15 GMT Message-Id: <202012301002.0BUA2Fnp001107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michal Meloun Subject: git: 30ae416898ef - main - Tegra210: Add lost-in-merge fixes: - misplaced '#ifdef notyet' in max77620.c - misnamed 'xusb_gate' clock in tegra210_clk_per.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 30ae416898efdae0599f1ddaffddc7233733aeb8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 10:02:15 -0000 The branch main has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=30ae416898efdae0599f1ddaffddc7233733aeb8 commit 30ae416898efdae0599f1ddaffddc7233733aeb8 Author: Michal Meloun AuthorDate: 2020-12-29 09:58:29 +0000 Commit: Michal Meloun CommitDate: 2020-12-30 09:53:41 +0000 Tegra210: Add lost-in-merge fixes: - misplaced '#ifdef notyet' in max77620.c - misnamed 'xusb_gate' clock in tegra210_clk_per.c --- sys/arm64/nvidia/tegra210/max77620.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_clk_per.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm64/nvidia/tegra210/max77620.c b/sys/arm64/nvidia/tegra210/max77620.c index d46417ce0e28..a4fddb25e5a2 100644 --- a/sys/arm64/nvidia/tegra210/max77620.c +++ b/sys/arm64/nvidia/tegra210/max77620.c @@ -396,10 +396,10 @@ max77620_attach(device_t dev) rv = 0; LOCK_INIT(sc); -#ifdef notyet /* Interrupt parent is not implemented */ rid = 0; sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); +#ifdef notyet /* Interrupt parent is not implemented */ if (sc->irq_res == NULL) { device_printf(dev, "Cannot allocate interrupt.\n"); rv = ENXIO; diff --git a/sys/arm64/nvidia/tegra210/tegra210_clk_per.c b/sys/arm64/nvidia/tegra210/tegra210_clk_per.c index 32ad855b5a55..b2f45062c02f 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_clk_per.c +++ b/sys/arm64/nvidia/tegra210/tegra210_clk_per.c @@ -412,7 +412,7 @@ static struct pgate_def pgate_def[] = { GATE(EMC_IOBIST, "emc_iobist", "clk_m", W(10)), GATE(SATA_IOBIST, "sata_iobist", "clk_m", W(12)), GATE(MIPI_IOBIST, "mipi_iobist", "clk_m", W(13)), - GATE(XUSB_GATE, "xusb", "clk_m", W(15)), + GATE(XUSB_GATE, "xusb_gate", "clk_m", W(15)), GATE(CILAB, "cilab", "pc_cilab", W(16)), GATE(CILCD, "cilcd", "pc_cilcd", W(17)), GATE(CILE, "cilef", "pc_cilef", W(18)), From owner-dev-commits-src-all@freebsd.org Wed Dec 30 10:06:58 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9CA294BDD5D; Wed, 30 Dec 2020 10:06:58 +0000 (UTC) (envelope-from emss.mail@gmail.com) Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (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 4D5Rlj6kCYz4tC6; Wed, 30 Dec 2020 10:06:57 +0000 (UTC) (envelope-from emss.mail@gmail.com) Received: by mail-wr1-x432.google.com with SMTP id t30so17024169wrb.0; Wed, 30 Dec 2020 02:06:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-transfer-encoding; bh=D0FejF7hSyKHCtwLlmQZh5YvcPb5uQGjuJx1D2hJqWI=; b=Awn31G/ivY+VEUywEHIJa9NBKhlMugANwqwpkPzq6Fs4JQBarkwvNNfheeyQOfprSq uQMhmDHbFjgrPuS4G1mUpLK+ovhDNqmX65K/p1SJoVj7a/TNmt1Unftd556Pke4tcO8T I/TRi69ddO6LxwtGTGu+qiIjBo4HDCCf8QrJJX6qAlV1ynItN//29yNvGDporYYAdKSA fMfiwsBaHoIzcrOZMhBPsE3uGHgcCqKUKGcM29a6Si2u451FKpnpesOOPbaNjzQd9AP3 +KrVW28Wf0O5vrvqF1l0+iXA8ahTwPrUayM+ToRDZ7dCQtFhF6FIM0bW+tJNGVguuuJL Mv5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-transfer-encoding; bh=D0FejF7hSyKHCtwLlmQZh5YvcPb5uQGjuJx1D2hJqWI=; b=DQnOGzRnRTuo8X68lGnE2jRlDxyO5L2CKI3nAqGbJekfVvo1YFHBAZ9W7aZHXok5km j7rv/knDfi4pEC3J7yw+ocIAL1gOUBELMtSStysM9BJ+SwTJ0bubRpEO3m+Ojl1wHOmp hcMmrscOlCF8aaT69Fmk5/1ZACocWdsIyr9zLfw0226faRBfe72zoookLaC1yrgrphPE LsQYnv0+UqntQRnvSY6ZmQFY67AYO/7F97B6LI9MIPRn7qyzIMz8qKvoVT6RKCURTgYe h/OQjTZ8ibvLZMYAUudYhWMCJblekE4z0e+xy+LXuQGKGrIRGp37XI94e13f0xrkQKn7 Jy3A== X-Gm-Message-State: AOAM531bSiIDEUKi4KcklszE0EYlDfHq9sdB4y5b8mMrDUxZiP1wNgnv ezI0aHkSe+M+MXBLxIokMfCrXC1OGxdwjg== X-Google-Smtp-Source: ABdhPJwNarMVKZInZGHrMmiq8VxpVpzYkoC6uAKptw1yHni/elcSnLrQBx6UrBv/UMDJG1ngg/HYWg== X-Received: by 2002:a5d:4fc4:: with SMTP id h4mr57829406wrw.129.1609322815963; Wed, 30 Dec 2020 02:06:55 -0800 (PST) Received: from srvbsdfenssv.interne.associated-bears.org (lstlambert-658-1-110-48.w217-128.abo.wanadoo.fr. [217.128.200.48]) by smtp.gmail.com with ESMTPSA id f14sm51048519wre.69.2020.12.30.02.06.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Dec 2020 02:06:55 -0800 (PST) Sender: Eric Masson Received: from srvbsdfenssv.interne.associated-bears.org (localhost [127.0.0.1]) by srvbsdfenssv.interne.associated-bears.org (Postfix) with ESMTP id 6634CD22; Wed, 30 Dec 2020 11:06:54 +0100 (CET) X-Virus-Scanned: amavisd-new at interne.associated-bears.org Received: from srvbsdfenssv.interne.associated-bears.org ([127.0.0.1]) by srvbsdfenssv.interne.associated-bears.org (srvbsdfenssv.interne.associated-bears.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0HioxWailW0f; Wed, 30 Dec 2020 11:06:51 +0100 (CET) Received: by srvbsdfenssv.interne.associated-bears.org (Postfix, from userid 1001) id 96514A57; Wed, 30 Dec 2020 11:06:51 +0100 (CET) From: Eric Masson To: Alexey Dokuchaev Cc: Poul-Henning Kamp , Warner Losh , Glen Barber , Kyle Evans , "Rodney W. Grimes" , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL In-Reply-To: <20201230090913.GA90119@FreeBSD.org> (Alexey Dokuchaev's message of "Wed, 30 Dec 2020 09:09:13 +0000") References: <202012291441.0BTEf1X9009764@gitrepo.freebsd.org> <202012300018.0BU0I7gn079533@gndrsh.dnsmgr.net> <20201230022128.GE1206@FreeBSD.org> <15826.1609318943@critter.freebsd.dk> <20201230090913.GA90119@FreeBSD.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (berkeley-unix) X-Operating-System: FreeBSD 12.2-STABLE amd64 Date: Wed, 30 Dec 2020 11:06:51 +0100 Message-ID: <864kk3fw04.fsf@srvbsdfenssv.interne.associated-bears.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4D5Rlj6kCYz4tC6 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=Awn31G/i; dmarc=none; spf=pass (mx1.freebsd.org: domain of emssmail@gmail.com designates 2a00:1450:4864:20::432 as permitted sender) smtp.mailfrom=emssmail@gmail.com X-Spamd-Result: default: False [-1.20 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[free.fr]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_SEVEN(0.00)[9]; FORGED_SENDER(0.30)[emss@free.fr,emssmail@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[217.128.200.48:received]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::432:from]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_NEQ_ENVFROM(0.00)[emss@free.fr,emssmail@gmail.com]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[free.fr]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_SPAM_SHORT(1.00)[1.000]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::432:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::432:from]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 10:06:58 -0000 Alexey Dokuchaev writes: Hi, > What about mergemaster -F, on a related note? Did my first build based on git checkout STABLE/12 src yesterday, F flag really helped in mergemaster stage (mergemaster -iFU), only had to merge the usual local mods. Éric From owner-dev-commits-src-all@freebsd.org Wed Dec 30 10:18:56 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5E92B4BE068; Wed, 30 Dec 2020 10:18:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5S1X1BNVz4tZd; Wed, 30 Dec 2020 10:18:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 180F81C880; Wed, 30 Dec 2020 10:18:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUAIuVi014236; Wed, 30 Dec 2020 10:18:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUAIutt014235; Wed, 30 Dec 2020 10:18:56 GMT (envelope-from git) Date: Wed, 30 Dec 2020 10:18:56 GMT Message-Id: <202012301018.0BUAIutt014235@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau Monné Subject: git: 2ae75536d370 - main - xen/xenstore: remove unused functions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ae75536d370c238f77ad09e5e994d2b8bdf010c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 10:18:56 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=2ae75536d370c238f77ad09e5e994d2b8bdf010c commit 2ae75536d370c238f77ad09e5e994d2b8bdf010c Author: Roger Pau Monné AuthorDate: 2020-11-26 08:57:47 +0000 Commit: Roger Pau Monné CommitDate: 2020-12-30 10:18:25 +0000 xen/xenstore: remove unused functions Those helpers are not used, so remove them. No functional change. Sponsored by: Citrix Systems R&D MFC after: 3 days --- sys/xen/xenbus/xenbus.c | 42 ---------------------------------- sys/xen/xenbus/xenbusvar.h | 56 ---------------------------------------------- 2 files changed, 98 deletions(-) diff --git a/sys/xen/xenbus/xenbus.c b/sys/xen/xenbus/xenbus.c index c59d4aec4532..415279ec2311 100644 --- a/sys/xen/xenbus/xenbus.c +++ b/sys/xen/xenbus/xenbus.c @@ -102,48 +102,6 @@ xenbus_strstate(XenbusState state) return ((state < (XenbusStateClosed + 1)) ? name[state] : "INVALID"); } -int -xenbus_watch_path(device_t dev, char *path, struct xs_watch *watch, - xs_watch_cb_t *callback, uintptr_t callback_data) -{ - int error; - - watch->node = path; - watch->callback = callback; - watch->callback_data = callback_data; - - error = xs_register_watch(watch); - - if (error) { - watch->node = NULL; - watch->callback = NULL; - xenbus_dev_fatal(dev, error, "adding watch on %s", path); - } - - return (error); -} - -int -xenbus_watch_path2(device_t dev, const char *path, - const char *path2, struct xs_watch *watch, - xs_watch_cb_t *callback, uintptr_t callback_data) -{ - int error; - char *state = malloc(strlen(path) + 1 + strlen(path2) + 1, - M_XENBUS, M_WAITOK); - - strcpy(state, path); - strcat(state, "/"); - strcat(state, path2); - - error = xenbus_watch_path(dev, state, watch, callback, callback_data); - if (error) { - free(state,M_XENBUS); - } - - return (error); -} - void xenbus_dev_verror(device_t dev, int err, const char *fmt, va_list ap) { diff --git a/sys/xen/xenbus/xenbusvar.h b/sys/xen/xenbus/xenbusvar.h index 377d60c01590..bea65fff8e5a 100644 --- a/sys/xen/xenbus/xenbusvar.h +++ b/sys/xen/xenbus/xenbusvar.h @@ -123,62 +123,6 @@ xenbus_get_otherend_state(device_t dev) return (xenbus_read_driver_state(xenbus_get_otherend_path(dev))); } -/** - * Initialize and register a watch on the given path (client suplied storage). - * - * \param dev The XenBus device requesting the watch service. - * \param path The XenStore path of the object to be watched. The - * storage for this string must be stable for the lifetime - * of the watch. - * \param watch The watch object to use for this request. This object - * must be stable for the lifetime of the watch. - * \param callback The function to call when XenStore objects at or below - * path are modified. - * \param cb_data Client data that can be retrieved from the watch object - * during the callback. - * - * \return On success, 0. Otherwise an errno value indicating the - * type of failure. - * - * \note On error, the device 'dev' will be switched to the XenbusStateClosing - * state and the returned error is saved in the per-device error node - * for dev in the XenStore. - */ -int xenbus_watch_path(device_t dev, char *path, - struct xs_watch *watch, - xs_watch_cb_t *callback, - uintptr_t cb_data); - -/** - * Initialize and register a watch at path/path2 in the XenStore. - * - * \param dev The XenBus device requesting the watch service. - * \param path The base XenStore path of the object to be watched. - * \param path2 The tail XenStore path of the object to be watched. - * \param watch The watch object to use for this request. This object - * must be stable for the lifetime of the watch. - * \param callback The function to call when XenStore objects at or below - * path are modified. - * \param cb_data Client data that can be retrieved from the watch object - * during the callback. - * - * \return On success, 0. Otherwise an errno value indicating the - * type of failure. - * - * \note On error, \a dev will be switched to the XenbusStateClosing - * state and the returned error is saved in the per-device error node - * for \a dev in the XenStore. - * - * Similar to xenbus_watch_path, however the storage for the path to the - * watched object is allocated from the heap and filled with "path '/' path2". - * Should a call to this function succeed, it is the callers responsibility - * to free watch->node using the M_XENBUS malloc type. - */ -int xenbus_watch_path2(device_t dev, const char *path, - const char *path2, struct xs_watch *watch, - xs_watch_cb_t *callback, - uintptr_t cb_data); - /** * Grant access to the given ring_mfn to the peer of the given device. * From owner-dev-commits-src-all@freebsd.org Wed Dec 30 10:18:56 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5E1394BDE9C; Wed, 30 Dec 2020 10:18:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5S1X0zZPz4tMT; Wed, 30 Dec 2020 10:18:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1028F1C3F4; Wed, 30 Dec 2020 10:18:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUAItCK014219; Wed, 30 Dec 2020 10:18:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUAIt7L014218; Wed, 30 Dec 2020 10:18:55 GMT (envelope-from git) Date: Wed, 30 Dec 2020 10:18:55 GMT Message-Id: <202012301018.0BUAIt7L014218@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau Monné Subject: git: 4e4e43dc9e1a - main - xen: allow limiting the amount of duplicated pending xenstore watches MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e4e43dc9e1afc863670a031cc5cc75eb5e668d6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 10:18:56 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=4e4e43dc9e1afc863670a031cc5cc75eb5e668d6 commit 4e4e43dc9e1afc863670a031cc5cc75eb5e668d6 Author: Roger Pau Monné AuthorDate: 2020-11-25 11:34:38 +0000 Commit: Roger Pau Monné CommitDate: 2020-12-30 10:18:26 +0000 xen: allow limiting the amount of duplicated pending xenstore watches Xenstore watches received are queued in a list and processed in a deferred thread. Such queuing was done without any checking, so a guest could potentially trigger a resource starvation against the FreeBSD kernel if such kernel is watching any user-controlled xenstore path. Allowing limiting the amount of pending events a watch can accumulate to prevent a remote guest from triggering this resource starvation issue. For the PV device backends and frontends this limitation is only applied to the other end /state node, which is limited to 1 pending event, the rest of the watched paths can still have unlimited pending watches because they are either local or controlled by a privileged domain. The xenstore user-space device gets special treatment as it's not possible for the kernel to know whether the paths being watched by user-space processes are controlled by a guest domain. For this reason watches set by the xenstore user-space device are limited to 1000 pending events. Note this can be modified using the max_pending_watch_events sysctl of the device. This is XSA-349. Sponsored by: Citrix Systems R&D MFC after: 3 days --- sys/dev/xen/balloon/balloon.c | 3 ++- sys/dev/xen/blkback/blkback.c | 6 ++++++ sys/dev/xen/control/control.c | 6 ++++++ sys/dev/xen/xenstore/xenstore.c | 14 +++++++++++--- sys/dev/xen/xenstore/xenstore_dev.c | 15 +++++++++++++++ sys/xen/xenbus/xenbusb.c | 17 +++++++++++++++++ sys/xen/xenstore/xenstorevar.h | 9 +++++++++ 7 files changed, 66 insertions(+), 4 deletions(-) diff --git a/sys/dev/xen/balloon/balloon.c b/sys/dev/xen/balloon/balloon.c index a9354321af3b..01d75204f5bf 100644 --- a/sys/dev/xen/balloon/balloon.c +++ b/sys/dev/xen/balloon/balloon.c @@ -312,7 +312,8 @@ set_new_target(unsigned long target) static struct xs_watch target_watch = { - .node = "memory/target" + .node = "memory/target", + .max_pending = 1, }; /* React to a change in the target key */ diff --git a/sys/dev/xen/blkback/blkback.c b/sys/dev/xen/blkback/blkback.c index d60920c819b8..762f25302c00 100644 --- a/sys/dev/xen/blkback/blkback.c +++ b/sys/dev/xen/blkback/blkback.c @@ -3746,6 +3746,12 @@ xbb_attach(device_t dev) xbb->hotplug_watch.callback = xbb_attach_disk; KASSERT(xbb->hotplug_watch.node == NULL, ("watch node already setup")); xbb->hotplug_watch.node = strdup(sbuf_data(watch_path), M_XENBLOCKBACK); + /* + * We don't care about the path updated, just about the value changes + * on that single node, hence there's no need to queue more that one + * event. + */ + xbb->hotplug_watch.max_pending = 1; sbuf_delete(watch_path); error = xs_register_watch(&xbb->hotplug_watch); if (error != 0) { diff --git a/sys/dev/xen/control/control.c b/sys/dev/xen/control/control.c index e985d56cda5a..a9738eeb7c2b 100644 --- a/sys/dev/xen/control/control.c +++ b/sys/dev/xen/control/control.c @@ -434,6 +434,12 @@ xctrl_attach(device_t dev) xctrl->xctrl_watch.node = "control/shutdown"; xctrl->xctrl_watch.callback = xctrl_on_watch_event; xctrl->xctrl_watch.callback_data = (uintptr_t)xctrl; + /* + * We don't care about the path updated, just about the value changes + * on that single node, hence there's no need to queue more that one + * event. + */ + xctrl->xctrl_watch.max_pending = 1; xs_register_watch(&xctrl->xctrl_watch); if (xen_pv_domain()) diff --git a/sys/dev/xen/xenstore/xenstore.c b/sys/dev/xen/xenstore/xenstore.c index 4d8a247361a5..890cfe009411 100644 --- a/sys/dev/xen/xenstore/xenstore.c +++ b/sys/dev/xen/xenstore/xenstore.c @@ -655,12 +655,17 @@ xs_process_msg(enum xsd_sockmsg_type *type) mtx_lock(&xs.registered_watches_lock); msg->u.watch.handle = find_watch( msg->u.watch.vec[XS_WATCH_TOKEN]); - if (msg->u.watch.handle != NULL) { - mtx_lock(&xs.watch_events_lock); + mtx_lock(&xs.watch_events_lock); + if (msg->u.watch.handle != NULL && + (!msg->u.watch.handle->max_pending || + msg->u.watch.handle->pending < + msg->u.watch.handle->max_pending)) { + msg->u.watch.handle->pending++; TAILQ_INSERT_TAIL(&xs.watch_events, msg, list); wakeup(&xs.watch_events); mtx_unlock(&xs.watch_events_lock); } else { + mtx_unlock(&xs.watch_events_lock); free(msg->u.watch.vec, M_XENSTORE); free(msg, M_XENSTORE); } @@ -981,8 +986,10 @@ xenwatch_thread(void *unused) mtx_lock(&xs.watch_events_lock); msg = TAILQ_FIRST(&xs.watch_events); - if (msg) + if (msg) { TAILQ_REMOVE(&xs.watch_events, msg, list); + msg->u.watch.handle->pending--; + } mtx_unlock(&xs.watch_events_lock); if (msg != NULL) { @@ -1577,6 +1584,7 @@ xs_register_watch(struct xs_watch *watch) char token[sizeof(watch) * 2 + 1]; int error; + watch->pending = 0; sprintf(token, "%lX", (long)watch); mtx_lock(&xs.registered_watches_lock); diff --git a/sys/dev/xen/xenstore/xenstore_dev.c b/sys/dev/xen/xenstore/xenstore_dev.c index 95e9a9d8fa0f..c88901bb5d68 100644 --- a/sys/dev/xen/xenstore/xenstore_dev.c +++ b/sys/dev/xen/xenstore/xenstore_dev.c @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -52,6 +53,8 @@ __FBSDID("$FreeBSD$"); #include #include +static unsigned int max_pending_watches = 1000; + struct xs_dev_transaction { LIST_ENTRY(xs_dev_transaction) list; struct xs_transaction handle; @@ -333,6 +336,7 @@ xs_dev_write(struct cdev *dev, struct uio *uio, int ioflag) watch->watch.node = strdup(wpath, M_XENSTORE); watch->watch.callback = xs_dev_watch_cb; watch->watch.callback_data = (uintptr_t)watch; + watch->watch.max_pending = max_pending_watches; watch->token = strdup(wtoken, M_XENSTORE); watch->user = u; @@ -509,6 +513,17 @@ static int xs_dev_attach(device_t dev) { struct cdev *xs_cdev; + struct sysctl_ctx_list *sysctl_ctx; + struct sysctl_oid *sysctl_tree; + + sysctl_ctx = device_get_sysctl_ctx(dev); + sysctl_tree = device_get_sysctl_tree(dev); + if (sysctl_ctx == NULL || sysctl_tree == NULL) + return (EINVAL); + + SYSCTL_ADD_UINT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, + "max_pending_watch_events", CTLFLAG_RW, &max_pending_watches, 0, + "maximum amount of pending watch events to be delivered"); xs_cdev = make_dev_credf(MAKEDEV_ETERNAL, &xs_dev_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0400, "xen/xenstore"); diff --git a/sys/xen/xenbus/xenbusb.c b/sys/xen/xenbus/xenbusb.c index 220551109642..3e49dfd9424c 100644 --- a/sys/xen/xenbus/xenbusb.c +++ b/sys/xen/xenbus/xenbusb.c @@ -701,10 +701,21 @@ xenbusb_add_device(device_t dev, const char *type, const char *id) ivars->xd_otherend_watch.node = statepath; ivars->xd_otherend_watch.callback = xenbusb_otherend_watch_cb; ivars->xd_otherend_watch.callback_data = (uintptr_t)ivars; + /* + * Other end state node watch, limit to one pending event + * to prevent frontends from queuing too many events that + * could cause resource starvation. + */ + ivars->xd_otherend_watch.max_pending = 1; ivars->xd_local_watch.node = ivars->xd_node; ivars->xd_local_watch.callback = xenbusb_local_watch_cb; ivars->xd_local_watch.callback_data = (uintptr_t)ivars; + /* + * Watch our local path, only writable by us or a privileged + * domain, no need to limit. + */ + ivars->xd_local_watch.max_pending = 0; mtx_lock(&xbs->xbs_lock); xbs->xbs_connecting_children++; @@ -763,6 +774,12 @@ xenbusb_attach(device_t dev, char *bus_node, u_int id_components) xbs->xbs_device_watch.node = bus_node; xbs->xbs_device_watch.callback = xenbusb_devices_changed; xbs->xbs_device_watch.callback_data = (uintptr_t)xbs; + /* + * Allow for unlimited pending watches, as those are local paths + * either controlled by the guest or only writable by privileged + * domains. + */ + xbs->xbs_device_watch.max_pending = 0; TASK_INIT(&xbs->xbs_probe_children, 0, xenbusb_probe_children_cb, dev); diff --git a/sys/xen/xenstore/xenstorevar.h b/sys/xen/xenstore/xenstorevar.h index 52fa9a65362a..98d60f2646d2 100644 --- a/sys/xen/xenstore/xenstorevar.h +++ b/sys/xen/xenstore/xenstorevar.h @@ -70,6 +70,15 @@ struct xs_watch /* Callback client data untouched by the XenStore watch mechanism. */ uintptr_t callback_data; + + /* Maximum number of pending watch events to be delivered. */ + unsigned int max_pending; + + /* + * Private counter used by xenstore to keep track of the pending + * watches. Protected by xs.watch_events_lock. + */ + unsigned int pending; }; LIST_HEAD(xs_watch_list, xs_watch); From owner-dev-commits-src-all@freebsd.org Wed Dec 30 11:33:57 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2B5524BF22C; Wed, 30 Dec 2020 11:33:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 4D5Th45ty6z3FYh; Wed, 30 Dec 2020 11:33:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 0BUBXhL2017240 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 30 Dec 2020 13:33:47 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 0BUBXhL2017240 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 0BUBXha0017239; Wed, 30 Dec 2020 13:33:43 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 30 Dec 2020 13:33:43 +0200 From: Konstantin Belousov To: Ryan Libby Cc: Kyle Evans , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 Message-ID: References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4D5Th45ty6z3FYh X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 11:33:57 -0000 On Tue, Dec 29, 2020 at 07:10:02PM -0800, Ryan Libby wrote: > I checked amd64 and it failed due to pkru. I don't think we care to fix > that either, but we technically could of course. For amd64 the external > toolchain with gcc 6.4 is broken at the moment but will be fixed after a > few more MFCs. Could you be more specific, please? What is broken with PKRU, the gcc 6.4 build? For kernel, or libc? Does it work with not-so-ancient gcc? From owner-dev-commits-src-all@freebsd.org Wed Dec 30 11:51:28 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B5114BF56A; Wed, 30 Dec 2020 11:51:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5V4H5CB9z3GNp; Wed, 30 Dec 2020 11:51:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 165731D92A; Wed, 30 Dec 2020 11:51:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUBpPhV032196; Wed, 30 Dec 2020 11:51:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUBpPas032195; Wed, 30 Dec 2020 11:51:25 GMT (envelope-from git) Date: Wed, 30 Dec 2020 11:51:25 GMT Message-Id: <202012301151.0BUBpPas032195@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: d3912bec58d0 - stable/12 - Implement strerror_l(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: d3912bec58d0b82509a0973cae02f156986d88fa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 11:51:28 -0000 The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d3912bec58d0b82509a0973cae02f156986d88fa commit d3912bec58d0b82509a0973cae02f156986d88fa Author: Konstantin Belousov AuthorDate: 2020-12-16 09:02:09 +0000 Commit: Konstantin Belousov CommitDate: 2020-12-30 10:44:23 +0000 Implement strerror_l(). PR: 251651 MFC of r368692, r368723 (cherry picked from commit 675079b1ea61b310f3a42cb0d352a49c1780f89a) (cherry picked from commit 65bf3043365bd86fc5d4d387ad0c42217f11330b) --- include/string.h | 2 +- include/xlocale/_string.h | 1 + lib/libc/include/libc_private.h | 5 ++++ lib/libc/nls/msgcat.c | 9 ++++++- lib/libc/string/Makefile.inc | 1 + lib/libc/string/Symbol.map | 4 ++++ lib/libc/string/strerror.3 | 52 +++++++++++++++++++++++++++++++++-------- lib/libc/string/strerror.c | 46 +++++++++++++++++++++++++++--------- 8 files changed, 97 insertions(+), 23 deletions(-) diff --git a/include/string.h b/include/string.h index 3c5cceaeb857..774cf5fe9756 100644 --- a/include/string.h +++ b/include/string.h @@ -140,7 +140,7 @@ int timingsafe_bcmp(const void *, const void *, size_t); int timingsafe_memcmp(const void *, const void *, size_t); #endif /* __BSD_VISIBLE */ -#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) +#if __POSIX_VISIBLE >= 200112 || defined(_XLOCALE_H_) #include #endif diff --git a/include/xlocale/_string.h b/include/xlocale/_string.h index 7fdad7562860..6df9132de171 100644 --- a/include/xlocale/_string.h +++ b/include/xlocale/_string.h @@ -46,6 +46,7 @@ typedef struct _xlocale *locale_t; * POSIX2008 functions */ int strcoll_l(const char *, const char *, locale_t); +char *strerror_l(int num, locale_t); size_t strxfrm_l(char *, const char *, size_t, locale_t); #endif /* _XLOCALE_STRING1_H */ diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h index 181900fa4ba8..d3fe788e9654 100644 --- a/lib/libc/include/libc_private.h +++ b/lib/libc/include/libc_private.h @@ -429,4 +429,9 @@ void ___pthread_cleanup_pop_imp(int); void __throw_constraint_handler_s(const char * restrict msg, int error); +struct __nl_cat_d; +struct _xlocale; +struct __nl_cat_d *__catopen_l(const char *name, int type, + struct _xlocale *locale); + #endif /* _LIBC_PRIVATE_H_ */ diff --git a/lib/libc/nls/msgcat.c b/lib/libc/nls/msgcat.c index 5eb3273f7269..918d188142b8 100644 --- a/lib/libc/nls/msgcat.c +++ b/lib/libc/nls/msgcat.c @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include "../locale/xlocale_private.h" +#include "libc_private.h" #define _DEFAULT_NLS_PATH "/usr/share/nls/%L/%N.cat:/usr/share/nls/%N/%L:/usr/local/share/nls/%L/%N.cat:/usr/local/share/nls/%N/%L" @@ -118,6 +119,12 @@ SLIST_HEAD(listhead, catentry) cache = nl_catd catopen(const char *name, int type) +{ + return (__catopen_l(name, type, __get_locale())); +} + +nl_catd +__catopen_l(const char *name, int type, locale_t locale) { struct stat sbuf; struct catentry *np; @@ -136,7 +143,7 @@ catopen(const char *name, int type) lang = NULL; else { if (type == NL_CAT_LOCALE) - lang = querylocale(LC_MESSAGES_MASK, __get_locale()); + lang = querylocale(LC_MESSAGES_MASK, locale); else lang = getenv("LANG"); diff --git a/lib/libc/string/Makefile.inc b/lib/libc/string/Makefile.inc index 3df53f05d390..6e6a3f42f723 100644 --- a/lib/libc/string/Makefile.inc +++ b/lib/libc/string/Makefile.inc @@ -64,6 +64,7 @@ MLINKS+=strcpy.3 stpcpy.3 \ strcpy.3 strncpy.3 MLINKS+=strdup.3 strndup.3 MLINKS+=strerror.3 perror.3 \ + strerror.3 strerror_l.3 \ strerror.3 strerror_r.3 \ strerror.3 sys_errlist.3 \ strerror.3 sys_nerr.3 diff --git a/lib/libc/string/Symbol.map b/lib/libc/string/Symbol.map index 83c6eb34dc2a..450b745c7e0a 100644 --- a/lib/libc/string/Symbol.map +++ b/lib/libc/string/Symbol.map @@ -110,6 +110,10 @@ FBSD_1.5 { timingsafe_memcmp; }; +FBSD_1.6 { + strerror_l; +}; + FBSDprivate_1.0 { __strtok_r; }; diff --git a/lib/libc/string/strerror.3 b/lib/libc/string/strerror.3 index a47494fd0784..39f49d3007ac 100644 --- a/lib/libc/string/strerror.3 +++ b/lib/libc/string/strerror.3 @@ -32,12 +32,13 @@ .\" @(#)strerror.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd April 5, 2011 +.Dd December 7, 2020 .Dt STRERROR 3 .Os .Sh NAME .Nm perror , .Nm strerror , +.Nm strerror_l , .Nm strerror_r , .Nm sys_errlist , .Nm sys_nerr @@ -53,12 +54,15 @@ .In string.h .Ft "char *" .Fn strerror "int errnum" +.Ft "char *" +.Fn strerror_l "int errnum" "locale_t" .Ft int .Fn strerror_r "int errnum" "char *strerrbuf" "size_t buflen" .Sh DESCRIPTION The .Fn strerror , -.Fn strerror_r +.Fn strerror_l , +.Fn strerror_r , and .Fn perror functions look up the error message string corresponding to an @@ -68,8 +72,28 @@ The .Fn strerror function accepts an error number argument .Fa errnum -and returns a pointer to the corresponding -message string. +and returns a pointer to the corresponding message string +in the current locale. +.Fn strerror +is not thread-safe. +It returns a pointer to an internal static buffer that could be +overwritten by a +.Fn strerror +call from another thread. +.Pp +The +.Fn strerror_l +function accepts +.Fa errnum +error number and +.Fa locale +locale handle arguments and returns a pointer to a string +corresponding to the specified error in the given locale. +.Fn strerror_l +is thread-safe, its result can be only overwritten by +another call to +.Fn strerror_l +from the current thread. .Pp The .Fn strerror_r @@ -141,7 +165,8 @@ The external value contains a count of the messages in .Va sys_errlist . The use of these variables is deprecated; -.Fn strerror +.Fn strerror , +.Fn strerror_l , or .Fn strerror_r should be used instead. @@ -160,6 +185,10 @@ The .Fn strerror_r function conforms to .St -p1003.1-2001 . +The +.Fn strerror_l +function conforms to +.St -p1003.1-2008 . .Sh HISTORY The .Fn strerror @@ -173,18 +202,21 @@ function was implemented in .Fx 4.4 by .An Wes Peters Aq Mt wes@FreeBSD.org . +The +.Fn strerror_l +function was added in +.Fx 13.0 . .Sh BUGS The .Fn strerror function returns its result in a static buffer which will be overwritten by subsequent calls. .Pp -The return type for -.Fn strerror -is missing a type-qualifier; it should actually be -.Vt const char * . -.Pp Programs that use the deprecated .Va sys_errlist variable often fail to compile because they declare it inconsistently. +Size of the +.Va sys_errlist +object might increase during FreeBSD lifetime, +breaking some ABI stability guarantees. diff --git a/lib/libc/string/strerror.c b/lib/libc/string/strerror.c index 7cd984ea48ff..11b9701d968f 100644 --- a/lib/libc/string/strerror.c +++ b/lib/libc/string/strerror.c @@ -45,6 +45,8 @@ __FBSDID("$FreeBSD$"); #include #include "errlst.h" +#include "../locale/xlocale_private.h" +#include "libc_private.h" /* * Define buffer big enough to contain delimiter (": ", 2 bytes), @@ -78,34 +80,35 @@ errstr(int num, const char *uprefix, char *buf, size_t len) strlcat(buf, t, len); } -int -strerror_r(int errnum, char *strerrbuf, size_t buflen) +static int +strerror_rl(int errnum, char *strerrbuf, size_t buflen, locale_t locale) { int retval = 0; #if defined(NLS) int saved_errno = errno; nl_catd catd; - catd = catopen("libc", NL_CAT_LOCALE); + + catd = __catopen_l("libc", NL_CAT_LOCALE, locale); #endif if (errnum < 0 || errnum >= __hidden_sys_nerr) { errstr(errnum, #if defined(NLS) - catgets(catd, 1, 0xffff, __uprefix), + catgets(catd, 1, 0xffff, __uprefix), #else - __uprefix, + __uprefix, #endif - strerrbuf, buflen); + strerrbuf, buflen); retval = EINVAL; } else { if (strlcpy(strerrbuf, #if defined(NLS) - catgets(catd, 1, errnum, __hidden_sys_errlist[errnum]), + catgets(catd, 1, errnum, __hidden_sys_errlist[errnum]), #else - __hidden_sys_errlist[errnum], + __hidden_sys_errlist[errnum], #endif - buflen) >= buflen) - retval = ERANGE; + buflen) >= buflen) + retval = ERANGE; } #if defined(NLS) @@ -116,12 +119,33 @@ strerror_r(int errnum, char *strerrbuf, size_t buflen) return (retval); } +int +strerror_r(int errnum, char *strerrbuf, size_t buflen) +{ + return (strerror_rl(errnum, strerrbuf, buflen, __get_locale())); +} + +char * +strerror_l(int num, locale_t locale) +{ +#ifndef __NO_TLS + static _Thread_local char ebuf[NL_TEXTMAX]; + + if (strerror_rl(num, ebuf, sizeof(ebuf), locale) != 0) + errno = EINVAL; + return (ebuf); +#else + errno = ENOTSUP; + return (NULL); +#endif +} + char * strerror(int num) { static char ebuf[NL_TEXTMAX]; - if (strerror_r(num, ebuf, sizeof(ebuf)) != 0) + if (strerror_rl(num, ebuf, sizeof(ebuf), __get_locale()) != 0) errno = EINVAL; return (ebuf); } From owner-dev-commits-src-all@freebsd.org Wed Dec 30 12:04:56 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 12B6E4C0E8A; Wed, 30 Dec 2020 12:04:56 +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 4D5VMq5rMMz3HXR; Wed, 30 Dec 2020 12:04:55 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 0BUC4qmh081947; Wed, 30 Dec 2020 04:04:52 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 0BUC4qX7081946; Wed, 30 Dec 2020 04:04:52 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202012301204.0BUC4qX7081946@gndrsh.dnsmgr.net> Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL In-Reply-To: To: Warner Losh Date: Wed, 30 Dec 2020 04:04:52 -0800 (PST) CC: Glen Barber , Kyle Evans , "Rodney W. Grimes" , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4D5VMq5rMMz3HXR X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 12:04:56 -0000 > On Tue, Dec 29, 2020, 7:21 PM Glen Barber wrote: > > > On Tue, Dec 29, 2020 at 06:36:45PM -0600, Kyle Evans wrote: > > > On Tue, Dec 29, 2020, 18:18 Rodney W. Grimes > > > wrote: > > > > > > > > The branch main has been updated by gjb: > > > > > > > > > > URL: > > > > > > https://cgit.FreeBSD.org/src/commit/?id=70e64ba4494190e64ab8faa04d744182d420c275 > > > > > > > > > > commit 70e64ba4494190e64ab8faa04d744182d420c275 > > > > > Author: Glen Barber > > > > > AuthorDate: 2020-12-29 14:34:05 +0000 > > > > > Commit: Glen Barber > > > > > CommitDate: 2020-12-29 14:40:28 +0000 > > > > > > > > > > release.sh: Update GITROOT URL > > > > > > > > > > Hard-code the GITROOT for the ports tree to use cgit-beta > > > > > until the ports repository is converted. > > > > > > > > > > While here, remove $FreeBSD$ RCS IDs. > > > > > > > > So how do I know what version of some file I am looking at > > > > once it has been dis-associated from a git clone? > > > > > > > > Is there some new mechanism that can give me the cadence of > > > > say, /etc/pkg/FreeBSD.conf once its FreBSD ID is riped out? > > > > > > > > Also if $FreeBSD$ needs to be removed, can we please just do > > > > it in one massive tree wide commit rather than have this > > > > random piece wise needless noise in 1000's of commits? > > > > > > > > > > > > I don't see any particularly compelling reason to strip these tags, > > > personally. I stripped them from caroot because we embedded them in > > > generated files and it creates a lot of noise on updatecerts that I do > > not > > > need/want, while providing no value to justify the noise for a purely > > > generated file. > > > > They are not used/updated, so why keep a tag that does not expand to any > > useful information? > > > > Deleting all the $FreeBSD$ in on go is massively unwise (or as the British > might say, "a very brave plan"). It will screw up MFCs on an epic scale for > years for no real benefit to pay for that extra developer time. It itself > can't be MFCd. It's a terrible idea. We should not be deleting them, except > judiciously for things that cannot be MFCd. With the subversion exporter, > they will live on in stable/12. Just exactly how would this screw up MFC's on an epic scale? Your NOT going to merge this massive commit, which as long as you don't touch lines near $FreeBSD$ things should just be fine. Now commiting a change to $FreeBSD$ along with OTHER changes is a sure fire way to cause a MFC conflict, but not anything major that can not be dealt with via conflict resolution. Now what is being just shoved off as nothing is the fact without $FreeBSD$ working the ability to backtrace cadence of a file is going to be a royal pain in the ass, and basically means the project has "lost" versioning of installed product. > Warner -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-all@freebsd.org Wed Dec 30 12:05:55 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0CC464C0DD3; Wed, 30 Dec 2020 12:05:55 +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 4D5VNy5ZvZz3Hc0; Wed, 30 Dec 2020 12:05:53 +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 0BUC5q5Z081966; Wed, 30 Dec 2020 04:05:52 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 0BUC5qV1081965; Wed, 30 Dec 2020 04:05:52 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202012301205.0BUC5qV1081965@gndrsh.dnsmgr.net> Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL In-Reply-To: To: Kyle Evans Date: Wed, 30 Dec 2020 04:05:52 -0800 (PST) CC: "Rodney W. Grimes" , Glen Barber , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4D5VNy5ZvZz3Hc0 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 12:05:55 -0000 > On Tue, Dec 29, 2020, 18:18 Rodney W. Grimes > wrote: > > > > The branch main has been updated by gjb: > > > > > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=70e64ba4494190e64ab8faa04d744182d420c275 > > > > > > commit 70e64ba4494190e64ab8faa04d744182d420c275 > > > Author: Glen Barber > > > AuthorDate: 2020-12-29 14:34:05 +0000 > > > Commit: Glen Barber > > > CommitDate: 2020-12-29 14:40:28 +0000 > > > > > > release.sh: Update GITROOT URL > > > > > > Hard-code the GITROOT for the ports tree to use cgit-beta > > > until the ports repository is converted. > > > > > > While here, remove $FreeBSD$ RCS IDs. > > > > So how do I know what version of some file I am looking at > > once it has been dis-associated from a git clone? > > > > Is there some new mechanism that can give me the cadence of > > say, /etc/pkg/FreeBSD.conf once its FreBSD ID is riped out? > > > > Also if $FreeBSD$ needs to be removed, can we please just do > > it in one massive tree wide commit rather than have this > > random piece wise needless noise in 1000's of commits? > > > > I don't see any particularly compelling reason to strip these tags, > personally. I stripped them from caroot because we embedded them in > generated files and it creates a lot of noise on updatecerts that I do not > need/want, while providing no value to justify the noise for a purely > generated file. What you call noise I call tracability to origin, and we are loosing that it seems, and IMHO, that is a really bad day to see. -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-all@freebsd.org Wed Dec 30 12:12:55 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 811564C0E66; Wed, 30 Dec 2020 12:12:55 +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 4D5VY24F4sz3Hm8; Wed, 30 Dec 2020 12:12:54 +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 0BUCCqN6081999; Wed, 30 Dec 2020 04:12:52 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 0BUCCqUC081998; Wed, 30 Dec 2020 04:12:52 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202012301212.0BUCCqUC081998@gndrsh.dnsmgr.net> Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL In-Reply-To: <20201230022048.GD1206@FreeBSD.org> To: Glen Barber Date: Wed, 30 Dec 2020 04:12:52 -0800 (PST) CC: rgrimes@freebsd.org, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4D5VY24F4sz3Hm8 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 [-2.10 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[5]; SPAMHAUS_ZRD(0.00)[69.59.192.140:from:127.0.2.255]; RCVD_TLS_LAST(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[69.59.192.140:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; 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]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 12:12:55 -0000 > On Tue, Dec 29, 2020 at 04:18:07PM -0800, Rodney W. Grimes wrote: > > > The branch main has been updated by gjb: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=70e64ba4494190e64ab8faa04d744182d420c275 > > > > > > commit 70e64ba4494190e64ab8faa04d744182d420c275 > > > Author: Glen Barber > > > AuthorDate: 2020-12-29 14:34:05 +0000 > > > Commit: Glen Barber > > > CommitDate: 2020-12-29 14:40:28 +0000 > > > > > > release.sh: Update GITROOT URL > > > > > > Hard-code the GITROOT for the ports tree to use cgit-beta > > > until the ports repository is converted. > > > > > > While here, remove $FreeBSD$ RCS IDs. > > > > So how do I know what version of some file I am looking at > > once it has been dis-associated from a git clone? > > > > You can't. Git does not expand the tags. And no new mechanism in place to replace it? So, we have no versioning of files in the final product any more? Sad, very very sad :-(. This may cause some down streams, other than me, some very serious heart ache. > > Is there some new mechanism that can give me the cadence of > > say, /etc/pkg/FreeBSD.conf once its FreBSD ID is riped out? > > > > Also if $FreeBSD$ needs to be removed, can we please just do > > it in one massive tree wide commit rather than have this > > random piece wise needless noise in 1000's of commits? > > > > Please, no. There is no benefit to prune these in one fell swoop as > opposed to, for example, bumping Copyright dates. Well have to disagree on that. a) If it is removed in one fell swoop it can also probably be undone in one fell swoop too. b) It concentrates the change in 1 commit that does NOT ever need to be MFC'ed. c) It'll quickly get us to the damage that is done by the loss of this information from the released binary product so repairs may begin. d) It'll shorten 1000's of commit messages by the lines: While here, remove $FreeBSD$ RCS IDs. -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-all@freebsd.org Wed Dec 30 12:25:00 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BC63D4C1963; Wed, 30 Dec 2020 12:25:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5Vq04xJlz3K8c; Wed, 30 Dec 2020 12:25:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 982CA1E300; Wed, 30 Dec 2020 12:25:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUCP0dN071770; Wed, 30 Dec 2020 12:25:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUCP05K071767; Wed, 30 Dec 2020 12:25:00 GMT (envelope-from git) Date: Wed, 30 Dec 2020 12:25:00 GMT Message-Id: <202012301225.0BUCP05K071767@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michal Meloun Subject: git: 59f46e34cf64 - main - sys/tools: Add a tool for generating arm and arm64 kernel images. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 59f46e34cf640a057e7445960a807004ce4de9ff Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 12:25:00 -0000 The branch main has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=59f46e34cf640a057e7445960a807004ce4de9ff commit 59f46e34cf640a057e7445960a807004ce4de9ff Author: Michal Meloun AuthorDate: 2020-12-29 13:49:41 +0000 Commit: Michal Meloun CommitDate: 2020-12-30 12:22:04 +0000 sys/tools: Add a tool for generating arm and arm64 kernel images. This tool can generate kernel images without changing the offsets in the final executable. It replaces the ELF header by properly sized zeroed block then emits a relative jump to _start(for 'v7jump' or 'v8jump' option) or the booti header (for 'v8booti' option) to the beginning of the converted file. Submited by: ian --- sys/tools/arm_kernel_boothdr.awk | 190 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 190 insertions(+) diff --git a/sys/tools/arm_kernel_boothdr.awk b/sys/tools/arm_kernel_boothdr.awk new file mode 100644 index 000000000000..5526102606f6 --- /dev/null +++ b/sys/tools/arm_kernel_boothdr.awk @@ -0,0 +1,190 @@ +#!/usr/bin/awk -f +#- +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright 2019 Ian Lepore +# +# 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$ + +BEGIN { + # Init global vars. + gBytesOut = 0; # How many output bytes we've written so far + gKernbase = 0; # Address of first byte of loaded kernel image + gStart = 0; # Address of _start symbol + gStartOff = 0; # Offset of _start symbol from start of image + gEnd = 0; # Address of _end symbol + gEndOff = 0; # Offset of _end symbol from start of image + + # The type of header we're writing is set using -v hdrtype= on + # the command line, ensure we got a valid value for it. + if (hdrtype != "v7jump" && + hdrtype != "v8jump" && + hdrtype != "v8booti") { + print "arm_kernel_boothdr.awk: " \ + "missing or invalid '-v hdrtype=' argument" >"/dev/stderr" + gHdrType = "error_reported" + exit 1 + } + + gHdrType = hdrtype +} + +function addr_to_offset(addr) { + # Turn an address into an offset from the start of the loaded image. + return addr % gKernbase +} + +function hexstr_to_num(str) { + + # Prepend a 0x onto the string, then coerce it to a number by doing + # arithmetic with it, which makes awk run it through strtod(), + # which handles hex numbers that have a 0x prefix. + + return 0 + ("0x" str) +} + +function write_le32(num) { + + for (i = 0; i < 4; i++) { + printf("%c", num % 256); + num /= 256 + } + gBytesOut += 4 +} + +function write_le64(num) { + + for (i = 0; i < 8; i++) { + printf("%c", num % 256); + num /= 256 + } + gBytesOut += 8 +} + +function write_padding() { + + # Write enough padding bytes so that the header fills all the + # remaining space before the _start symbol. + + while (gBytesOut++ < gStartOff) { + printf("%c", 0); + } +} + +function write_v7jump() { + + # Write the machine code for "b _start"... + # 0xea is armv7 "branch always" and the low 24 bits is the signed + # offset from the current PC, in words. We know the gStart offset + # is in the first 2mb, so it'll fit in 24 bits. + + write_le32(hexstr_to_num("ea000000") + (gStartOff / 4) - 2) +} + +function write_v8jump() { + + # Write the machine code for "b _start"... + # 0x14 is armv8 "branch always" and the low 26 bits is the signed + # offset from the current PC, in words. We know the gStart offset + # is in the first 2mb, so it'll fit in 26 bits. + + write_le32(hexstr_to_num("14000000") + (gStartOff / 4)) +} + +function write_v8booti() { + + # We are writing this struct... + # + # struct Image_header { + # uint32_t code0; /* Executable code */ + # uint32_t code1; /* Executable code */ + # uint64_t text_offset; /* Image load offset, LE */ + # uint64_t image_size; /* Effective Image size, LE */ + # uint64_t flags; /* Kernel flags, LE */ + # uint64_t res1[3]; /* reserved */ + # uint32_t magic; /* Magic number */ + # uint32_t res2; + # }; + # + # We write 'b _start' into code0. The image size is everything from + # the start of the loaded image to the offset given by the _end symbol. + + write_v8jump() # code0 + write_le32(0) # code1 + write_le64(0) # text_offset + write_le64(gEndOff) # image_size + write_le64(0) # flags + write_le64(0) # res1[0] + write_le64(0) # res1[1] + write_le64(0) # res1[2] + write_le32(hexstr_to_num("644d5241")) # magic (LE "ARMd" (d is 0x64)) + write_le32(0) # res2 +} + +/kernbase/ { + # If the symbol name is exactly "kernbase" save its address. + if ($8 == "kernbase") { + gKernbase = hexstr_to_num($2) + } +} + +/_start/ { + # If the symbol name is exactly "_start" save its address. + if ($8 == "_start") { + gStart = hexstr_to_num($2) + } +} + +/_end/ { + # If the symbol name is exactly "_end" remember its value. + if ($8 == "_end") { + gEnd = hexstr_to_num($2) + } +} + +END { + # Note that this function runs even if BEGIN calls exit(1)! + if (gHdrType == "error_reported") { + exit 1 + } + + # Make sure we got all three required symbols. + if (gKernbase == 0 || gStart == 0 || gEnd == 0) { + print "arm_kernel_boothdr.awk: " \ + "missing kernbase/_start/_end symbol(s)" >"/dev/stderr" + exit 1 + } + + gStartOff = addr_to_offset(gStart) + gEndOff = addr_to_offset(gEnd) + + if (gHdrType == "v7jump") { + write_v7jump() + } else if (gHdrType == "v8jump") { + write_v8jump() + } else if (gHdrType == "v8booti") { + write_v8booti() + } + write_padding() +} From owner-dev-commits-src-all@freebsd.org Wed Dec 30 12:45:56 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 045884C23F1; Wed, 30 Dec 2020 12:45:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5WH74Bjkz3Ltb; Wed, 30 Dec 2020 12:45:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 830731E5D2; Wed, 30 Dec 2020 12:45:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUCjtOd096571; Wed, 30 Dec 2020 12:45:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUCjtjs096570; Wed, 30 Dec 2020 12:45:55 GMT (envelope-from git) Date: Wed, 30 Dec 2020 12:45:55 GMT Message-Id: <202012301245.0BUCjtjs096570@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Stefan Eßer Subject: git: e163cae76ec7 - main - Make calendarhome buffer static MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e163cae76ec73bb5e20185c066518ec646d0f34f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 12:45:56 -0000 The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=e163cae76ec73bb5e20185c066518ec646d0f34f commit e163cae76ec73bb5e20185c066518ec646d0f34f Author: Stefan Eßer AuthorDate: 2020-12-30 12:42:48 +0000 Commit: Stefan Eßer CommitDate: 2020-12-30 12:44:33 +0000 Make calendarhome buffer static the value may be used in error messages after leaving this function. --- usr.bin/calendar/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/calendar/io.c b/usr.bin/calendar/io.c index adea085cf3da..24966399c179 100644 --- a/usr.bin/calendar/io.c +++ b/usr.bin/calendar/io.c @@ -122,7 +122,7 @@ cal_fopen(const char *file) unsigned int i; struct stat sb; static bool warned = false; - char calendarhome[MAXPATHLEN]; + static char calendarhome[MAXPATHLEN]; if (home == NULL || *home == '\0') { warnx("Cannot get home directory"); From owner-dev-commits-src-all@freebsd.org Wed Dec 30 12:57:34 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A57364C2D15; Wed, 30 Dec 2020 12:57:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5WXZ3vptz3MrT; Wed, 30 Dec 2020 12:57:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 793F21E888; Wed, 30 Dec 2020 12:57:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUCvYdx009106; Wed, 30 Dec 2020 12:57:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUCvYkE009105; Wed, 30 Dec 2020 12:57:34 GMT (envelope-from git) Date: Wed, 30 Dec 2020 12:57:34 GMT Message-Id: <202012301257.0BUCvYkE009105@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michal Meloun Subject: git: 28482babd08a - main - arm64: Use new arm_kernel_boothdr script for generating booti images. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28482babd08afdee79a6d42bd4f54d57f176dc8a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 12:57:34 -0000 The branch main has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=28482babd08afdee79a6d42bd4f54d57f176dc8a commit 28482babd08afdee79a6d42bd4f54d57f176dc8a Author: Michal Meloun AuthorDate: 2020-12-25 18:48:33 +0000 Commit: Michal Meloun CommitDate: 2020-12-30 12:56:11 +0000 arm64: Use new arm_kernel_boothdr script for generating booti images. --- sys/arm64/arm64/locore.S | 31 ------------------------------- sys/conf/Makefile.arm64 | 36 ++++++++++++++++++++---------------- 2 files changed, 20 insertions(+), 47 deletions(-) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index 3e7ea7b44b70..c62a2a5bd626 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -43,22 +43,6 @@ .globl kernbase .set kernbase, KERNBASE - -/* U-Boot booti related constants. */ -#if defined(LINUX_BOOT_ABI) -#ifndef UBOOT_IMAGE_OFFSET -#define UBOOT_IMAGE_OFFSET 0 /* Image offset from start of */ -#endif /* 2 MiB page */ - -#ifndef UBOOT_IMAGE_SIZE /* Total size of image */ -#define UBOOT_IMAGE_SIZE _end - _start -#endif - -#ifndef UBOOT_IMAGE_FLAGS -#define UBOOT_IMAGE_FLAGS 0 /* LE kernel, unspecified */ -#endif /* page size */ -#endif /* defined(LINUX_BOOT_ABI) */ - /* * We assume: * MMU on with an identity map, or off @@ -68,21 +52,6 @@ */ ENTRY(_start) -#if defined(LINUX_BOOT_ABI) - /* U-boot image header */ - b 1f /* code 0 */ - .long 0 /* code 1 */ - .quad UBOOT_IMAGE_OFFSET /* Image offset in 2 MiB page, LE */ - .quad UBOOT_IMAGE_SIZE /* Image size, LE */ - .quad UBOOT_IMAGE_FLAGS /* Flags for kernel. LE */ - .quad 0 /* Reserved */ - .quad 0 /* Reserved */ - .quad 0 /* Reserved */ - .long 0x644d5241 /* Magic "ARM\x64", LE */ - .long 0 /* Reserved for PE COFF offset*/ -1: -#endif /* defined(LINUX_BOOT_ABI) */ - /* Drop to EL1 */ bl drop_to_el1 diff --git a/sys/conf/Makefile.arm64 b/sys/conf/Makefile.arm64 index 057f4feb3d38..1f5760021f3e 100644 --- a/sys/conf/Makefile.arm64 +++ b/sys/conf/Makefile.arm64 @@ -40,25 +40,11 @@ SYSTEM_LD= \ --strip-symbol='$$[adtx]*' \ ${.TARGET} -# Generate the .bin (no elf headers) kernel as an extra build output. -# We must relink to generate the .bin kernel, because without headers the -# location of everything changes. We also strip the ARM marker symbols. +# Generate the .bin (booti images) kernel as an extra build output. +# The targets and rules to generate these appear near the end of the file. KERNEL_EXTRA+= ${KERNEL_KO}.bin KERNEL_EXTRA_INSTALL+= ${KERNEL_KO}.bin -${KERNEL_KO}.bin: ${SYSTEM_DEP} vers.o - @echo "linking ${.TARGET}" - @${SYSTEM_LD_BASECMD} \ - --defsym='text_start=kernbase' \ - -o ${.TARGET} ${SYSTEM_OBJS} vers.o - ${SIZE} ${.TARGET} - @${OBJCOPY} \ - --wildcard \ - --strip-symbol='$$[adtx]*' \ - --output-target=binary \ - ${.TARGET} - @chmod 755 ${.TARGET} - .if !empty(DDB_ENABLED) CFLAGS += -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer .endif @@ -79,3 +65,21 @@ CLEAN+= ${KERNEL_KO}.bin %RULES .include "$S/conf/kern.post.mk" + +# Create a kernel.bin file... +# Copy the kernel to u-boot's booti image format (the elf headers are +# stripped and a custom binary head blob is prepended), saving the +# output in a temp file. We also strip arm "marker" symbols which are +# used only by elf toolchains. Read the symbols from kernel.full and pass +# them to arm_kernel_boothdr.awk, which generates a binary header blob +# that goes on the front of the stripped kernel. Cat the header blob +# and the temp file together to make the kernel.bin file. +${KERNEL_KO}.bin: ${FULLKERNEL} + @${OBJCOPY} --wildcard --strip-symbol='$$[adtx]*' \ + --output-target=binary ${.ALLSRC} ${.TARGET}.temp + @{ readelf -s ${.ALLSRC} | \ + ${AWK} -f $S/tools/arm_kernel_boothdr.awk -v hdrtype=v8booti && \ + cat ${.TARGET}.temp; \ + } > ${.TARGET} + @rm ${.TARGET}.temp + @echo "created ${.TARGET} from ${.ALLSRC}" From owner-dev-commits-src-all@freebsd.org Wed Dec 30 13:24:31 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 164A54C36C2; Wed, 30 Dec 2020 13:24:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5X7g064mz3PXT; Wed, 30 Dec 2020 13:24:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EAC0A1ECC0; Wed, 30 Dec 2020 13:24:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUDOUdk045286; Wed, 30 Dec 2020 13:24:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUDOUTO045285; Wed, 30 Dec 2020 13:24:30 GMT (envelope-from git) Date: Wed, 30 Dec 2020 13:24:30 GMT Message-Id: <202012301324.0BUDOUTO045285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Philip Paeps Subject: git: b6d54565c238 - main - share/zoneinfo: fix minor documentation nit MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b6d54565c238399b6e90b21d5bb9f08d5dc91960 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 13:24:31 -0000 The branch main has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=b6d54565c238399b6e90b21d5bb9f08d5dc91960 commit b6d54565c238399b6e90b21d5bb9f08d5dc91960 Author: Philip Paeps AuthorDate: 2020-12-30 13:23:17 +0000 Commit: Philip Paeps CommitDate: 2020-12-30 13:23:17 +0000 share/zoneinfo: fix minor documentation nit The `git tag` command wants a tag name. --- share/zoneinfo/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/zoneinfo/Makefile b/share/zoneinfo/Makefile index 3cbca07c1b94..de354f885674 100644 --- a/share/zoneinfo/Makefile +++ b/share/zoneinfo/Makefile @@ -12,7 +12,7 @@ # (check with "git status" and "git diff" if it all makes sense) # $ git add -A # $ git commit -m "Import tzdata 20XXX" -# $ git tag -a -m "Tag import of tzdata 20XXX" +# $ git tag -a -m "Tag import of tzdata 20XXX" vendor/tzdata/tzdata20XXX # $ git push --follow-tags freebsd vendor/tzdata # $ popd # From owner-dev-commits-src-all@freebsd.org Wed Dec 30 16:05:26 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 181CE4C770F; Wed, 30 Dec 2020 16:05:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5bjL0Fbnz3q9P; Wed, 30 Dec 2020 16:05:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA6A020C28; Wed, 30 Dec 2020 16:05:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUG5PD7041695; Wed, 30 Dec 2020 16:05:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUG5P5m041694; Wed, 30 Dec 2020 16:05:25 GMT (envelope-from git) Date: Wed, 30 Dec 2020 16:05:25 GMT Message-Id: <202012301605.0BUG5P5m041694@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: 07b0027f6c21 - main - Handle ports FLAVOR better. (+minor polish) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 07b0027f6c21bfb42769ad38bc763d58c988e5a5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 16:05:26 -0000 The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=07b0027f6c21bfb42769ad38bc763d58c988e5a5 commit 07b0027f6c21bfb42769ad38bc763d58c988e5a5 Author: Poul-Henning Kamp AuthorDate: 2020-12-30 16:04:32 +0000 Commit: Poul-Henning Kamp CommitDate: 2020-12-30 16:05:09 +0000 Handle ports FLAVOR better. (+minor polish) --- tools/tools/sysbuild/sysbuild.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/tools/sysbuild/sysbuild.sh b/tools/tools/sysbuild/sysbuild.sh index 950f9f4da50d..2ad19b75659f 100644 --- a/tools/tools/sysbuild/sysbuild.sh +++ b/tools/tools/sysbuild/sysbuild.sh @@ -196,11 +196,14 @@ ports_recurse() ( echo "$t" >> /tmp/_.plist.tdone for d do + if [ "x$d" == "xpatch" ] ; then + continue + fi fl="" if [ ! -d $d ] ; then fl=FLAVOR=`expr $d : '.*@\(.*\)'` bd=`expr $d : '\(.*\)@.*'` - if [ ! -d $bd ] ; then + if [ ! -d "$bd" ] ; then echo "Missing port $d ($t) (fl $fl) (bd $bd)" 1>&2 continue fi @@ -485,7 +488,7 @@ if $do_world ; then rm -rf /usr/obj (cd /freebsd && mkdir -p ${OBJ_PATH} && ln -s ${OBJ_PATH} /usr/obj) else - rm -rf /usr/obj + rm -rf /usr/obj/* mkdir -p /usr/obj fi fi @@ -496,6 +499,10 @@ for i in ${PORTS_WE_WANT} do ( cd /usr/ports + if [ ! -d $i ] ; then + fl=FLAVOR=`expr $i : '.*@\(.*\)'` + i=`expr $i : '\(.*\)@.*'` + fi if [ ! -d $i ] ; then echo "Port $i not found" 1>&2 exit 2 From owner-dev-commits-src-all@freebsd.org Wed Dec 30 16:20:21 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9FBFA4C810A; Wed, 30 Dec 2020 16:20:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5c2Y48nrz3rQx; Wed, 30 Dec 2020 16:20:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 81A2B20D67; Wed, 30 Dec 2020 16:20:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUGKLIs061855; Wed, 30 Dec 2020 16:20:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUGKLG4061854; Wed, 30 Dec 2020 16:20:21 GMT (envelope-from git) Date: Wed, 30 Dec 2020 16:20:21 GMT Message-Id: <202012301620.0BUGKLG4061854@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 5e78bbb74a1f - main - Split out the FDT arm pmu attachment MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e78bbb74a1f55c6213f99eda0ec87e81731a369 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 16:20:21 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=5e78bbb74a1f55c6213f99eda0ec87e81731a369 commit 5e78bbb74a1f55c6213f99eda0ec87e81731a369 Author: Andrew Turner AuthorDate: 2020-12-30 14:20:28 +0000 Commit: Andrew Turner CommitDate: 2020-12-30 16:11:02 +0000 Split out the FDT arm pmu attachment This will allow us to add an ACPI attachment. Submitted by: Greg V (earlier version) Sponsored by: Innovate UK --- sys/arm/arm/pmu.c | 209 +------------------------------------------ sys/arm/arm/pmu_fdt.c | 239 ++++++++++++++++++++++++++++++++++++++++++++++++++ sys/conf/files.arm | 3 +- sys/conf/files.arm64 | 1 + 4 files changed, 245 insertions(+), 207 deletions(-) diff --git a/sys/arm/arm/pmu.c b/sys/arm/arm/pmu.c index b16ffcafcfac..544962e9ab28 100644 --- a/sys/arm/arm/pmu.c +++ b/sys/arm/arm/pmu.c @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include "opt_hwpmc_hooks.h" -#include "opt_platform.h" #include #include @@ -50,31 +49,14 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef FDT -#include -#include -#include -#endif - #include #include #include -#define MAX_RLEN 8 - -struct pmu_intr { - struct resource *res; - void *ih; - int cpuid; -}; - -struct pmu_softc { - device_t dev; - struct pmu_intr irq[MAX_RLEN]; -}; +#include "pmu.h" /* CCNT */ -#if __ARM_ARCH > 6 +#if defined(__arm__) && (__ARM_ARCH > 6) int pmu_attched = 0; uint32_t ccnt_hi[MAXCPU]; #endif @@ -116,129 +98,7 @@ pmu_intr(void *arg) return (FILTER_HANDLED); } -static int -pmu_parse_affinity(struct pmu_softc *sc, struct pmu_intr *irq, phandle_t xref, - uint32_t mpidr) -{ - struct pcpu *pcpu; - int i, err; - - - if (xref != 0) { - err = OF_getencprop(OF_node_from_xref(xref), "reg", &mpidr, - sizeof(mpidr)); - if (err < 0) { - device_printf(sc->dev, "missing 'reg' property\n"); - return (ENXIO); - } - } - - for (i = 0; i < MAXCPU; i++) { - pcpu = pcpu_find(i); - if (pcpu != NULL && pcpu->pc_mpidr == mpidr) { - irq->cpuid = i; - return (0); - } - } - - device_printf(sc->dev, "Cannot find CPU with MPIDR: 0x%08X\n", mpidr); - return (ENXIO); -} - -static int -pmu_parse_intr(struct pmu_softc *sc) -{ - bool has_affinity; - phandle_t node, *cpus; - int rid, err, ncpus, i; - - - node = ofw_bus_get_node(sc->dev); - has_affinity = OF_hasprop(node, "interrupt-affinity"); - - for (i = 0; i < MAX_RLEN; i++) - sc->irq[i].cpuid = -1; - - cpus = NULL; - if (has_affinity) { - ncpus = OF_getencprop_alloc_multi(node, "interrupt-affinity", - sizeof(*cpus), (void **)&cpus); - if (ncpus < 0) { - device_printf(sc->dev, - "Cannot read interrupt affinity property\n"); - return (ENXIO); - } - } - - /* Process first interrupt */ - rid = 0; - sc->irq[0].res = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, &rid, - RF_ACTIVE | RF_SHAREABLE); - - if (sc->irq[0].res == NULL) { - device_printf(sc->dev, "Cannot get interrupt\n"); - err = ENXIO; - goto done; - } - - /* Check if PMU have one per-CPU interrupt */ - if (intr_is_per_cpu(sc->irq[0].res)) { - if (has_affinity) { - device_printf(sc->dev, - "Per CPU interupt have declared affinity\n"); - err = ENXIO; - goto done; - } - return (0); - } - - /* - * PMU with set of generic interrupts (one per core) - * Each one must be binded to exact core. - */ - err = pmu_parse_affinity(sc, sc->irq + 0, has_affinity ? cpus[0]: 0, - 0); - if (err != 0) { - device_printf(sc->dev, "Cannot parse affinity for CPUid: 0\n"); - goto done; - } - - for (i = 1; i < MAX_RLEN; i++) { - rid = i; - sc->irq[i].res = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, - &rid, RF_ACTIVE | RF_SHAREABLE); - if (sc->irq[i].res == NULL) - break; - - if (intr_is_per_cpu(sc->irq[i].res)) - { - device_printf(sc->dev, "Unexpected per CPU interupt\n"); - err = ENXIO; - goto done; - } - - if (has_affinity && i >= ncpus) { - device_printf(sc->dev, "Missing value in interrupt " - "affinity property\n"); - err = ENXIO; - goto done; - } - - err = pmu_parse_affinity(sc, sc->irq + i, - has_affinity ? cpus[i]: 0, i); - if (err != 0) { - device_printf(sc->dev, - "Cannot parse affinity for CPUid: %d.\n", i); - goto done; - } - } - err = 0; -done: - OF_prop_free(cpus); - return (err); -} - -static int +int pmu_attach(device_t dev) { struct pmu_softc *sc; @@ -250,10 +110,6 @@ pmu_attach(device_t dev) sc = device_get_softc(dev); sc->dev = dev; - err = pmu_parse_intr(sc); - if (err != 0) - return (err); - for (i = 0; i < MAX_RLEN; i++) { if (sc->irq[i].res == NULL) break; @@ -303,62 +159,3 @@ fail: return(err); } -#ifdef FDT -static struct ofw_compat_data compat_data[] = { - {"arm,armv8-pmuv3", 1}, - {"arm,cortex-a77-pmu", 1}, - {"arm,cortex-a76-pmu", 1}, - {"arm,cortex-a75-pmu", 1}, - {"arm,cortex-a73-pmu", 1}, - {"arm,cortex-a72-pmu", 1}, - {"arm,cortex-a65-pmu", 1}, - {"arm,cortex-a57-pmu", 1}, - {"arm,cortex-a55-pmu", 1}, - {"arm,cortex-a53-pmu", 1}, - {"arm,cortex-a34-pmu", 1}, - - {"arm,cortex-a17-pmu", 1}, - {"arm,cortex-a15-pmu", 1}, - {"arm,cortex-a12-pmu", 1}, - {"arm,cortex-a9-pmu", 1}, - {"arm,cortex-a8-pmu", 1}, - {"arm,cortex-a7-pmu", 1}, - {"arm,cortex-a5-pmu", 1}, - {"arm,arm11mpcore-pmu", 1}, - {"arm,arm1176-pmu", 1}, - {"arm,arm1136-pmu", 1}, - {"qcom,krait-pmu", 1}, - {NULL, 0} -}; - -static int -pmu_fdt_probe(device_t dev) -{ - - if (!ofw_bus_status_okay(dev)) - return (ENXIO); - - if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { - device_set_desc(dev, "Performance Monitoring Unit"); - return (BUS_PROBE_DEFAULT); - } - - return (ENXIO); -} - -static device_method_t pmu_fdt_methods[] = { - DEVMETHOD(device_probe, pmu_fdt_probe), - DEVMETHOD(device_attach, pmu_attach), - { 0, 0 } -}; - -static driver_t pmu_fdt_driver = { - "pmu", - pmu_fdt_methods, - sizeof(struct pmu_softc), -}; - -static devclass_t pmu_fdt_devclass; - -DRIVER_MODULE(pmu, simplebus, pmu_fdt_driver, pmu_fdt_devclass, 0, 0); -#endif diff --git a/sys/arm/arm/pmu_fdt.c b/sys/arm/arm/pmu_fdt.c new file mode 100644 index 000000000000..2e03fc98bfe0 --- /dev/null +++ b/sys/arm/arm/pmu_fdt.c @@ -0,0 +1,239 @@ +/*- + * Copyright (c) 2015 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * 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 "pmu.h" + +static struct ofw_compat_data compat_data[] = { + {"arm,armv8-pmuv3", 1}, + {"arm,cortex-a77-pmu", 1}, + {"arm,cortex-a76-pmu", 1}, + {"arm,cortex-a75-pmu", 1}, + {"arm,cortex-a73-pmu", 1}, + {"arm,cortex-a72-pmu", 1}, + {"arm,cortex-a65-pmu", 1}, + {"arm,cortex-a57-pmu", 1}, + {"arm,cortex-a55-pmu", 1}, + {"arm,cortex-a53-pmu", 1}, + {"arm,cortex-a34-pmu", 1}, + + {"arm,cortex-a17-pmu", 1}, + {"arm,cortex-a15-pmu", 1}, + {"arm,cortex-a12-pmu", 1}, + {"arm,cortex-a9-pmu", 1}, + {"arm,cortex-a8-pmu", 1}, + {"arm,cortex-a7-pmu", 1}, + {"arm,cortex-a5-pmu", 1}, + {"arm,arm11mpcore-pmu", 1}, + {"arm,arm1176-pmu", 1}, + {"arm,arm1136-pmu", 1}, + {"qcom,krait-pmu", 1}, + {NULL, 0} +}; + +static int +pmu_fdt_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { + device_set_desc(dev, "Performance Monitoring Unit"); + return (BUS_PROBE_DEFAULT); + } + + return (ENXIO); +} + +static int +pmu_parse_affinity(device_t dev, struct pmu_softc *sc, struct pmu_intr *irq, + phandle_t xref, uint32_t mpidr) +{ + struct pcpu *pcpu; + int i, err; + + + if (xref != 0) { + err = OF_getencprop(OF_node_from_xref(xref), "reg", &mpidr, + sizeof(mpidr)); + if (err < 0) { + device_printf(dev, "missing 'reg' property\n"); + return (ENXIO); + } + } + + for (i = 0; i < MAXCPU; i++) { + pcpu = pcpu_find(i); + if (pcpu != NULL && pcpu->pc_mpidr == mpidr) { + irq->cpuid = i; + return (0); + } + } + + device_printf(dev, "Cannot find CPU with MPIDR: 0x%08X\n", mpidr); + return (ENXIO); +} + +static int +pmu_parse_intr(device_t dev, struct pmu_softc *sc) +{ + bool has_affinity; + phandle_t node, *cpus; + int rid, err, ncpus, i; + + + node = ofw_bus_get_node(dev); + has_affinity = OF_hasprop(node, "interrupt-affinity"); + + for (i = 0; i < MAX_RLEN; i++) + sc->irq[i].cpuid = -1; + + cpus = NULL; + if (has_affinity) { + ncpus = OF_getencprop_alloc_multi(node, "interrupt-affinity", + sizeof(*cpus), (void **)&cpus); + if (ncpus < 0) { + device_printf(dev, + "Cannot read interrupt affinity property\n"); + return (ENXIO); + } + } + + /* Process first interrupt */ + rid = 0; + sc->irq[0].res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_ACTIVE | RF_SHAREABLE); + + if (sc->irq[0].res == NULL) { + device_printf(dev, "Cannot get interrupt\n"); + err = ENXIO; + goto done; + } + + /* Check if PMU have one per-CPU interrupt */ + if (intr_is_per_cpu(sc->irq[0].res)) { + if (has_affinity) { + device_printf(dev, + "Per CPU interupt have declared affinity\n"); + err = ENXIO; + goto done; + } + return (0); + } + + /* + * PMU with set of generic interrupts (one per core) + * Each one must be binded to exact core. + */ + err = pmu_parse_affinity(dev, sc, sc->irq + 0, + has_affinity ? cpus[0] : 0, 0); + if (err != 0) { + device_printf(dev, "Cannot parse affinity for CPUid: 0\n"); + goto done; + } + + for (i = 1; i < MAX_RLEN; i++) { + rid = i; + sc->irq[i].res = bus_alloc_resource_any(dev, SYS_RES_IRQ, + &rid, RF_ACTIVE | RF_SHAREABLE); + if (sc->irq[i].res == NULL) + break; + + if (intr_is_per_cpu(sc->irq[i].res)) + { + device_printf(dev, "Unexpected per CPU interupt\n"); + err = ENXIO; + goto done; + } + + if (has_affinity && i >= ncpus) { + device_printf(dev, "Missing value in interrupt " + "affinity property\n"); + err = ENXIO; + goto done; + } + + err = pmu_parse_affinity(dev, sc, sc->irq + i, + has_affinity ? cpus[i] : 0, i); + if (err != 0) { + device_printf(dev, + "Cannot parse affinity for CPUid: %d.\n", i); + goto done; + } + } + err = 0; +done: + OF_prop_free(cpus); + return (err); +} + +static int +pmu_fdt_attach(device_t dev) +{ + struct pmu_softc *sc; + int err; + + sc = device_get_softc(dev); + err = pmu_parse_intr(dev, sc); + if (err != 0) + return (err); + + return (pmu_attach(dev)); +} + +static device_method_t pmu_fdt_methods[] = { + DEVMETHOD(device_probe, pmu_fdt_probe), + DEVMETHOD(device_attach, pmu_fdt_attach), + { 0, 0 } +}; + +static driver_t pmu_fdt_driver = { + "pmu", + pmu_fdt_methods, + sizeof(struct pmu_softc), +}; + +static devclass_t pmu_fdt_devclass; + +DRIVER_MODULE(pmu, simplebus, pmu_fdt_driver, pmu_fdt_devclass, 0, 0); diff --git a/sys/conf/files.arm b/sys/conf/files.arm index 13a47e5b6f5a..eb3a23b5fc21 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -56,7 +56,8 @@ arm/arm/platform.c optional platform arm/arm/platform_if.m optional platform arm/arm/platform_pl310_if.m optional platform pl310 arm/arm/pmap-v6.c standard -arm/arm/pmu.c optional pmu | fdt hwpmc +arm/arm/pmu.c optional pmu | hwpmc +arm/arm/pmu_fdt.c optional fdt pmu | fdt hwpmc arm/arm/ptrace_machdep.c standard arm/arm/sc_machdep.c optional sc arm/arm/setcpsr.S standard diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 439b37c12cd0..f421304b1903 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -85,6 +85,7 @@ arm/arm/gic.c standard arm/arm/gic_acpi.c optional acpi arm/arm/gic_fdt.c optional fdt arm/arm/pmu.c standard +arm/arm/pmu_fdt.c optional fdt arm/broadcom/bcm2835/bcm2835_audio.c optional sound vchiq fdt \ compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" arm/broadcom/bcm2835/bcm2835_bsc.c optional bcm2835_bsc fdt From owner-dev-commits-src-all@freebsd.org Wed Dec 30 17:33:31 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 206D34C9B1B; Wed, 30 Dec 2020 17:33:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5dfz0QZbz3wQB; Wed, 30 Dec 2020 17:33:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 015C721F10; Wed, 30 Dec 2020 17:33:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUHXU6U053610; Wed, 30 Dec 2020 17:33:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUHXUka053609; Wed, 30 Dec 2020 17:33:30 GMT (envelope-from git) Date: Wed, 30 Dec 2020 17:33:30 GMT Message-Id: <202012301733.0BUHXUka053609@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: b67e44075539 - main - Add comment explaining Git commit message hook MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b67e440755391b4a75363173ca16e170ccbf0394 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 17:33:31 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b67e440755391b4a75363173ca16e170ccbf0394 commit b67e440755391b4a75363173ca16e170ccbf0394 Author: Ed Maste AuthorDate: 2020-12-30 17:31:29 +0000 Commit: Ed Maste CommitDate: 2020-12-30 17:33:19 +0000 Add comment explaining Git commit message hook Suggested by: jhb --- tools/tools/git/hooks/prepare-commit-msg | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/tools/git/hooks/prepare-commit-msg b/tools/tools/git/hooks/prepare-commit-msg index 9dcb85cd1a3f..e453b73cc45d 100755 --- a/tools/tools/git/hooks/prepare-commit-msg +++ b/tools/tools/git/hooks/prepare-commit-msg @@ -1,5 +1,13 @@ #!/bin/sh +# prepare-commit-msg: Prepare a commit message upon `git commit` for the +# user to edit. A script (rather than a static template) is used, so +# that we can insert our template text other than at the top of the +# message. +# +# Install by copying into the git hooks directory - for example, +# cp tools/tools/git/hooks/prepare-commit-msg .git/hooks/ + case "$2" in commit|message) # It appears git invokes this script for interactive rebase but does @@ -21,7 +29,9 @@ outfile=$(mktemp /tmp/freebsd-git-commit.XXXXXXXX) # # 1. The beginning of the git-provided template (up to the first comment-only # line) which explains commented lines and such. +# # 2. Our template. +# # 3. The remainder of the git-provided template (from the first comment-only # line to the end of the file) which lists files staged for commit, files # not staged, and untracked files. From owner-dev-commits-src-all@freebsd.org Wed Dec 30 17:43:53 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9A4C94C9B50; Wed, 30 Dec 2020 17:43:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 4D5dtx3dRyz4R1d; Wed, 30 Dec 2020 17:43:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:e936:7c25:afe9:9450]) (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 D31176328; Wed, 30 Dec 2020 17:43:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Ryan Libby , Kyle Evans Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <0af13399-f119-06aa-c249-2fe8069dd631@FreeBSD.org> Date: Wed, 30 Dec 2020 09:43:50 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 17:43:53 -0000 On 12/29/20 7:10 PM, Ryan Libby wrote: > I checked amd64 and it failed due to pkru. I don't think we care to fix > that either, but we technically could of course. For amd64 the external > toolchain with gcc 6.4 is broken at the moment but will be fixed after a > few more MFCs. Just to be explicit, we do not care about building amd64 with 4.2.1 at this point on 12.x. Getting it building with less ancient GCC is a noble goal, but architectures that build fine with clang in stable/12 do not need to build with gcc 4.2.1. -- John Baldwin From owner-dev-commits-src-all@freebsd.org Wed Dec 30 17:53:42 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A9F44C9DC3; Wed, 30 Dec 2020 17:53:42 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [18.222.6.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5f6G0BlCz4RDS; Wed, 30 Dec 2020 17:53:41 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (unknown [18.188.142.31]) by mail.soaustin.net (Postfix) with ESMTPSA id 06D25170FD; Wed, 30 Dec 2020 17:53:41 +0000 (UTC) Date: Wed, 30 Dec 2020 17:53:39 +0000 From: Mark Linimon To: John Baldwin Cc: Ryan Libby , Kyle Evans , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 Message-ID: <20201230175339.GA29398@lonesome.com> References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> <0af13399-f119-06aa-c249-2fe8069dd631@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0af13399-f119-06aa-c249-2fe8069dd631@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Rspamd-Queue-Id: 4D5f6G0BlCz4RDS X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 17:53:42 -0000 On Wed, Dec 30, 2020 at 09:43:50AM -0800, John Baldwin wrote: > Just to be explicit, we do not care about building amd64 with 4.2.1 at this > point on 12.x. AFAIK the only use case for gcc4.2.1 is powerpc* < 13. (I check new ports on powerpc64 vs. gcc4.2.1. I will be glad to see the end of it.) mcl From owner-dev-commits-src-all@freebsd.org Wed Dec 30 18:01:22 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 630FF4CA618; Wed, 30 Dec 2020 18:01:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5fH62QCmz4Rvd; Wed, 30 Dec 2020 18:01:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 45CBF2207B; Wed, 30 Dec 2020 18:01:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUI1MgF086137; Wed, 30 Dec 2020 18:01:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUI1MRr086136; Wed, 30 Dec 2020 18:01:22 GMT (envelope-from git) Date: Wed, 30 Dec 2020 18:01:22 GMT Message-Id: <202012301801.0BUI1MRr086136@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 672784750001 - main - Don't try to adjust a TLS TOE socket that has been closed. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67278475000116086fea848f22a8d0d1be885e26 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 18:01:22 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=67278475000116086fea848f22a8d0d1be885e26 commit 67278475000116086fea848f22a8d0d1be885e26 Author: John Baldwin AuthorDate: 2020-12-09 22:36:01 +0000 Commit: John Baldwin CommitDate: 2020-12-30 17:56:24 +0000 Don't try to adjust a TLS TOE socket that has been closed. The handshake timer can race with another thread sending a FIN or RST to close a TOE TLS socket. Just bail from the timer without rescheduling if the connection is closed when the timer fires. Reported by: Sony Arpita Das @ Chelsio QA Reviewed by: np Differential Revision: https://reviews.freebsd.org/D27583 --- sys/dev/cxgbe/tom/t4_tls.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/cxgbe/tom/t4_tls.c b/sys/dev/cxgbe/tom/t4_tls.c index 5cd043a68533..4016a4f1995a 100644 --- a/sys/dev/cxgbe/tom/t4_tls.c +++ b/sys/dev/cxgbe/tom/t4_tls.c @@ -739,6 +739,10 @@ tls_send_handshake_ack(void *arg) struct tls_ofld_info *tls_ofld = &toep->tls; struct adapter *sc = td_adapter(toep->td); + /* Bail without rescheduling if the connection has closed. */ + if ((toep->flags & (TPF_FIN_SENT | TPF_ABORT_SHUTDOWN)) != 0) + return; + /* * If this connection has timed out without receiving more * data, downgrade to plain TOE mode and don't re-arm the From owner-dev-commits-src-all@freebsd.org Wed Dec 30 18:07:04 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 07E034CA4DE; Wed, 30 Dec 2020 18:07:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5fPg6nYwz4Sp2; Wed, 30 Dec 2020 18:07:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D761522685; Wed, 30 Dec 2020 18:07:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUI73Ra090329; Wed, 30 Dec 2020 18:07:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUI73B0090328; Wed, 30 Dec 2020 18:07:03 GMT (envelope-from git) Date: Wed, 30 Dec 2020 18:07:03 GMT Message-Id: <202012301807.0BUI73B0090328@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: bdbc2a6fc2d8 - main - Fix typo in an_initator_name. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bdbc2a6fc2d8c524d2059e3124f81be08f025a65 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 18:07:04 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=bdbc2a6fc2d8c524d2059e3124f81be08f025a65 commit bdbc2a6fc2d8c524d2059e3124f81be08f025a65 Author: Alexander Motin AuthorDate: 2020-12-29 18:41:56 +0000 Commit: Alexander Motin CommitDate: 2020-12-30 18:05:41 +0000 Fix typo in an_initator_name. MFC after: 1 week --- usr.sbin/ctld/ctld.c | 8 ++++---- usr.sbin/ctld/ctld.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.sbin/ctld/ctld.c b/usr.sbin/ctld/ctld.c index 6c294f7c0cd9..7af1d88da44a 100644 --- a/usr.sbin/ctld/ctld.c +++ b/usr.sbin/ctld/ctld.c @@ -304,7 +304,7 @@ auth_name_new(struct auth_group *ag, const char *name) if (an == NULL) log_err(1, "calloc"); an->an_auth_group = ag; - an->an_initator_name = checked_strdup(name); + an->an_initiator_name = checked_strdup(name); TAILQ_INSERT_TAIL(&ag->ag_names, an, an_next); return (an); } @@ -314,7 +314,7 @@ auth_name_delete(struct auth_name *an) { TAILQ_REMOVE(&an->an_auth_group->ag_names, an, an_next); - free(an->an_initator_name); + free(an->an_initiator_name); free(an); } @@ -332,7 +332,7 @@ auth_name_find(const struct auth_group *ag, const char *name) const struct auth_name *auth_name; TAILQ_FOREACH(auth_name, &ag->ag_names, an_next) { - if (strcmp(auth_name->an_initator_name, name) == 0) + if (strcmp(auth_name->an_initiator_name, name) == 0) return (auth_name); } @@ -1680,7 +1680,7 @@ conf_print(struct conf *conf) auth->a_mutual_user, auth->a_mutual_secret); TAILQ_FOREACH(auth_name, &ag->ag_names, an_next) fprintf(stderr, "\t initiator-name %s\n", - auth_name->an_initator_name); + auth_name->an_initiator_name); TAILQ_FOREACH(auth_portal, &ag->ag_portals, ap_next) fprintf(stderr, "\t initiator-portal %s\n", auth_portal->ap_initiator_portal); diff --git a/usr.sbin/ctld/ctld.h b/usr.sbin/ctld/ctld.h index 2b485496d013..4ff8f0e638ac 100644 --- a/usr.sbin/ctld/ctld.h +++ b/usr.sbin/ctld/ctld.h @@ -63,7 +63,7 @@ struct auth { struct auth_name { TAILQ_ENTRY(auth_name) an_next; struct auth_group *an_auth_group; - char *an_initator_name; + char *an_initiator_name; }; struct auth_portal { From owner-dev-commits-src-all@freebsd.org Wed Dec 30 18:13:41 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C4F304CABF2; Wed, 30 Dec 2020 18:13:41 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) (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 4D5fYK4twWz4T6S; Wed, 30 Dec 2020 18:13:41 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qv1-f47.google.com with SMTP id l14so8043166qvh.2; Wed, 30 Dec 2020 10:13:41 -0800 (PST) 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=uuzQj6MmchJ23JjyiOOxBhQM0EATZLEZGJypAuZJvxs=; b=uHV+fFhnTOjUv2e8j89XVOV1kngSiX/a9ePKZ7n8O4J32wSNrb7hKMOXUd61TBcEUP nfwrDk893GykTC2FVpf1mgGnSVZ6G2l0Ba0TjcY9MwY42yItiTOwShUC9LuZGFHZDuDr 8+hERhZrMymOJrOOTwzL67EyJQ9sG2CcxOHGwryRkStpF/fNH9/dhhxzOIu+gyHWqvao HG/XetYRyvk7DiUTylPaSQCWYbE4sDoP9okXC5Sp3Q38g6+zspyY/k0p9L0cqGjtmx2g IkuQZueh5bDOeTBE56hQA/EBGy6uY6IPueqkKe7jwXWI9asSwdzCL9N6E2p6v3CVUY+t a46g== X-Gm-Message-State: AOAM531J+VZZk58/XVmKY8dDvemeiKzGKl8KDS8/qxNHx2PWJE78MhEn ckyVrGIWrjK1YnQ31MWFrQAngU+wzYzyBg== X-Google-Smtp-Source: ABdhPJzE038MNmcA0eVs1g3WpJsXyqmKbSiveha1WXuUGetKxKxyiSvYUg2VKrrPK05DWGrZYBMmQQ== X-Received: by 2002:a0c:8304:: with SMTP id j4mr24045763qva.18.1609352020156; Wed, 30 Dec 2020 10:13:40 -0800 (PST) Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com. [209.85.219.53]) by smtp.gmail.com with ESMTPSA id n4sm28784769qtl.22.2020.12.30.10.13.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Dec 2020 10:13:40 -0800 (PST) Received: by mail-qv1-f53.google.com with SMTP id a4so8004152qvd.12; Wed, 30 Dec 2020 10:13:39 -0800 (PST) X-Received: by 2002:ad4:5762:: with SMTP id r2mr58238716qvx.45.1609352019670; Wed, 30 Dec 2020 10:13:39 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> In-Reply-To: From: Ryan Libby Date: Wed, 30 Dec 2020 10:13:28 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Konstantin Belousov Cc: Kyle Evans , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4D5fYK4twWz4T6S X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 18:13:41 -0000 On Wed, Dec 30, 2020 at 3:33 AM Konstantin Belousov wrote: > > On Tue, Dec 29, 2020 at 07:10:02PM -0800, Ryan Libby wrote: > > I checked amd64 and it failed due to pkru. I don't think we care to fix > > that either, but we technically could of course. For amd64 the external > > toolchain with gcc 6.4 is broken at the moment but will be fixed after a > > few more MFCs. > > Could you be more specific, please? > > What is broken with PKRU, the gcc 6.4 build? For kernel, or libc? > Does it work with not-so-ancient gcc? Sorry, I wasn't clear. gcc 6.4 from the external toolchain is fine with pkru. Separately, there are just a few remaining MFCs to make gcc 6.4 work out of the box with no WERROR suppression. gcc 4.2.1 for amd64 is broken, most immediately because of pkru in libc (because of new instructions and because of a use of the ifunc attribute). This is what I meant to say was technically fixable, but that we didn't care. (For those reading along who haven't checked, pkru(3) is x86-only, at least so far.) Ryan From owner-dev-commits-src-all@freebsd.org Wed Dec 30 18:15:29 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2B82C4CACB7; Wed, 30 Dec 2020 18:15:29 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.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 4D5fbP0R2zz4TP9; Wed, 30 Dec 2020 18:15:28 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qk1-f178.google.com with SMTP id z11so14577597qkj.7; Wed, 30 Dec 2020 10:15:28 -0800 (PST) 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=BspoO4zPLuABe+kv0nUa2BiLrcl7KliB87pxQ502A2k=; b=FirrOnikVsJKpHN8s0rtyF4w5zDhlh+onE/G1x+VK7kpF2aXB0aAA5hawIEtG60uzf kB26c514AbzeB31tgTIvxPwVvRmMCTLzlv/8WcRX71FLtEL41c7SWrnGyVfJZF2MHWg8 Di8P7R/sHqoK4cOILUARfZDdScDD8M+vZb1Y7DxNiDB1Xzqk8sVKAlntG85l2cIBEn2C h1Q8CKSO02cPx8l6kxNbvM24UuU5/12kq3kDtKrYPr4YlwKV5Fjw2MUXCkl1vSWoj1LB 7RBcp6HC7Bb2qEiAxQ/HjcMcdqq7jnOhYDa65lJjK2qfPe8zCg3WuQb/7sY4qe59jYhS ZBNQ== X-Gm-Message-State: AOAM533WJNaIpagMHwIkTY95yl7SOWFY/FIzAKvKKkY+AAlp8qgGGGrz NYsdiiqZxg3AvNPMmgUOQ+qhD/6mcJ3vJA== X-Google-Smtp-Source: ABdhPJwNOv+JnzzAg32HYxe+8/jyrLMoyrdhOXgJWmNaBBc+sMLrg2aoqEFanXhMSjNfyJPnJKrKmg== X-Received: by 2002:a37:9f4c:: with SMTP id i73mr54345760qke.82.1609352127395; Wed, 30 Dec 2020 10:15:27 -0800 (PST) Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com. [209.85.160.174]) by smtp.gmail.com with ESMTPSA id y67sm18499280qka.68.2020.12.30.10.15.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Dec 2020 10:15:27 -0800 (PST) Received: by mail-qt1-f174.google.com with SMTP id y15so11446339qtv.5; Wed, 30 Dec 2020 10:15:27 -0800 (PST) X-Received: by 2002:aed:2088:: with SMTP id 8mr39921384qtb.174.1609352126968; Wed, 30 Dec 2020 10:15:26 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> <0af13399-f119-06aa-c249-2fe8069dd631@FreeBSD.org> In-Reply-To: <0af13399-f119-06aa-c249-2fe8069dd631@FreeBSD.org> From: Ryan Libby Date: Wed, 30 Dec 2020 10:15:16 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: John Baldwin Cc: Kyle Evans , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4D5fbP0R2zz4TP9 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 18:15:29 -0000 On Wed, Dec 30, 2020 at 9:43 AM John Baldwin wrote: > > On 12/29/20 7:10 PM, Ryan Libby wrote: > > I checked amd64 and it failed due to pkru. I don't think we care to fix > > that either, but we technically could of course. For amd64 the external > > toolchain with gcc 6.4 is broken at the moment but will be fixed after a > > few more MFCs. > > Just to be explicit, we do not care about building amd64 with 4.2.1 at this > point on 12.x. Getting it building with less ancient GCC is a noble goal, > but architectures that build fine with clang in stable/12 do not need to > build with gcc 4.2.1. > > -- > John Baldwin Yes, I'm on board with this. From owner-dev-commits-src-all@freebsd.org Wed Dec 30 18:43:48 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 199054CBF15; Wed, 30 Dec 2020 18:43:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5gD404XBz4WXq; Wed, 30 Dec 2020 18:43:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E979422BAC; Wed, 30 Dec 2020 18:43:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUIhl8g039308; Wed, 30 Dec 2020 18:43:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUIhl7I039307; Wed, 30 Dec 2020 18:43:47 GMT (envelope-from git) Date: Wed, 30 Dec 2020 18:43:47 GMT Message-Id: <202012301843.0BUIhl7I039307@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 697684325da8 - main - [vale] Fix valectl to compile on a 32-bit platform MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 697684325da855f0dcb1ad02b09779575b05a906 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 18:43:48 -0000 The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=697684325da855f0dcb1ad02b09779575b05a906 commit 697684325da855f0dcb1ad02b09779575b05a906 Author: Adrian Chadd AuthorDate: 2020-12-29 18:20:43 +0000 Commit: Adrian Chadd CommitDate: 2020-12-30 18:40:43 +0000 [vale] Fix valectl to compile on a 32-bit platform This shows up when compiling valectl on a 32 bit platform like i386 and mips32. gcc-6.4 complains about this (-Wint-to-pointer-cast). Reviewed by: vmaffione Differential Revision: https://reviews.freebsd.org/D27814 --- usr.sbin/valectl/valectl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/valectl/valectl.c b/usr.sbin/valectl/valectl.c index 7e219e2df7a3..bf1bc6229fb8 100644 --- a/usr.sbin/valectl/valectl.c +++ b/usr.sbin/valectl/valectl.c @@ -181,7 +181,7 @@ list_all(int fd, struct nmreq_header *hdr) { int error; struct nmreq_vale_list *vale_list = - (struct nmreq_vale_list *)hdr->nr_body; + (struct nmreq_vale_list *)(uintptr_t)hdr->nr_body; for (;;) { hdr->nr_name[0] = '\0'; From owner-dev-commits-src-all@freebsd.org Wed Dec 30 18:46:05 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B59424CBFBF; Wed, 30 Dec 2020 18:46:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5gGj4kpwz4WSD; Wed, 30 Dec 2020 18:46:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B0EE22BAE; Wed, 30 Dec 2020 18:46:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUIk5eC039806; Wed, 30 Dec 2020 18:46:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUIk54R039805; Wed, 30 Dec 2020 18:46:05 GMT (envelope-from git) Date: Wed, 30 Dec 2020 18:46:05 GMT Message-Id: <202012301846.0BUIk54R039805@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: ccdd2b2b3cc2 - main - Add "-n" flag to sockstat. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ccdd2b2b3cc2f86cd08a355be2fb58e435ec8ff8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 18:46:05 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=ccdd2b2b3cc2f86cd08a355be2fb58e435ec8ff8 commit ccdd2b2b3cc2f86cd08a355be2fb58e435ec8ff8 Author: Alexander Motin AuthorDate: 2020-12-30 18:40:37 +0000 Commit: Alexander Motin CommitDate: 2020-12-30 18:45:53 +0000 Add "-n" flag to sockstat. sockstat can "hang" on getpwuid() calls in situations when FreeBSD is joined to a directory service (AD/LDAP etc) and the directory service fail to answer in a timely manner when trying to resolve numeric UIDs to user names. Submitted by: Caleb St. John MFC after: 1 week --- usr.bin/sockstat/sockstat.1 | 6 ++++-- usr.bin/sockstat/sockstat.c | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/usr.bin/sockstat/sockstat.1 b/usr.bin/sockstat/sockstat.1 index 571b3e7041bb..8521c50348c9 100644 --- a/usr.bin/sockstat/sockstat.1 +++ b/usr.bin/sockstat/sockstat.1 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 13, 2020 +.Dd December 30, 2020 .Dt SOCKSTAT 1 .Os .Sh NAME @@ -35,7 +35,7 @@ .Nd list open sockets .Sh SYNOPSIS .Nm -.Op Fl 46CcLlSsUuvw +.Op Fl 46CcLlnSsUuvw .Op Fl j Ar jid .Op Fl p Ar ports .Op Fl P Ar protocols @@ -71,6 +71,8 @@ or do not contain the IPv6 loopback address .Li ::1 . .It Fl l Show listening sockets. +.It Fl n +Do not resolve numeric UIDs to user names. .It Fl p Ar ports Only show Internet sockets if the local or foreign port number is on the specified list. diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c index 5ddbf0775507..26f31d96b8e0 100644 --- a/usr.bin/sockstat/sockstat.c +++ b/usr.bin/sockstat/sockstat.c @@ -79,6 +79,7 @@ static int opt_c; /* Show connected sockets */ static int opt_j; /* Show specified jail */ static int opt_L; /* Don't show IPv4 or IPv6 loopback sockets */ static int opt_l; /* Show listening sockets */ +static int opt_n; /* Don't resolve UIDs to user names */ static int opt_q; /* Don't show header */ static int opt_S; /* Show protocol stack if applicable */ static int opt_s; /* Show protocol state if applicable */ @@ -1205,7 +1206,7 @@ display(void) continue; s->shown = 1; pos = 0; - if ((pwd = getpwuid(xf->xf_uid)) == NULL) + if (opt_n || (pwd = getpwuid(xf->xf_uid)) == NULL) pos += xprintf("%lu ", (u_long)xf->xf_uid); else pos += xprintf("%s ", pwd->pw_name); @@ -1304,7 +1305,7 @@ main(int argc, char *argv[]) int o, i; opt_j = -1; - while ((o = getopt(argc, argv, "46Ccj:Llp:P:qSsUuvw")) != -1) + while ((o = getopt(argc, argv, "46Ccj:Llnp:P:qSsUuvw")) != -1) switch (o) { case '4': opt_4 = 1; @@ -1329,6 +1330,9 @@ main(int argc, char *argv[]) case 'l': opt_l = 1; break; + case 'n': + opt_n = 1; + break; case 'p': parse_ports(optarg); break; From owner-dev-commits-src-all@freebsd.org Wed Dec 30 18:55:56 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 81B324CC238 for ; Wed, 30 Dec 2020 18:55:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) (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 4D5gV430Dyz4X5L for ; Wed, 30 Dec 2020 18:55:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82f.google.com with SMTP id h19so11496332qtq.13 for ; Wed, 30 Dec 2020 10:55:56 -0800 (PST) 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=845w5xdiUkyXv0S2YXegVoHF0NRBZRS0uTAk5gl5E8k=; b=DdKvgQd7DEtHCbY8zAjS7+ShlLrp50ZAV8/2aZClu14otw2LQTJyBQPTNsR9Tqv9vH 0myXoAOf39v03gmyETR1VLA+k8f654rJu4SSBLgysrSzjINOoAdl7ulTWsoo7oTNOrMY sQ5VjCnvSGRSt86JxtkD2qJ+YHL1oo/ikXIUvP9RALhGZuUM0GhkgtKsl94ZLhyQ9bPI oMhrfOrMkoxWGWNxqkzkylLI0RJk4EG6GhG2C+8oE3oXXnE86awuOBDuP2VVYyIVp/Py pcvtSXC0eOw5ewGXqR/2jcNAVCOqt/bA+1pdaCA7m5XACGoG6Cus1WseDZny2PkSPhbD 1iPg== 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=845w5xdiUkyXv0S2YXegVoHF0NRBZRS0uTAk5gl5E8k=; b=c8BnzQv5qftYugIz0PdrltLvhd8Mk2jcfhZ+OXwhzcM8C6TIQRk6zLm/Aa0KOxamu5 RfkGxegdpuxASaxauntVOuvEMJsHtQUdh0e5xr4bRnxwJofHAv2iM7N4aMCex1k1tjZI dzFqLSBnOduq5EgKaf/52DqiQ1PQsaf8hq3Uvc9gevQEe6c0d7P8AVTcP1LYnKU1DEo0 BSFuV0jORqtFQLjYnYxwHCe8Tm87qpg59fWmmKN8GG8ruzoE78Sf2hHnQmycv8ffrGOO BmDW3OVtMk4ekPsD6I2rDywogzlxAR1j5LvEwWVZGUYkoVOs0iKct/ZoyHAoLcjt6KVP EBJQ== X-Gm-Message-State: AOAM530k3T4ViFWhDRR5iGXPeO+jmLi9Hx3MKWQ7NKc9QIx5RmuqUfCG UaiNsip7kPL+CL3LwEvpHC5ZKKLS+cRqZ2P5CJ7/nw== X-Google-Smtp-Source: ABdhPJxvf3RQDm1BGP9qXJepmBCbyv2Sm7fhyoWqyNsP6fRgpIsJGybJha0R9xI+hgBNtqEdk8WTHI9jLkGKYPDe/Lw= X-Received: by 2002:ac8:58d2:: with SMTP id u18mr52729816qta.235.1609354555313; Wed, 30 Dec 2020 10:55:55 -0800 (PST) MIME-Version: 1.0 References: <202012291441.0BTEf1X9009764@gitrepo.freebsd.org> <202012300018.0BU0I7gn079533@gndrsh.dnsmgr.net> <20201230022128.GE1206@FreeBSD.org> <15826.1609318943@critter.freebsd.dk> In-Reply-To: <15826.1609318943@critter.freebsd.dk> From: Warner Losh Date: Wed, 30 Dec 2020 11:55:44 -0700 Message-ID: Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL To: Poul-Henning Kamp Cc: Glen Barber , Kyle Evans , "Rodney W. Grimes" , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4D5gV430Dyz4X5L X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 18:55:56 -0000 On Wed, Dec 30, 2020 at 2:02 AM Poul-Henning Kamp wrote: > -------- > Warner Losh writes: > > > Deleting all the $FreeBSD$ in on go is massively unwise (or as the > British > > might say, "a very brave plan"). It will screw up MFCs on an epic scale > for > > years for no real benefit to pay for that extra developer time. It itself > > can't be MFCd. It's a terrible idea. We should not be deleting them, > except > > judiciously for things that cannot be MFCd. With the subversion exporter, > > they will live on in stable/12. > > Does that imply that we should start to remove them once stable/12 is > safely > EOL'ed in a few years ? > Yes. As we get close to EOL on 12, more and more things will not be MFC'd and it will be safer to re-evaluate this then.... However, some care is needed to ensure we can MFC it to stable/13 at the same time to avoid the issues with big commits and needing to partially merge them and/or cope with the merge conflicts. 90% of the removal will be a drop in MFC, it's the last 10% someone will need to spend at least a little time contemplating. Warner From owner-dev-commits-src-all@freebsd.org Wed Dec 30 19:00:38 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6070C4CC3DF for ; Wed, 30 Dec 2020 19:00:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) 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 4D5gbV20NQz4XPm for ; Wed, 30 Dec 2020 19:00:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x731.google.com with SMTP id n142so14686942qkn.2 for ; Wed, 30 Dec 2020 11:00:38 -0800 (PST) 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=rD6IGB6B/SKOvgREeT1VQq97jVwycLLDKaNQ3mR0YSc=; b=DC8FpK/rS8IPM9Z69yQB94nCOB4qb9fNRX+rEjt3K9ph0NN9TVCKYN7duvPl9ql79Q c112Wf9eUpcx4IDy1rjm4QJa2ViA3CJxT7vwPa3lwReJbUe+blja3QoxmTNj6FlmeyYg xoi4TXd9+8pWqL5EPX+kL5eRunESISMcOYX+Z9ewVOS+r9YGKz3rieZe9W7oklbrdpBi HZCaIzV7kI+H3vJb90Dn40gOOny7YppmbFPsYKW+8NkJzPVD1lfqxT/C1cyojxUjjjZc 9ATG7s9lkTPcjoRN542Xmqxaozha9pWDZTRqPfuL7c6Lh5uFH6/nwTy/4kLxYL+5ftVh CS0g== 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=rD6IGB6B/SKOvgREeT1VQq97jVwycLLDKaNQ3mR0YSc=; b=PC5+Depazv/uzWhfZR4nHarBif3kcA8Gawj8y4reBPFnlr0fD0mjNv9mYc/9P05w08 RSJQ2UZQNq8zputKHH6i8BbjYErRj0HGz7OISRDFfZlEoBEethdraEeGZxSy+VijPf+D CNNdFVQoCQ8ygJSwWXCg0Rnoevmts4UC4irt2O2MnHkbkxruMK+vRthMHuis1eyx1ZzQ 3Lx6MKPlyCemle5sTcANQ+HzRTOeTIX0KGGByvp5f0hVFX+Van+FDnPhSTgWiFLkgQVQ y9FJ3Qn8dTYcoZzHjoleIM3qA0veTCU5v1aqnazDAjo0YiikozrufOxCT60GFna4MnJz 3DMQ== X-Gm-Message-State: AOAM531fbN6FNtL2LeshZv7ggDha98yqwpqd67sh/Cs2KfH4gSd2YpkP UZ6P7+zDE3VT+YjPUVCFYw/kjh/CGBQ9n4EHwiaD6A== X-Google-Smtp-Source: ABdhPJzqS+GEMtDCOdNBo9nhqd/HV4Wsc8AKg3MxxtLXrDgBtvw81kAn3sIWPR4q7a4Idj+6YqZhi8KxKh0Ey3Y+ySM= X-Received: by 2002:a37:83c2:: with SMTP id f185mr24799724qkd.206.1609354837471; Wed, 30 Dec 2020 11:00:37 -0800 (PST) MIME-Version: 1.0 References: <202012301204.0BUC4qX7081946@gndrsh.dnsmgr.net> In-Reply-To: <202012301204.0BUC4qX7081946@gndrsh.dnsmgr.net> From: Warner Losh Date: Wed, 30 Dec 2020 12:00:26 -0700 Message-ID: Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL To: "Rodney W. Grimes" Cc: Glen Barber , Kyle Evans , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4D5gbV20NQz4XPm X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 19:00:38 -0000 On Wed, Dec 30, 2020 at 5:04 AM Rodney W. Grimes wrote: > > On Tue, Dec 29, 2020, 7:21 PM Glen Barber wrote: > > > > > On Tue, Dec 29, 2020 at 06:36:45PM -0600, Kyle Evans wrote: > > > > On Tue, Dec 29, 2020, 18:18 Rodney W. Grimes < > freebsd@gndrsh.dnsmgr.net> > > > > wrote: > > > > > > > > > > The branch main has been updated by gjb: > > > > > > > > > > > > URL: > > > > > > > > > https://cgit.FreeBSD.org/src/commit/?id=70e64ba4494190e64ab8faa04d744182d420c275 > > > > > > > > > > > > commit 70e64ba4494190e64ab8faa04d744182d420c275 > > > > > > Author: Glen Barber > > > > > > AuthorDate: 2020-12-29 14:34:05 +0000 > > > > > > Commit: Glen Barber > > > > > > CommitDate: 2020-12-29 14:40:28 +0000 > > > > > > > > > > > > release.sh: Update GITROOT URL > > > > > > > > > > > > Hard-code the GITROOT for the ports tree to use cgit-beta > > > > > > until the ports repository is converted. > > > > > > > > > > > > While here, remove $FreeBSD$ RCS IDs. > > > > > > > > > > So how do I know what version of some file I am looking at > > > > > once it has been dis-associated from a git clone? > > > > > > > > > > Is there some new mechanism that can give me the cadence of > > > > > say, /etc/pkg/FreeBSD.conf once its FreBSD ID is riped out? > > > > > > > > > > Also if $FreeBSD$ needs to be removed, can we please just do > > > > > it in one massive tree wide commit rather than have this > > > > > random piece wise needless noise in 1000's of commits? > > > > > > > > > > > > > > > > I don't see any particularly compelling reason to strip these tags, > > > > personally. I stripped them from caroot because we embedded them in > > > > generated files and it creates a lot of noise on updatecerts that I > do > > > not > > > > need/want, while providing no value to justify the noise for a purely > > > > generated file. > > > > > > They are not used/updated, so why keep a tag that does not expand to > any > > > useful information? > > > > > > > Deleting all the $FreeBSD$ in on go is massively unwise (or as the > British > > might say, "a very brave plan"). It will screw up MFCs on an epic scale > for > > years for no real benefit to pay for that extra developer time. It itself > > can't be MFCd. It's a terrible idea. We should not be deleting them, > except > > judiciously for things that cannot be MFCd. With the subversion exporter, > > they will live on in stable/12. > > Just exactly how would this screw up MFC's on an epic scale? Your > NOT going to merge this massive commit, which as long as you don't > touch lines near $FreeBSD$ things should just be fine. > By screwing them up. I'm sorry you don't have enough experience to know all the ways it causes pain: (1) merge conflicts often enough to require developer time to sort out (2) partial merges causing confusion when other changes need to make them. > Now commiting a change to $FreeBSD$ along with OTHER changes is > a sure fire way to cause a MFC conflict, but not anything major > that can not be dealt with via conflict resolution. > Right. We're inflicting conflict resolution pain over a large number of commits. This costs developer time, even if it's just a little. Removing $FreeBSD$ simply isn't worth that developer time. > Now what is being just shoved off as nothing is the fact without > $FreeBSD$ working the ability to backtrace cadence of a file is > going to be a royal pain in the ass, and basically means the project > has "lost" versioning of installed product. > You can commit the file you have to a temporary branch, and use a simple loop to find the file that's closest to it in the main branch with git tools. It's not that hard and covered in several stack trace posts. It's far more reliable than $FreeBSD$ since it will show the version that's the closest to the one you have, in case you moved other later changes in w/o updating $FreeBSD$. Warner From owner-dev-commits-src-all@freebsd.org Wed Dec 30 19:05:00 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B6A704CC561 for ; Wed, 30 Dec 2020 19:05:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (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 4D5ghX4Jt5z4Xq2 for ; Wed, 30 Dec 2020 19:05:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x732.google.com with SMTP id 186so14709020qkj.3 for ; Wed, 30 Dec 2020 11:05:00 -0800 (PST) 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=avS+L8P5UvZekODKaLKZaFAmwDWDEo6h5UzYH+BjDO4=; b=oADEc1qDuyVXhgY5rQM0Us/v+Ne+vvF4U74Au0jBXj6cuZFVMgQqja2YD7bxIZdtWJ 0fRLAXHeTxBQwPGRqnNH3NTwRzpuuZx8vf6oItHah+tXipYgvBOrRyGO1vM0Wkj7MfUE QwMdeUpH0dTF3Ud42QHuVqgUc8H7Lm5rtyxRHZ9bGyw9SsjxD8u+TwCwVDxoePs54XTq QJWqKTfGII87J4pO59P1R3nTxWeva/lLJZFwj+rHDy9vPZOA32F19nmPQqcc7GlmHAmu RYNkBjfj/UO7jXWoP56wIkhlqg2J/qGg4tmzydVCXbvgX1IcgKthpv9NtVNlcL8QiXux chvA== 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=avS+L8P5UvZekODKaLKZaFAmwDWDEo6h5UzYH+BjDO4=; b=HFMdhR3Eg5exDHJ83rhAaiHI3Wpa/WhN3iEmKa4SnPDZXSHxduklWQXRIfDaC+mB21 v7H5idgS9sA0EZpnsCCkY1N2RAkt5GLbaXJ8fSe62knAtoFLeHoTInXFr0kp+F5stbkI 4iqJYVQO18K9rF3xMNlJNV9sAH840JsVAgW0+DqpwHGINOI9j5r5cdCPOeFSIzAK481X qa5K1v1nygRYX2n1vGcicedLRpltztfvIRr17Ki+MXZumPGhFwWQGgP9pr4YpZun/vAQ t6FPRj4ZCzBMVAWe0P1uomjYAB2rtMh0Z1GKNJ+Bje2GQ5eCyLwvBUyOAIDIbZXdhC2H NIQA== X-Gm-Message-State: AOAM5325NY5lVEqpm0IglJVDC/P5BQorsYyPWmATdngvpudoGu1UhJQP hlOLWrGkgH4MEV18eOHEauvEE1X6iDcr36yFy8fV5Q== X-Google-Smtp-Source: ABdhPJyxXmlkI2F3NxY5HgGYXRckh/Zi3AuKW54aqGnKQoJ3EhwnzQFrnwwdMo11PLARkoZxBopLhmp982RT7WwET/g= X-Received: by 2002:a37:83c2:: with SMTP id f185mr24818547qkd.206.1609355100038; Wed, 30 Dec 2020 11:05:00 -0800 (PST) MIME-Version: 1.0 References: <20201230022048.GD1206@FreeBSD.org> <202012301212.0BUCCqUC081998@gndrsh.dnsmgr.net> In-Reply-To: <202012301212.0BUCCqUC081998@gndrsh.dnsmgr.net> From: Warner Losh Date: Wed, 30 Dec 2020 12:04:49 -0700 Message-ID: Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL To: "Rodney W. Grimes" Cc: Glen Barber , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4D5ghX4Jt5z4Xq2 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 19:05:00 -0000 On Wed, Dec 30, 2020 at 5:13 AM Rodney W. Grimes wrote: > > On Tue, Dec 29, 2020 at 04:18:07PM -0800, Rodney W. Grimes wrote: > > > > The branch main has been updated by gjb: > > > > > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=70e64ba4494190e64ab8faa04d744182d420c275 > > > > > > > > commit 70e64ba4494190e64ab8faa04d744182d420c275 > > > > Author: Glen Barber > > > > AuthorDate: 2020-12-29 14:34:05 +0000 > > > > Commit: Glen Barber > > > > CommitDate: 2020-12-29 14:40:28 +0000 > > > > > > > > release.sh: Update GITROOT URL > > > > > > > > Hard-code the GITROOT for the ports tree to use cgit-beta > > > > until the ports repository is converted. > > > > > > > > While here, remove $FreeBSD$ RCS IDs. > > > > > > So how do I know what version of some file I am looking at > > > once it has been dis-associated from a git clone? > > > > > > > You can't. Git does not expand the tags. > > And no new mechanism in place to replace it? So, we have > no versioning of files in the final product any more? > No. We will not. > Sad, very very sad :-(. This may cause some down streams, > other than me, some very serious heart ache. > Git provides tools to reduce that heart ache. You can get the same info, but using different means using git's tools should you need to. > > > Is there some new mechanism that can give me the cadence of > > > say, /etc/pkg/FreeBSD.conf once its FreBSD ID is riped out? > > > > > > Also if $FreeBSD$ needs to be removed, can we please just do > > > it in one massive tree wide commit rather than have this > > > random piece wise needless noise in 1000's of commits? > > > > > > > Please, no. There is no benefit to prune these in one fell swoop as > > opposed to, for example, bumping Copyright dates. > > Well have to disagree on that. > > a) If it is removed in one fell swoop it can also probably > be undone in one fell swoop too. > It won't ever be undone, so this is irrelevant. > b) It concentrates the change in 1 commit that does NOT > ever need to be MFC'ed. > That causes merge conflicts for everybody for years. The cost here is too high. > c) It'll quickly get us to the damage that is done by > the loss of this information from the released binary > product so repairs may begin. > We can begin repairs w/o doing this. 99% of these never end up in binaries anyway. > d) It'll shorten 1000's of commit messages by the lines: > While here, remove $FreeBSD$ RCS IDs. > Who cares? I mean, this is not an issue at all. Like I've said: there's a real cost to doing this, and the benefits from doing this are quite small. As someone that's had to deal for years with partial merges of sweeping commits, please listen when I say that they always cause unintended pain due to their size. Warner From owner-dev-commits-src-all@freebsd.org Wed Dec 30 21:06:59 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F31F4CEBF3; Wed, 30 Dec 2020 21:06:59 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) (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 4D5kPH1M7cz4fsq; Wed, 30 Dec 2020 21:06:58 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qk1-f173.google.com with SMTP id n142so14980673qkn.2; Wed, 30 Dec 2020 13:06:58 -0800 (PST) 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=RkEUrcYcxi3j2ab4i1/m8qzSBTyHhz1BEYMGLIT1FDw=; b=cbchAbhq66kNYmEnfz5oeBBmRT5iBQLSJtAWb0+3Lco1Q7Mjn5RBoGAddS42tM/pG1 iAM++fDnGUlM6Mb5yjES2Dl41JbVvfVKOxSGiGIORgOm47cP0mXz/zampBJeqFxnZUah xx3XGxol1/u7B5bfluBLe9AC2yfRaDM35KX30NNNlfV/fa8YNmqHhSXG2yDhumegeZ52 fzIS+E/hQWGA+HAc3YBfBn3T6PCFxQSodqQ+IYIPo8n97nY8SzOQa/+z9oa75DE2sKuc LUBNIDi/qD27lAwSBKM/cz9khMBJ3rTagPyyMV4JJ0Ektdtaf+zQcbku0+boip2P4hKF DZxA== X-Gm-Message-State: AOAM533jWjWZ8xAMOwXIlOUQR/oNsG/Mz1jOtPyPXl/xjhz4jrxIW5W0 VLusnu9qac4LmeUSH0HEtbOXSI10CMfodA== X-Google-Smtp-Source: ABdhPJwSgQyp7y796kIWySrTbga/hPTE3ECw2fJayCgzUo0M+YTezglo288rTMjAOrT9WW4fOJ7okA== X-Received: by 2002:a05:620a:22ab:: with SMTP id p11mr55082813qkh.237.1609362417918; Wed, 30 Dec 2020 13:06:57 -0800 (PST) Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com. [209.85.222.176]) by smtp.gmail.com with ESMTPSA id z26sm27314644qki.40.2020.12.30.13.06.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Dec 2020 13:06:57 -0800 (PST) Received: by mail-qk1-f176.google.com with SMTP id c7so14992574qke.1; Wed, 30 Dec 2020 13:06:57 -0800 (PST) X-Received: by 2002:a37:6189:: with SMTP id v131mr53421779qkb.337.1609362417448; Wed, 30 Dec 2020 13:06:57 -0800 (PST) MIME-Version: 1.0 References: <202012301204.0BUC4qX7081946@gndrsh.dnsmgr.net> In-Reply-To: From: Ryan Libby Date: Wed, 30 Dec 2020 13:06:46 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL To: Warner Losh Cc: "Rodney W. Grimes" , Glen Barber , Kyle Evans , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4D5kPH1M7cz4fsq X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 21:06:59 -0000 On Wed, Dec 30, 2020 at 11:00 AM Warner Losh wrote: > > On Wed, Dec 30, 2020 at 5:04 AM Rodney W. Grimes > wrote: > > Now what is being just shoved off as nothing is the fact without > > $FreeBSD$ working the ability to backtrace cadence of a file is > > going to be a royal pain in the ass, and basically means the project > > has "lost" versioning of installed product. > > > > You can commit the file you have to a temporary branch, and use a simple > loop to find the file that's closest to it in the main branch with git > tools. It's not that hard and covered in several stack trace posts. It's > far more reliable than $FreeBSD$ since it will show the version that's the > closest to the one you have, in case you moved other later changes in w/o > updating $FreeBSD$. If there's a need for this, it might be useful to describe in or link from the freebsd-git-docs. For exact matches, this almost works: git describe $(git hash-object $file) but not for all branches, I think for git describe $blob you have to be on a branch with the blob in history. It might also come with some caveats about the hash format. We might be able either to add some glue around that or work with git upstream. Having a tool to find fuzzy matches would be neat (the blob with the minimum diff). Does one exist? Ryan From owner-dev-commits-src-all@freebsd.org Wed Dec 30 21:18:59 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4B2D84CF4D5; Wed, 30 Dec 2020 21:18:59 +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 4D5kg66XSGz4gjQ; Wed, 30 Dec 2020 21:18:58 +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 0BULIuow083575; Wed, 30 Dec 2020 13:18:56 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 0BULIuGd083574; Wed, 30 Dec 2020 13:18:56 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202012302118.0BULIuGd083574@gndrsh.dnsmgr.net> Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL In-Reply-To: To: Ryan Libby Date: Wed, 30 Dec 2020 13:18:56 -0800 (PST) CC: Warner Losh , "Rodney W. Grimes" , Glen Barber , Kyle Evans , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4D5kg66XSGz4gjQ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 21:18:59 -0000 > On Wed, Dec 30, 2020 at 11:00 AM Warner Losh wrote: > > > > On Wed, Dec 30, 2020 at 5:04 AM Rodney W. Grimes > > wrote: > > > > Now what is being just shoved off as nothing is the fact without > > > $FreeBSD$ working the ability to backtrace cadence of a file is > > > going to be a royal pain in the ass, and basically means the project > > > has "lost" versioning of installed product. > > > > > > > You can commit the file you have to a temporary branch, and use a simple > > loop to find the file that's closest to it in the main branch with git > > tools. It's not that hard and covered in several stack trace posts. It's > > far more reliable than $FreeBSD$ since it will show the version that's the > > closest to the one you have, in case you moved other later changes in w/o > > updating $FreeBSD$. > > If there's a need for this, it might be useful to describe in or link > from the freebsd-git-docs. > > For exact matches, this almost works: > > git describe $(git hash-object $file) > > but not for all branches, I think for git describe $blob you have to be > on a branch with the blob in history. It might also come with some > caveats about the hash format. We might be able either to add some glue > around that or work with git upstream. > > Having a tool to find fuzzy matches would be neat (the blob with the > minimum diff). Does one exist? This simply well not easily work. Let me try to explain why. First take your self OUT of developer mode, and into operations and administration. Take for example all the files in /etc, these files can easily at present often be tracked back to exactly what release installed them cause the $FreeBSD$ points you at it. These files are often modified by local administrators, and with out knowing what version they started out it is a crap shoot to ever figure it out unless the local mods are minor and you get lucky. Contractors are some times hired to go in and upgrade or clean up after someone else did work, and not having this information and telling them to go dig in git to try and figure out the state of there system is pretty much a non-started, well at least it is for me. > > Ryan > -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-all@freebsd.org Wed Dec 30 21:31:18 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 902E04CF8D0; Wed, 30 Dec 2020 21:31:18 +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 4D5kxL2LPRz4hRL; Wed, 30 Dec 2020 21:31:17 +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 0BULVEfr083619; Wed, 30 Dec 2020 13:31:14 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 0BULVETD083618; Wed, 30 Dec 2020 13:31:14 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202012302131.0BULVETD083618@gndrsh.dnsmgr.net> Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL In-Reply-To: To: Warner Losh Date: Wed, 30 Dec 2020 13:31:14 -0800 (PST) CC: "Rodney W. Grimes" , Glen Barber , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4D5kxL2LPRz4hRL X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 21:31:18 -0000 > On Wed, Dec 30, 2020 at 5:13 AM Rodney W. Grimes > wrote: > > > > On Tue, Dec 29, 2020 at 04:18:07PM -0800, Rodney W. Grimes wrote: > > > > > The branch main has been updated by gjb: > > > > > > > > > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=70e64ba4494190e64ab8faa04d744182d420c275 > > > > > > > > > > commit 70e64ba4494190e64ab8faa04d744182d420c275 > > > > > Author: Glen Barber > > > > > AuthorDate: 2020-12-29 14:34:05 +0000 > > > > > Commit: Glen Barber > > > > > CommitDate: 2020-12-29 14:40:28 +0000 > > > > > > > > > > release.sh: Update GITROOT URL > > > > > > > > > > Hard-code the GITROOT for the ports tree to use cgit-beta > > > > > until the ports repository is converted. > > > > > > > > > > While here, remove $FreeBSD$ RCS IDs. > > > > > > > > So how do I know what version of some file I am looking at > > > > once it has been dis-associated from a git clone? > > > > > > > > > > You can't. Git does not expand the tags. > > > > And no new mechanism in place to replace it? So, we have > > no versioning of files in the final product any more? > > > > No. We will not. That I take a very hard line against, that is IMHO a very big mistake. > > Sad, very very sad :-(. This may cause some down streams, > > other than me, some very serious heart ache. > > > > Git provides tools to reduce that heart ache. You can get the same info, > but using different means using git's tools should you need to. See other mail to Ryan, those tools well not help with the issues of locally modified files and being able to figure out what base they started with. > > > > > > Is there some new mechanism that can give me the cadence of > > > > say, /etc/pkg/FreeBSD.conf once its FreBSD ID is riped out? > > > > > > > > Also if $FreeBSD$ needs to be removed, can we please just do > > > > it in one massive tree wide commit rather than have this > > > > random piece wise needless noise in 1000's of commits? > > > > > > > > > > Please, no. There is no benefit to prune these in one fell swoop as > > > opposed to, for example, bumping Copyright dates. > > > > Well have to disagree on that. > > > > a) If it is removed in one fell swoop it can also probably > > be undone in one fell swoop too. > > > > It won't ever be undone, so this is irrelevant. I would be careful with any claim of never. > > > > b) It concentrates the change in 1 commit that does NOT > > ever need to be MFC'ed. > > > > That causes merge conflicts for everybody for years. The cost here is too > high. Again, please, enlighten me how a 1 line +- delta in a file is going to cause any merge conflict outside of +-3 lines from that line? These strings are VERY well located and in areas that should be very rarely touched. Very different than things like large white space clean up. > > c) It'll quickly get us to the damage that is done by > > the loss of this information from the released binary > > product so repairs may begin. > > > > We can begin repairs w/o doing this. 99% of these never end up in binaries > anyway. Oh, now thats false... simple test: find /bin | xargs grep -l \$FreeBSD: | wc find /bin | wc 44/45 files on my 12.1 system. As far as I recall it is more like 99% of our files HAVE these strings in them. > > > d) It'll shorten 1000's of commit messages by the lines: > > While here, remove $FreeBSD$ RCS IDs. > > > > Who cares? I mean, this is not an issue at all. > > Like I've said: there's a real cost to doing this, and the benefits from > doing this are quite small. As someone that's had to deal for years with > partial merges of sweeping commits, please listen when I say that they > always cause unintended pain due to their size. You can repeat yourself, but please give relavent factual cause on how this causes a merge conflict. In most cases it would be a single line delete in an area of the file that is rarely touched. This is NOT like white space cleanup, macro renames, or other global scope changes. It is no worse than the SPDX tagging that was done, and if that had not been caught up in some work flow errors, would of been fine. > Warner -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-all@freebsd.org Wed Dec 30 21:54:11 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6F6624D042D; Wed, 30 Dec 2020 21:54:11 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) (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 4D5lRl2PkLz4jy1; Wed, 30 Dec 2020 21:54:11 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qk1-f175.google.com with SMTP id d14so15017664qkc.13; Wed, 30 Dec 2020 13:54:11 -0800 (PST) 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=k1dEEiFUHPGOawxmP+IUHPMzH3gmTK+cgPasDvjLoUs=; b=hnUNrEZeLqEw7OOVgOMKajuRyDC4rlc31jIGeEHTTAWwhXIBT/4A0Oo+D7sdEH1bV2 /lW5PQxnI+sRkiSEjqUQbbtMz/G+c3Rh08816ILOha4FrmQXUGYQwMOC8uNGCOAJqGiL X5ClPrqmPUg/aEGayI5Eg/IrFr+TK3yyHhn+/FdG8BgiuwIr6zpj+YZGPTft9l9uHdjk V5ZVjBrkhVWjd8oQ8DVtAAk16Gl+3UVcdWz+QyZYOopoPqzRAezJeZtX+0J6qN+Ji5Kb 8f4rJTMtyIXmnVZDMIFd/cCiY6FtAGYwKG3PviF6Uee9HScauU/dVSef0fbXMxSi5tL5 1uZA== X-Gm-Message-State: AOAM530AIg5rsXWMMRUeO27C/z0SHq8HjI5PdoLv7aC9zpcC+pgs2/wp RAAUiWBXhVBWMfwaqNf48cH7Ke+EJ6nsjw== X-Google-Smtp-Source: ABdhPJxFwKa9ff6an40fYxcJB/pp3myYeeeTaofIBLrBV+VJiDZysuHKtVx4vWEDHXmpCOPI4uRf8w== X-Received: by 2002:a05:620a:1398:: with SMTP id k24mr55073279qki.109.1609365250144; Wed, 30 Dec 2020 13:54:10 -0800 (PST) Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com. [209.85.222.171]) by smtp.gmail.com with ESMTPSA id l191sm28325638qke.7.2020.12.30.13.54.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Dec 2020 13:54:09 -0800 (PST) Received: by mail-qk1-f171.google.com with SMTP id p14so15078357qke.6; Wed, 30 Dec 2020 13:54:09 -0800 (PST) X-Received: by 2002:ae9:f312:: with SMTP id p18mr54070785qkg.311.1609365249627; Wed, 30 Dec 2020 13:54:09 -0800 (PST) MIME-Version: 1.0 References: <202012302118.0BULIuGd083574@gndrsh.dnsmgr.net> In-Reply-To: <202012302118.0BULIuGd083574@gndrsh.dnsmgr.net> From: Ryan Libby Date: Wed, 30 Dec 2020 13:53:58 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL To: "Rodney W. Grimes" Cc: Warner Losh , Glen Barber , Kyle Evans , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4D5lRl2PkLz4jy1 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 21:54:11 -0000 On Wed, Dec 30, 2020 at 1:19 PM Rodney W. Grimes wrote: > > > On Wed, Dec 30, 2020 at 11:00 AM Warner Losh wrote: > > > > > > On Wed, Dec 30, 2020 at 5:04 AM Rodney W. Grimes > > > wrote: > > > > > > Now what is being just shoved off as nothing is the fact without > > > > $FreeBSD$ working the ability to backtrace cadence of a file is > > > > going to be a royal pain in the ass, and basically means the project > > > > has "lost" versioning of installed product. > > > > > > > > > > You can commit the file you have to a temporary branch, and use a simple > > > loop to find the file that's closest to it in the main branch with git > > > tools. It's not that hard and covered in several stack trace posts. It's > > > far more reliable than $FreeBSD$ since it will show the version that's the > > > closest to the one you have, in case you moved other later changes in w/o > > > updating $FreeBSD$. > > > > If there's a need for this, it might be useful to describe in or link > > from the freebsd-git-docs. > > > > For exact matches, this almost works: > > > > git describe $(git hash-object $file) > > > > but not for all branches, I think for git describe $blob you have to be > > on a branch with the blob in history. It might also come with some > > caveats about the hash format. We might be able either to add some glue > > around that or work with git upstream. > > > > Having a tool to find fuzzy matches would be neat (the blob with the > > minimum diff). Does one exist? > > This simply well not easily work. Let me try to explain why. > > First take your self OUT of developer mode, and into operations > and administration. > > Take for example all the files in /etc, these files can easily > at present often be tracked back to exactly what release installed > them cause the $FreeBSD$ points you at it. These files are often > modified by local administrators, and with out knowing what version > they started out it is a crap shoot to ever figure it out unless > the local mods are minor and you get lucky. > > Contractors are some times hired to go in and upgrade or clean up > after someone else did work, and not having this information and > telling them to go dig in git to try and figure out the state of > there system is pretty much a non-started, well at least it is for > me. > > > > > Ryan > > > > -- > Rod Grimes rgrimes@freebsd.org Disclaimer: I won't pretend to have experience in this area, this is just musing. For files that are not disconnected from FreeBSD, as in stuff that we install and expect or anticipate may be edited on site, it might be possible to work our own magic to do $FreeBSD$ expansion at build time. (I'm not sure if this has been discussed previously, or what exactly that would look like in the build.) For disconnected files, if there were a tool like, let us imagine, $ cd /usr/src $ git whence /some/file [ output of git describe blob plus a diff ] Maybe that would be enough? Ryan From owner-dev-commits-src-all@freebsd.org Wed Dec 30 21:54:20 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C7EDD4D01A6; Wed, 30 Dec 2020 21:54:20 +0000 (UTC) (envelope-from bdragon@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 4D5lRv1gKjz4jwL; Wed, 30 Dec 2020 21:54:19 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id BB763871F; Wed, 30 Dec 2020 21:54:17 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 8D02127C0054; Wed, 30 Dec 2020 16:54:16 -0500 (EST) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Wed, 30 Dec 2020 16:54:16 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvfedgudehhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecufghrlhcuvffnffculddutddmnecujfgurhepof gfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdeurhgrnhguohhnuceu vghrghhrvghnfdcuoegsughrrghgohhnsefhrhgvvgeuufffrdhorhhgqeenucggtffrrg htthgvrhhnpeetteelffduvddttdeuvdfhfeehjedvvdfgvdekvdeftefhgeekvdekleev uedvudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsughrrghgohhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqddutdegvdef heekieegqddukedutdekheduqdgsughrrghgohhnpeephfhrvggvuefuffdrohhrghesih hmrghprdgttg X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id C0AB8C200A5; Wed, 30 Dec 2020 16:54:16 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.1-61-gb52c239-fm-20201210.001-gb52c2396 Mime-Version: 1.0 Message-Id: In-Reply-To: <202012302131.0BULVETD083618@gndrsh.dnsmgr.net> References: <202012302131.0BULVETD083618@gndrsh.dnsmgr.net> Date: Wed, 30 Dec 2020 15:53:56 -0600 From: "Brandon Bergren" To: rgrimes@freebsd.org, "Warner Losh" Cc: "Glen Barber" , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL Content-Type: text/plain X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 21:54:23 -0000 On Wed, Dec 30, 2020, at 3:31 PM, Rodney W. Grimes wrote: > > > And no new mechanism in place to replace it? So, we have > > > no versioning of files in the final product any more? > > > > > > > No. We will not. > > That I take a very hard line against, that is IMHO a very big mistake. > Git has one main context where continuing to support expansion might make sense: When using git archive to create a tarball of a tree (for rolling a release or whatever), if the .gitattributes file has "export-subst" set for a file, it will do expansion at that time. However, I think it uses $Format$ instead of being able to define custom tags, so it's less convenient than $FreeBSD$ was. -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-all@freebsd.org Wed Dec 30 22:05:53 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 40F504D01D8 for ; Wed, 30 Dec 2020 22:05:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) (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 4D5ljF11Jlz4kYX for ; Wed, 30 Dec 2020 22:05:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf31.google.com with SMTP id et9so8300745qvb.10 for ; Wed, 30 Dec 2020 14:05:53 -0800 (PST) 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=O0b/ywQ5eOaEabdSxHa48VGm+ySA8ciN/Gt7PzGLafg=; b=UKZjgFGtHLhwpi4/g/a3fsprvsId3kloSjwhpLebCbldv7NrnumR3DrPVwiyKLtBDX oGe0nlZC4qoS8oGJnBVyezMsBVknZQ1WN8q2mEQVCdL+kxunja8h/vd+5uiFhhPaXgLd PWip8WMsFQVi//dfsHAnX/WTbfqRnofyUQxAn62tNVFAJwCfS5dKojfuhM4r/qttXoLi F/74Bf9Da6xoLB0q1rMOO6uYJIi6xQk2U46hYfB97Qv6RnqQD8o86eAqnD8cx+Dx42Qs aSI3Ggvs0AeWwH9g1oiMmpv77gmJS/ggKzEGjybsIAY1pCNwDExLpoGbpiwyWO88WkTZ rcbw== 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=O0b/ywQ5eOaEabdSxHa48VGm+ySA8ciN/Gt7PzGLafg=; b=dSctImTXSoZeOs+37RRvsuw1klK3fGum/FJy1gIKeDinbEbGj86/eyEpmsh5qt/iDc BPIE/5MZTlO1RLDV74i7Y5YaJ5MSdXj5x2BVCvnOa8bCQNAjoIpB9d+IXTjW+XSbGonW jnxFXaI7z+PvDr+gOWP/TeCMZNzebiFRwzI/GWjeZvt9NMEgCv+4ZQhVbGkUgdygK57g aM+hhgrg4rF/vKZhQf9hPOMj5yN9MRCG8GbgGlspRjzjOpS5TBEfZvPt05Xh8BTicQT8 kXdZ8hZcWDJgooX5wRuP9+smXNW05I8BOUpQTqxmn6safPzFwwoX1Lows4xMBfmonbpV zmYg== X-Gm-Message-State: AOAM532I0Ukt4kzxHZLlwQbQHkbgSrQ702QTUofebVoJ3rklqZnVnsXw t5BkKH/fsFod9rFTXjUFJAnjq6T15ppek3vINPmhkFFZGzsk5g== X-Google-Smtp-Source: ABdhPJzyEnoM+Rw8ymuChIVh27M+Pvh62+CGglelwLedN8imfbD/4xa3x2HzsjiMAyzVQXnDipmmYtq0YqacH9SYZn8= X-Received: by 2002:a0c:f14c:: with SMTP id y12mr28593161qvl.23.1609365952388; Wed, 30 Dec 2020 14:05:52 -0800 (PST) MIME-Version: 1.0 References: <202012302131.0BULVETD083618@gndrsh.dnsmgr.net> In-Reply-To: From: Warner Losh Date: Wed, 30 Dec 2020 15:05:41 -0700 Message-ID: Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL To: Brandon Bergren Cc: "Rodney W. Grimes" , Glen Barber , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4D5ljF11Jlz4kYX X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 22:05:53 -0000 On Wed, Dec 30, 2020 at 2:54 PM Brandon Bergren wrote: > On Wed, Dec 30, 2020, at 3:31 PM, Rodney W. Grimes wrote: > > > > And no new mechanism in place to replace it? So, we have > > > > no versioning of files in the final product any more? > > > > > > > > > > No. We will not. > > > > That I take a very hard line against, that is IMHO a very big mistake. > > > > Git has one main context where continuing to support expansion might make > sense: > > When using git archive to create a tarball of a tree (for rolling a > release or whatever), if the .gitattributes file has "export-subst" set for > a file, it will do expansion at that time. > > However, I think it uses $Format$ instead of being able to define custom > tags, so it's less convenient than $FreeBSD$ was. > And it exports the git object hash, not the commit hash, which is kinda useless without access to the repo. Even if we could get $FreeBSD$ to expand, it expands to something you need the git tree to do anything with. There's the git smudge extension which does this, but it's tedious and cumbersome to use, and the information it preserves is at best indirect. Warner From owner-dev-commits-src-all@freebsd.org Wed Dec 30 22:09:27 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99C274D05CC; Wed, 30 Dec 2020 22:09:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5lnM3xHcz4kfG; Wed, 30 Dec 2020 22:09:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 760BE252E6; Wed, 30 Dec 2020 22:09:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUM9RmU083870; Wed, 30 Dec 2020 22:09:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUM9RPJ083869; Wed, 30 Dec 2020 22:09:27 GMT (envelope-from git) Date: Wed, 30 Dec 2020 22:09:27 GMT Message-Id: <202012302209.0BUM9RPJ083869@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: 6d2254bc922b - main - [POWERPC64LE] fix sysctl dev.opal_sensor.* on little-endian kernel MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alfredo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d2254bc922b4858cd479d8c7133f64143b6cac5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 22:09:27 -0000 The branch main has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=6d2254bc922b4858cd479d8c7133f64143b6cac5 commit 6d2254bc922b4858cd479d8c7133f64143b6cac5 Author: Alfredo Dal'Ava Junior AuthorDate: 2020-12-31 01:00:28 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2020-12-31 01:00:28 +0000 [POWERPC64LE] fix sysctl dev.opal_sensor.* on little-endian kernel - fix values returned by 'sysctls dev.opal_sensor.*.sensor' - fix missing 'dev.opal_sensor.*.sensor_[max|min]' on sysctl Reviewed-by: jhibbits Sponsored-by: Eldorado Research Institute (eldorado.org.br) Differential-Revision: https://reviews.freebsd.org/D27365 --- sys/powerpc/powernv/opal.h | 22 ++++++++++++++++++++++ sys/powerpc/powernv/opal_dev.c | 20 +++++++++++++++++--- sys/powerpc/powernv/opal_sensor.c | 7 ++++--- 3 files changed, 43 insertions(+), 6 deletions(-) diff --git a/sys/powerpc/powernv/opal.h b/sys/powerpc/powernv/opal.h index 7671ece28122..d7a81e33f809 100644 --- a/sys/powerpc/powernv/opal.h +++ b/sys/powerpc/powernv/opal.h @@ -138,15 +138,37 @@ int opal_call(uint64_t token, ...); #define OPAL_SUCCESS 0 #define OPAL_PARAMETER -1 #define OPAL_BUSY -2 +#define OPAL_PARTIAL -3 +#define OPAL_CONSTRAINED -4 #define OPAL_CLOSED -5 #define OPAL_HARDWARE -6 #define OPAL_UNSUPPORTED -7 +#define OPAL_PERMISSION -8 +#define OPAL_NO_MEM -9 #define OPAL_RESOURCE -10 +#define OPAL_INTERNAL_ERROR -11 #define OPAL_BUSY_EVENT -12 +#define OPAL_HARDWARE_FROZEN -13 +#define OPAL_WRONG_STATE -14 #define OPAL_ASYNC_COMPLETION -15 #define OPAL_EMPTY -16 +#define OPAL_I2C_TIMEOUT -17 +#define OPAL_I2C_INVALID_CMD -18 +#define OPAL_I2C_LBUS_PARITY -19 +#define OPAL_I2C_BKEND_OVERRUN -20 +#define OPAL_I2C_BKEND_ACCESS -21 +#define OPAL_I2C_ARBT_LOST -22 +#define OPAL_I2C_NACK_RCVD -23 +#define OPAL_I2C_STOP_ERR -24 +#define OPAL_XSCOM_PARTIAL_GOOD -25 +#define OPAL_XSCOM_ADDR_ERROR -26 +#define OPAL_XSCOM_CLOCK_ERROR -27 +#define OPAL_XSCOM_PARITY_ERROR -28 +#define OPAL_XSCOM_TIMEOUT -29 +#define OPAL_XSCOM_CTR_OFFLINED -30 #define OPAL_XIVE_PROVISIONING -31 #define OPAL_XIVE_FREE_ACTIVE -32 +#define OPAL_TIMEOUT -33 #define OPAL_TOKEN_ABSENT 0 #define OPAL_TOKEN_PRESENT 1 diff --git a/sys/powerpc/powernv/opal_dev.c b/sys/powerpc/powernv/opal_dev.c index ccd49bac7a68..e23844fde04d 100644 --- a/sys/powerpc/powernv/opal_dev.c +++ b/sys/powerpc/powernv/opal_dev.c @@ -382,8 +382,22 @@ opal_handle_messages(void) rv = opal_call(OPAL_GET_MSG, vtophys(&msg), sizeof(msg)); - if (rv != OPAL_SUCCESS) + switch (rv) { + case OPAL_SUCCESS: + break; + case OPAL_RESOURCE: + /* no available messages - return */ + return; + case OPAL_PARAMETER: + printf("%s error: invalid buffer. Please file a bug report.\n", __func__); + return; + case OPAL_PARTIAL: + printf("%s error: buffer is too small and messages was discarded. Please file a bug report.\n", __func__); return; + default: + printf("%s opal_call returned unknown result <%lu>\n", __func__, rv); + return; + } type = be32toh(msg.msg_type); switch (type) { @@ -406,7 +420,7 @@ opal_handle_messages(void) EVENTHANDLER_DIRECT_INVOKE(OPAL_OCC, &msg); break; default: - printf("Unknown OPAL message type %d\n", type); + printf("%s Unknown OPAL message type %d\n", __func__, type); } } @@ -418,7 +432,7 @@ opal_intr(void *xintr) opal_call(OPAL_HANDLE_INTERRUPT, (uint32_t)(uint64_t)xintr, vtophys(&events)); /* Wake up the heartbeat, if it's been setup. */ - if (events != 0 && opal_hb_proc != NULL) + if (be64toh(events) != 0 && opal_hb_proc != NULL) wakeup(opal_hb_proc); } diff --git a/sys/powerpc/powernv/opal_sensor.c b/sys/powerpc/powernv/opal_sensor.c index dae1f97bc989..a95746472975 100644 --- a/sys/powerpc/powernv/opal_sensor.c +++ b/sys/powerpc/powernv/opal_sensor.c @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -114,7 +115,7 @@ opal_sensor_get_val(struct opal_sensor_softc *sc, uint32_t key, uint64_t *val) SENSOR_UNLOCK(sc); if (rv == OPAL_SUCCESS) - *val = val32; + *val = be32toh(val32); else rv = EIO; @@ -218,7 +219,7 @@ opal_sensor_attach(device_t dev) SYSCTL_ADD_STRING(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "label", CTLFLAG_RD, sc->sc_label, 0, ""); - if (OF_getprop(node, "sensor-data-min", + if (OF_getencprop(node, "sensor-data-min", &sensor_id, sizeof(sensor_id)) > 0) { sc->sc_min_handle = sensor_id; SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, @@ -228,7 +229,7 @@ opal_sensor_attach(device_t dev) "minimum value"); } - if (OF_getprop(node, "sensor-data-max", + if (OF_getencprop(node, "sensor-data-max", &sensor_id, sizeof(sensor_id)) > 0) { sc->sc_max_handle = sensor_id; SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, From owner-dev-commits-src-all@freebsd.org Wed Dec 30 22:20:57 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3DD454D0B05 for ; Wed, 30 Dec 2020 22:20:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) (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 4D5m2d0zYJz4l9D for ; Wed, 30 Dec 2020 22:20:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72b.google.com with SMTP id v126so15071087qkd.11 for ; Wed, 30 Dec 2020 14:20:56 -0800 (PST) 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=+VKpwut2qzUbpl3QN+xi1X6Zo/MvuuPC3a5viwb7ixc=; b=afaMKFe9Gw/3qywv0YhcFNJwHcmDVhJiuqs5AdJjbJVJTAUS7puwO8dcr/kR2WS4mQ rZ/4iyDE43T6BNqIFiF6TmVExWIO0sHYKOF1/U6b2zp20wXLOu57qJLH2UboW+lCOcjy xLCS6W6H2UwJYSUWZcLh0aN91H96Hb6+KLc1DY2lsYwYW3ahD1nCMO78jL16VHf+Ifxq 25c5FYZ3xD40gJ/L+IsO4nEbcGWOy0BQVMPIRD/zgyE6ACy5DKJzT+sgAlUZfKpXdX/r NakzZEKNkjshgOnUeg9Kh3yeGxadhg196cvIDmZpeeab3VCGo7q4cGep1pQR2sWPyfn/ iVUQ== 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=+VKpwut2qzUbpl3QN+xi1X6Zo/MvuuPC3a5viwb7ixc=; b=pr9beQOCREXesUqhSGIu8bVT+YrA49az0qJwnImXvCC6DC+4nlJm0wkLnOHkvED0vM GpSXG9j2rpota6B7ykCk0SCdV7U5ygvCrg44IGNW8Ew2V4eAw7h8QLyfYnhXyaFWvcTt tfl9H1zESCz/jQuk7mRoqiuO9yeCsGzeb0F44myewapT3bZReYWxZXUstOflGn2ebPWh r/Z46sRc4qbPFLjaia59+EZgqXszvgGg+ZZvlN6rahqPoYtUT7i9mpg7GC0Rs3JztQz9 So4EDvQOfkItZnjssnQcI3MovB8JmXeoO04Emk9qpDuOxdH1O4J88cjsAYNr4N4lKbcv BRBg== X-Gm-Message-State: AOAM531lZ7qnmCjWjsjM2lIDKTIqEX+VxXYGG/DiErqsbGwcfX0JrZSK nA+RAJL1dQ0f9vPBcfAcyNpe6tQvFNRe03rDJOUgLw== X-Google-Smtp-Source: ABdhPJxq27V3scJQg1pYwtatAmKYQE3f4TlNKWiuQYARgO7g6E5OTCqML0/flrj5bp+Z74ZorF5QmcjcgHJWm2HSuYY= X-Received: by 2002:a37:4a4e:: with SMTP id x75mr55571211qka.89.1609366856350; Wed, 30 Dec 2020 14:20:56 -0800 (PST) MIME-Version: 1.0 References: <202012302131.0BULVETD083618@gndrsh.dnsmgr.net> In-Reply-To: <202012302131.0BULVETD083618@gndrsh.dnsmgr.net> From: Warner Losh Date: Wed, 30 Dec 2020 15:20:45 -0700 Message-ID: Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL To: "Rodney W. Grimes" Cc: Glen Barber , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4D5m2d0zYJz4l9D X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 22:20:57 -0000 On Wed, Dec 30, 2020 at 2:31 PM Rodney W. Grimes wrote: > > On Wed, Dec 30, 2020 at 5:13 AM Rodney W. Grimes < > freebsd@gndrsh.dnsmgr.net> > > wrote: > > > > > > On Tue, Dec 29, 2020 at 04:18:07PM -0800, Rodney W. Grimes wrote: > > > > > > The branch main has been updated by gjb: > > > > > > > > > > > > URL: > > > > https://cgit.FreeBSD.org/src/commit/?id=70e64ba4494190e64ab8faa04d744182d420c275 > > > > > > > > > > > > commit 70e64ba4494190e64ab8faa04d744182d420c275 > > > > > > Author: Glen Barber > > > > > > AuthorDate: 2020-12-29 14:34:05 +0000 > > > > > > Commit: Glen Barber > > > > > > CommitDate: 2020-12-29 14:40:28 +0000 > > > > > > > > > > > > release.sh: Update GITROOT URL > > > > > > > > > > > > Hard-code the GITROOT for the ports tree to use cgit-beta > > > > > > until the ports repository is converted. > > > > > > > > > > > > While here, remove $FreeBSD$ RCS IDs. > > > > > > > > > > So how do I know what version of some file I am looking at > > > > > once it has been dis-associated from a git clone? > > > > > > > > > > > > > You can't. Git does not expand the tags. > > > > > > And no new mechanism in place to replace it? So, we have > > > no versioning of files in the final product any more? > > > > > > > No. We will not. > > That I take a very hard line against, that is IMHO a very big mistake. > Your opinion has been noted. > > > Sad, very very sad :-(. This may cause some down streams, > > > other than me, some very serious heart ache. > > > > > > > Git provides tools to reduce that heart ache. You can get the same info, > > but using different means using git's tools should you need to. > > See other mail to Ryan, those tools well not help with the issues > of locally modified files and being able to figure out what base > they started with. > You describe a source code management nightmare that $FreeBSD$ might be able to solve a subset of cases, but other methods will solve them better. > > > > > > > > > Is there some new mechanism that can give me the cadence of > > > > > say, /etc/pkg/FreeBSD.conf once its FreBSD ID is riped out? > > > > > > > > > > Also if $FreeBSD$ needs to be removed, can we please just do > > > > > it in one massive tree wide commit rather than have this > > > > > random piece wise needless noise in 1000's of commits? > > > > > > > > > > > > > Please, no. There is no benefit to prune these in one fell swoop as > > > > opposed to, for example, bumping Copyright dates. > > > > > > Well have to disagree on that. > > > > > > a) If it is removed in one fell swoop it can also probably > > > be undone in one fell swoop too. > > > > > > > It won't ever be undone, so this is irrelevant. > > I would be careful with any claim of never. > I am. It's an extremely poor fit to git, has extreme resistance in git upstream and the available git support is too limited to be useful. Big effort, low reward item in a volunteer project generally means it won't happen when there's other workarounds that are simpler and easier. > > > > > > > b) It concentrates the change in 1 commit that does NOT > > > ever need to be MFC'ed. > > > > > > > That causes merge conflicts for everybody for years. The cost here is too > > high. > > Again, please, enlighten me how a 1 line +- delta in a file is going to > cause any merge conflict outside of +-3 lines from that line? These > strings are VERY well located and in areas that should be very rarely > touched. Very different than things like large white space clean up. > Let's do some math. We have about 10k commits on a stable branch, give or take. My experience with MFCing suggests that 5% of these will have a merge conflict that needs to be resolved. Each one of these conflicts takes 5 minutes to resolve because it breaks up the flow of the commits, etc. So ~500 commits for ~5 minutes is ~40 hours. We've just wasted an entire week of developer time for doing it all at once, vs almost 0 for doing it incrementally. > > c) It'll quickly get us to the damage that is done by > > > the loss of this information from the released binary > > > product so repairs may begin. > > > > > > > We can begin repairs w/o doing this. 99% of these never end up in > binaries > > anyway. > > Oh, now thats false... simple test: > find /bin | xargs grep -l \$FreeBSD: | wc > find /bin | wc > > 44/45 files on my 12.1 system. > > As far as I recall it is more like 99% of our files HAVE these strings in > them. > On my system, the numbers are quite different: % find /*bin /usr/*bin -type f | xargs grep -la '$FreeBSD:' | wc 4 4 64 3:14pm rebo:[245]> find /*bin /usr/*bin -type f | wc 1032 1032 16791 And all 4 binaries are from 2016 and appear to be 'stale' leftovers. > > d) It'll shorten 1000's of commit messages by the lines: > > > While here, remove $FreeBSD$ RCS IDs. > > > > > > > Who cares? I mean, this is not an issue at all. > > > > Like I've said: there's a real cost to doing this, and the benefits from > > doing this are quite small. As someone that's had to deal for years with > > partial merges of sweeping commits, please listen when I say that they > > always cause unintended pain due to their size. > > You can repeat yourself, but please give relavent factual cause on how > this causes a merge conflict. I have given numbers. We'd be wasting a week's time of all our developers, give or take. In most cases it would be a single line delete in an area of the > file that is rarely touched. This is NOT like white space cleanup, > macro renames, or other global scope changes. It is no worse than > the SPDX tagging that was done, and if that had not been caught up > in some work flow errors, would of been fine. > There's value in the SPDX stuff, which we also did piecemeal, and which also caused me grief when I MFC'd stuff because it was done in large batches, and merged incrementally. Warner From owner-dev-commits-src-all@freebsd.org Wed Dec 30 22:23:51 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 485664D0857; Wed, 30 Dec 2020 22:23:51 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5m5z1Zwwz4lbC; Wed, 30 Dec 2020 22:23:51 +0000 (UTC) (envelope-from gjb@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1609367031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PgHb7t4uCOYt42+WdhgQumD5TX+TLvfQDLRJTDXmCdo=; b=xccUqvbyExjeFAcjYIwQrFuvR6B0x/3aMLx7EblYMvhWARMwEZqGj7i8ufFNduDLwgcD31 U4G+vfvRRC7hDbIlnhstmaV+h89EqjvxmG5YGr+w53abNu93FIabT59Ky7YzE1Xlge/3ll iMm7TxxsOI6p+4kCLtjxbawBRKGlatwOPFgbW7rKESdSy9fItFjWXJ887Aj1QsJsg5B7fc 3ZkkjELzZfOuNw54BCcp5PzkVbpWb6mjRHqPbCBfKtZ/dL+/ic5UaS63KIEDehLbooheXA Gpxsb9bxDtrJbFO1rtd8rx0BG4AvHsfoyaNXdlPJn7sWA8XdZRFBAWpRlw8m8g== Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 94B2B452; Wed, 30 Dec 2020 22:23:50 +0000 (UTC) (envelope-from gjb@freebsd.org) Date: Wed, 30 Dec 2020 22:23:47 +0000 From: Glen Barber To: rgrimes@freebsd.org Cc: Ryan Libby , Warner Losh , Kyle Evans , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL Message-ID: <20201230222347.GF1206@FreeBSD.org> References: <202012302118.0BULIuGd083574@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3607uds81ZQvwCD0" Content-Disposition: inline In-Reply-To: <202012302118.0BULIuGd083574@gndrsh.dnsmgr.net> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1609367031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PgHb7t4uCOYt42+WdhgQumD5TX+TLvfQDLRJTDXmCdo=; b=vH5B/VNOo15kMmd4NMQr+2n9ubbAdHfofs7jfQ2hMsLjfj4HPhucrVbXPEebdsGIgyAGG3 W8+S59+4MFfAfmM+UHx8uIwgM8AGiaGwoDa8r4SYOkCpbbzoyR4bQHtxQbiwE0xBooZXNU EUs0q6MmRUmJAgJcroCGUK9bgu/Q73k+J2izQX0CRQ0B/6+5tF59Rne8WhXjuY25IpggmY xRs2Ew/4lU0+SC+2Ot6WlUWY8BvzFXwu9IdeacWYElIuRDUzlcZ879Dy51sCJRHgDOz/AY /fRhp/2wS11AIgZfMRNuhBOCeRC6ENaLp5KJzgOCgm4t700QCHlsa1AOTpfnSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1609367031; a=rsa-sha256; cv=none; b=xv01XKgd6tUyk2B9jpaSJWIr+tkUGDRxvngfDne5XNKbOsrB2oEvxalK54scrdD/l1rhe4 dbKp4r8jOLntBodNi7m+HBLbCHgq1BPeuHIwzarRaUvm/yW/4+2D5U6lOJXhjoTVgImZXh X4KftR96Lr5X1GIMRhEY7ng4VVVqt1LpyY/yBhQMKr+HPYXg8ebSdizd+/sPOE5IpgkwNI ahupFV1G1xzk6kwHifur+KPkr5mf8FzclKtkB27kC9VK3WcAKAOBujoKgZU8bkP9YW/Udf NJjXo3EohjGiOM8SJHzvngpzIn3L+8duVqfVSDbnXGZVn2A4FPWz7B/yyrNK5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 22:23:51 -0000 --3607uds81ZQvwCD0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 30, 2020 at 01:18:56PM -0800, Rodney W. Grimes wrote: > First take your self OUT of developer mode, and into operations > and administration. >=20 > Take for example all the files in /etc, these files can easily > at present often be tracked back to exactly what release installed > them cause the $FreeBSD$ points you at it. These files are often > modified by local administrators, and with out knowing what version > they started out it is a crap shoot to ever figure it out unless > the local mods are minor and you get lucky. >=20 > Contractors are some times hired to go in and upgrade or clean up > after someone else did work, and not having this information and > telling them to go dig in git to try and figure out the state of > there system is pretty much a non-started, well at least it is for > me. >=20 This, IMHO, is a problem best solved with some sort of system configuration management tool (cfengine, puppet, custom management scripts, whatever your flavor of Kool-Aid is on that day), and not by a version control system, distributed or otherwise. Glen (Said with my sysadmin hat on) --3607uds81ZQvwCD0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAl/s/e8ACgkQAxRYpUeP 4pOyqA//UQyXOTgdaPusbmXgxi1AMwAB4ZAJWqP47+Epb2qZt/Ii9sbPUoS0P5lQ El6+uhypbdvIovToQ0Gd64jM9sZCfQRnqLpQvB0Op+cNAnIXNfK+Nbn50mNhGtpH vx6cpklQB4EHyiQvlwa+McMoCs5Dj9cKggku+KJwQ+YhuStLU3fhvWGd/iVAhQNs pRhvr/Oz0Bssy+k3Ob+IQT2NHxjxAG/vnrSmDfw7fOyxYFbU/QxjpD1e3q7utqID g91iPKjP2Kh1dbYEn52gRT5Bc53O+53nDW5F69cXNyT7I6eq3yz1Dz4dljKvxdwl 9NJoMUz9UTXp4rHQm8FiI+XxDvH5cp/hR989Hr3mUJKjdbXI9KHJB2NK+PzKtSWr Yl049e5eFBOd3TtT8QqJHQ+U39Sr92mG85bVzXooei0Bjvk8R6fHWCkgqnSKNlAq x0Ego2EREumo2e5ZAXEBQ2Ngf9CRzuLtoF+HJKjG75yqsDsO8Qde+K+Kf1iQ+ER0 Ev/1f1g3clkeao5R8A3X4NnDs6RD0k18aYYYhEGSmUQa8sodSq2bhXd8Sj9ldbfW Sh8gVLc6lOnPQn9u4juSKU5LfjosTXCrjLcVeITws1fsY3ClhhtHlLI++Wk+CuEY 7WzNB4/jXIuy/1HjT+6faSLj1KeDjUAD4KlJNL7DMWJQn3L9RKA= =zo6T -----END PGP SIGNATURE----- --3607uds81ZQvwCD0-- From owner-dev-commits-src-all@freebsd.org Wed Dec 30 22:45:53 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC23E4D1167; Wed, 30 Dec 2020 22:45:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5mbP6PWZz4mmY; Wed, 30 Dec 2020 22:45:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CEF7625F89; Wed, 30 Dec 2020 22:45:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUMjrUP032437; Wed, 30 Dec 2020 22:45:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUMjrlb032434; Wed, 30 Dec 2020 22:45:53 GMT (envelope-from git) Date: Wed, 30 Dec 2020 22:45:53 GMT Message-Id: <202012302245.0BUMjrlb032434@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Kubaj Subject: git: adf79abc35ff - main - Radix dump updates MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: adf79abc35ff807644c5e43c3d4856b5a29e15ab Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 22:45:54 -0000 The branch main has been updated by pkubaj (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=adf79abc35ff807644c5e43c3d4856b5a29e15ab commit adf79abc35ff807644c5e43c3d4856b5a29e15ab Author: Justin Hibbits AuthorDate: 2020-05-27 03:31:17 +0000 Commit: Piotr Kubaj CommitDate: 2020-12-30 22:45:28 +0000 Radix dump updates --- sys/powerpc/aim/mmu_radix.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c index 5833739a25df..2373425afd30 100644 --- a/sys/powerpc/aim/mmu_radix.c +++ b/sys/powerpc/aim/mmu_radix.c @@ -1216,6 +1216,7 @@ retry: } PV_STAT(atomic_add_int(&pc_chunk_count, 1)); PV_STAT(atomic_add_int(&pc_chunk_allocs, 1)); + dump_add_page(m->phys_addr); pc = (void *)PHYS_TO_DMAP(m->phys_addr); pc->pc_pmap = pmap; pc->pc_map[0] = PC_FREE0; @@ -1490,6 +1491,7 @@ reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp) PV_STAT(atomic_add_int(&pc_chunk_frees, 1)); /* Entire chunk is free; return it. */ m_pc = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); + dump_drop_page(m_pc->phys_addr); mtx_lock(&pv_chunks_mutex); TAILQ_REMOVE(&pv_chunks, pc, pc_lru); break; @@ -1579,6 +1581,7 @@ free_pv_chunk(struct pv_chunk *pc) PV_STAT(atomic_add_int(&pc_chunk_frees, 1)); /* entire chunk is free, return it */ m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); + dump_drop_page(m->phys_addr); vm_page_unwire_noq(m); vm_page_free(m); } @@ -1639,6 +1642,7 @@ retry: } PV_STAT(atomic_add_int(&pc_chunk_count, 1)); PV_STAT(atomic_add_int(&pc_chunk_allocs, 1)); + dump_add_page(m->phys_addr); pc = (void *)PHYS_TO_DMAP(m->phys_addr); pc->pc_pmap = pmap; pc->pc_map[0] = PC_FREE0 & ~1ul; /* preallocated bit 0 */ @@ -2095,6 +2099,10 @@ mmu_radix_late_bootstrap(vm_offset_t start, vm_offset_t end) pa = allocpages(DPCPU_SIZE >> PAGE_SHIFT); dpcpu = (void *)PHYS_TO_DMAP(pa); dpcpu_init(dpcpu, curcpu); + + crashdumpmap = (caddr_t)virtual_avail; + virtual_avail += MAXDUMPPGS * PAGE_SIZE; + /* * Reserve some special page table entries/VA space for temporary * mapping of pages. From owner-dev-commits-src-all@freebsd.org Wed Dec 30 22:45:54 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0C5B64D1258; Wed, 30 Dec 2020 22:45:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5mbP6xHwz4mRm; Wed, 30 Dec 2020 22:45:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E0EF925D8C; Wed, 30 Dec 2020 22:45:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUMjrZg032454; Wed, 30 Dec 2020 22:45:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUMjrBF032453; Wed, 30 Dec 2020 22:45:53 GMT (envelope-from git) Date: Wed, 30 Dec 2020 22:45:53 GMT Message-Id: <202012302245.0BUMjrBF032453@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Kubaj Subject: git: 7d7f26f5b613 - main - powerpc/radix_mmu: Apply errata fixes for POWER9 TLB invalidation bug MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7d7f26f5b613bf54ab30b86f9a03ca8bb3f10bb9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 22:45:54 -0000 The branch main has been updated by pkubaj (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=7d7f26f5b613bf54ab30b86f9a03ca8bb3f10bb9 commit 7d7f26f5b613bf54ab30b86f9a03ca8bb3f10bb9 Author: Justin Hibbits AuthorDate: 2020-05-14 15:50:27 +0000 Commit: Piotr Kubaj CommitDate: 2020-12-30 22:45:21 +0000 powerpc/radix_mmu: Apply errata fixes for POWER9 TLB invalidation bug Found in Linux, the only apparent source of errata documentation. --- sys/powerpc/aim/mmu_radix.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c index cd067f96d90a..5833739a25df 100644 --- a/sys/powerpc/aim/mmu_radix.c +++ b/sys/powerpc/aim/mmu_radix.c @@ -193,7 +193,19 @@ radix_tlbie(uint8_t ric, uint8_t prs, uint16_t is, uint32_t pid, uint32_t lpid, rs = ((uint64_t)pid << 32) | lpid; rb = va | is | ap; __asm __volatile(PPC_TLBIE_5(%0, %1, %2, %3, 1) : : - "r" (rb), "r" (rs), "i" (ric), "i" (prs)); + "r" (rb), "r" (rs), "i" (ric), "i" (prs) : "memory"); +} + +static __inline void +radix_tlbie_fixup(uint32_t pid, vm_offset_t va, int ap) +{ + + __asm __volatile("ptesync" ::: "memory"); + radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, + TLBIEL_INVAL_PAGE, 0, 0, va, ap); + __asm __volatile("ptesync" ::: "memory"); + radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, + TLBIEL_INVAL_PAGE, pid, 0, va, ap); } static __inline void @@ -202,6 +214,7 @@ radix_tlbie_invlpg_user_4k(uint32_t pid, vm_offset_t va) radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, TLBIEL_INVAL_PAGE, pid, 0, va, TLBIE_ACTUAL_PAGE_4K); + radix_tlbie_fixup(pid, va, TLBIE_ACTUAL_PAGE_4K); } static __inline void @@ -210,6 +223,7 @@ radix_tlbie_invlpg_user_2m(uint32_t pid, vm_offset_t va) radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, TLBIEL_INVAL_PAGE, pid, 0, va, TLBIE_ACTUAL_PAGE_2M); + radix_tlbie_fixup(pid, va, TLBIE_ACTUAL_PAGE_2M); } static __inline void @@ -234,6 +248,7 @@ radix_tlbie_invlpg_kernel_4k(vm_offset_t va) radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, TLBIEL_INVAL_PAGE, 0, 0, va, TLBIE_ACTUAL_PAGE_4K); + radix_tlbie_fixup(0, va, TLBIE_ACTUAL_PAGE_4K); } static __inline void @@ -242,6 +257,7 @@ radix_tlbie_invlpg_kernel_2m(vm_offset_t va) radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, TLBIEL_INVAL_PAGE, 0, 0, va, TLBIE_ACTUAL_PAGE_2M); + radix_tlbie_fixup(0, va, TLBIE_ACTUAL_PAGE_2M); } /* 1GB pages aren't currently supported. */ @@ -251,6 +267,7 @@ radix_tlbie_invlpg_kernel_1g(vm_offset_t va) radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, TLBIEL_INVAL_PAGE, 0, 0, va, TLBIE_ACTUAL_PAGE_1G); + radix_tlbie_fixup(0, va, TLBIE_ACTUAL_PAGE_1G); } static __inline void @@ -2757,6 +2774,7 @@ setpte: pmap_pv_promote_l3e(pmap, va, newpde & PG_PS_FRAME, lockp); pte_store(pde, PG_PROMOTED | newpde); + ptesync(); atomic_add_long(&pmap_l3e_promotions, 1); CTR2(KTR_PMAP, "pmap_promote_l3e: success for va %#lx" " in pmap %p", va, pmap); From owner-dev-commits-src-all@freebsd.org Wed Dec 30 22:45:54 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 281AD4D13A3; Wed, 30 Dec 2020 22:45:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5mbQ0Nn7z4mV3; Wed, 30 Dec 2020 22:45:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F3EAE25D8D; Wed, 30 Dec 2020 22:45:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUMjrYA032471; Wed, 30 Dec 2020 22:45:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUMjrc6032470; Wed, 30 Dec 2020 22:45:53 GMT (envelope-from git) Date: Wed, 30 Dec 2020 22:45:53 GMT Message-Id: <202012302245.0BUMjrc6032470@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Kubaj Subject: git: ac19bf854b8c - main - powerpc/aim: Add machine check handler for TLB multihit MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ac19bf854b8c0bedc793af0cb501f08c6612ccd5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 22:45:54 -0000 The branch main has been updated by pkubaj (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ac19bf854b8c0bedc793af0cb501f08c6612ccd5 commit ac19bf854b8c0bedc793af0cb501f08c6612ccd5 Author: Justin Hibbits AuthorDate: 2020-05-29 02:02:41 +0000 Commit: Piotr Kubaj CommitDate: 2020-12-30 22:45:10 +0000 powerpc/aim: Add machine check handler for TLB multihit Handle TLB multi-hit the same as ERAT multi-hit, by flushing the full TLB. --- sys/powerpc/aim/aim_machdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/powerpc/aim/aim_machdep.c b/sys/powerpc/aim/aim_machdep.c index 8824e7447ea6..0ce7cf03403f 100644 --- a/sys/powerpc/aim/aim_machdep.c +++ b/sys/powerpc/aim/aim_machdep.c @@ -563,7 +563,8 @@ cpu_machine_check(struct thread *td, struct trapframe *frame, int *ucode) /* SLB multi-hit is recoverable. */ if ((frame->cpu.aim.dsisr & DSISR_MC_SLB_MULTIHIT) != 0) return (0); - if ((frame->cpu.aim.dsisr & DSISR_MC_DERAT_MULTIHIT) != 0) { + if ((frame->cpu.aim.dsisr & + (DSISR_MC_DERAT_MULTIHIT | DSISR_MC_TLB_MULTIHIT)) != 0) { pmap_tlbie_all(); return (0); } From owner-dev-commits-src-all@freebsd.org Wed Dec 30 22:45:53 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C8FEE4D15CC; Wed, 30 Dec 2020 22:45:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5mbP5NSNz4mpV; Wed, 30 Dec 2020 22:45:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ABF9F25AB9; Wed, 30 Dec 2020 22:45:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUMjr9c032401; Wed, 30 Dec 2020 22:45:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUMjrpm032399; Wed, 30 Dec 2020 22:45:53 GMT (envelope-from git) Date: Wed, 30 Dec 2020 22:45:53 GMT Message-Id: <202012302245.0BUMjrpm032399@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Kubaj Subject: git: 76ff03aef741 - main - powerpc: Fix copyin/copyout race condition MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 76ff03aef7411e601673dfc997bd6d691bd9a14e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 22:45:53 -0000 The branch main has been updated by pkubaj (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=76ff03aef7411e601673dfc997bd6d691bd9a14e commit 76ff03aef7411e601673dfc997bd6d691bd9a14e Author: Justin Hibbits AuthorDate: 2020-12-08 22:49:25 +0000 Commit: Piotr Kubaj CommitDate: 2020-12-30 22:45:44 +0000 powerpc: Fix copyin/copyout race condition It's possible for a context switch, and CPU migration, to occur between fetching the PCPU context and extracting the pc_curpcb. This can cause the fault handler to be installed for the wrong thread, leading to a panic in copyin()/copyout(). Since curthread is already in %r13, just use that directly, as GPRs are migrated, so there is no migration race risk. --- sys/powerpc/powerpc/support.S | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/sys/powerpc/powerpc/support.S b/sys/powerpc/powerpc/support.S index 9ff1bcc02437..10d3192972d5 100644 --- a/sys/powerpc/powerpc/support.S +++ b/sys/powerpc/powerpc/support.S @@ -61,6 +61,7 @@ /* log_2(8 * WORD) */ #define LOOP_LOG 6 #define LOG_WORD 3 +#define CURTHREAD %r13 #else #define LOAD lwz #define STORE stw @@ -70,6 +71,7 @@ /* log_2(8 * WORD) */ #define LOOP_LOG 5 #define LOG_WORD 2 +#define CURTHREAD %r2 #endif #ifdef AIM @@ -149,32 +151,26 @@ #endif -#define PCPU(reg) mfsprg reg, 0 - #define SET_COPYFAULT(raddr, rpcb, len) \ VALIDATE_ADDR_COPY(raddr, len) ;\ - PCPU(%r9) ;\ li %r0, COPYFAULT ;\ - LOAD rpcb, PC_CURPCB(%r9) ;\ + LOAD rpcb, TD_PCB(CURTHREAD) ;\ STORE %r0, PCB_ONFAULT(rpcb) ;\ #define SET_COPYFAULT_TRUNCATE(raddr, rpcb, len)\ VALIDATE_TRUNCATE_ADDR_COPY(raddr, len) ;\ - PCPU(%r9) ;\ li %r0, COPYFAULT ;\ - LOAD rpcb, PC_CURPCB(%r9) ;\ + LOAD rpcb, TD_PCB(CURTHREAD) ;\ STORE %r0, PCB_ONFAULT(rpcb) #define SET_FUSUFAULT(raddr, rpcb) \ VALIDATE_ADDR_FUSU(raddr) ;\ - PCPU(%r9) ;\ li %r0, FUSUFAULT ;\ - LOAD rpcb, PC_CURPCB(%r9) ;\ + LOAD rpcb, TD_PCB(CURTHREAD) ;\ STORE %r0, PCB_ONFAULT(rpcb) #define CLEAR_FAULT_NO_CLOBBER(rpcb) \ - PCPU(%r9) ;\ - LOAD rpcb, PC_CURPCB(%r9) ;\ + LOAD rpcb, TD_PCB(CURTHREAD) ;\ li %r0, 0 ;\ STORE %r0, PCB_ONFAULT(rpcb) From owner-dev-commits-src-all@freebsd.org Wed Dec 30 22:45:53 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DBC484D1166; Wed, 30 Dec 2020 22:45:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5mbP5twyz4mRl; Wed, 30 Dec 2020 22:45:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD4DD25D55; Wed, 30 Dec 2020 22:45:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUMjroE032418; Wed, 30 Dec 2020 22:45:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUMjrQN032417; Wed, 30 Dec 2020 22:45:53 GMT (envelope-from git) Date: Wed, 30 Dec 2020 22:45:53 GMT Message-Id: <202012302245.0BUMjrQN032417@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Kubaj Subject: git: 6260bfb08742 - main - powerpc: Optimize copyinstr() to avoid repeatedly mapping user strings MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6260bfb0874280d3fb58ac52699e2aee6ecca8a8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 22:45:53 -0000 The branch main has been updated by pkubaj (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=6260bfb0874280d3fb58ac52699e2aee6ecca8a8 commit 6260bfb0874280d3fb58ac52699e2aee6ecca8a8 Author: Justin Hibbits AuthorDate: 2020-06-04 18:15:15 +0000 Commit: Piotr Kubaj CommitDate: 2020-12-30 22:45:35 +0000 powerpc: Optimize copyinstr() to avoid repeatedly mapping user strings Currently copyinstr() uses fubyte() to read each byte from userspace. However, this means that for each byte, it calls pmap_map_user_ptr() to map the string into memory. This is needlessly wasteful, since the string will rarely ever cross a segment boundary. Instead, map a segment at a time, and copy as much from that segment as possible at a time. Measured with the HPT pmap on powerpc64, this saves roughly 8% time on buildkernel, and 5% on buildworld, in wallclock time. --- sys/powerpc/powerpc/copyinout.c | 46 +++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/sys/powerpc/powerpc/copyinout.c b/sys/powerpc/powerpc/copyinout.c index 76965ad996b8..1528accc0e0e 100644 --- a/sys/powerpc/powerpc/copyinout.c +++ b/sys/powerpc/powerpc/copyinout.c @@ -236,31 +236,51 @@ REMAP(copyin)(const void *udaddr, void *kaddr, size_t len) int REMAP(copyinstr)(const void *udaddr, void *kaddr, size_t len, size_t *done) { + struct thread *td; + pmap_t pm; + jmp_buf env; const char *up; - char *kp; - size_t l; - int rv, c; + char *kp, *p; + size_t i, l, t; + int rv; - kp = kaddr; - up = udaddr; + td = curthread; + pm = &td->td_proc->p_vmspace->vm_pmap; + t = 0; rv = ENAMETOOLONG; - for (l = 0; len-- > 0; l++) { - if ((c = fubyte(up++)) < 0) { + td->td_pcb->pcb_onfault = &env; + if (setjmp(env)) { + rv = EFAULT; + goto done; + } + + kp = kaddr; + up = udaddr; + + while (len > 0) { + if (pmap_map_user_ptr(pm, up, (void **)&p, len, &l)) { rv = EFAULT; - break; + goto done; } - if (!(*kp++ = c)) { - l++; - rv = 0; - break; + for (i = 0; len > 0 && i < l; i++, t++, len--) { + if ((*kp++ = *p++) == 0) { + i++, t++; + rv = 0; + goto done; + } } + + up += l; } +done: + td->td_pcb->pcb_onfault = NULL; + if (done != NULL) { - *done = l; + *done = t; } return (rv); From owner-dev-commits-src-all@freebsd.org Wed Dec 30 22:53:45 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B3944D1AEE; Wed, 30 Dec 2020 22:53:45 +0000 (UTC) (envelope-from bdragon@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 4D5mmT3MgFz4p0y; Wed, 30 Dec 2020 22:53:45 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 607478F98; Wed, 30 Dec 2020 22:53:45 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 2A46527C0054; Wed, 30 Dec 2020 17:53:45 -0500 (EST) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Wed, 30 Dec 2020 17:53:45 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvgedgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepheeiieekkeffkeelkeel geetgfeltdetgffhudetieekveefvdfhgefgffdujefgnecuffhomhgrihhnpehfrhgvvg gsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepsggurhgrghhonhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqud dtgedvfeehkeeigedqudekuddtkeehuddqsggurhgrghhonheppefhrhgvvgeuufffrdho rhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 807A5C200A5; Wed, 30 Dec 2020 17:53:45 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.1-61-gb52c239-fm-20201210.001-gb52c2396 Mime-Version: 1.0 Message-Id: <050b7622-0766-42b9-a7a3-420f586e39ea@www.fastmail.com> In-Reply-To: <202012302245.0BUMjrpm032399@gitrepo.freebsd.org> References: <202012302245.0BUMjrpm032399@gitrepo.freebsd.org> Date: Wed, 30 Dec 2020 16:53:25 -0600 From: "Brandon Bergren" To: "Piotr Kubaj" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: =?UTF-8?Q?Re:_git:_76ff03aef741_-_main_-_powerpc:_Fix_copyin/copyout_rac?= =?UTF-8?Q?e_condition?= Content-Type: text/plain X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 22:53:45 -0000 Note: This commit series is stuff salvaged from jhibbits' local tree. Apologies for the malformed commit messages, Piotr and I were discussing them in IRC earlier and I was under the mistaken assumption that they would get reworded before the push. On Wed, Dec 30, 2020, at 4:45 PM, Piotr Kubaj wrote: > The branch main has been updated by pkubaj (ports committer): > > URL: > https://cgit.FreeBSD.org/src/commit/?id=76ff03aef7411e601673dfc997bd6d691bd9a14e > > commit 76ff03aef7411e601673dfc997bd6d691bd9a14e > Author: Justin Hibbits > AuthorDate: 2020-12-08 22:49:25 +0000 > Commit: Piotr Kubaj > CommitDate: 2020-12-30 22:45:44 +0000 > > powerpc: Fix copyin/copyout race condition > > It's possible for a context switch, and CPU migration, to occur between > fetching the PCPU context and extracting the pc_curpcb. This can cause > the fault handler to be installed for the wrong thread, leading to a > panic in copyin()/copyout(). Since curthread is already in %r13, just > use that directly, as GPRs are migrated, so there is no migration race > risk. -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-all@freebsd.org Wed Dec 30 22:57:20 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 754FF4D1F6D; Wed, 30 Dec 2020 22:57:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5mrc2x4qz4p4l; Wed, 30 Dec 2020 22:57:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5331525F62; Wed, 30 Dec 2020 22:57:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUMvKVd045399; Wed, 30 Dec 2020 22:57:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUMvK0h045398; Wed, 30 Dec 2020 22:57:20 GMT (envelope-from git) Date: Wed, 30 Dec 2020 22:57:20 GMT Message-Id: <202012302257.0BUMvK0h045398@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: 4f250d9436af - main - [POWERPC64LE] enable IPMI using OPAL bus MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alfredo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f250d9436af83927c38eda958de14893c73f0ac Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 22:57:20 -0000 The branch main has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=4f250d9436af83927c38eda958de14893c73f0ac commit 4f250d9436af83927c38eda958de14893c73f0ac Author: Alfredo Dal'Ava Junior AuthorDate: 2020-12-31 01:32:34 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2020-12-31 01:55:53 +0000 [POWERPC64LE] enable IPMI using OPAL bus Enable build of IPMI over OPAL on powerpc64le Reviewed by: bdragon Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D27443 --- sys/modules/ipmi/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/modules/ipmi/Makefile b/sys/modules/ipmi/Makefile index 5a730ef74830..4539dfda3b28 100644 --- a/sys/modules/ipmi/Makefile +++ b/sys/modules/ipmi/Makefile @@ -15,7 +15,7 @@ SRCS+= acpi_if.h isa_if.h pci_if.h smbus_if.h SUBDIR+= ipmi_linux -.elif ${MACHINE_ARCH} == "powerpc64" +.elif ${MACHINE_ARCH:Mpowerpc64*} != "" SRCS+= ipmi_opal.c ofw_bus_if.h .endif From owner-dev-commits-src-all@freebsd.org Wed Dec 30 22:58:10 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CFBF84D219B; Wed, 30 Dec 2020 22:58:10 +0000 (UTC) (envelope-from bdragon@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 4D5msZ5KPqz4pGd; Wed, 30 Dec 2020 22:58:10 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id A33128747; Wed, 30 Dec 2020 22:58:10 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id D980527C0054; Wed, 30 Dec 2020 17:58:09 -0500 (EST) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Wed, 30 Dec 2020 17:58:09 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvgedgtdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder redtnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhephfdvgfettdeuvedujeeu gffhkeekjeefgfelkeelvedvfeeuhfelveefleeluddtnecuffhomhgrihhnpehfrhgvvg gsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepsggurhgrghhonhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqud dtgedvfeehkeeigedqudekuddtkeehuddqsggurhgrghhonheppefhrhgvvgeuufffrdho rhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 315EBC200A7; Wed, 30 Dec 2020 17:58:10 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.1-61-gb52c239-fm-20201210.001-gb52c2396 Mime-Version: 1.0 Message-Id: <1aef0db2-d564-4ac0-8019-b0a49c9a4e2f@www.fastmail.com> In-Reply-To: <202012302245.0BUMjrlb032434@gitrepo.freebsd.org> References: <202012302245.0BUMjrlb032434@gitrepo.freebsd.org> Date: Wed, 30 Dec 2020 16:57:42 -0600 From: "Brandon Bergren" To: "Piotr Kubaj" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: adf79abc35ff - main - Radix dump updates Content-Type: text/plain X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 22:58:10 -0000 [PowerPC] Update crash dump page tracking in Radix MMU Due to incorrect bookkeeping, the wrong pages were being dumped in some cases. Update the dump tracking to match the actual page liveness. Approved-By: bdragon (in IRC) On Wed, Dec 30, 2020, at 4:45 PM, Piotr Kubaj wrote: > The branch main has been updated by pkubaj (ports committer): > > URL: > https://cgit.FreeBSD.org/src/commit/?id=adf79abc35ff807644c5e43c3d4856b5a29e15ab > > commit adf79abc35ff807644c5e43c3d4856b5a29e15ab > Author: Justin Hibbits > AuthorDate: 2020-05-27 03:31:17 +0000 > Commit: Piotr Kubaj > CommitDate: 2020-12-30 22:45:28 +0000 > > Radix dump updates > --- > sys/powerpc/aim/mmu_radix.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c > index 5833739a25df..2373425afd30 100644 > --- a/sys/powerpc/aim/mmu_radix.c > +++ b/sys/powerpc/aim/mmu_radix.c > @@ -1216,6 +1216,7 @@ retry: > } > PV_STAT(atomic_add_int(&pc_chunk_count, 1)); > PV_STAT(atomic_add_int(&pc_chunk_allocs, 1)); > + dump_add_page(m->phys_addr); > pc = (void *)PHYS_TO_DMAP(m->phys_addr); > pc->pc_pmap = pmap; > pc->pc_map[0] = PC_FREE0; > @@ -1490,6 +1491,7 @@ reclaim_pv_chunk(pmap_t locked_pmap, struct > rwlock **lockp) > PV_STAT(atomic_add_int(&pc_chunk_frees, 1)); > /* Entire chunk is free; return it. */ > m_pc = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); > + dump_drop_page(m_pc->phys_addr); > mtx_lock(&pv_chunks_mutex); > TAILQ_REMOVE(&pv_chunks, pc, pc_lru); > break; > @@ -1579,6 +1581,7 @@ free_pv_chunk(struct pv_chunk *pc) > PV_STAT(atomic_add_int(&pc_chunk_frees, 1)); > /* entire chunk is free, return it */ > m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); > + dump_drop_page(m->phys_addr); > vm_page_unwire_noq(m); > vm_page_free(m); > } > @@ -1639,6 +1642,7 @@ retry: > } > PV_STAT(atomic_add_int(&pc_chunk_count, 1)); > PV_STAT(atomic_add_int(&pc_chunk_allocs, 1)); > + dump_add_page(m->phys_addr); > pc = (void *)PHYS_TO_DMAP(m->phys_addr); > pc->pc_pmap = pmap; > pc->pc_map[0] = PC_FREE0 & ~1ul; /* preallocated bit 0 */ > @@ -2095,6 +2099,10 @@ mmu_radix_late_bootstrap(vm_offset_t start, > vm_offset_t end) > pa = allocpages(DPCPU_SIZE >> PAGE_SHIFT); > dpcpu = (void *)PHYS_TO_DMAP(pa); > dpcpu_init(dpcpu, curcpu); > + > + crashdumpmap = (caddr_t)virtual_avail; > + virtual_avail += MAXDUMPPGS * PAGE_SIZE; > + > /* > * Reserve some special page table entries/VA space for temporary > * mapping of pages. > -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-all@freebsd.org Wed Dec 30 22:58:47 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D15FC4D21B1; Wed, 30 Dec 2020 22:58:47 +0000 (UTC) (envelope-from bdragon@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 4D5mtH5Kmqz4pQQ; Wed, 30 Dec 2020 22:58:47 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 9F2FC91F6; Wed, 30 Dec 2020 22:58:47 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 9479827C0054; Wed, 30 Dec 2020 17:58:47 -0500 (EST) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Wed, 30 Dec 2020 17:58:47 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvgedgtdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepheeiieekkeffkeelkeel geetgfeltdetgffhudetieekveefvdfhgefgffdujefgnecuffhomhgrihhnpehfrhgvvg gsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepsggurhgrghhonhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqud dtgedvfeehkeeigedqudekuddtkeehuddqsggurhgrghhonheppefhrhgvvgeuufffrdho rhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id E80A4C200A5; Wed, 30 Dec 2020 17:58:47 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.1-61-gb52c239-fm-20201210.001-gb52c2396 Mime-Version: 1.0 Message-Id: <2c16d4dd-30e4-40ae-91f9-1936434dc922@www.fastmail.com> In-Reply-To: <202012302245.0BUMjrQN032417@gitrepo.freebsd.org> References: <202012302245.0BUMjrQN032417@gitrepo.freebsd.org> Date: Wed, 30 Dec 2020 16:58:26 -0600 From: "Brandon Bergren" To: "Piotr Kubaj" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: =?UTF-8?Q?Re:_git:_6260bfb08742_-_main_-_powerpc:_Optimize_copyinstr()_t?= =?UTF-8?Q?o_avoid_repeatedly_mapping_user_strings?= Content-Type: text/plain X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 22:58:47 -0000 Approved-By: bdragon (in IRC) On Wed, Dec 30, 2020, at 4:45 PM, Piotr Kubaj wrote: > The branch main has been updated by pkubaj (ports committer): > > URL: > https://cgit.FreeBSD.org/src/commit/?id=6260bfb0874280d3fb58ac52699e2aee6ecca8a8 > > commit 6260bfb0874280d3fb58ac52699e2aee6ecca8a8 > Author: Justin Hibbits > AuthorDate: 2020-06-04 18:15:15 +0000 > Commit: Piotr Kubaj > CommitDate: 2020-12-30 22:45:35 +0000 > > powerpc: Optimize copyinstr() to avoid repeatedly mapping user strings > > Currently copyinstr() uses fubyte() to read each byte from userspace. > However, this means that for each byte, it calls pmap_map_user_ptr() to > map the string into memory. This is needlessly wasteful, since the > string will rarely ever cross a segment boundary. Instead, map a > segment at a time, and copy as much from that segment as possible at a > time. > > Measured with the HPT pmap on powerpc64, this saves roughly 8% time on > buildkernel, and 5% on buildworld, in wallclock time. > --- > sys/powerpc/powerpc/copyinout.c | 46 +++++++++++++++++++++++++++++------------ > 1 file changed, 33 insertions(+), 13 deletions(-) > > diff --git a/sys/powerpc/powerpc/copyinout.c b/sys/powerpc/powerpc/copyinout.c > index 76965ad996b8..1528accc0e0e 100644 > --- a/sys/powerpc/powerpc/copyinout.c > +++ b/sys/powerpc/powerpc/copyinout.c > @@ -236,31 +236,51 @@ REMAP(copyin)(const void *udaddr, void *kaddr, size_t len) > int > REMAP(copyinstr)(const void *udaddr, void *kaddr, size_t len, size_t *done) > { > + struct thread *td; > + pmap_t pm; > + jmp_buf env; > const char *up; > - char *kp; > - size_t l; > - int rv, c; > + char *kp, *p; > + size_t i, l, t; > + int rv; > > - kp = kaddr; > - up = udaddr; > + td = curthread; > + pm = &td->td_proc->p_vmspace->vm_pmap; > > + t = 0; > rv = ENAMETOOLONG; > > - for (l = 0; len-- > 0; l++) { > - if ((c = fubyte(up++)) < 0) { > + td->td_pcb->pcb_onfault = &env; > + if (setjmp(env)) { > + rv = EFAULT; > + goto done; > + } > + > + kp = kaddr; > + up = udaddr; > + > + while (len > 0) { > + if (pmap_map_user_ptr(pm, up, (void **)&p, len, &l)) { > rv = EFAULT; > - break; > + goto done; > } > > - if (!(*kp++ = c)) { > - l++; > - rv = 0; > - break; > + for (i = 0; len > 0 && i < l; i++, t++, len--) { > + if ((*kp++ = *p++) == 0) { > + i++, t++; > + rv = 0; > + goto done; > + } > } > + > + up += l; > } > > +done: > + td->td_pcb->pcb_onfault = NULL; > + > if (done != NULL) { > - *done = l; > + *done = t; > } > > return (rv); > -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-all@freebsd.org Wed Dec 30 22:59:24 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 211924D1FE9; Wed, 30 Dec 2020 22:59:24 +0000 (UTC) (envelope-from bdragon@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 4D5mty2SSGz4pcv; Wed, 30 Dec 2020 22:59:21 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id EB8A88748; Wed, 30 Dec 2020 22:59:17 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id DA51F27C0054; Wed, 30 Dec 2020 17:59:17 -0500 (EST) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Wed, 30 Dec 2020 17:59:17 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvgedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepheeiieekkeffkeelkeel geetgfeltdetgffhudetieekveefvdfhgefgffdujefgnecuffhomhgrihhnpehfrhgvvg gsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepsggurhgrghhonhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqud dtgedvfeehkeeigedqudekuddtkeehuddqsggurhgrghhonheppefhrhgvvgeuufffrdho rhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 3DF14C200A5; Wed, 30 Dec 2020 17:59:18 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.1-61-gb52c239-fm-20201210.001-gb52c2396 Mime-Version: 1.0 Message-Id: In-Reply-To: <202012302245.0BUMjrc6032470@gitrepo.freebsd.org> References: <202012302245.0BUMjrc6032470@gitrepo.freebsd.org> Date: Wed, 30 Dec 2020 16:58:57 -0600 From: "Brandon Bergren" To: "Piotr Kubaj" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: =?UTF-8?Q?Re:_git:_ac19bf854b8c_-_main_-_powerpc/aim:_Add_machine_check_?= =?UTF-8?Q?handler_for_TLB_multihit?= Content-Type: text/plain X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 22:59:24 -0000 Approved-By: bdragon (in IRC) On Wed, Dec 30, 2020, at 4:45 PM, Piotr Kubaj wrote: > The branch main has been updated by pkubaj (ports committer): > > URL: > https://cgit.FreeBSD.org/src/commit/?id=ac19bf854b8c0bedc793af0cb501f08c6612ccd5 > > commit ac19bf854b8c0bedc793af0cb501f08c6612ccd5 > Author: Justin Hibbits > AuthorDate: 2020-05-29 02:02:41 +0000 > Commit: Piotr Kubaj > CommitDate: 2020-12-30 22:45:10 +0000 > > powerpc/aim: Add machine check handler for TLB multihit > > Handle TLB multi-hit the same as ERAT multi-hit, by flushing the full > TLB. > --- > sys/powerpc/aim/aim_machdep.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/sys/powerpc/aim/aim_machdep.c > b/sys/powerpc/aim/aim_machdep.c > index 8824e7447ea6..0ce7cf03403f 100644 > --- a/sys/powerpc/aim/aim_machdep.c > +++ b/sys/powerpc/aim/aim_machdep.c > @@ -563,7 +563,8 @@ cpu_machine_check(struct thread *td, struct > trapframe *frame, int *ucode) > /* SLB multi-hit is recoverable. */ > if ((frame->cpu.aim.dsisr & DSISR_MC_SLB_MULTIHIT) != 0) > return (0); > - if ((frame->cpu.aim.dsisr & DSISR_MC_DERAT_MULTIHIT) != 0) { > + if ((frame->cpu.aim.dsisr & > + (DSISR_MC_DERAT_MULTIHIT | DSISR_MC_TLB_MULTIHIT)) != 0) { > pmap_tlbie_all(); > return (0); > } > -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-all@freebsd.org Wed Dec 30 23:00:05 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3CFA04D21D3; Wed, 30 Dec 2020 23:00:05 +0000 (UTC) (envelope-from bdragon@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 4D5mvn17HXz4q2l; Wed, 30 Dec 2020 23:00:05 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 18E527AE7; Wed, 30 Dec 2020 23:00:05 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 0F9D127C0054; Wed, 30 Dec 2020 18:00:05 -0500 (EST) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Wed, 30 Dec 2020 18:00:05 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvgedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepheeiieekkeffkeelkeel geetgfeltdetgffhudetieekveefvdfhgefgffdujefgnecuffhomhgrihhnpehfrhgvvg gsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhf rhhomhepsggurhgrghhonhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqud dtgedvfeehkeeigedqudekuddtkeehuddqsggurhgrghhonheppefhrhgvvgeuufffrdho rhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 518D2C200A5; Wed, 30 Dec 2020 18:00:05 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.1-61-gb52c239-fm-20201210.001-gb52c2396 Mime-Version: 1.0 Message-Id: <63205fd6-7a3b-4e7e-a717-4d250c49ecc9@www.fastmail.com> In-Reply-To: <202012302245.0BUMjrBF032453@gitrepo.freebsd.org> References: <202012302245.0BUMjrBF032453@gitrepo.freebsd.org> Date: Wed, 30 Dec 2020 16:59:44 -0600 From: "Brandon Bergren" To: "Piotr Kubaj" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: =?UTF-8?Q?Re:_git:_7d7f26f5b613_-_main_-_powerpc/radix=5Fmmu:_Apply_erra?= =?UTF-8?Q?ta_fixes_for_POWER9_TLB_invalidation_bug?= Content-Type: text/plain X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 23:00:05 -0000 Approved-By: bdragon (in IRC) On Wed, Dec 30, 2020, at 4:45 PM, Piotr Kubaj wrote: > The branch main has been updated by pkubaj (ports committer): > > URL: > https://cgit.FreeBSD.org/src/commit/?id=7d7f26f5b613bf54ab30b86f9a03ca8bb3f10bb9 > > commit 7d7f26f5b613bf54ab30b86f9a03ca8bb3f10bb9 > Author: Justin Hibbits > AuthorDate: 2020-05-14 15:50:27 +0000 > Commit: Piotr Kubaj > CommitDate: 2020-12-30 22:45:21 +0000 > > powerpc/radix_mmu: Apply errata fixes for POWER9 TLB invalidation bug > > Found in Linux, the only apparent source of errata documentation. > --- > sys/powerpc/aim/mmu_radix.c | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > > diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c > index cd067f96d90a..5833739a25df 100644 > --- a/sys/powerpc/aim/mmu_radix.c > +++ b/sys/powerpc/aim/mmu_radix.c > @@ -193,7 +193,19 @@ radix_tlbie(uint8_t ric, uint8_t prs, uint16_t is, > uint32_t pid, uint32_t lpid, > rs = ((uint64_t)pid << 32) | lpid; > rb = va | is | ap; > __asm __volatile(PPC_TLBIE_5(%0, %1, %2, %3, 1) : : > - "r" (rb), "r" (rs), "i" (ric), "i" (prs)); > + "r" (rb), "r" (rs), "i" (ric), "i" (prs) : "memory"); > +} > + > +static __inline void > +radix_tlbie_fixup(uint32_t pid, vm_offset_t va, int ap) > +{ > + > + __asm __volatile("ptesync" ::: "memory"); > + radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, > + TLBIEL_INVAL_PAGE, 0, 0, va, ap); > + __asm __volatile("ptesync" ::: "memory"); > + radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, > + TLBIEL_INVAL_PAGE, pid, 0, va, ap); > } > > static __inline void > @@ -202,6 +214,7 @@ radix_tlbie_invlpg_user_4k(uint32_t pid, vm_offset_t va) > > radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, > TLBIEL_INVAL_PAGE, pid, 0, va, TLBIE_ACTUAL_PAGE_4K); > + radix_tlbie_fixup(pid, va, TLBIE_ACTUAL_PAGE_4K); > } > > static __inline void > @@ -210,6 +223,7 @@ radix_tlbie_invlpg_user_2m(uint32_t pid, vm_offset_t va) > > radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, > TLBIEL_INVAL_PAGE, pid, 0, va, TLBIE_ACTUAL_PAGE_2M); > + radix_tlbie_fixup(pid, va, TLBIE_ACTUAL_PAGE_2M); > } > > static __inline void > @@ -234,6 +248,7 @@ radix_tlbie_invlpg_kernel_4k(vm_offset_t va) > > radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, > TLBIEL_INVAL_PAGE, 0, 0, va, TLBIE_ACTUAL_PAGE_4K); > + radix_tlbie_fixup(0, va, TLBIE_ACTUAL_PAGE_4K); > } > > static __inline void > @@ -242,6 +257,7 @@ radix_tlbie_invlpg_kernel_2m(vm_offset_t va) > > radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, > TLBIEL_INVAL_PAGE, 0, 0, va, TLBIE_ACTUAL_PAGE_2M); > + radix_tlbie_fixup(0, va, TLBIE_ACTUAL_PAGE_2M); > } > > /* 1GB pages aren't currently supported. */ > @@ -251,6 +267,7 @@ radix_tlbie_invlpg_kernel_1g(vm_offset_t va) > > radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, > TLBIEL_INVAL_PAGE, 0, 0, va, TLBIE_ACTUAL_PAGE_1G); > + radix_tlbie_fixup(0, va, TLBIE_ACTUAL_PAGE_1G); > } > > static __inline void > @@ -2757,6 +2774,7 @@ setpte: > pmap_pv_promote_l3e(pmap, va, newpde & PG_PS_FRAME, lockp); > > pte_store(pde, PG_PROMOTED | newpde); > + ptesync(); > atomic_add_long(&pmap_l3e_promotions, 1); > CTR2(KTR_PMAP, "pmap_promote_l3e: success for va %#lx" > " in pmap %p", va, pmap); > -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-all@freebsd.org Wed Dec 30 23:00:33 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 876044D21FA; Wed, 30 Dec 2020 23:00:33 +0000 (UTC) (envelope-from bdragon@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 4D5mwK39S2z4ppv; Wed, 30 Dec 2020 23:00:33 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 5FC198F99; Wed, 30 Dec 2020 23:00:33 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 4F05327C0054; Wed, 30 Dec 2020 18:00:33 -0500 (EST) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Wed, 30 Dec 2020 18:00:33 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvgedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepheeiieekkeffkeelkeel geetgfeltdetgffhudetieekveefvdfhgefgffdujefgnecuffhomhgrihhnpehfrhgvvg gsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpehmrghilhhf rhhomhepsggurhgrghhonhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqud dtgedvfeehkeeigedqudekuddtkeehuddqsggurhgrghhonheppefhrhgvvgeuufffrdho rhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id A4EBEC200A5; Wed, 30 Dec 2020 18:00:33 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.1-61-gb52c239-fm-20201210.001-gb52c2396 Mime-Version: 1.0 Message-Id: <01789d70-9469-4049-a23e-cd529dd96ce5@www.fastmail.com> In-Reply-To: <202012302245.0BUMjrpm032399@gitrepo.freebsd.org> References: <202012302245.0BUMjrpm032399@gitrepo.freebsd.org> Date: Wed, 30 Dec 2020 17:00:13 -0600 From: "Brandon Bergren" To: "Piotr Kubaj" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: =?UTF-8?Q?Re:_git:_76ff03aef741_-_main_-_powerpc:_Fix_copyin/copyout_rac?= =?UTF-8?Q?e_condition?= Content-Type: text/plain X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 23:00:33 -0000 Approved-By: bdragon (in IRC) On Wed, Dec 30, 2020, at 4:45 PM, Piotr Kubaj wrote: > The branch main has been updated by pkubaj (ports committer): > > URL: > https://cgit.FreeBSD.org/src/commit/?id=76ff03aef7411e601673dfc997bd6d691bd9a14e > > commit 76ff03aef7411e601673dfc997bd6d691bd9a14e > Author: Justin Hibbits > AuthorDate: 2020-12-08 22:49:25 +0000 > Commit: Piotr Kubaj > CommitDate: 2020-12-30 22:45:44 +0000 > > powerpc: Fix copyin/copyout race condition > > It's possible for a context switch, and CPU migration, to occur between > fetching the PCPU context and extracting the pc_curpcb. This can cause > the fault handler to be installed for the wrong thread, leading to a > panic in copyin()/copyout(). Since curthread is already in %r13, just > use that directly, as GPRs are migrated, so there is no migration race > risk. > --- > sys/powerpc/powerpc/support.S | 16 ++++++---------- > 1 file changed, 6 insertions(+), 10 deletions(-) > > diff --git a/sys/powerpc/powerpc/support.S b/sys/powerpc/powerpc/support.S > index 9ff1bcc02437..10d3192972d5 100644 > --- a/sys/powerpc/powerpc/support.S > +++ b/sys/powerpc/powerpc/support.S > @@ -61,6 +61,7 @@ > /* log_2(8 * WORD) */ > #define LOOP_LOG 6 > #define LOG_WORD 3 > +#define CURTHREAD %r13 > #else > #define LOAD lwz > #define STORE stw > @@ -70,6 +71,7 @@ > /* log_2(8 * WORD) */ > #define LOOP_LOG 5 > #define LOG_WORD 2 > +#define CURTHREAD %r2 > #endif > > #ifdef AIM > @@ -149,32 +151,26 @@ > > #endif > > -#define PCPU(reg) mfsprg reg, 0 > - > #define SET_COPYFAULT(raddr, rpcb, len) \ > VALIDATE_ADDR_COPY(raddr, len) ;\ > - PCPU(%r9) ;\ > li %r0, COPYFAULT ;\ > - LOAD rpcb, PC_CURPCB(%r9) ;\ > + LOAD rpcb, TD_PCB(CURTHREAD) ;\ > STORE %r0, PCB_ONFAULT(rpcb) ;\ > > #define SET_COPYFAULT_TRUNCATE(raddr, rpcb, len)\ > VALIDATE_TRUNCATE_ADDR_COPY(raddr, len) ;\ > - PCPU(%r9) ;\ > li %r0, COPYFAULT ;\ > - LOAD rpcb, PC_CURPCB(%r9) ;\ > + LOAD rpcb, TD_PCB(CURTHREAD) ;\ > STORE %r0, PCB_ONFAULT(rpcb) > > #define SET_FUSUFAULT(raddr, rpcb) \ > VALIDATE_ADDR_FUSU(raddr) ;\ > - PCPU(%r9) ;\ > li %r0, FUSUFAULT ;\ > - LOAD rpcb, PC_CURPCB(%r9) ;\ > + LOAD rpcb, TD_PCB(CURTHREAD) ;\ > STORE %r0, PCB_ONFAULT(rpcb) > > #define CLEAR_FAULT_NO_CLOBBER(rpcb) \ > - PCPU(%r9) ;\ > - LOAD rpcb, PC_CURPCB(%r9) ;\ > + LOAD rpcb, TD_PCB(CURTHREAD) ;\ > li %r0, 0 ;\ > STORE %r0, PCB_ONFAULT(rpcb) > > -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-all@freebsd.org Wed Dec 30 23:18:03 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4FCB44D2DB5; Wed, 30 Dec 2020 23:18:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5nJW1phHz4rSB; Wed, 30 Dec 2020 23:18:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C83C2648D; Wed, 30 Dec 2020 23:18:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUNI3Qq069696; Wed, 30 Dec 2020 23:18:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUNI3Ov069695; Wed, 30 Dec 2020 23:18:03 GMT (envelope-from git) Date: Wed, 30 Dec 2020 23:18:03 GMT Message-Id: <202012302318.0BUNI3Ov069695@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ryan Libby Subject: git: be3bbda216c5 - stable/12 - Don't add -Wno-class-memaccess with older gcc. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: be3bbda216c5cab1d846d1555f0afe8b5b17e45f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 23:18:03 -0000 The branch stable/12 has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=be3bbda216c5cab1d846d1555f0afe8b5b17e45f commit be3bbda216c5cab1d846d1555f0afe8b5b17e45f Author: Brooks Davis AuthorDate: 2019-08-09 23:50:57 +0000 Commit: Ryan Libby CommitDate: 2020-12-30 18:33:01 +0000 Don't add -Wno-class-memaccess with older gcc. This is a gcc 8.0+ warning which needed to be silenced on for the riscv build. amd64-xtoolchain-gcc still uses gcc 6.4.0 and does not understand this flag. Reviewed by: asomers Feedback from: imp Differential Revision: https://reviews.freebsd.org/D21195 (cherry picked from commit 4a045a66fd912b0e28a0585dbd8991643ccc2cb0) --- tests/sys/fs/fusefs/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile index 96f08963b1e4..ebe4061c1668 100644 --- a/tests/sys/fs/fusefs/Makefile +++ b/tests/sys/fs/fusefs/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/fs/fusefs @@ -66,7 +68,10 @@ TEST_METADATA+= timeout=10 FUSEFS= ${SRCTOP}/sys/fs/fuse MOUNT= ${SRCTOP}/sbin/mount # Suppress warnings that GCC generates for the libc++ and gtest headers. -CXXWARNFLAGS.gcc+= -Wno-placement-new -Wno-attributes -Wno-class-memaccess +CXXWARNFLAGS.gcc+= -Wno-placement-new -Wno-attributes +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 80000 +CXXWARNFLAGS+= -Wno-class-memaccess +.endif CXXFLAGS+= -I${SRCTOP}/tests CXXFLAGS+= -I${FUSEFS} CXXFLAGS+= -I${MOUNT} From owner-dev-commits-src-all@freebsd.org Wed Dec 30 23:21:58 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B1334D2BCE; Wed, 30 Dec 2020 23:21:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5nP21C2jz4rhm; Wed, 30 Dec 2020 23:21:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C59026264; Wed, 30 Dec 2020 23:21:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUNLwWj078520; Wed, 30 Dec 2020 23:21:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUNLwPo078519; Wed, 30 Dec 2020 23:21:58 GMT (envelope-from git) Date: Wed, 30 Dec 2020 23:21:58 GMT Message-Id: <202012302321.0BUNLwPo078519@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 282381aa53a3 - main - rsu: Don't modify read-only firmware block. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 282381aa53a3cb21de8e855797f61c27cbb73884 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 23:21:58 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=282381aa53a3cb21de8e855797f61c27cbb73884 commit 282381aa53a3cb21de8e855797f61c27cbb73884 Author: John Baldwin AuthorDate: 2020-12-30 23:18:02 +0000 Commit: John Baldwin CommitDate: 2020-12-30 23:21:35 +0000 rsu: Don't modify read-only firmware block. The firmware header loaded into an rsu(4) device has to be customized to reflect device settings. The driver was overwriting the header from the shared firmware image before sending it to the device. If two devices attached at the same time with different settings, one device could potentially get a corrupted header. The recent changes in a095390344fb1795c1b118a2f84da8f6a7f254ab exposed this bug in the form of a panic as the firmware blobs are now marked read-only in object files and mapped read-only by the kernel. To avoid the bug, change the driver to allocate a copy of the firmware header on the stack that is initialized before writing it to the device. PR: 252163 Reported by: vidwer+fbsdbugs@gmail.com Tested by: vidwer+fbsdbugs@gmail.com Reviewed by: hselasky, bz, emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27850 --- sys/dev/usb/wlan/if_rsu.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/sys/dev/usb/wlan/if_rsu.c b/sys/dev/usb/wlan/if_rsu.c index 0505af9ae941..f2dc6657026e 100644 --- a/sys/dev/usb/wlan/if_rsu.c +++ b/sys/dev/usb/wlan/if_rsu.c @@ -3343,7 +3343,7 @@ static int rsu_load_firmware(struct rsu_softc *sc) { const struct r92s_fw_hdr *hdr; - struct r92s_fw_priv *dmem; + struct r92s_fw_priv dmem; struct ieee80211com *ic = &sc->sc_ic; const uint8_t *imem, *emem; uint32_t imemsz, ememsz; @@ -3389,7 +3389,7 @@ rsu_load_firmware(struct rsu_softc *sc) hdr->minute); /* Make sure that driver and firmware are in sync. */ - if (hdr->privsz != htole32(sizeof(*dmem))) { + if (hdr->privsz != htole32(sizeof(dmem))) { device_printf(sc->sc_dev, "unsupported firmware image\n"); error = EINVAL; goto fail; @@ -3475,24 +3475,23 @@ rsu_load_firmware(struct rsu_softc *sc) } /* Update DMEM section before loading. */ - dmem = __DECONST(struct r92s_fw_priv *, &hdr->priv); - memset(dmem, 0, sizeof(*dmem)); - dmem->hci_sel = R92S_HCI_SEL_USB | R92S_HCI_SEL_8172; - dmem->nendpoints = sc->sc_nendpoints; - dmem->chip_version = sc->cut; - dmem->rf_config = sc->sc_rftype; - dmem->vcs_type = R92S_VCS_TYPE_AUTO; - dmem->vcs_mode = R92S_VCS_MODE_RTS_CTS; - dmem->turbo_mode = 0; - dmem->bw40_en = !! (ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40); - dmem->amsdu2ampdu_en = !! (sc->sc_ht); - dmem->ampdu_en = !! (sc->sc_ht); - dmem->agg_offload = !! (sc->sc_ht); - dmem->qos_en = 1; - dmem->ps_offload = 1; - dmem->lowpower_mode = 1; /* XXX TODO: configurable? */ + memset(&dmem, 0, sizeof(dmem)); + dmem.hci_sel = R92S_HCI_SEL_USB | R92S_HCI_SEL_8172; + dmem.nendpoints = sc->sc_nendpoints; + dmem.chip_version = sc->cut; + dmem.rf_config = sc->sc_rftype; + dmem.vcs_type = R92S_VCS_TYPE_AUTO; + dmem.vcs_mode = R92S_VCS_MODE_RTS_CTS; + dmem.turbo_mode = 0; + dmem.bw40_en = !! (ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40); + dmem.amsdu2ampdu_en = !! (sc->sc_ht); + dmem.ampdu_en = !! (sc->sc_ht); + dmem.agg_offload = !! (sc->sc_ht); + dmem.qos_en = 1; + dmem.ps_offload = 1; + dmem.lowpower_mode = 1; /* XXX TODO: configurable? */ /* Load DMEM section. */ - error = rsu_fw_loadsection(sc, (uint8_t *)dmem, sizeof(*dmem)); + error = rsu_fw_loadsection(sc, (uint8_t *)&dmem, sizeof(dmem)); if (error != 0) { device_printf(sc->sc_dev, "could not load firmware section %s\n", "DMEM"); From owner-dev-commits-src-all@freebsd.org Wed Dec 30 23:24:04 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5B8F84D2C7D; Wed, 30 Dec 2020 23:24:04 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (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 4D5nRS1xZqz4rxX; Wed, 30 Dec 2020 23:24:03 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: by mail-ej1-f51.google.com with SMTP id g20so23709249ejb.1; Wed, 30 Dec 2020 15:24:03 -0800 (PST) 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=byGWGKOZyWkZ4fNcttsUy6j26yJETsmKvY9UqmrnAhI=; b=IhSbWbfmlZVPfjA1WPXoXWVkwJViLdyvxZ5HdZBlaXTZUeFJJ/1EiO9IOjaPpwMmO0 mz9ZFNv3VbZXob3sHQtvIcbQ837l7lybohbHzScpNuhxFWguvrd/eF6CysT5C8FUP/Y0 F3RPHp6vNhnj9HFOJNZ/IS/y76HZa3qRGcc5neKTGVvfD/MvFxORwsfUjVIoeYUAPnrA ZmB3HkY35riD/f8Li9ILe0ljkRZn7WtTCyQ36qYKOaeWcyS19D1MultZZLNPTbI3ngXG RJkVKhBIAWtGVdJBumeUzeKn0rO2vhplmJtK2FPy0M1sdGjyf1EdXROWYoPMYFeSiw09 EXbw== X-Gm-Message-State: AOAM5301S45YgEfUNet/RG4Fw0DqSdAscfC4yGR2D7drQGmq+uLAIbzV 8RusoRYS5v4wwKmSX++V798XG97tbY3MOw== X-Google-Smtp-Source: ABdhPJwiHQevAO95yd83uv5UX0nDZNMj9PC7FxAn8xO6Yfwla9f8W1lso1m0iORqoi/2YJhOKccAwQ== X-Received: by 2002:a17:906:fa8b:: with SMTP id lt11mr51179402ejb.94.1609370641323; Wed, 30 Dec 2020 15:24:01 -0800 (PST) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com. [209.85.221.54]) by smtp.gmail.com with ESMTPSA id j9sm38537082eds.66.2020.12.30.15.24.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Dec 2020 15:24:01 -0800 (PST) Received: by mail-wr1-f54.google.com with SMTP id q18so18838565wrn.1; Wed, 30 Dec 2020 15:24:00 -0800 (PST) X-Received: by 2002:a5d:6ccb:: with SMTP id c11mr62269254wrc.224.1609370640729; Wed, 30 Dec 2020 15:24:00 -0800 (PST) MIME-Version: 1.0 References: <202012301733.0BUHXUka053609@gitrepo.freebsd.org> In-Reply-To: <202012301733.0BUHXUka053609@gitrepo.freebsd.org> From: Alexander Richardson Date: Thu, 31 Dec 2020 00:23:49 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: b67e44075539 - main - Add comment explaining Git commit message hook To: Ed Maste Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4D5nRS1xZqz4rxX X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 23:24:04 -0000 On Wed, 30 Dec 2020 at 18:33, Ed Maste wrote: > > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b67e440755391b4a75363173ca16e170ccbf0394 > > commit b67e440755391b4a75363173ca16e170ccbf0394 > Author: Ed Maste > AuthorDate: 2020-12-30 17:31:29 +0000 > Commit: Ed Maste > CommitDate: 2020-12-30 17:33:19 +0000 > > Add comment explaining Git commit message hook > > Suggested by: jhb > --- > tools/tools/git/hooks/prepare-commit-msg | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/tools/tools/git/hooks/prepare-commit-msg b/tools/tools/git/hooks/prepare-commit-msg > index 9dcb85cd1a3f..e453b73cc45d 100755 > --- a/tools/tools/git/hooks/prepare-commit-msg > +++ b/tools/tools/git/hooks/prepare-commit-msg > @@ -1,5 +1,13 @@ > #!/bin/sh > > +# prepare-commit-msg: Prepare a commit message upon `git commit` for the > +# user to edit. A script (rather than a static template) is used, so > +# that we can insert our template text other than at the top of the > +# message. > +# > +# Install by copying into the git hooks directory - for example, > +# cp tools/tools/git/hooks/prepare-commit-msg .git/hooks/ > + Maybe suggest `ln -s ../../tools/tools/git/hooks/prepare-commit-msg .git/hooks/` to ensure that future updates to the commit template aren't lost? Thanks, Alex > case "$2" in > commit|message) > # It appears git invokes this script for interactive rebase but does > @@ -21,7 +29,9 @@ outfile=$(mktemp /tmp/freebsd-git-commit.XXXXXXXX) > # > # 1. The beginning of the git-provided template (up to the first comment-only > # line) which explains commented lines and such. > +# > # 2. Our template. > +# > # 3. The remainder of the git-provided template (from the first comment-only > # line to the end of the file) which lists files staged for commit, files > # not staged, and untracked files. From owner-dev-commits-src-all@freebsd.org Thu Dec 31 00:43:55 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 271E54D51DB; Thu, 31 Dec 2020 00:43:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5qCb0c7jz3D4m; Thu, 31 Dec 2020 00:43:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 07CC0275A7; Thu, 31 Dec 2020 00:43:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BV0hsmi079305; Thu, 31 Dec 2020 00:43:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BV0hs3K079304; Thu, 31 Dec 2020 00:43:54 GMT (envelope-from git) Date: Thu, 31 Dec 2020 00:43:54 GMT Message-Id: <202012310043.0BV0hs3K079304@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: ce87312019a1 - stable/12 - MFC: contrib/tzdata: import tzdata 2020f MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: ce87312019a18e6bd0c97c50e5762b38ffc21e76 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 00:43:55 -0000 The branch stable/12 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=ce87312019a18e6bd0c97c50e5762b38ffc21e76 commit ce87312019a18e6bd0c97c50e5762b38ffc21e76 Author: Philip Paeps AuthorDate: 2020-12-30 04:50:26 +0000 Commit: Philip Paeps CommitDate: 2020-12-31 00:41:51 +0000 MFC: contrib/tzdata: import tzdata 2020f Merge commit '96b88ac701b35ce68425046d4be8f51cb75b5d5b' into main Changes: https://github.com/eggert/tz/blob/2020f/NEWS (cherry picked from commit e35a01eec6926bfb5c088ca8961079b51a067bf3) --- contrib/tzdata/Makefile | 5 ++++- contrib/tzdata/NEWS | 8 ++++++++ contrib/tzdata/version | 2 +- contrib/tzdata/ziguard.awk | 9 +++++---- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/contrib/tzdata/Makefile b/contrib/tzdata/Makefile index 5064a190c5a5..1136af9298f1 100644 --- a/contrib/tzdata/Makefile +++ b/contrib/tzdata/Makefile @@ -945,7 +945,10 @@ check_public: $(VERSION_DEPS) mkdir public.dir ln $(VERSION_DEPS) public.dir cd public.dir && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL - for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi; do \ + for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi \ + public.dir/vanguard.zi public.dir/main.zi \ + public.dir/rearguard.zi; \ + do \ public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \ done public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK) diff --git a/contrib/tzdata/NEWS b/contrib/tzdata/NEWS index 6014b45a0b4a..19470cc41c3d 100644 --- a/contrib/tzdata/NEWS +++ b/contrib/tzdata/NEWS @@ -1,5 +1,13 @@ News for the tz database +Release 2020f - 2020-12-29 00:17:46 -0800 + + Change to build procedure + + 'make rearguard_tarballs' no longer generates a bad rearguard.zi, + fixing a 2020e bug. (Problem reported by Deborah Goldsmith.) + + Release 2020e - 2020-12-22 15:14:34 -0800 Briefly: diff --git a/contrib/tzdata/version b/contrib/tzdata/version index e788a597fa7b..a481df8cb9d4 100644 --- a/contrib/tzdata/version +++ b/contrib/tzdata/version @@ -1 +1 @@ -2020e +2020f diff --git a/contrib/tzdata/ziguard.awk b/contrib/tzdata/ziguard.awk index e27e799392ec..7d6f7c99c952 100644 --- a/contrib/tzdata/ziguard.awk +++ b/contrib/tzdata/ziguard.awk @@ -37,7 +37,7 @@ DATAFORM != "main" { # If this line should differ due to Czechoslovakia using negative SAVE values, # uncomment the desired version and comment out the undesired one. - if (zone == "Europe/Prague" && /1947 Feb 23/) { + if (zone == "Europe/Prague" && /^#?[\t ]+[01]:00[\t ]/ && /1947 Feb 23/) { if (($(in_comment + 2) != "-") == vanguard) { uncomment = in_comment } else { @@ -65,10 +65,11 @@ DATAFORM != "main" { # uncomment the desired version and comment out the undesired one. Rule_Namibia = /^#?Rule[\t ]+Namibia[\t ]/ Zone_using_Namibia_rule \ - = (zone == "Africa/Windhoek" \ + = (zone == "Africa/Windhoek" && /^#?[\t ]+[12]:00[\t ]/ \ && ($(in_comment + 2) == "Namibia" \ - || (1994 <= $(in_comment + 4) && $(in_comment + 4) <= 2017) \ - || in_comment + 3 == NF)) + || ($(in_comment + 2) == "-" && $(in_comment + 3) == "CAT" \ + && ((1994 <= $(in_comment + 4) && $(in_comment + 4) <= 2017) \ + || in_comment + 3 == NF)))) if (Rule_Namibia || Zone_using_Namibia_rule) { if ((Rule_Namibia \ ? ($(in_comment + 9) ~ /^-/ \ From owner-dev-commits-src-all@freebsd.org Thu Dec 31 00:44:10 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3A7684D52D8; Thu, 31 Dec 2020 00:44:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5qCt1Fmfz3Dgk; Thu, 31 Dec 2020 00:44:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1DA562751D; Thu, 31 Dec 2020 00:44:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BV0iANp079456; Thu, 31 Dec 2020 00:44:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BV0iAZl079455; Thu, 31 Dec 2020 00:44:10 GMT (envelope-from git) Date: Thu, 31 Dec 2020 00:44:10 GMT Message-Id: <202012310044.0BV0iAZl079455@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: c41eeeac3cad - stable/11 - MFC: contrib/tzdata: import tzdata 2020f MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: c41eeeac3cad996cc9194dc675cd78568a4a380f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 00:44:10 -0000 The branch stable/11 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=c41eeeac3cad996cc9194dc675cd78568a4a380f commit c41eeeac3cad996cc9194dc675cd78568a4a380f Author: Philip Paeps AuthorDate: 2020-12-30 04:50:26 +0000 Commit: Philip Paeps CommitDate: 2020-12-31 00:42:58 +0000 MFC: contrib/tzdata: import tzdata 2020f Merge commit '96b88ac701b35ce68425046d4be8f51cb75b5d5b' into main Changes: https://github.com/eggert/tz/blob/2020f/NEWS (cherry picked from commit e35a01eec6926bfb5c088ca8961079b51a067bf3) --- contrib/tzdata/Makefile | 5 ++++- contrib/tzdata/NEWS | 8 ++++++++ contrib/tzdata/version | 2 +- contrib/tzdata/ziguard.awk | 9 +++++---- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/contrib/tzdata/Makefile b/contrib/tzdata/Makefile index 5064a190c5a5..1136af9298f1 100644 --- a/contrib/tzdata/Makefile +++ b/contrib/tzdata/Makefile @@ -945,7 +945,10 @@ check_public: $(VERSION_DEPS) mkdir public.dir ln $(VERSION_DEPS) public.dir cd public.dir && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL - for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi; do \ + for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi \ + public.dir/vanguard.zi public.dir/main.zi \ + public.dir/rearguard.zi; \ + do \ public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \ done public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK) diff --git a/contrib/tzdata/NEWS b/contrib/tzdata/NEWS index 6014b45a0b4a..19470cc41c3d 100644 --- a/contrib/tzdata/NEWS +++ b/contrib/tzdata/NEWS @@ -1,5 +1,13 @@ News for the tz database +Release 2020f - 2020-12-29 00:17:46 -0800 + + Change to build procedure + + 'make rearguard_tarballs' no longer generates a bad rearguard.zi, + fixing a 2020e bug. (Problem reported by Deborah Goldsmith.) + + Release 2020e - 2020-12-22 15:14:34 -0800 Briefly: diff --git a/contrib/tzdata/version b/contrib/tzdata/version index e788a597fa7b..a481df8cb9d4 100644 --- a/contrib/tzdata/version +++ b/contrib/tzdata/version @@ -1 +1 @@ -2020e +2020f diff --git a/contrib/tzdata/ziguard.awk b/contrib/tzdata/ziguard.awk index e27e799392ec..7d6f7c99c952 100644 --- a/contrib/tzdata/ziguard.awk +++ b/contrib/tzdata/ziguard.awk @@ -37,7 +37,7 @@ DATAFORM != "main" { # If this line should differ due to Czechoslovakia using negative SAVE values, # uncomment the desired version and comment out the undesired one. - if (zone == "Europe/Prague" && /1947 Feb 23/) { + if (zone == "Europe/Prague" && /^#?[\t ]+[01]:00[\t ]/ && /1947 Feb 23/) { if (($(in_comment + 2) != "-") == vanguard) { uncomment = in_comment } else { @@ -65,10 +65,11 @@ DATAFORM != "main" { # uncomment the desired version and comment out the undesired one. Rule_Namibia = /^#?Rule[\t ]+Namibia[\t ]/ Zone_using_Namibia_rule \ - = (zone == "Africa/Windhoek" \ + = (zone == "Africa/Windhoek" && /^#?[\t ]+[12]:00[\t ]/ \ && ($(in_comment + 2) == "Namibia" \ - || (1994 <= $(in_comment + 4) && $(in_comment + 4) <= 2017) \ - || in_comment + 3 == NF)) + || ($(in_comment + 2) == "-" && $(in_comment + 3) == "CAT" \ + && ((1994 <= $(in_comment + 4) && $(in_comment + 4) <= 2017) \ + || in_comment + 3 == NF)))) if (Rule_Namibia || Zone_using_Namibia_rule) { if ((Rule_Namibia \ ? ($(in_comment + 9) ~ /^-/ \ From owner-dev-commits-src-all@freebsd.org Thu Dec 31 02:58:49 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5AEAC4D9E2E; Thu, 31 Dec 2020 02:58:49 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) (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 4D5tCD4QHXz3NfQ; Thu, 31 Dec 2020 02:58:48 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qv1-f48.google.com with SMTP id h16so8539386qvu.8; Wed, 30 Dec 2020 18:58:48 -0800 (PST) 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=uPbywmetzhq6bxDSNoG/dcRxgyyr9q+3qd3kfDT6HCs=; b=oWilvi+SvP/NC2CPGo4ZlQPVrFYCUZgcKs7iNXHyAPvi1paYIqWuZu9jmnFXv7yKcm vGNZRAv/m1w2LA/ptzQnND8YXT1pkfwMrNU1Pd63j8gMsgzSALvs39aTGOYdV1wK1WQo +QKNx32ljHBBmLEeOaf3rmu4xxsH/ffS7Xv1MXhgxAsXq6hHC42I9odrkpOYeuBM14vZ Eob8z+K1Og83Bl2psy/GkavEtRTPf7jpLuHoFi/JZJ7jZHYr0jAP7cuO5QQfnVDeVyL4 VSiTAnAzOfJf856hHf2xPAvtMZwwRg18OWWM8Dyi5trKqNqxG3+opn8fZieX6TE8oDVg 6lPA== X-Gm-Message-State: AOAM5301mFZ3JKOwz/MsEK9DAf7+JFyr0uHCLd/orugR4V4y7ULj8/0X FCx/FVMXoLAplP6bBhw62st6UAzjlRAjlQ== X-Google-Smtp-Source: ABdhPJzue4OWaCzkaatPOwAWqcLMQOgzzcHyYpGxVn8viQUXJLNvMuQ2zayNBiVjmZIVS3Dn1Saj+Q== X-Received: by 2002:a05:6214:321:: with SMTP id j1mr60149863qvu.32.1609383526346; Wed, 30 Dec 2020 18:58:46 -0800 (PST) Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com. [209.85.219.42]) by smtp.gmail.com with ESMTPSA id c7sm27998478qtw.70.2020.12.30.18.58.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Dec 2020 18:58:46 -0800 (PST) Received: by mail-qv1-f42.google.com with SMTP id az16so8553101qvb.5; Wed, 30 Dec 2020 18:58:46 -0800 (PST) X-Received: by 2002:a05:6214:144b:: with SMTP id b11mr58195236qvy.5.1609383525684; Wed, 30 Dec 2020 18:58:45 -0800 (PST) MIME-Version: 1.0 References: <202012291703.0BTH345t067627@gitrepo.freebsd.org> In-Reply-To: <202012291703.0BTH345t067627@gitrepo.freebsd.org> From: Ryan Libby Date: Wed, 30 Dec 2020 18:58:34 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: ec52ff6d1411 - main - Streamline the infiniband code according to the ethernet code. To: Hans Petter Selasky Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4D5tCD4QHXz3NfQ X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of rlibby@gmail.com designates 209.85.219.48 as permitted sender) smtp.mailfrom=rlibby@gmail.com X-Spamd-Result: default: False [-1.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[rlibby@freebsd.org,rlibby@gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.219.48:from]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[rlibby@freebsd.org,rlibby@gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[rlibby]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; SPAMHAUS_ZRD(0.00)[209.85.219.48:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[209.85.219.48:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.219.48:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 02:58:49 -0000 On Tue, Dec 29, 2020 at 9:03 AM Hans Petter Selasky wrote: > > The branch main has been updated by hselasky: > > URL: https://cgit.FreeBSD.org/src/commit/?id=ec52ff6d14117573afef970604d5bf6b9691bc88 > > commit ec52ff6d14117573afef970604d5bf6b9691bc88 > Author: Hans Petter Selasky > AuthorDate: 2020-12-29 17:01:57 +0000 > Commit: Hans Petter Selasky > CommitDate: 2020-12-29 17:01:57 +0000 > > Streamline the infiniband code according to the ethernet code. > > Specifically implement the if_requestencap callback function for infiniband. > Most of the changes are simply a cut and paste of the equivalent ethernet part. > > Reviewed by: melifaro @ > Differential Revision: https://reviews.freebsd.org/D27631 > MFC after: 1 week > Sponsored by: Mellanox Technologies // NVIDIA Networking > --- > sys/net/if_infiniband.c | 303 ++++++++++++++++++++++++++++++++---------------- > 1 file changed, 201 insertions(+), 102 deletions(-) > > diff --git a/sys/net/if_infiniband.c b/sys/net/if_infiniband.c > index 1d6d561c4d83..bf33457b0a4f 100644 > --- a/sys/net/if_infiniband.c > +++ b/sys/net/if_infiniband.c > @@ -143,141 +143,240 @@ infiniband_bpf_mtap(struct ifnet *ifp, struct mbuf *mb) > mb->m_pkthdr.len += sizeof(*ibh); > } > > +static void > +update_mbuf_csumflags(struct mbuf *src, struct mbuf *dst) > +{ > + int csum_flags = 0; > + > + if (src->m_pkthdr.csum_flags & CSUM_IP) > + csum_flags |= (CSUM_IP_CHECKED|CSUM_IP_VALID); > + if (src->m_pkthdr.csum_flags & CSUM_DELAY_DATA) > + csum_flags |= (CSUM_DATA_VALID|CSUM_PSEUDO_HDR); > + if (src->m_pkthdr.csum_flags & CSUM_SCTP) > + csum_flags |= CSUM_SCTP_VALID; > + dst->m_pkthdr.csum_flags |= csum_flags; > + if (csum_flags & CSUM_DATA_VALID) > + dst->m_pkthdr.csum_data = 0xffff; > +} > + > /* > - * Infiniband output routine. > + * Handle link-layer encapsulation requests. > */ > static int > -infiniband_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, > - struct route *ro) > +infiniband_requestencap(struct ifnet *ifp, struct if_encap_req *req) > { > - uint8_t edst[INFINIBAND_ADDR_LEN]; > -#if defined(INET) || defined(INET6) > - struct llentry *lle = NULL; > -#endif > - struct infiniband_header *ibh; > - int error = 0; > - uint16_t type; > - bool is_gw; > + struct infiniband_header *ih; > + struct arphdr *ah; > + uint16_t etype; > + const uint8_t *lladdr; > > - NET_EPOCH_ASSERT(); > - > - is_gw = ((ro != NULL) && (ro->ro_flags & RT_HAS_GW) != 0); > + if (req->rtype != IFENCAP_LL) > + return (EOPNOTSUPP); > > -#ifdef MAC > - error = mac_ifnet_check_transmit(ifp, m); > - if (error) > - goto bad; > -#endif > + if (req->bufsize < INFINIBAND_HDR_LEN) > + return (ENOMEM); > > - M_PROFILE(m); > - if (ifp->if_flags & IFF_MONITOR) { > - error = ENETDOWN; > - goto bad; > - } > - if (!((ifp->if_flags & IFF_UP) && > - (ifp->if_drv_flags & IFF_DRV_RUNNING))) { > - error = ENETDOWN; > - goto bad; > - } > + ih = (struct infiniband_header *)req->buf; > + lladdr = req->lladdr; > + req->lladdr_off = 0; > > - switch (dst->sa_family) { > - case AF_LINK: > - goto output; > -#ifdef INET > + switch (req->family) { > case AF_INET: > - if (lle != NULL && (lle->la_flags & LLE_VALID)) { > - memcpy(edst, lle->ll_addr, sizeof(edst)); > - } else if (m->m_flags & M_MCAST) { > - infiniband_ipv4_multicast_map( > - ((const struct sockaddr_in *)dst)->sin_addr.s_addr, > - ifp->if_broadcastaddr, edst); > - } else { > - error = arpresolve(ifp, is_gw, m, dst, edst, NULL, NULL); > - if (error) { > - if (error == EWOULDBLOCK) > - error = 0; > - m = NULL; /* mbuf is consumed by resolver */ > - goto bad; > - } > - } > - type = htons(ETHERTYPE_IP); > + etype = htons(ETHERTYPE_IP); > break; > - case AF_ARP: { > - struct arphdr *ah; > - > - if (m->m_len < sizeof(*ah)) { > - error = EINVAL; > - goto bad; > - } > - > - ah = mtod(m, struct arphdr *); > - > - if (m->m_len < arphdr_len(ah)) { > - error = EINVAL; > - goto bad; > - } > + case AF_INET6: > + etype = htons(ETHERTYPE_IPV6); > + break; > + case AF_ARP: > + ah = (struct arphdr *)req->hdata; > ah->ar_hrd = htons(ARPHRD_INFINIBAND); > > switch (ntohs(ah->ar_op)) { > case ARPOP_REVREQUEST: > case ARPOP_REVREPLY: > - type = htons(ETHERTYPE_REVARP); > + etype = htons(ETHERTYPE_REVARP); > break; > case ARPOP_REQUEST: > case ARPOP_REPLY: > default: > - type = htons(ETHERTYPE_ARP); > + etype = htons(ETHERTYPE_ARP); > break; > } > > - if (m->m_flags & M_BCAST) { > - memcpy(edst, ifp->if_broadcastaddr, INFINIBAND_ADDR_LEN); > + if (req->flags & IFENCAP_FLAG_BROADCAST) > + lladdr = ifp->if_broadcastaddr; > + break; > + default: > + return (EAFNOSUPPORT); > + } > + > + ih->ib_protocol = etype; > + ih->ib_reserved = 0; > + memcpy(ih->ib_hwaddr, lladdr, INFINIBAND_ADDR_LEN); > + req->bufsize = sizeof(struct infiniband_header); > + > + return (0); > +} > + > +static int > +infiniband_resolve_addr(struct ifnet *ifp, struct mbuf *m, > + const struct sockaddr *dst, struct route *ro, uint8_t *phdr, > + uint32_t *pflags, struct llentry **plle) > +{ > + struct infiniband_header *ih; > + uint32_t lleflags = 0; > + int error = 0; > + > + if (plle) > + *plle = NULL; > + ih = (struct infiniband_header *)phdr; > + > + switch (dst->sa_family) { > +#ifdef INET > + case AF_INET: > + if ((m->m_flags & (M_BCAST | M_MCAST)) == 0) { > + error = arpresolve(ifp, 0, m, dst, phdr, &lleflags, plle); > } else { > - if (ah->ar_hln != INFINIBAND_ADDR_LEN) { > - error = EINVAL; > - goto bad; > + if (m->m_flags & M_BCAST) { > + memcpy(ih->ib_hwaddr, ifp->if_broadcastaddr, > + INFINIBAND_ADDR_LEN); > + } else { > + infiniband_ipv4_multicast_map( > + ((const struct sockaddr_in *)dst)->sin_addr.s_addr, > + ifp->if_broadcastaddr, ih->ib_hwaddr); > } > - memcpy(edst, ar_tha(ah), INFINIBAND_ADDR_LEN); > + ih->ib_protocol = htons(ETHERTYPE_IP); > + ih->ib_reserved = 0; > } > break; > - } > #endif > #ifdef INET6 > - case AF_INET6: { > - const struct ip6_hdr *ip6; > - > - ip6 = mtod(m, const struct ip6_hdr *); > - if (m->m_len < sizeof(*ip6)) { > - error = EINVAL; > - goto bad; > - } else if (lle != NULL && (lle->la_flags & LLE_VALID)) { > - memcpy(edst, lle->ll_addr, sizeof(edst)); > - } else if (m->m_flags & M_MCAST) { > + case AF_INET6: > + if ((m->m_flags & M_MCAST) == 0) { > + error = nd6_resolve(ifp, 0, m, dst, phdr, &lleflags, plle); > + } else { > infiniband_ipv6_multicast_map( > &((const struct sockaddr_in6 *)dst)->sin6_addr, > - ifp->if_broadcastaddr, edst); > - } else if (ip6->ip6_nxt == IPPROTO_ICMPV6) { > - memcpy(edst, ifp->if_broadcastaddr, INFINIBAND_ADDR_LEN); > - } else { > - error = nd6_resolve(ifp, is_gw, m, dst, edst, NULL, NULL); > - if (error) { > - if (error == EWOULDBLOCK) > - error = 0; > - m = NULL; /* mbuf is consumed by resolver */ > - goto bad; > - } > + ifp->if_broadcastaddr, ih->ib_hwaddr); > + ih->ib_protocol = htons(ETHERTYPE_IPV6); > + ih->ib_reserved = 0; > } > - type = htons(ETHERTYPE_IPV6); > break; > - } > #endif > default: > - error = EAFNOSUPPORT; > + if_printf(ifp, "can't handle af%d\n", dst->sa_family); > + if (m != NULL) > + m_freem(m); > + return (EAFNOSUPPORT); > + } > + > + if (error == EHOSTDOWN) { > + if (ro != NULL && (ro->ro_flags & RT_HAS_GW) != 0) > + error = EHOSTUNREACH; > + } > + > + if (error != 0) > + return (error); > + > + *pflags = RT_MAY_LOOP; > + if (lleflags & LLE_IFADDR) > + *pflags |= RT_L2_ME; > + > + return (0); > +} > + > +/* > + * Infiniband output routine. > + */ > +static int > +infiniband_output(struct ifnet *ifp, struct mbuf *m, > + const struct sockaddr *dst, struct route *ro) > +{ > + uint8_t linkhdr[INFINIBAND_HDR_LEN]; > + uint8_t *phdr; > +#if defined(INET) || defined(INET6) > + struct llentry *lle = NULL; > +#endif This broke tinderbox via the LINT-NOIP kernels. The code compiles fine with the ifdef guard removed. Can we just delete it? > + struct infiniband_header *ih; > + int error = 0; > + int hlen; /* link layer header length */ > + uint32_t pflags; > + bool addref; > + > + NET_EPOCH_ASSERT(); > + > + addref = false; > + phdr = NULL; > + pflags = 0; > + if (ro != NULL) { > + /* XXX BPF uses ro_prepend */ > + if (ro->ro_prepend != NULL) { > + phdr = ro->ro_prepend; > + hlen = ro->ro_plen; > + } else if (!(m->m_flags & (M_BCAST | M_MCAST))) { > + if ((ro->ro_flags & RT_LLE_CACHE) != 0) { > + lle = ro->ro_lle; > + if (lle != NULL && > + (lle->la_flags & LLE_VALID) == 0) { > + LLE_FREE(lle); > + lle = NULL; /* redundant */ > + ro->ro_lle = NULL; > + } > + if (lle == NULL) { > + /* if we lookup, keep cache */ > + addref = 1; > + } else > + /* > + * Notify LLE code that > + * the entry was used > + * by datapath. > + */ > + llentry_mark_used(lle); > + } > + if (lle != NULL) { > + phdr = lle->r_linkdata; > + hlen = lle->r_hdrlen; > + pflags = lle->r_flags; > + } > + } > + } > + > +#ifdef MAC > + error = mac_ifnet_check_transmit(ifp, m); > + if (error) > + goto bad; > +#endif > + > + M_PROFILE(m); > + if (ifp->if_flags & IFF_MONITOR) { > + error = ENETDOWN; > + goto bad; > + } > + if (!((ifp->if_flags & IFF_UP) && > + (ifp->if_drv_flags & IFF_DRV_RUNNING))) { > + error = ENETDOWN; > goto bad; > } > > + if (phdr == NULL) { > + /* No prepend data supplied. Try to calculate ourselves. */ > + phdr = linkhdr; > + hlen = INFINIBAND_HDR_LEN; > + error = infiniband_resolve_addr(ifp, m, dst, ro, phdr, &pflags, > + addref ? &lle : NULL); > + if (addref && lle != NULL) > + ro->ro_lle = lle; > + if (error != 0) > + return (error == EWOULDBLOCK ? 0 : error); > + } > + > + if ((pflags & RT_L2_ME) != 0) { > + update_mbuf_csumflags(m, m); > + return (if_simloop(ifp, m, dst->sa_family, 0)); > + } > + > /* > - * Add local net header. If no space in first mbuf, > + * Add local infiniband header. If no space in first mbuf, > * allocate another. > */ > M_PREPEND(m, INFINIBAND_HDR_LEN, M_NOWAIT); > @@ -285,16 +384,15 @@ infiniband_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, > error = ENOBUFS; > goto bad; > } > - ibh = mtod(m, struct infiniband_header *); > - > - ibh->ib_protocol = type; > - memcpy(ibh->ib_hwaddr, edst, sizeof(edst)); > + if ((pflags & RT_HAS_HEADER) == 0) { > + ih = mtod(m, struct infiniband_header *); > + memcpy(ih, phdr, hlen); > + } > > /* > * Queue message on interface, update output statistics if > * successful, and start output if interface not yet active. > */ > -output: > return (ifp->if_transmit(ifp, m)); > bad: > if (m != NULL) > @@ -484,6 +582,7 @@ infiniband_ifattach(struct ifnet *ifp, const uint8_t *lla, const uint8_t *llb) > ifp->if_output = infiniband_output; > ifp->if_input = infiniband_input; > ifp->if_resolvemulti = infiniband_resolvemulti; > + ifp->if_requestencap = infiniband_requestencap; > > if (ifp->if_baudrate == 0) > ifp->if_baudrate = IF_Gbps(10); /* default value */ From owner-dev-commits-src-all@freebsd.org Thu Dec 31 03:08:23 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1AE064DA92D; Thu, 31 Dec 2020 03:08:23 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.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 4D5tQG6qchz3Pr4; Thu, 31 Dec 2020 03:08:22 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qk1-f178.google.com with SMTP id d14so15497698qkc.13; Wed, 30 Dec 2020 19:08:22 -0800 (PST) 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=P1IaEnS/MK85LmEPQx5EeYtD6sPucgqZJrRDNQ0jhY0=; b=g02gh+sjooC47CKqm1BjBs1VLTs/nsQqvsACUz+cXE4F5sKSGbMOCTVvRkDm6ee7X6 t+Kh2tP/kzCQ8p1DPLexcz194bHK2z60oxmnP/HxWUuFvvXD1aUdsEkJEkOkQY38bftz DDKDeuqJ54Dl8EBoqs0Sk9p9vzMhxyszyGPALMnh8swXRi8dXy2O71fHww8kOFtABfZa XVMtiCEkgRUb1kwmqnK8vvsQZ1mcGqrKiE5qVTtWU4SRUytpxa25KtZXNLtHWqdvYWjQ SVq7F2dkkjw0d60c0QjmzS1/TaLg24jzFpoKrmCFlzabNs4yvTtSa0VRoTsgp+xRK/DI 2m0g== X-Gm-Message-State: AOAM530YtnvJI5vj1aZbZBxE9FjZVLwPwPuFYprXSA4kb4ZaOoxfGbhe +MWE400WYlAZN8JtMh8uBxQ8DhCzJVb/yQ== X-Google-Smtp-Source: ABdhPJztK3ne1978Y5SkroNnSMBCwRptZVcG6M0ZR57Whfw0X4R56acYDjvltUhrFpnKW3mKQnoJrQ== X-Received: by 2002:a37:90c5:: with SMTP id s188mr44209466qkd.128.1609384101648; Wed, 30 Dec 2020 19:08:21 -0800 (PST) Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com. [209.85.219.41]) by smtp.gmail.com with ESMTPSA id l1sm29303670qtb.42.2020.12.30.19.08.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Dec 2020 19:08:21 -0800 (PST) Received: by mail-qv1-f41.google.com with SMTP id h16so8545861qvu.8; Wed, 30 Dec 2020 19:08:21 -0800 (PST) X-Received: by 2002:a05:6214:1887:: with SMTP id cx7mr59616505qvb.39.1609384101056; Wed, 30 Dec 2020 19:08:21 -0800 (PST) MIME-Version: 1.0 References: <202012301620.0BUGKLG4061854@gitrepo.freebsd.org> In-Reply-To: <202012301620.0BUGKLG4061854@gitrepo.freebsd.org> From: Ryan Libby Date: Wed, 30 Dec 2020 19:08:10 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 5e78bbb74a1f - main - Split out the FDT arm pmu attachment To: Andrew Turner Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4D5tQG6qchz3Pr4 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 03:08:23 -0000 On Wed, Dec 30, 2020 at 8:20 AM Andrew Turner wrote: > > The branch main has been updated by andrew: > > URL: https://cgit.FreeBSD.org/src/commit/?id=5e78bbb74a1f55c6213f99eda0ec87e81731a369 > > commit 5e78bbb74a1f55c6213f99eda0ec87e81731a369 > Author: Andrew Turner > AuthorDate: 2020-12-30 14:20:28 +0000 > Commit: Andrew Turner > CommitDate: 2020-12-30 16:11:02 +0000 > > Split out the FDT arm pmu attachment > > This will allow us to add an ACPI attachment. > > Submitted by: Greg V (earlier version) > Sponsored by: Innovate UK > --- > sys/arm/arm/pmu.c | 209 +------------------------------------------ > sys/arm/arm/pmu_fdt.c | 239 ++++++++++++++++++++++++++++++++++++++++++++++++++ > sys/conf/files.arm | 3 +- > sys/conf/files.arm64 | 1 + > 4 files changed, 245 insertions(+), 207 deletions(-) > > diff --git a/sys/arm/arm/pmu.c b/sys/arm/arm/pmu.c > index b16ffcafcfac..544962e9ab28 100644 > --- a/sys/arm/arm/pmu.c > +++ b/sys/arm/arm/pmu.c > @@ -36,7 +36,6 @@ > __FBSDID("$FreeBSD$"); > > #include "opt_hwpmc_hooks.h" > -#include "opt_platform.h" > > #include > #include > @@ -50,31 +49,14 @@ __FBSDID("$FreeBSD$"); > #include > #include > > -#ifdef FDT > -#include > -#include > -#include > -#endif > - > #include > #include > #include > > -#define MAX_RLEN 8 > - > -struct pmu_intr { > - struct resource *res; > - void *ih; > - int cpuid; > -}; > - > -struct pmu_softc { > - device_t dev; > - struct pmu_intr irq[MAX_RLEN]; > -}; > +#include "pmu.h" This seems to have broken arm kernels in tinderbox. Did pmu.h get missed in this commit? > > /* CCNT */ > -#if __ARM_ARCH > 6 > +#if defined(__arm__) && (__ARM_ARCH > 6) > int pmu_attched = 0; > uint32_t ccnt_hi[MAXCPU]; > #endif > @@ -116,129 +98,7 @@ pmu_intr(void *arg) > return (FILTER_HANDLED); > } > > -static int > -pmu_parse_affinity(struct pmu_softc *sc, struct pmu_intr *irq, phandle_t xref, > - uint32_t mpidr) > -{ > - struct pcpu *pcpu; > - int i, err; > - > - > - if (xref != 0) { > - err = OF_getencprop(OF_node_from_xref(xref), "reg", &mpidr, > - sizeof(mpidr)); > - if (err < 0) { > - device_printf(sc->dev, "missing 'reg' property\n"); > - return (ENXIO); > - } > - } > - > - for (i = 0; i < MAXCPU; i++) { > - pcpu = pcpu_find(i); > - if (pcpu != NULL && pcpu->pc_mpidr == mpidr) { > - irq->cpuid = i; > - return (0); > - } > - } > - > - device_printf(sc->dev, "Cannot find CPU with MPIDR: 0x%08X\n", mpidr); > - return (ENXIO); > -} > - > -static int > -pmu_parse_intr(struct pmu_softc *sc) > -{ > - bool has_affinity; > - phandle_t node, *cpus; > - int rid, err, ncpus, i; > - > - > - node = ofw_bus_get_node(sc->dev); > - has_affinity = OF_hasprop(node, "interrupt-affinity"); > - > - for (i = 0; i < MAX_RLEN; i++) > - sc->irq[i].cpuid = -1; > - > - cpus = NULL; > - if (has_affinity) { > - ncpus = OF_getencprop_alloc_multi(node, "interrupt-affinity", > - sizeof(*cpus), (void **)&cpus); > - if (ncpus < 0) { > - device_printf(sc->dev, > - "Cannot read interrupt affinity property\n"); > - return (ENXIO); > - } > - } > - > - /* Process first interrupt */ > - rid = 0; > - sc->irq[0].res = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, &rid, > - RF_ACTIVE | RF_SHAREABLE); > - > - if (sc->irq[0].res == NULL) { > - device_printf(sc->dev, "Cannot get interrupt\n"); > - err = ENXIO; > - goto done; > - } > - > - /* Check if PMU have one per-CPU interrupt */ > - if (intr_is_per_cpu(sc->irq[0].res)) { > - if (has_affinity) { > - device_printf(sc->dev, > - "Per CPU interupt have declared affinity\n"); > - err = ENXIO; > - goto done; > - } > - return (0); > - } > - > - /* > - * PMU with set of generic interrupts (one per core) > - * Each one must be binded to exact core. > - */ > - err = pmu_parse_affinity(sc, sc->irq + 0, has_affinity ? cpus[0]: 0, > - 0); > - if (err != 0) { > - device_printf(sc->dev, "Cannot parse affinity for CPUid: 0\n"); > - goto done; > - } > - > - for (i = 1; i < MAX_RLEN; i++) { > - rid = i; > - sc->irq[i].res = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, > - &rid, RF_ACTIVE | RF_SHAREABLE); > - if (sc->irq[i].res == NULL) > - break; > - > - if (intr_is_per_cpu(sc->irq[i].res)) > - { > - device_printf(sc->dev, "Unexpected per CPU interupt\n"); > - err = ENXIO; > - goto done; > - } > - > - if (has_affinity && i >= ncpus) { > - device_printf(sc->dev, "Missing value in interrupt " > - "affinity property\n"); > - err = ENXIO; > - goto done; > - } > - > - err = pmu_parse_affinity(sc, sc->irq + i, > - has_affinity ? cpus[i]: 0, i); > - if (err != 0) { > - device_printf(sc->dev, > - "Cannot parse affinity for CPUid: %d.\n", i); > - goto done; > - } > - } > - err = 0; > -done: > - OF_prop_free(cpus); > - return (err); > -} > - > -static int > +int > pmu_attach(device_t dev) > { > struct pmu_softc *sc; > @@ -250,10 +110,6 @@ pmu_attach(device_t dev) > sc = device_get_softc(dev); > sc->dev = dev; > > - err = pmu_parse_intr(sc); > - if (err != 0) > - return (err); > - > for (i = 0; i < MAX_RLEN; i++) { > if (sc->irq[i].res == NULL) > break; > @@ -303,62 +159,3 @@ fail: > return(err); > } > > -#ifdef FDT > -static struct ofw_compat_data compat_data[] = { > - {"arm,armv8-pmuv3", 1}, > - {"arm,cortex-a77-pmu", 1}, > - {"arm,cortex-a76-pmu", 1}, > - {"arm,cortex-a75-pmu", 1}, > - {"arm,cortex-a73-pmu", 1}, > - {"arm,cortex-a72-pmu", 1}, > - {"arm,cortex-a65-pmu", 1}, > - {"arm,cortex-a57-pmu", 1}, > - {"arm,cortex-a55-pmu", 1}, > - {"arm,cortex-a53-pmu", 1}, > - {"arm,cortex-a34-pmu", 1}, > - > - {"arm,cortex-a17-pmu", 1}, > - {"arm,cortex-a15-pmu", 1}, > - {"arm,cortex-a12-pmu", 1}, > - {"arm,cortex-a9-pmu", 1}, > - {"arm,cortex-a8-pmu", 1}, > - {"arm,cortex-a7-pmu", 1}, > - {"arm,cortex-a5-pmu", 1}, > - {"arm,arm11mpcore-pmu", 1}, > - {"arm,arm1176-pmu", 1}, > - {"arm,arm1136-pmu", 1}, > - {"qcom,krait-pmu", 1}, > - {NULL, 0} > -}; > - > -static int > -pmu_fdt_probe(device_t dev) > -{ > - > - if (!ofw_bus_status_okay(dev)) > - return (ENXIO); > - > - if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { > - device_set_desc(dev, "Performance Monitoring Unit"); > - return (BUS_PROBE_DEFAULT); > - } > - > - return (ENXIO); > -} > - > -static device_method_t pmu_fdt_methods[] = { > - DEVMETHOD(device_probe, pmu_fdt_probe), > - DEVMETHOD(device_attach, pmu_attach), > - { 0, 0 } > -}; > - > -static driver_t pmu_fdt_driver = { > - "pmu", > - pmu_fdt_methods, > - sizeof(struct pmu_softc), > -}; > - > -static devclass_t pmu_fdt_devclass; > - > -DRIVER_MODULE(pmu, simplebus, pmu_fdt_driver, pmu_fdt_devclass, 0, 0); > -#endif > diff --git a/sys/arm/arm/pmu_fdt.c b/sys/arm/arm/pmu_fdt.c > new file mode 100644 > index 000000000000..2e03fc98bfe0 > --- /dev/null > +++ b/sys/arm/arm/pmu_fdt.c > @@ -0,0 +1,239 @@ > +/*- > + * Copyright (c) 2015 Ruslan Bukin > + * All rights reserved. > + * > + * This software was developed by SRI International and the University of > + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) > + * ("CTSRD"), as part of the DARPA CRASH research programme. > + * > + * 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 "pmu.h" > + > +static struct ofw_compat_data compat_data[] = { > + {"arm,armv8-pmuv3", 1}, > + {"arm,cortex-a77-pmu", 1}, > + {"arm,cortex-a76-pmu", 1}, > + {"arm,cortex-a75-pmu", 1}, > + {"arm,cortex-a73-pmu", 1}, > + {"arm,cortex-a72-pmu", 1}, > + {"arm,cortex-a65-pmu", 1}, > + {"arm,cortex-a57-pmu", 1}, > + {"arm,cortex-a55-pmu", 1}, > + {"arm,cortex-a53-pmu", 1}, > + {"arm,cortex-a34-pmu", 1}, > + > + {"arm,cortex-a17-pmu", 1}, > + {"arm,cortex-a15-pmu", 1}, > + {"arm,cortex-a12-pmu", 1}, > + {"arm,cortex-a9-pmu", 1}, > + {"arm,cortex-a8-pmu", 1}, > + {"arm,cortex-a7-pmu", 1}, > + {"arm,cortex-a5-pmu", 1}, > + {"arm,arm11mpcore-pmu", 1}, > + {"arm,arm1176-pmu", 1}, > + {"arm,arm1136-pmu", 1}, > + {"qcom,krait-pmu", 1}, > + {NULL, 0} > +}; > + > +static int > +pmu_fdt_probe(device_t dev) > +{ > + > + if (!ofw_bus_status_okay(dev)) > + return (ENXIO); > + > + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { > + device_set_desc(dev, "Performance Monitoring Unit"); > + return (BUS_PROBE_DEFAULT); > + } > + > + return (ENXIO); > +} > + > +static int > +pmu_parse_affinity(device_t dev, struct pmu_softc *sc, struct pmu_intr *irq, > + phandle_t xref, uint32_t mpidr) > +{ > + struct pcpu *pcpu; > + int i, err; > + > + > + if (xref != 0) { > + err = OF_getencprop(OF_node_from_xref(xref), "reg", &mpidr, > + sizeof(mpidr)); > + if (err < 0) { > + device_printf(dev, "missing 'reg' property\n"); > + return (ENXIO); > + } > + } > + > + for (i = 0; i < MAXCPU; i++) { > + pcpu = pcpu_find(i); > + if (pcpu != NULL && pcpu->pc_mpidr == mpidr) { > + irq->cpuid = i; > + return (0); > + } > + } > + > + device_printf(dev, "Cannot find CPU with MPIDR: 0x%08X\n", mpidr); > + return (ENXIO); > +} > + > +static int > +pmu_parse_intr(device_t dev, struct pmu_softc *sc) > +{ > + bool has_affinity; > + phandle_t node, *cpus; > + int rid, err, ncpus, i; > + > + > + node = ofw_bus_get_node(dev); > + has_affinity = OF_hasprop(node, "interrupt-affinity"); > + > + for (i = 0; i < MAX_RLEN; i++) > + sc->irq[i].cpuid = -1; > + > + cpus = NULL; > + if (has_affinity) { > + ncpus = OF_getencprop_alloc_multi(node, "interrupt-affinity", > + sizeof(*cpus), (void **)&cpus); > + if (ncpus < 0) { > + device_printf(dev, > + "Cannot read interrupt affinity property\n"); > + return (ENXIO); > + } > + } > + > + /* Process first interrupt */ > + rid = 0; > + sc->irq[0].res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, > + RF_ACTIVE | RF_SHAREABLE); > + > + if (sc->irq[0].res == NULL) { > + device_printf(dev, "Cannot get interrupt\n"); > + err = ENXIO; > + goto done; > + } > + > + /* Check if PMU have one per-CPU interrupt */ > + if (intr_is_per_cpu(sc->irq[0].res)) { > + if (has_affinity) { > + device_printf(dev, > + "Per CPU interupt have declared affinity\n"); > + err = ENXIO; > + goto done; > + } > + return (0); > + } > + > + /* > + * PMU with set of generic interrupts (one per core) > + * Each one must be binded to exact core. > + */ > + err = pmu_parse_affinity(dev, sc, sc->irq + 0, > + has_affinity ? cpus[0] : 0, 0); > + if (err != 0) { > + device_printf(dev, "Cannot parse affinity for CPUid: 0\n"); > + goto done; > + } > + > + for (i = 1; i < MAX_RLEN; i++) { > + rid = i; > + sc->irq[i].res = bus_alloc_resource_any(dev, SYS_RES_IRQ, > + &rid, RF_ACTIVE | RF_SHAREABLE); > + if (sc->irq[i].res == NULL) > + break; > + > + if (intr_is_per_cpu(sc->irq[i].res)) > + { > + device_printf(dev, "Unexpected per CPU interupt\n"); > + err = ENXIO; > + goto done; > + } > + > + if (has_affinity && i >= ncpus) { > + device_printf(dev, "Missing value in interrupt " > + "affinity property\n"); > + err = ENXIO; > + goto done; > + } > + > + err = pmu_parse_affinity(dev, sc, sc->irq + i, > + has_affinity ? cpus[i] : 0, i); > + if (err != 0) { > + device_printf(dev, > + "Cannot parse affinity for CPUid: %d.\n", i); > + goto done; > + } > + } > + err = 0; > +done: > + OF_prop_free(cpus); > + return (err); > +} > + > +static int > +pmu_fdt_attach(device_t dev) > +{ > + struct pmu_softc *sc; > + int err; > + > + sc = device_get_softc(dev); > + err = pmu_parse_intr(dev, sc); > + if (err != 0) > + return (err); > + > + return (pmu_attach(dev)); > +} > + > +static device_method_t pmu_fdt_methods[] = { > + DEVMETHOD(device_probe, pmu_fdt_probe), > + DEVMETHOD(device_attach, pmu_fdt_attach), > + { 0, 0 } > +}; > + > +static driver_t pmu_fdt_driver = { > + "pmu", > + pmu_fdt_methods, > + sizeof(struct pmu_softc), > +}; > + > +static devclass_t pmu_fdt_devclass; > + > +DRIVER_MODULE(pmu, simplebus, pmu_fdt_driver, pmu_fdt_devclass, 0, 0); > diff --git a/sys/conf/files.arm b/sys/conf/files.arm > index 13a47e5b6f5a..eb3a23b5fc21 100644 > --- a/sys/conf/files.arm > +++ b/sys/conf/files.arm > @@ -56,7 +56,8 @@ arm/arm/platform.c optional platform > arm/arm/platform_if.m optional platform > arm/arm/platform_pl310_if.m optional platform pl310 > arm/arm/pmap-v6.c standard > -arm/arm/pmu.c optional pmu | fdt hwpmc > +arm/arm/pmu.c optional pmu | hwpmc > +arm/arm/pmu_fdt.c optional fdt pmu | fdt hwpmc > arm/arm/ptrace_machdep.c standard > arm/arm/sc_machdep.c optional sc > arm/arm/setcpsr.S standard > diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 > index 439b37c12cd0..f421304b1903 100644 > --- a/sys/conf/files.arm64 > +++ b/sys/conf/files.arm64 > @@ -85,6 +85,7 @@ arm/arm/gic.c standard > arm/arm/gic_acpi.c optional acpi > arm/arm/gic_fdt.c optional fdt > arm/arm/pmu.c standard > +arm/arm/pmu_fdt.c optional fdt > arm/broadcom/bcm2835/bcm2835_audio.c optional sound vchiq fdt \ > compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" > arm/broadcom/bcm2835/bcm2835_bsc.c optional bcm2835_bsc fdt > _______________________________________________ > dev-commits-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all > To unsubscribe, send any mail to "dev-commits-src-all-unsubscribe@freebsd.org" From owner-dev-commits-src-all@freebsd.org Thu Dec 31 03:19:52 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAD354DAAC2; Thu, 31 Dec 2020 03:19:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D5tgX3zttz3QN9; Thu, 31 Dec 2020 03:19:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B68D1660; Thu, 31 Dec 2020 03:19:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BV3JqN5063608; Thu, 31 Dec 2020 03:19:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BV3Jqd0063607; Thu, 31 Dec 2020 03:19:52 GMT (envelope-from git) Date: Thu, 31 Dec 2020 03:19:52 GMT Message-Id: <202012310319.0BV3Jqd0063607@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 53bc3221561a - stable/12 - MFC addr2line label checks when DW_AT_range and DW_AT_low_pc cannot be used MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 53bc3221561aac01410087646444dc4d4ef41f37 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 03:19:52 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=53bc3221561aac01410087646444dc4d4ef41f37 commit 53bc3221561aac01410087646444dc4d4ef41f37 Author: Ed Maste AuthorDate: 2020-11-19 21:10:36 +0000 Commit: Ed Maste CommitDate: 2020-12-31 03:19:32 +0000 MFC addr2line label checks when DW_AT_range and DW_AT_low_pc cannot be used addr2line: swap if conditions for diff reduction in upcoming change No functional change intended. (cherry picked from commit 65c207758a9586116a023dea8eb3d173e85cb0a9) addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used Check label's ranges for address we want to translate if a CU doesn't have usable DW_AT_range or DW_AT_low_pc. Use more appropriate names: "struct CU" -> "struct range" Developed as part of upstream ELF Tool Chain bug report https://sourceforge.net/p/elftoolchain/tickets/552/ although this does not address the specific case reported there. Submitted by: Tiger Gao Sponsored by: The FreeBSD Foundation Differential Revision: D23782 (cherry picked from commit a36179937e7e768d1840896ac1ea13ba6f118a09) addr2line: rework check_range conditions Simplify logic and reduce indentation for DW_AT_low_pc case. Reviewed by: Tiger Gao, markj Sponsored by: The FreeBSD Foundation Differential Revision: D27426 (cherry picked from commit f4d6ed9a5c5f5e78b9e20ae0c4b3ab78922aaf20) addr2line: fix allocation leak in error path CID: 1437677 Reported by: Coverity Scan Sponsored by: The FreeBSD Foundation (cherry picked from commit 67b94fc58e61a78225930d54eadaba77f46a73b7) --- contrib/elftoolchain/addr2line/addr2line.c | 317 +++++++++++++++++++++-------- 1 file changed, 231 insertions(+), 86 deletions(-) diff --git a/contrib/elftoolchain/addr2line/addr2line.c b/contrib/elftoolchain/addr2line/addr2line.c index 123ce8cce9b3..db8f84eef780 100644 --- a/contrib/elftoolchain/addr2line/addr2line.c +++ b/contrib/elftoolchain/addr2line/addr2line.c @@ -56,8 +56,8 @@ struct Func { STAILQ_ENTRY(Func) next; }; -struct CU { - RB_ENTRY(CU) entry; +struct range { + RB_ENTRY(range) entry; Dwarf_Off off; Dwarf_Unsigned lopc; Dwarf_Unsigned hipc; @@ -88,16 +88,16 @@ static char unknown[] = { '?', '?', '\0' }; static Dwarf_Addr section_base; /* Need a new curlopc that stores last lopc value. */ static Dwarf_Unsigned curlopc = ~0ULL; -static RB_HEAD(cutree, CU) cuhead = RB_INITIALIZER(&cuhead); +static RB_HEAD(cutree, range) cuhead = RB_INITIALIZER(&cuhead); static int -lopccmp(struct CU *e1, struct CU *e2) +lopccmp(struct range *e1, struct range *e2) { return (e1->lopc < e2->lopc ? -1 : e1->lopc > e2->lopc); } -RB_PROTOTYPE(cutree, CU, entry, lopccmp); -RB_GENERATE(cutree, CU, entry, lopccmp) +RB_PROTOTYPE(cutree, range, entry, lopccmp); +RB_GENERATE(cutree, range, entry, lopccmp) #define USAGE_MESSAGE "\ Usage: %s [options] hexaddress...\n\ @@ -170,7 +170,7 @@ handle_high_pc(Dwarf_Die die, Dwarf_Unsigned lopc, Dwarf_Unsigned *hipc) } static struct Func * -search_func(struct CU *cu, Dwarf_Unsigned addr) +search_func(struct range *range, Dwarf_Unsigned addr) { struct Func *f, *f0; Dwarf_Unsigned lopc, hipc, addr_base; @@ -178,7 +178,7 @@ search_func(struct CU *cu, Dwarf_Unsigned addr) f0 = NULL; - STAILQ_FOREACH(f, &cu->funclist, next) { + STAILQ_FOREACH(f, &range->funclist, next) { if (f->ranges != NULL) { addr_base = 0; for (i = 0; i < f->ranges_cnt; i++) { @@ -215,7 +215,8 @@ search_func(struct CU *cu, Dwarf_Unsigned addr) } static void -collect_func(Dwarf_Debug dbg, Dwarf_Die die, struct Func *parent, struct CU *cu) +collect_func(Dwarf_Debug dbg, Dwarf_Die die, struct Func *parent, + struct range *range) { Dwarf_Die ret_die, abst_die, spec_die; Dwarf_Error de; @@ -237,7 +238,7 @@ collect_func(Dwarf_Debug dbg, Dwarf_Die die, struct Func *parent, struct CU *cu) goto cont_search; } if (tag == DW_TAG_subprogram || tag == DW_TAG_entry_point || - tag == DW_TAG_inlined_subroutine) { + tag == DW_TAG_inlined_subroutine || tag == DW_TAG_label) { /* * Function address range can be specified by either * a DW_AT_ranges attribute which points to a range list or @@ -257,14 +258,21 @@ collect_func(Dwarf_Debug dbg, Dwarf_Die die, struct Func *parent, struct CU *cu) } /* - * Search for DW_AT_low_pc/DW_AT_high_pc if ranges pointer - * not found. - */ - if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) || - dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc, &de)) - goto cont_search; - if (handle_high_pc(die, lopc, &hipc) != DW_DLV_OK) - goto cont_search; + * Ranges pointer not found. Search for DW_AT_low_pc, and + * DW_AT_high_pc iff die is not a label. Labels doesn't have + * hipc attr. */ + if (tag == DW_TAG_label) { + if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, + &de) != DW_DLV_OK) + goto cont_search; + } else { + if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, + &de) || dwarf_attrval_unsigned(die, DW_AT_high_pc, + &hipc, &de)) + goto cont_search; + if (handle_high_pc(die, lopc, &hipc) != DW_DLV_OK) + goto cont_search; + } get_func_name: /* @@ -322,7 +330,7 @@ collect_func(Dwarf_Debug dbg, Dwarf_Die die, struct Func *parent, struct CU *cu) dwarf_attrval_unsigned(die, DW_AT_call_line, &f->call_line, &de); } - STAILQ_INSERT_TAIL(&cu->funclist, f, next); + STAILQ_INSERT_TAIL(&range->funclist, f, next); } cont_search: @@ -333,9 +341,9 @@ cont_search: warnx("dwarf_child: %s", dwarf_errmsg(de)); else if (ret == DW_DLV_OK) { if (f != NULL) - collect_func(dbg, ret_die, f, cu); + collect_func(dbg, ret_die, f, range); else - collect_func(dbg, ret_die, parent, cu); + collect_func(dbg, ret_die, parent, range); } /* Search sibling. */ @@ -343,10 +351,10 @@ cont_search: if (ret == DW_DLV_ERROR) warnx("dwarf_siblingof: %s", dwarf_errmsg(de)); else if (ret == DW_DLV_OK) - collect_func(dbg, ret_die, parent, cu); + collect_func(dbg, ret_die, parent, range); /* Cleanup */ - if (die != cu->die) + if (die != range->die) dwarf_dealloc(dbg, die, DW_DLA_DIE); if (abst_die != NULL) @@ -357,14 +365,14 @@ cont_search: } static void -print_inlines(struct CU *cu, struct Func *f, Dwarf_Unsigned call_file, +print_inlines(struct range *range, struct Func *f, Dwarf_Unsigned call_file, Dwarf_Unsigned call_line) { char demangled[1024]; char *file; - if (call_file > 0 && (Dwarf_Signed) call_file <= cu->nsrcfiles) - file = cu->srcfiles[call_file - 1]; + if (call_file > 0 && (Dwarf_Signed) call_file <= range->nsrcfiles) + file = range->srcfiles[call_file - 1]; else file = unknown; @@ -389,14 +397,14 @@ print_inlines(struct CU *cu, struct Func *f, Dwarf_Unsigned call_file, (uintmax_t) call_line); if (f->inlined_caller != NULL) - print_inlines(cu, f->inlined_caller, f->call_file, + print_inlines(range, f->inlined_caller, f->call_file, f->call_line); } -static struct CU * +static struct range * culookup(Dwarf_Unsigned addr) { - struct CU find, *res; + struct range find, *res; find.lopc = addr; res = RB_NFIND(cutree, &cuhead, &find); @@ -414,12 +422,150 @@ culookup(Dwarf_Unsigned addr) } /* - * Check whether addr falls into range(s) of current CU, and save current CU - * to lookup tree if so. + * When DW_AT_ranges, DW_AT_low_pc/DW_AT_high_pc are all absent, we check the + * children of cu die for labels. If the address falls into one of the labels + * ranges(aranges), return the label DIE. + */ +static int +check_labels(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Unsigned addr, + struct range **range) { + Dwarf_Addr start; + Dwarf_Arange *aranges; + Dwarf_Die prev_die, ret_die; + Dwarf_Error de; + Dwarf_Half tag; + Dwarf_Off die_off; + Dwarf_Unsigned lopc, length; + Dwarf_Signed arcnt; + struct range *labelp, **labels; + int i, j, label_cnt, ret; + + prev_die = ret_die = NULL; + labels = NULL; + i = label_cnt = 0; + + /* Find aranges. */ + ret = dwarf_get_aranges(dbg, &aranges, &arcnt, &de); + if (ret != DW_DLV_OK && ret != DW_DLV_NO_ENTRY) + warnx("dwarf_get_aranges failed: %s", dwarf_errmsg(de)); + + /* Child of current CU. */ + ret = dwarf_child(die, &prev_die, &de); + if (ret == DW_DLV_ERROR) + warnx("dwarf_child: %s", dwarf_errmsg(de)); + + /* Count labels. */ + while (1) { + if (dwarf_tag(prev_die, &tag, &de) != DW_DLV_OK) { + warnx("dwarf_tag failed: %s", + dwarf_errmsg(de)); + return DW_DLV_ERROR; + } + if (tag == DW_TAG_label) { + if (dwarf_attrval_unsigned(prev_die, DW_AT_low_pc, + &lopc, &de) == DW_DLV_OK) + label_cnt++; + } + + if (dwarf_siblingof(dbg, prev_die, &ret_die, &de) != DW_DLV_OK) + break; + + if (prev_die != NULL) + dwarf_dealloc(dbg, prev_die, DW_DLA_DIE); + prev_die = ret_die; + } + + if (label_cnt == 0) + return (DW_DLV_NO_ENTRY); + + /* Allocate space for labels. */ + if ((labels = calloc(label_cnt, sizeof(struct range *))) == NULL) + err(EXIT_FAILURE, "calloc"); + + /* Add labels to list. */ + ret = dwarf_child(die, &prev_die, &de); + if (ret == DW_DLV_ERROR) + warnx("dwarf_child: %s", dwarf_errmsg(de)); + while (1) { + if (dwarf_tag(prev_die, &tag, &de) != DW_DLV_OK) { + warnx("dwarf_tag failed: %s", + dwarf_errmsg(de)); + free(labels); + return DW_DLV_ERROR; + } + if (tag == DW_TAG_label) { + if (dwarf_attrval_unsigned(prev_die, DW_AT_low_pc, + &lopc, &de) == DW_DLV_OK) { + if (curlopc == lopc) { + for (i = 0; i < label_cnt - 1; i++) { + if (labels[i] != *range) + free(labels[i]); + } + free(labels); + return DW_DLV_ERROR; + } + labelp = calloc(1, sizeof(struct range)); + if (labelp == NULL) + err(EXIT_FAILURE, "calloc"); + labelp->lopc = lopc; + labelp->die = prev_die; + labelp->dbg = dbg; + STAILQ_INIT(&labelp->funclist); + labels[i++] = labelp; + } + } + if (dwarf_siblingof(dbg, prev_die, &ret_die, &de) != DW_DLV_OK) + break; + if (prev_die != NULL && tag != DW_TAG_label) + dwarf_dealloc(dbg, prev_die, DW_DLA_DIE); + prev_die = ret_die; + } + + /* Set hipc for each label using aranges */ + for (i = 0; i < label_cnt; i++) { + for (j = 0; j < arcnt; j++) { + if (dwarf_get_arange_info(aranges[j], &start, &length, + &die_off, &de) != DW_DLV_OK) { + warnx("dwarf_get_arange_info failed: %s", + dwarf_errmsg(de)); + continue; + } + if (labels[i]->lopc == (Dwarf_Unsigned)start) { + labels[i]->hipc = start + length; + break; + } + } + } + + /* If addr in label's range, we have found the range for this label. */ + for (i = 0; i < label_cnt; i++) { + if (addr >= labels[i]->lopc && addr < labels[i]->hipc) { + *range = labels[i]; + RB_INSERT(cutree, &cuhead, (*range)); + curlopc = (*range)->lopc; + break; + } + } + + for (i = 0; i < label_cnt - 1; i++) { + if (labels[i] != *range) + free(labels[i]); + } + free(labels); + + if (*range != NULL) + return (DW_DLV_OK); + else + return (DW_DLV_NO_ENTRY); +} + +/* + * Check whether addr falls into range(s) of current CU. + * If so, save current CU to lookup tree. */ static int check_range(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Unsigned addr, - struct CU **cu) + struct range **range) { Dwarf_Error de; Dwarf_Unsigned addr_base, lopc, hipc; @@ -427,38 +573,15 @@ check_range(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Unsigned addr, Dwarf_Signed ranges_cnt; Dwarf_Ranges *ranges; int i, ret; - bool in_range; + bool in_cu; addr_base = 0; ranges = NULL; ranges_cnt = 0; - in_range = false; + in_cu = false; - ret = dwarf_attrval_unsigned(die, DW_AT_ranges, &ranges_off, &de); - if (ret == DW_DLV_NO_ENTRY) { - if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) == - DW_DLV_OK) { - if (lopc == curlopc) - return (DW_DLV_ERROR); - if (dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc, - &de) == DW_DLV_OK) { - /* - * Check if the address falls into the PC - * range of this CU. - */ - if (handle_high_pc(die, lopc, &hipc) != - DW_DLV_OK) - return (DW_DLV_ERROR); - } else { - /* Assume ~0ULL if DW_AT_high_pc not present */ - hipc = ~0ULL; - } - - if (addr >= lopc && addr < hipc) { - in_range = true; - } - } - } else if (ret == DW_DLV_OK) { + if (dwarf_attrval_unsigned(die, DW_AT_ranges, &ranges_off, &de) == + DW_DLV_OK) { ret = dwarf_get_ranges(dbg, ranges_off, &ranges, &ranges_cnt, NULL, &de); if (ret != DW_DLV_OK) @@ -485,23 +608,45 @@ check_range(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Unsigned addr, return (DW_DLV_ERROR); if (addr >= lopc && addr < hipc){ - in_range = true; + in_cu = true; break; } } + } else if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) == + DW_DLV_OK) { + if (lopc == curlopc) + return (DW_DLV_ERROR); + if (dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc, &de) == + DW_DLV_OK) { + /* + * Check if the address falls into the PC + * range of this CU. + */ + if (handle_high_pc(die, lopc, &hipc) != DW_DLV_OK) + return (DW_DLV_ERROR); + } else { + /* Assume ~0ULL if DW_AT_high_pc not present. */ + hipc = ~0ULL; + } + + if (addr >= lopc && addr < hipc) { + in_cu = true; + } } else { - return (DW_DLV_ERROR); + /* Addr not found above, try labels. */ + ret = check_labels(dbg, die, addr, range); + return ret; } - - if (in_range) { - if ((*cu = calloc(1, sizeof(struct CU))) == NULL) + + if (in_cu) { + if ((*range = calloc(1, sizeof(struct range))) == NULL) err(EXIT_FAILURE, "calloc"); - (*cu)->lopc = lopc; - (*cu)->hipc = hipc; - (*cu)->die = die; - (*cu)->dbg = dbg; - STAILQ_INIT(&(*cu)->funclist); - RB_INSERT(cutree, &cuhead, *cu); + (*range)->lopc = lopc; + (*range)->hipc = hipc; + (*range)->die = die; + (*range)->dbg = dbg; + STAILQ_INIT(&(*range)->funclist); + RB_INSERT(cutree, &cuhead, *range); curlopc = lopc; return (DW_DLV_OK); } else { @@ -519,7 +664,7 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr) Dwarf_Unsigned addr, lineno, plineno; Dwarf_Signed lcount; Dwarf_Addr lineaddr, plineaddr; - struct CU *cu; + struct range *range; struct Func *f; const char *funcname; char *file, *file0, *pfile; @@ -533,10 +678,10 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr) die = NULL; ret = DW_DLV_OK; - cu = culookup(addr); - if (cu != NULL) { - die = cu->die; - dbg = cu->dbg; + range = culookup(addr); + if (range != NULL) { + die = range->die; + dbg = range->dbg; goto status_ok; } @@ -575,7 +720,7 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr) warnx("could not find DW_TAG_compile_unit die"); goto next_cu; } - ret = check_range(dbg, die, addr, &cu); + ret = check_range(dbg, die, addr, &range); if (ret == DW_DLV_OK) break; if (ret == DW_DLV_ERROR) @@ -633,16 +778,16 @@ status_ok: out: f = NULL; funcname = NULL; - if (ret == DW_DLV_OK && (func || inlines) && cu != NULL) { - if (cu->srcfiles == NULL) - if (dwarf_srcfiles(die, &cu->srcfiles, &cu->nsrcfiles, - &de)) + if (ret == DW_DLV_OK && (func || inlines) && range != NULL) { + if (range->srcfiles == NULL) + if (dwarf_srcfiles(die, &range->srcfiles, + &range->nsrcfiles, &de)) warnx("dwarf_srcfiles: %s", dwarf_errmsg(de)); - if (STAILQ_EMPTY(&cu->funclist)) { - collect_func(dbg, die, NULL, cu); + if (STAILQ_EMPTY(&range->funclist)) { + collect_func(dbg, range->die, NULL, range); die = NULL; } - f = search_func(cu, addr); + f = search_func(range, addr); if (f != NULL) funcname = f->name; } @@ -685,9 +830,9 @@ out: (void) printf("%s:%ju\n", base ? basename(file) : file, (uintmax_t) lineno); - if (ret == DW_DLV_OK && inlines && cu != NULL && - cu->srcfiles != NULL && f != NULL && f->inlined_caller != NULL) - print_inlines(cu, f->inlined_caller, f->call_file, + if (ret == DW_DLV_OK && inlines && range != NULL && + range->srcfiles != NULL && f != NULL && f->inlined_caller != NULL) + print_inlines(range, f->inlined_caller, f->call_file, f->call_line); } From owner-dev-commits-src-all@freebsd.org Thu Dec 31 03:35:05 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 163CA4DB0B9; Thu, 31 Dec 2020 03:35:05 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5v145v4Dz3QtJ; Thu, 31 Dec 2020 03:35:04 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1609385704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=quPFucfC3PnotSuPncOc0iweiuxU6DhjUSycaB/mO6Q=; b=bKf7MfjmaDrovhKYO+nt2IwkI4qZf1YubjNoVQ+gLM/3ZTKAijzubiSZUVmMAodyEJQhHx 0kdQvSPNDAPxRCo8aII6+DPXCxCFMwO2hrrSuN2Y8Sfo9Ra1S70M6r1lVzlwr+N84Tsq5O 7GpBfR8pHgB55r9EaKUmhpPEafC7IH842j0SGBl0xE6EArUt5GXXRnIckzUXYgwPgySAWw HHuokw/de2PV34FAJdNDs8Bb7vtuJKDbBYazQJlP0LHR5H7B2hY51+CLKZoOBx06FLRWyQ WAks54kYoGy2DZ+8c9Z7aF5QDAEsj27Xf0PPGmioYalxSiilHyrFEpZicYMKiw== Received: by freefall.freebsd.org (Postfix, from userid 1033) id B5E06575A; Thu, 31 Dec 2020 03:35:04 +0000 (UTC) Date: Thu, 31 Dec 2020 03:35:04 +0000 From: Alexey Dokuchaev To: Eric Masson Cc: Poul-Henning Kamp , Warner Losh , Glen Barber , Kyle Evans , "Rodney W. Grimes" , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL Message-ID: <20201231033504.GA26157@FreeBSD.org> References: <202012291441.0BTEf1X9009764@gitrepo.freebsd.org> <202012300018.0BU0I7gn079533@gndrsh.dnsmgr.net> <20201230022128.GE1206@FreeBSD.org> <15826.1609318943@critter.freebsd.dk> <20201230090913.GA90119@FreeBSD.org> <864kk3fw04.fsf@srvbsdfenssv.interne.associated-bears.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <864kk3fw04.fsf@srvbsdfenssv.interne.associated-bears.org> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1609385704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=quPFucfC3PnotSuPncOc0iweiuxU6DhjUSycaB/mO6Q=; b=wxcWciCO8E/0f39TotTB9umZFE8CvYLojNqnze0ycbDLzLD++2UAQIS2iqiInwTltp2KwE vwNKjxL5+cgc/1vV9xVwGlpTN8iAG3/03xe11SjzngcOyIhOZUB6bVickjVt6aBNe+OKcP fi7D+FjOi7aRcj2VGpPAaMcJSpxKNHG41g8aWmL0VxeLmyaaZ7qzw9wlOLb5/BmKKwsWPP EIqfAfoonnQ8Xhgk1J8zeyJIIU6xNqhTWR1y1+sCz3Ub+bR5JHyGUfdKYuMD65EkkqHGjz ceLXpAeqg+MbPzt78M8LfYVZHysrKcLcJhxtN7NTGhDZQsC6ksCMqasWieiVgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1609385704; a=rsa-sha256; cv=none; b=AAgxjhwiFs2Y/CnMOtxSPm5aCPoIWDw49+oSrUdvCLOmQP+aKiZpP46eVRDO+AGM6pysBr yPnTIuXNFh0p+dJKIAtVKcO921wLRxLao0FPdv/d5B/OkV1l2VMP+t6asDMCcxiX0L4htp b6Qbmf6YnyuSPcZmhb9qHnylEeahIT76HIUSzJY3vc/9hAH/Ujz/3YvzRuBi3HeJCrgpeF q3NhTWFZDKTFMVf1n9PIhltboelMTaWGPK396bGnxVMfdyuWeb6cLiy0Y1+C1G5NrNcIYi aRLJy5PEk997fMbkDFR9NF2yb7so7mU6WkfAxYHeOC8w+nwTE33pGbsfCVrZog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 03:35:05 -0000 On Wed, Dec 30, 2020 at 11:06:51AM +0100, Eric Masson wrote: > ... > Did my first build based on git checkout STABLE/12 src yesterday, F flag > really helped in mergemaster stage (mergemaster -iFU), only had to merge > the usual local mods. And how exactly could this work if -F uses VCS Id ($FreeBSD$) and git does not expand them? ./danfe From owner-dev-commits-src-all@freebsd.org Thu Dec 31 06:03:10 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4B2574DDE25; Thu, 31 Dec 2020 06:03:10 +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 4D5yHx5xlWz3pjJ; Thu, 31 Dec 2020 06:03:09 +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 0BV62xEp085089; Wed, 30 Dec 2020 22:02:59 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 0BV62xUk085088; Wed, 30 Dec 2020 22:02:59 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202012310602.0BV62xUk085088@gndrsh.dnsmgr.net> Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL In-Reply-To: To: Warner Losh Date: Wed, 30 Dec 2020 22:02:59 -0800 (PST) CC: "Rodney W. Grimes" , Glen Barber , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4D5yHx5xlWz3pjJ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 06:03:10 -0000 > On Wed, Dec 30, 2020 at 2:31 PM Rodney W. Grimes > wrote: > > > > On Wed, Dec 30, 2020 at 5:13 AM Rodney W. Grimes < > > freebsd@gndrsh.dnsmgr.net> > > > wrote: > > > > > > > > On Tue, Dec 29, 2020 at 04:18:07PM -0800, Rodney W. Grimes wrote: > > > > > > > The branch main has been updated by gjb: > > > > > > > > > > > > > > URL: > > > > > > https://cgit.FreeBSD.org/src/commit/?id=70e64ba4494190e64ab8faa04d744182d420c275 > > > > > > > > > > > > > > commit 70e64ba4494190e64ab8faa04d744182d420c275 > > > > > > > Author: Glen Barber > > > > > > > AuthorDate: 2020-12-29 14:34:05 +0000 > > > > > > > Commit: Glen Barber > > > > > > > CommitDate: 2020-12-29 14:40:28 +0000 > > > > > > > > > > > > > > release.sh: Update GITROOT URL > > > > > > > > > > > > > > Hard-code the GITROOT for the ports tree to use cgit-beta > > > > > > > until the ports repository is converted. > > > > > > > > > > > > > > While here, remove $FreeBSD$ RCS IDs. > > > > > > > > > > > > So how do I know what version of some file I am looking at > > > > > > once it has been dis-associated from a git clone? > > > > > > > > > > > > > > > > You can't. Git does not expand the tags. > > > > > > > > And no new mechanism in place to replace it? So, we have > > > > no versioning of files in the final product any more? > > > > > > > > > > No. We will not. > > > > That I take a very hard line against, that is IMHO a very big mistake. > > > > Your opinion has been noted. > > > > > > Sad, very very sad :-(. This may cause some down streams, > > > > other than me, some very serious heart ache. > > > > > > > > > > Git provides tools to reduce that heart ache. You can get the same info, > > > but using different means using git's tools should you need to. > > > > See other mail to Ryan, those tools well not help with the issues > > of locally modified files and being able to figure out what base > > they started with. > > > > You describe a source code management nightmare that $FreeBSD$ might be > able to solve a subset of cases, but other methods will solve them better. This is not a source code management nightmare, it is a traceability of production items, this "feature" has been in BSD since /bin/what was written to extract SCCS id's out of binary files. That got broken cause we stoped putting them in, but the strings of $FreeBSD$ have always been in the binaries. This gives traceability. > > > > > > > > > Is there some new mechanism that can give me the cadence of > > > > > > say, /etc/pkg/FreeBSD.conf once its FreBSD ID is riped out? > > > > > > > > > > > > Also if $FreeBSD$ needs to be removed, can we please just do > > > > > > it in one massive tree wide commit rather than have this > > > > > > random piece wise needless noise in 1000's of commits? > > > > > > > > > > > > > > > > Please, no. There is no benefit to prune these in one fell swoop as > > > > > opposed to, for example, bumping Copyright dates. > > > > > > > > Well have to disagree on that. > > > > > > > > a) If it is removed in one fell swoop it can also probably > > > > be undone in one fell swoop too. > > > > > > > > > > It won't ever be undone, so this is irrelevant. > > > > I would be careful with any claim of never. > > > > I am. It's an extremely poor fit to git, has extreme resistance in git > upstream and the available git support is too limited to be useful. Big > effort, low reward item in a volunteer project generally means it won't > happen when there's other workarounds that are simpler and easier. So basically anything that git doesnt fit is now gone.. *sigh* > > > > b) It concentrates the change in 1 commit that does NOT > > > > ever need to be MFC'ed. > > > > > > > > > > That causes merge conflicts for everybody for years. The cost here is too > > > high. > > > > Again, please, enlighten me how a 1 line +- delta in a file is going to > > cause any merge conflict outside of +-3 lines from that line? These > > strings are VERY well located and in areas that should be very rarely > > touched. Very different than things like large white space clean up. > > > > Let's do some math. We have about 10k commits on a stable branch, give or > take. My experience with MFCing suggests that 5% of these will have a merge > conflict that needs to be resolved. Each one of these conflicts takes 5 > minutes to resolve because it breaks up the flow of the commits, etc. So > ~500 commits for ~5 minutes is ~40 hours. We've just wasted an entire week > of developer time for doing it all at once, vs almost 0 for doing it > incrementally. Your math is not math if you claim that this delta would cause 5% conflicts. MOST MFC conflicts occur because of missing interveing commits. You still have not explained how a 1 line delta removing a line is likely to cause any conflict at all, and I continue to assert it is very unlikely to as this 1 line is almost always in other lines that are very very rarely if ever changed. > > > > c) It'll quickly get us to the damage that is done by > > > > the loss of this information from the released binary > > > > product so repairs may begin. > > > > > > > > > > We can begin repairs w/o doing this. 99% of these never end up in > > binaries > > > anyway. > > > > Oh, now thats false... simple test: > > find /bin | xargs grep -l \$FreeBSD: | wc > > find /bin | wc > > > > 44/45 files on my 12.1 system. > > > > As far as I recall it is more like 99% of our files HAVE these strings in > > them. > > > > On my system, the numbers are quite different: > % find /*bin /usr/*bin -type f | xargs grep -la '$FreeBSD:' | wc > 4 4 64 > 3:14pm rebo:[245]> find /*bin /usr/*bin -type f | wc > 1032 1032 16791 > > And all 4 binaries are from 2016 and appear to be 'stale' leftovers. My guess would be your system is NOT from a production release of FreeBSD, probably compiled with a STRIP_FBSDID defined. I checked /bin on 11.2, 12.0 and 12.1 same results, all but 2 files. > > > > d) It'll shorten 1000's of commit messages by the lines: > > > > While here, remove $FreeBSD$ RCS IDs. > > > > > > > > > > Who cares? I mean, this is not an issue at all. > > > > > > Like I've said: there's a real cost to doing this, and the benefits from > > > doing this are quite small. As someone that's had to deal for years with > > > partial merges of sweeping commits, please listen when I say that they > > > always cause unintended pain due to their size. > > > > You can repeat yourself, but please give relavent factual cause on how > > this causes a merge conflict. > > > I have given numbers. We'd be wasting a week's time of all our developers, > give or take. I do not accept your WAG 5% as a realistic number. > > In most cases it would be a single line delete in an area of the > > file that is rarely touched. This is NOT like white space cleanup, > > macro renames, or other global scope changes. It is no worse than > > the SPDX tagging that was done, and if that had not been caught up > > in some work flow errors, would of been fine. > > > > There's value in the SPDX stuff, which we also did piecemeal, and which > also caused me grief when I MFC'd stuff because it was done in large > batches, and merged incrementally. Just because you see no value in FreeBSD, does not make it have no value. I would argue it has more value that SPDX. At least it is used programatically to create traceability in the production releases. > Warner -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-all@freebsd.org Thu Dec 31 07:22:52 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9EFC74DE975 for ; Thu, 31 Dec 2020 07:22:52 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) (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 4D603w3hDTz3tQV for ; Thu, 31 Dec 2020 07:22:52 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf35.google.com with SMTP id p5so8715475qvs.7 for ; Wed, 30 Dec 2020 23:22:52 -0800 (PST) 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=bfaEz5vbnfZx768YdvqduP42dqxVjC9nF3/0Rvvf0aQ=; b=nD7kTTsA4Srn0WLvfYOHoNq7bzwlEi9Nqu+J8eXBzAgeNpMZAqCEWbKDjG3zKeeph5 Dkb8uyeN4sTgp11G6VwBElWYDB64ihrXsgsLr7sVEguefXeLgCVcIzbIH67Dgb/iGzMx hJx3qpKgeJ5rq51410PkSEwNC0QdyfY4NmQXi84t2AbzzR6yh8hAIW1rVO6r9P+3GiOl aU1A4jPUuTo4GNLfG/h1Jnzx6eTIzTi0aiJCobb37UL+xK+tXMe4O3pqK32h1/6THk9O C+g6XMht/iArYXYnth30QNWIa79VnLzmg1aqwY0nbEW0JddlVWKLPTvGjb3m6Yb4HBl+ DGAQ== 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=bfaEz5vbnfZx768YdvqduP42dqxVjC9nF3/0Rvvf0aQ=; b=ksVicBWigu+huoBaDFVWuC2kFdQCLtoLWPcB/pOuTkNt3x676yWDUk5roNIXEFv4us R7LSpJyMVBbQ3JNOkEw6EoTj0Na7dnsDC+wYjqOMG1FaSSeiowKXHEHpnyyZ6h/sbHBZ DYvwAGopXDhcuGLY827FtCOu1JZH4M9TVUeeJ9JhObUsURKiDf8q4h7Z5viCGx85pG9J bQlfh6ftr+8s4BAiNZ1HNpEW2xLOQSIXustXa+1vwFdDMyTraopFdMKFZtxCNMzOP5EO dwGIv1z3o7XAhTSa0HRftuHtaMRqYGZimBrUE/u6Cemnvmv3T5nobS+33fVYzHx1k3fc 7gDA== X-Gm-Message-State: AOAM533Zj9Ws5rNJozRutUvT9GMq5nMs0z8K+cOFr7JtuAHynzbUNPVS 2o9v/eGW+2XPMRkIls8o9JDyLjWNHANY27CmMgB6fQEQKFBQ/Q== X-Google-Smtp-Source: ABdhPJwSAkPgeuUbCHMPJj6nX1KHvBevC2Hr1Ep7q4ZfzSHnGpboj6sfM7fch6rCxmc/2Ce/mhpwbaBh0gB5/vi3hd0= X-Received: by 2002:ad4:5b82:: with SMTP id 2mr60263181qvp.28.1609399370852; Wed, 30 Dec 2020 23:22:50 -0800 (PST) MIME-Version: 1.0 References: <202012310602.0BV62xUk085088@gndrsh.dnsmgr.net> In-Reply-To: <202012310602.0BV62xUk085088@gndrsh.dnsmgr.net> From: Warner Losh Date: Thu, 31 Dec 2020 00:22:39 -0700 Message-ID: Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL To: "Rodney W. Grimes" Cc: Glen Barber , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4D603w3hDTz3tQV X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 07:22:52 -0000 On Wed, Dec 30, 2020, 11:03 PM Rodney W. Grimes wrote: > > On Wed, Dec 30, 2020 at 2:31 PM Rodney W. Grimes < > freebsd@gndrsh.dnsmgr.net> > > wrote: > > > > > > On Wed, Dec 30, 2020 at 5:13 AM Rodney W. Grimes < > > > freebsd@gndrsh.dnsmgr.net> > > > > wrote: > > > > > > > > > > On Tue, Dec 29, 2020 at 04:18:07PM -0800, Rodney W. Grimes wrote: > > > > > > > > The branch main has been updated by gjb: > > > > > > > > > > > > > > > > URL: > > > > > > > > > https://cgit.FreeBSD.org/src/commit/?id=70e64ba4494190e64ab8faa04d744182d420c275 > > > > > > > > > > > > > > > > commit 70e64ba4494190e64ab8faa04d744182d420c275 > > > > > > > > Author: Glen Barber > > > > > > > > AuthorDate: 2020-12-29 14:34:05 +0000 > > > > > > > > Commit: Glen Barber > > > > > > > > CommitDate: 2020-12-29 14:40:28 +0000 > > > > > > > > > > > > > > > > release.sh: Update GITROOT URL > > > > > > > > > > > > > > > > Hard-code the GITROOT for the ports tree to use cgit-beta > > > > > > > > until the ports repository is converted. > > > > > > > > > > > > > > > > While here, remove $FreeBSD$ RCS IDs. > > > > > > > > > > > > > > So how do I know what version of some file I am looking at > > > > > > > once it has been dis-associated from a git clone? > > > > > > > > > > > > > > > > > > > You can't. Git does not expand the tags. > > > > > > > > > > And no new mechanism in place to replace it? So, we have > > > > > no versioning of files in the final product any more? > > > > > > > > > > > > > No. We will not. > > > > > > That I take a very hard line against, that is IMHO a very big mistake. > > > > > > > Your opinion has been noted. > > > > > > > > > Sad, very very sad :-(. This may cause some down streams, > > > > > other than me, some very serious heart ache. > > > > > > > > > > > > > Git provides tools to reduce that heart ache. You can get the same > info, > > > > but using different means using git's tools should you need to. > > > > > > See other mail to Ryan, those tools well not help with the issues > > > of locally modified files and being able to figure out what base > > > they started with. > > > > > > > You describe a source code management nightmare that $FreeBSD$ might be > > able to solve a subset of cases, but other methods will solve them > better. > > This is not a source code management nightmare, it is a traceability > of production items, this "feature" has been in BSD since /bin/what > was written to extract SCCS id's out of binary files. That got > broken cause we stoped putting them in, but the strings of $FreeBSD$ > have always been in the binaries. This gives traceability. > Except we don't do that anymore. Nobody dies that any more. They use build IDs instead. They use proper CM. They have traceability through other means. > > > > > > > > > > Is there some new mechanism that can give me the cadence of > > > > > > > say, /etc/pkg/FreeBSD.conf once its FreBSD ID is riped out? > > > > > > > > > > > > > > Also if $FreeBSD$ needs to be removed, can we please just do > > > > > > > it in one massive tree wide commit rather than have this > > > > > > > random piece wise needless noise in 1000's of commits? > > > > > > > > > > > > > > > > > > > Please, no. There is no benefit to prune these in one fell > swoop as > > > > > > opposed to, for example, bumping Copyright dates. > > > > > > > > > > Well have to disagree on that. > > > > > > > > > > a) If it is removed in one fell swoop it can also probably > > > > > be undone in one fell swoop too. > > > > > > > > > > > > > It won't ever be undone, so this is irrelevant. > > > > > > I would be careful with any claim of never. > > > > > > > I am. It's an extremely poor fit to git, has extreme resistance in git > > upstream and the available git support is too limited to be useful. Big > > effort, low reward item in a volunteer project generally means it won't > > happen when there's other workarounds that are simpler and easier. > > So basically anything that git doesnt fit is now gone.. *sigh* > Yes. It is gone. The industry has moved on and no longer thinks this is a good idea. > > > > b) It concentrates the change in 1 commit that does NOT > > > > > ever need to be MFC'ed. > > > > > > > > > > > > > That causes merge conflicts for everybody for years. The cost here > is too > > > > high. > > > > > > Again, please, enlighten me how a 1 line +- delta in a file is going to > > > cause any merge conflict outside of +-3 lines from that line? These > > > strings are VERY well located and in areas that should be very rarely > > > touched. Very different than things like large white space clean up. > > > > > > > Let's do some math. We have about 10k commits on a stable branch, give or > > take. My experience with MFCing suggests that 5% of these will have a > merge > > conflict that needs to be resolved. Each one of these conflicts takes 5 > > minutes to resolve because it breaks up the flow of the commits, etc. So > > ~500 commits for ~5 minutes is ~40 hours. We've just wasted an entire > week > > of developer time for doing it all at once, vs almost 0 for doing it > > incrementally. > > Your math is not math if you claim that this delta would cause 5% > conflicts. MOST MFC conflicts occur because of missing interveing > commits. > You still have not explained how a 1 line delta removing a line > is likely to cause any conflict at all, and I continue to assert > it is very unlikely to as this 1 line is almost always in other > lines that are very very rarely if ever changed. > Lots of changes happen near the start of the file, near where the $FreeBSD$ lives. This is especially true for shorter files. > > > > > c) It'll quickly get us to the damage that is done by > > > > > the loss of this information from the released binary > > > > > product so repairs may begin. > > > > > > > > > > > > > We can begin repairs w/o doing this. 99% of these never end up in > > > binaries > > > > anyway. > > > > > > Oh, now thats false... simple test: > > > find /bin | xargs grep -l \$FreeBSD: | wc > > > find /bin | wc > > > > > > 44/45 files on my 12.1 system. > > > > > > As far as I recall it is more like 99% of our files HAVE these strings > in > > > them. > > > > > > > On my system, the numbers are quite different: > > % find /*bin /usr/*bin -type f | xargs grep -la '$FreeBSD:' | wc > > 4 4 64 > > 3:14pm rebo:[245]> find /*bin /usr/*bin -type f | wc > > 1032 1032 16791 > > > > And all 4 binaries are from 2016 and appear to be 'stale' leftovers. > > My guess would be your system is NOT from a production release > of FreeBSD, probably compiled with a STRIP_FBSDID defined. > > I checked /bin on 11.2, 12.0 and 12.1 same results, all but 2 files. > It is the default in current to omit these. I checked a current system. > > > > > d) It'll shorten 1000's of commit messages by the lines: > > > > > While here, remove $FreeBSD$ RCS IDs. > > > > > > > > > > > > > Who cares? I mean, this is not an issue at all. > > > > > > > > Like I've said: there's a real cost to doing this, and the benefits > from > > > > doing this are quite small. As someone that's had to deal for years > with > > > > partial merges of sweeping commits, please listen when I say that > they > > > > always cause unintended pain due to their size. > > > > > > You can repeat yourself, but please give relavent factual cause on how > > > this causes a merge conflict. > > > > > > I have given numbers. We'd be wasting a week's time of all our > developers, > > give or take. > > I do not accept your WAG 5% as a realistic number. > The fact you are demanding work from me makes you acceptance irrelevant. If it causes any extra work, it's too high a price. My WAG was to try to put some numbers around it based on doing hundreds of MFCs. > > > In most cases it would be a single line delete in an area of the > > > file that is rarely touched. This is NOT like white space cleanup, > > > macro renames, or other global scope changes. It is no worse than > > > the SPDX tagging that was done, and if that had not been caught up > > > in some work flow errors, would of been fine. > > > > > > > There's value in the SPDX stuff, which we also did piecemeal, and which > > also caused me grief when I MFC'd stuff because it was done in large > > batches, and merged incrementally. > > Just because you see no value in FreeBSD, does not make it have no > value. I would argue it has more value that SPDX. At least it > is used programatically to create traceability in the production > releases. > Git likes smaller changes. One huge commit would become un-revertable without a lot of effort fairly quickly. Small changes could be reverted more easily. The only snag is the one email per commit rather than per push... I'm kinda snarky about this because you are demanding we do this in a way I know will cause problems because when we've done big sweeping commits in the past they have caused problems, even ones that people at the time thought would be no trouble. Done all at once, there will be additional work for me and other frequent MFCers. It's not my burden to disprove everything you throw up. The project has a way of creating problems for itself by doing this in some philosophically right way that ignores history and experiences the project has had. I'm just asking that we not do it please. Warner > Warner > -- > Rod Grimes > rgrimes@freebsd.org > From owner-dev-commits-src-all@freebsd.org Thu Dec 31 07:51:06 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D90F34DF53D; Thu, 31 Dec 2020 07:51:06 +0000 (UTC) (envelope-from rpokala@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 4D60hV5fgMz3vy9; Thu, 31 Dec 2020 07:51:06 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.10] (c-98-207-126-143.hsd1.ca.comcast.net [98.207.126.143]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 0D46ECDFB; Thu, 31 Dec 2020 07:51:05 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.44.20121301 Date: Wed, 30 Dec 2020 23:51:02 -0800 Subject: Re: 162b82dfa0cb - MFC r355876 (by cem): From: Ravi Pokala To: Stefan Esser , Yuri Pankov , Warner Losh CC: src-committers , , Message-ID: <954BA92D-1D1C-41CA-870F-27CAE2A5C502@panasas.com> Thread-Topic: 162b82dfa0cb - MFC r355876 (by cem): References: <202012251825.0BPIPntO091296@gitrepo.freebsd.org> <751dc337-b4dc-52de-f2ee-a843eb5e43c5@FreeBSD.org> <20be96cf-1cda-d914-5759-aae90169d8c0@yuripv.dev> <12fd95e4-3a29-115c-72ff-b734baeffe5b@freebsd.org> In-Reply-To: <12fd95e4-3a29-115c-72ff-b734baeffe5b@freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 07:51:06 -0000 -----Original Message----- From: on behalf of Stefan Esser Date: 2020-12-26, Saturday at 00:49 To: Yuri Pankov , Warner Losh Cc: src-committers , , Subject: Re: git: 162b82dfa0cb - MFC r355876 (by cem): Am 26.12.20 um 06:36 schrieb Yuri Pankov: > Warner Losh wrote: >> I was rather hoping we'd land around using the old commit message, as >> is, and let the cherry-picked message at the end signify the MFC, at >> least for simple cherry-picks. >> >> For squashed ones, a sensible new summary line and an appropriate commit >> message would be good as well... Where appropriate is approximately what >> we do today, with all the hashes that we're merging mentioned. > > I am following the docs (and those make sense to me), `git cherry-pick > -x` is just enough; if it's direct commit, I'd add a note. So yes, any > commit to stable/* is MFC, unless stated otherwise. I'd like to get back the branch in the subject line, not only the first line of the commit message: It used to be: "svn commit: r368706 - in stable/12:", but now we only have the git hash in the subject line and "The branch ... has been updated ..." in the first line of the commit message. I was going to request this as well, but it looks like we started getting them as of 2020-12-26 20:50-ish. So, thank you to whoever did that! :-) -Ravi (rpokala@) Filtering out commits to -STABLE/RELENG is possible via "X-Git-Refname" (I hope this header line will be kept in exactly the current form to not require later adjustment of the filter), but it is no longer easy to see whether a commit affects -CURRENT by just looking at the subject line of the commit message ... Regards, STefan From owner-dev-commits-src-all@freebsd.org Thu Dec 31 09:07:24 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2AD1D4B97A3; Thu, 31 Dec 2020 09:07:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D62NX0QqHz4Tty; Thu, 31 Dec 2020 09:07:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 011855D1B; Thu, 31 Dec 2020 09:07:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BV97N2d091039; Thu, 31 Dec 2020 09:07:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BV97NCt091038; Thu, 31 Dec 2020 09:07:23 GMT (envelope-from git) Date: Thu, 31 Dec 2020 09:07:23 GMT Message-Id: <202012310907.0BV97NCt091038@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 747feea146d8 - main - Streamline the infiniband code according to the ethernet code. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 747feea146d809e01595a11d0a8e8adefc4a975c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 09:07:24 -0000 The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=747feea146d809e01595a11d0a8e8adefc4a975c commit 747feea146d809e01595a11d0a8e8adefc4a975c Author: Hans Petter Selasky AuthorDate: 2020-12-31 09:06:42 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-31 09:07:02 +0000 Streamline the infiniband code according to the ethernet code. Fix LINT-NOIP kernel build. Submitted by: rlibby @ Differential Revision: https://reviews.freebsd.org/D27861 MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/net/if_infiniband.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/net/if_infiniband.c b/sys/net/if_infiniband.c index bf33457b0a4f..3e7daeed4da3 100644 --- a/sys/net/if_infiniband.c +++ b/sys/net/if_infiniband.c @@ -294,9 +294,7 @@ infiniband_output(struct ifnet *ifp, struct mbuf *m, { uint8_t linkhdr[INFINIBAND_HDR_LEN]; uint8_t *phdr; -#if defined(INET) || defined(INET6) struct llentry *lle = NULL; -#endif struct infiniband_header *ih; int error = 0; int hlen; /* link layer header length */ From owner-dev-commits-src-all@freebsd.org Thu Dec 31 09:09:31 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7CF254B9E8E; Thu, 31 Dec 2020 09:09:31 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 4D62Qz2Xzfz4V6D; Thu, 31 Dec 2020 09:09:30 +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 3F0CF260072; Thu, 31 Dec 2020 10:09:23 +0100 (CET) Subject: Re: git: ec52ff6d1411 - main - Streamline the infiniband code according to the ethernet code. To: Ryan Libby Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202012291703.0BTH345t067627@gitrepo.freebsd.org> From: Hans Petter Selasky Message-ID: Date: Thu, 31 Dec 2020 10:09:13 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.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: 4D62Qz2Xzfz4V6D X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 09:09:31 -0000 On 12/31/20 3:58 AM, Ryan Libby wrote: > This broke tinderbox via the LINT-NOIP kernels. The code compiles fine > with the ifdef guard removed. Can we just delete it? Thank you. I've just fixed it in 747feea146d8. --HPS From owner-dev-commits-src-all@freebsd.org Thu Dec 31 09:10:56 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5AD224B9D41; Thu, 31 Dec 2020 09:10:56 +0000 (UTC) (envelope-from emss.mail@gmail.com) Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (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 4D62Sb2yWGz4VFr; Thu, 31 Dec 2020 09:10:55 +0000 (UTC) (envelope-from emss.mail@gmail.com) Received: by mail-wr1-x432.google.com with SMTP id m5so19541282wrx.9; Thu, 31 Dec 2020 01:10:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-transfer-encoding; bh=Nj1lKuBdl7XkrWBxbnkmuRfW/0dCHqWT3cMAp9Au1Ys=; b=D+IQa7ShluaiJ3EKg5xSN2jgpTZcBSiobFV+IwF30i2zHRd4o7E3W86+WGzIJMfc4M hcVLsyAA1dWQr3/TYyyMWgiyrrwv4SjLeBMWphOaB0KThKbCfOaUtt9ZE0O4wbAJkJKz R9G5AIKRYGy61ndHgll80xX6iWV3PZoOye74JSeC64XQxI/lZsJkU0xtAoQf0jPp/VyG FExZGFkSmSTcDnEbbHwjgkfmy55Lc7+dO6A0pSpMO3RHtHX38EfUTQbk5/xD5AHoC7at E1JFqEySkZxm3rEi9EVOoEQevzohU3rTLB4DjXiy1+Vz0nKV64lxOat4zF2WQZ0sm2U4 E0+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-transfer-encoding; bh=Nj1lKuBdl7XkrWBxbnkmuRfW/0dCHqWT3cMAp9Au1Ys=; b=JidTahzqgXsEjXTmhdyQu5BLfVH38h9YVOppNcMb3eXjd12c1XVG/C9GN19vl/8xE7 8XgG4fB5xMU75Ycx3gSe2TjqzDlIOIYKvu7yfjbeV71pKriZ6sGt6ZC4vDTUrq2MK/lz CiIlf/m4Ud6eABl6xmKbR5lQnxUx4qqcTai2KG40r1kXIcUkcxkSIeXW26jE7w+ok4Zg rQxQ6g2yn53JzAsuXelb8JQo7VI+u587JvWVZX5KCSXNWZMIunIYHRFAeIjgmPSBTTPn hlSfW6c6WaiJ6pdR6FFk2s4TxU62t+L1/HcBmZsoCWQG0sYnBtHUFjGyckSvv5jmK5JA OzPg== X-Gm-Message-State: AOAM5326v8GanrdKqDT3bF3Sv2t8yRwBtIpftiTwDk436vFcKk29OMEd sn5Q45l5whMEFLEZ9lXC+Hmjui+0wHvwZA== X-Google-Smtp-Source: ABdhPJxxPKjDeQ0LqkBWJpt6stHsawgw+96gy+l0NxKVjHRWz/gLUVPbYCHP0wV3zQ71F3yMO4VkGQ== X-Received: by 2002:a5d:4d4f:: with SMTP id a15mr63814168wru.315.1609405854132; Thu, 31 Dec 2020 01:10:54 -0800 (PST) Received: from srvbsdfenssv.interne.associated-bears.org ([2001:470:ccb0::1]) by smtp.gmail.com with ESMTPSA id y6sm11276412wmg.39.2020.12.31.01.10.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Dec 2020 01:10:53 -0800 (PST) Sender: Eric Masson Received: from srvbsdfenssv.interne.associated-bears.org (localhost [127.0.0.1]) by srvbsdfenssv.interne.associated-bears.org (Postfix) with ESMTP id 2E1972286; Thu, 31 Dec 2020 10:10:52 +0100 (CET) X-Virus-Scanned: amavisd-new at interne.associated-bears.org Received: from srvbsdfenssv.interne.associated-bears.org ([127.0.0.1]) by srvbsdfenssv.interne.associated-bears.org (srvbsdfenssv.interne.associated-bears.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v5Chs-3T91cV; Thu, 31 Dec 2020 10:10:48 +0100 (CET) Received: by srvbsdfenssv.interne.associated-bears.org (Postfix, from userid 1001) id BD5992224; Thu, 31 Dec 2020 10:10:48 +0100 (CET) From: Eric Masson To: Alexey Dokuchaev Cc: Poul-Henning Kamp , Warner Losh , Glen Barber , Kyle Evans , "Rodney W. Grimes" , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL In-Reply-To: <20201231033504.GA26157@FreeBSD.org> (Alexey Dokuchaev's message of "Thu, 31 Dec 2020 03:35:04 +0000") References: <202012291441.0BTEf1X9009764@gitrepo.freebsd.org> <202012300018.0BU0I7gn079533@gndrsh.dnsmgr.net> <20201230022128.GE1206@FreeBSD.org> <15826.1609318943@critter.freebsd.dk> <20201230090913.GA90119@FreeBSD.org> <864kk3fw04.fsf@srvbsdfenssv.interne.associated-bears.org> <20201231033504.GA26157@FreeBSD.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (berkeley-unix) X-Operating-System: FreeBSD 12.2-STABLE amd64 Date: Thu, 31 Dec 2020 10:10:48 +0100 Message-ID: <86pn2qgx2f.fsf@srvbsdfenssv.interne.associated-bears.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4D62Sb2yWGz4VFr X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=D+IQa7Sh; dmarc=none; spf=pass (mx1.freebsd.org: domain of emssmail@gmail.com designates 2a00:1450:4864:20::432 as permitted sender) smtp.mailfrom=emssmail@gmail.com X-Spamd-Result: default: False [-1.20 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[free.fr]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_SEVEN(0.00)[9]; FORGED_SENDER(0.30)[emss@free.fr,emssmail@gmail.com]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::432:from]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; FROM_NEQ_ENVFROM(0.00)[emss@free.fr,emssmail@gmail.com]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[free.fr]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::432:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::432:from]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 09:10:56 -0000 Alexey Dokuchaev writes: Hi, > And how exactly could this work if -F uses VCS Id ($FreeBSD$) and git does > not expand them? I can't tell, but it seems it worked fine. Éric From owner-dev-commits-src-all@freebsd.org Thu Dec 31 10:18:41 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 278E34BB879; Thu, 31 Dec 2020 10:18:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D63yn0F9jz4YbS; Thu, 31 Dec 2020 10:18:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EAF456C1C; Thu, 31 Dec 2020 10:18:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVAIe3K076641; Thu, 31 Dec 2020 10:18:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVAIeg3076640; Thu, 31 Dec 2020 10:18:40 GMT (envelope-from git) Date: Thu, 31 Dec 2020 10:18:40 GMT Message-Id: <202012311018.0BVAIeg3076640@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 80062279f770 - main - Add pmu.h missed in 5e78bbb74a1f MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 80062279f7703ccb980357f651ed1ff57af6bc77 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 10:18:41 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=80062279f7703ccb980357f651ed1ff57af6bc77 commit 80062279f7703ccb980357f651ed1ff57af6bc77 Author: Andrew Turner AuthorDate: 2020-12-31 10:09:50 +0000 Commit: Andrew Turner CommitDate: 2020-12-31 10:12:34 +0000 Add pmu.h missed in 5e78bbb74a1f Reported by: rlibby Sponsored by: Innovate UK --- sys/arm/arm/pmu.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/sys/arm/arm/pmu.h b/sys/arm/arm/pmu.h new file mode 100644 index 000000000000..bfad6d9da282 --- /dev/null +++ b/sys/arm/arm/pmu.h @@ -0,0 +1,52 @@ +/*- + * Copyright (c) 2015 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * 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 _ARM_PMU_H_ +#define _ARM_PMU_H_ + +#define MAX_RLEN 8 + +struct pmu_intr { + struct resource *res; + void *ih; + int cpuid; +}; + +struct pmu_softc { + device_t dev; + struct pmu_intr irq[MAX_RLEN]; +}; + + +int pmu_attach(device_t dev); + +#endif From owner-dev-commits-src-all@freebsd.org Thu Dec 31 11:48:35 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A6614BE30E; Thu, 31 Dec 2020 11:48:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D65yW1c8Rz4f3W; Thu, 31 Dec 2020 11:48:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A3667F19; Thu, 31 Dec 2020 11:48:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVBmZlL087821; Thu, 31 Dec 2020 11:48:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVBmZ2k087820; Thu, 31 Dec 2020 11:48:35 GMT (envelope-from git) Date: Thu, 31 Dec 2020 11:48:35 GMT Message-Id: <202012311148.0BVBmZ2k087820@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Stefan Eßer Subject: git: a3c29cdbd495 - main - Replace strcat, strcpy and snprintf with bounds checking versions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a3c29cdbd495ddbc64340745e70d7ddf1cb1d98c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 11:48:35 -0000 The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=a3c29cdbd495ddbc64340745e70d7ddf1cb1d98c commit a3c29cdbd495ddbc64340745e70d7ddf1cb1d98c Author: Stefan Eßer AuthorDate: 2020-12-31 11:37:37 +0000 Commit: Stefan Eßer CommitDate: 2020-12-31 11:37:37 +0000 Replace strcat, strcpy and snprintf with bounds checking versions --- usr.bin/calendar/parsedata.c | 94 ++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 46 deletions(-) diff --git a/usr.bin/calendar/parsedata.c b/usr.bin/calendar/parsedata.c index 606facb9ef83..a34ef5a9866d 100644 --- a/usr.bin/calendar/parsedata.c +++ b/usr.bin/calendar/parsedata.c @@ -39,6 +39,8 @@ __FBSDID("$FreeBSD$"); #include "calendar.h" +#define SLEN 100 /* maximum length of date spec. part strings */ + static char *showflags(int flags); static int isonlydigits(char *s, int nostar); static const char *getmonthname(int i); @@ -116,12 +118,12 @@ determinestyle(char *date, int *flags, *flags |= type; \ *flags |= F_VARIABLE; \ if (strlen(s1) == lens2) { \ - strcpy(specialday, s1); \ + strlcpy(specialday, s1, SLEN); \ return (1); \ } \ strncpy(specialday, s1, lens2); \ specialday[lens2] = '\0'; \ - strcpy(modifieroffset, s1 + lens2); \ + strlcpy(modifieroffset, s1 + lens2, SLEN); \ *flags |= F_MODIFIEROFFSET; \ return (1); \ } @@ -166,12 +168,12 @@ determinestyle(char *date, int *flags, *flags |= F_VARIABLE; *idayofweek = offset; if (strlen(date) == len) { - strcpy(dayofweek, date); + strlcpy(dayofweek, date, SLEN); return (1); } strncpy(dayofweek, date, len); dayofweek[len] = '\0'; - strcpy(modifierindex, date + len); + strlcpy(modifierindex, date + len, SLEN); *flags |= F_MODIFIERINDEX; return (1); } @@ -179,7 +181,7 @@ determinestyle(char *date, int *flags, /* Assume month number only */ *flags |= F_MONTH; *imonth = (int)strtol(date, (char **)NULL, 10); - strcpy(month, getmonthname(*imonth)); + strlcpy(month, getmonthname(*imonth), SLEN); return(1); } return (0); @@ -198,7 +200,7 @@ determinestyle(char *date, int *flags, if ((py = strchr(p2, '/')) != NULL) { /* We have a year in the string. Now this is getting tricky */ - strcpy(year, p1); + strlcpy(year, p1, SLEN); *iyear = (int)strtol(year, NULL, 10); p1 = p2; p2 = py + 1; @@ -213,9 +215,9 @@ determinestyle(char *date, int *flags, *flags |= F_MONTH; *imonth = offset; - strcpy(month, getmonthname(offset)); + strlcpy(month, getmonthname(offset), SLEN); if (isonlydigits(p2, 1)) { - strcpy(dayofmonth, p2); + strlcpy(dayofmonth, p2, SLEN); *idayofmonth = (int)strtol(p2, (char **)NULL, 10); *flags |= F_DAYOFMONTH; goto allfine; @@ -229,10 +231,10 @@ determinestyle(char *date, int *flags, *flags |= F_DAYOFWEEK; *flags |= F_VARIABLE; *idayofweek = offset; - strcpy(dayofweek, getdayofweekname(offset)); + strlcpy(dayofweek, getdayofweekname(offset), SLEN); if (strlen(p2) == len) goto allfine; - strcpy(modifierindex, p2 + len); + strlcpy(modifierindex, p2 + len, SLEN); *flags |= F_MODIFIERINDEX; goto allfine; } @@ -248,7 +250,7 @@ determinestyle(char *date, int *flags, *flags |= F_DAYOFMONTH; d = (int)strtol(p2, (char **)NULL, 10); *idayofmonth = d; - sprintf(dayofmonth, "%d", d); + snprintf(dayofmonth, SLEN, "%d", d); goto allfine; } @@ -264,12 +266,12 @@ determinestyle(char *date, int *flags, *idayofweek = offset; d = (int)strtol(p1, (char **)NULL, 10); *imonth = d; - strcpy(month, getmonthname(d)); + strlcpy(month, getmonthname(d), SLEN); - strcpy(dayofweek, getdayofweekname(offset)); + strlcpy(dayofweek, getdayofweekname(offset), SLEN); if (strlen(p2) == len) goto allfine; - strcpy(modifierindex, p2 + len); + strlcpy(modifierindex, p2 + len, SLEN); *flags |= F_MODIFIERINDEX; goto allfine; } @@ -291,13 +293,13 @@ determinestyle(char *date, int *flags, if (m > 12) { *imonth = d; *idayofmonth = m; - strcpy(month, getmonthname(d)); - sprintf(dayofmonth, "%d", m); + strlcpy(month, getmonthname(d), SLEN); + snprintf(dayofmonth, SLEN, "%d", m); } else { *imonth = m; *idayofmonth = d; - strcpy(month, getmonthname(m)); - sprintf(dayofmonth, "%d", d); + strlcpy(month, getmonthname(m), SLEN); + snprintf(dayofmonth, SLEN, "%d", d); } goto allfine; } @@ -328,7 +330,7 @@ remember(int *rememberindex, int *y, int *m, int *d, char **ed, int yy, int mm, m[*rememberindex] = mm; d[*rememberindex] = dd; if (extra != NULL) - strcpy(ed[*rememberindex], extra); + strlcpy(ed[*rememberindex], extra, SLEN); else ed[*rememberindex][0] = '\0'; *rememberindex += 1; @@ -431,9 +433,9 @@ int parsedaymonth(char *date, int *yearp, int *monthp, int *dayp, int *flags, char **edp) { - char month[100], dayofmonth[100], dayofweek[100], modifieroffset[100]; - char syear[100]; - char modifierindex[100], specialday[100]; + char month[SLEN], dayofmonth[SLEN], dayofweek[SLEN], modifieroffset[SLEN]; + char syear[SLEN]; + char modifierindex[SLEN], specialday[SLEN]; int idayofweek = -1, imonth = -1, idayofmonth = -1, iyear = -1; int year, remindex; int d, m, dow, rm, rd, offset; @@ -821,47 +823,47 @@ parsedaymonth(char *date, int *yearp, int *monthp, int *dayp, int *flags, static char * showflags(int flags) { - static char s[1000]; + static char s[SLEN]; s[0] = '\0'; if ((flags & F_YEAR) != 0) - strcat(s, "year "); + strlcat(s, "year ", SLEN); if ((flags & F_MONTH) != 0) - strcat(s, "month "); + strlcat(s, "month ", SLEN); if ((flags & F_DAYOFWEEK) != 0) - strcat(s, "dayofweek "); + strlcat(s, "dayofweek ", SLEN); if ((flags & F_DAYOFMONTH) != 0) - strcat(s, "dayofmonth "); + strlcat(s, "dayofmonth ", SLEN); if ((flags & F_MODIFIERINDEX) != 0) - strcat(s, "modifierindex "); + strlcat(s, "modifierindex ", SLEN); if ((flags & F_MODIFIEROFFSET) != 0) - strcat(s, "modifieroffset "); + strlcat(s, "modifieroffset ", SLEN); if ((flags & F_SPECIALDAY) != 0) - strcat(s, "specialday "); + strlcat(s, "specialday ", SLEN); if ((flags & F_ALLMONTH) != 0) - strcat(s, "allmonth "); + strlcat(s, "allmonth ", SLEN); if ((flags & F_ALLDAY) != 0) - strcat(s, "allday "); + strlcat(s, "allday ", SLEN); if ((flags & F_VARIABLE) != 0) - strcat(s, "variable "); + strlcat(s, "variable ", SLEN); if ((flags & F_CNY) != 0) - strcat(s, "chinesenewyear "); + strlcat(s, "chinesenewyear ", SLEN); if ((flags & F_PASKHA) != 0) - strcat(s, "paskha "); + strlcat(s, "paskha ", SLEN); if ((flags & F_EASTER) != 0) - strcat(s, "easter "); + strlcat(s, "easter ", SLEN); if ((flags & F_FULLMOON) != 0) - strcat(s, "fullmoon "); + strlcat(s, "fullmoon ", SLEN); if ((flags & F_NEWMOON) != 0) - strcat(s, "newmoon "); + strlcat(s, "newmoon ", SLEN); if ((flags & F_MAREQUINOX) != 0) - strcat(s, "marequinox "); + strlcat(s, "marequinox ", SLEN); if ((flags & F_SEPEQUINOX) != 0) - strcat(s, "sepequinox "); + strlcat(s, "sepequinox ", SLEN); if ((flags & F_JUNSOLSTICE) != 0) - strcat(s, "junsolstice "); + strlcat(s, "junsolstice ", SLEN); if ((flags & F_DECSOLSTICE) != 0) - strcat(s, "decsolstice "); + strlcat(s, "decsolstice ", SLEN); return s; } @@ -1026,7 +1028,7 @@ parseoffset(char *s) static char * floattotime(double f) { - static char buf[100]; + static char buf[SLEN]; int hh, mm, ss, i; f -= floor(f); @@ -1038,14 +1040,14 @@ floattotime(double f) i %= SECSPERMINUTE; ss = i; - sprintf(buf, "%02d:%02d:%02d", hh, mm, ss); + snprintf(buf, SLEN, "%02d:%02d:%02d", hh, mm, ss); return (buf); } static char * floattoday(int year, double f) { - static char buf[100]; + static char buf[SLEN]; int i, m, d, hh, mm, ss; int *cumdays = cumdaytab[isleap(year)]; @@ -1062,7 +1064,7 @@ floattoday(int year, double f) i %= SECSPERMINUTE; ss = i; - sprintf(buf, "%02d-%02d %02d:%02d:%02d", m, d, hh, mm, ss); + snprintf(buf, SLEN, "%02d-%02d %02d:%02d:%02d", m, d, hh, mm, ss); return (buf); } From owner-dev-commits-src-all@freebsd.org Thu Dec 31 14:12:54 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E586A4C2EF0; Thu, 31 Dec 2020 14:12:54 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D69925PZSz4pJT; Thu, 31 Dec 2020 14:12:54 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1609423974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7fwt8XNV7dkGYUbXWOg268BFZxI96GRxbPZWdxrlGAc=; b=YV+oWF9pyajSgcHtU9ASMTnFTdPLLl1qWwcbjgSBlNg8HnLN9/M92FRSGUFDEjBQrtm3kO PBjJtkkeb7OvHV3X37GILfAbxpCl75wpEd0//aAm3mcHrLWjRTHTSZB1rVuc3Yq5OyqCIh BaRX1J3LkkF0WQ3GmxKJ8sOj1WS/H1gn3kXZFO/KpW2luxVQ6e3/Fzg5CE9RpjGPuxIfjm dwKC3/zubR3vQrkNQvP+0Ad24BC9Mc/aSWrity3zSebpa8TbpZjf5iY3KkfZumhu+iKbXy DAzlhCrQUHoFEOH7sxXEtyRDilg2s2skcHonkw8XCX14ff/y9oyb/CkBdc9a0g== Received: by freefall.freebsd.org (Postfix, from userid 1033) id A3253C7A7; Thu, 31 Dec 2020 14:12:54 +0000 (UTC) Date: Thu, 31 Dec 2020 14:12:54 +0000 From: Alexey Dokuchaev To: Warner Losh Cc: "Rodney W. Grimes" , Glen Barber , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL Message-ID: <20201231141254.GA39790@FreeBSD.org> References: <202012310602.0BV62xUk085088@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1609423974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7fwt8XNV7dkGYUbXWOg268BFZxI96GRxbPZWdxrlGAc=; b=wNJC+Iaw6Ds16g5TwPwv+gOB1HbyHVWoiaaJ7956oL1vAz+dLBrfffwU6TXeP6xq0p7Ad8 +UGj8QOdbPkPDzDb4shgtXEArF/0W8N+RppJ8dPRHlNPNQ0ktAmN99Jn/ugB4uaItUMkdT LfVDJGNN/zDbk8Q2DfqLXEfj7/jyOIFJ4eHGqFZxYtiktvVxcJzpdOPAHkEKJyqU6qTSjt WnX5iKqdIjcGiSPbdDlJ3cDJUCPPorI9e5KoL0OeUCSCEryH6TiSPVQ0PytuOYdv7Z90uC Hy8CyG0l6NjedqlpAJwyY3nLX7yfOeSZDDDgN5WOzlDr0fBs26wADgxAapQKUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1609423974; a=rsa-sha256; cv=none; b=dzc3IM3jIpwhs6CqWiXXoobxFDhXaj2y/pKEsnBs4foCjsh94Zn7H/s0DRcmOb90mIoGSD vNuHGYL9RNWQWunjZevEzfO2dpcoZN/y22RlQPLgL+yFKYc5Ge+PdBYq6abnW4Al6U7DRe y++0NZIwcUXKn1s6IOjT1bq1dWrnGiCygHAk7YevqPSgQzK566o9+qvZQp73jMHZj9wCwj bnYI2fE6yTMBolC0oZ799mBwMF60rILBecuInasfpCjIe05lqIO21mYVPrV4CkEhv/k9wu esPf06SQc1kNBJ2HpaJUUPKHgwoZd/J5wbv6bT+LpgrxpchphvUpm0B2wcXnXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 14:12:55 -0000 On Thu, Dec 31, 2020 at 12:22:39AM -0700, Warner Losh wrote: > On Wed, Dec 30, 2020, 11:03 PM Rodney W. Grimes wrote: > > ... > > This is not a source code management nightmare, it is a traceability > > of production items, this "feature" has been in BSD since /bin/what > > was written to extract SCCS id's out of binary files. That got > > broken cause we stoped putting them in, but the strings of $FreeBSD$ > > have always been in the binaries. This gives traceability. > > Except we don't do that anymore. Nobody dies that any more. They use build > IDs instead. They use proper CM. They have traceability through other means. Nothing can adequately replace $Id$ tags. They're absolutely must-have feature (and not just for being baked into the binaries). Pretty much for any file you want to know which revision it came from, you need those. You need them for mergemaster -F, you need them for the ports' build logs to see exactly which Makefile the log is for. > > So basically anything that git doesnt fit is now gone.. *sigh* > > Yes. It is gone. The industry has moved on and no longer thinks this is > a good idea. The fact that git authors do not find them useful or don't know how to implement one of the core features of any usable VCS does not mean that the industry no longer likes the idea, it only means that git authors do not know how to write software properly. ./danfe From owner-dev-commits-src-all@freebsd.org Thu Dec 31 15:29:19 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E9B7F4C496A; Thu, 31 Dec 2020 15:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6BsC5q92z4t6x; Thu, 31 Dec 2020 15:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BAC0C129C7; Thu, 31 Dec 2020 15:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVFTJ4e056262; Thu, 31 Dec 2020 15:29:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVFTJ4g056261; Thu, 31 Dec 2020 15:29:19 GMT (envelope-from git) Date: Thu, 31 Dec 2020 15:29:19 GMT Message-Id: <202012311529.0BVFTJ4g056261@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 50a40d091170 - main - ldconfig: Retire a.out support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 50a40d091170d96a84688e5b8420f584e27b99a1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 15:29:20 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=50a40d091170d96a84688e5b8420f584e27b99a1 commit 50a40d091170d96a84688e5b8420f584e27b99a1 Author: Ed Maste AuthorDate: 2020-12-31 15:29:08 +0000 Commit: Ed Maste CommitDate: 2020-12-31 15:29:08 +0000 ldconfig: Retire a.out support aout support in ldconfig hasn't been required since FreeBSD 2.x. If someone needs to use FreeBSD 2 shared libraries they will be best served by using a FreeBSD 2 ldconfig as well. In aa5e1b42e6e3 we removed the ldconfig a.out invocation from rc.d but left the support in ldconfig itself. Remove it now. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27481 --- sbin/ldconfig/Makefile | 6 +- sbin/ldconfig/ldconfig.8 | 10 +- sbin/ldconfig/ldconfig.c | 511 +---------------------------------------------- 3 files changed, 15 insertions(+), 512 deletions(-) diff --git a/sbin/ldconfig/Makefile b/sbin/ldconfig/Makefile index 8360a3f6648e..2ead668578f6 100644 --- a/sbin/ldconfig/Makefile +++ b/sbin/ldconfig/Makefile @@ -2,11 +2,7 @@ PACKAGE=runtime PROG= ldconfig -SRCS= elfhints.c ldconfig.c shlib.c support.c -LDDIR?= ${SRCTOP}/libexec/rtld-aout -CFLAGS+=-I${LDDIR} -DFREEBSD_AOUT +SRCS= elfhints.c ldconfig.c MAN= ldconfig.8 -.PATH: ${LDDIR} - .include diff --git a/sbin/ldconfig/ldconfig.8 b/sbin/ldconfig/ldconfig.8 index 7c378472f859..9a1463be1ad4 100644 --- a/sbin/ldconfig/ldconfig.8 +++ b/sbin/ldconfig/ldconfig.8 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 17, 2020 +.Dd December 31, 2020 .Dt LDCONFIG 8 .Os .Sh NAME @@ -38,7 +38,7 @@ .Sh SYNOPSIS .Nm .Op Fl 32 -.Op Fl aout | Fl elf +.Op Fl elf .Op Fl Rimrsv .Op Fl f Ar hints_file .Op Ar directory | Ar @@ -109,12 +109,8 @@ The following options are recognized by .It Fl 32 Generate the hints for 32-bit ABI shared libraries on 64-bit systems that support running 32-bit binaries. -.It Fl aout -Generate the hints for a.out format shared libraries. -This option is deprecated and is not present in -.Fx 13 . .It Fl elf -Generate the hints for ELF format shared libraries. +Ignored for backwards compatibility. .It Fl R Rescan the previously configured directories. This opens the previous hints diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c index ca51b670a34c..d0c6c9802a52 100644 --- a/sbin/ldconfig/ldconfig.c +++ b/sbin/ldconfig/ldconfig.c @@ -46,20 +46,15 @@ static const char rcsid[] = #include #include #include -#include #include #include #include #include #include "ldconfig.h" -#include "shlib.h" -#include "support.h" #if DEBUG /* test */ -#undef _PATH_LD_HINTS -#define _PATH_LD_HINTS "./ld.so.hints" #undef _PATH_ELF_HINTS #define _PATH_ELF_HINTS "./ld-elf.so.hints" #endif @@ -78,52 +73,19 @@ static int merge; static int rescan; static const char *hints_file; -struct shlib_list { - /* Internal list of shared libraries found */ - char *name; - char *path; - int dewey[MAXDEWEY]; - int ndewey; -#define major dewey[0] -#define minor dewey[1] - struct shlib_list *next; -}; - -static struct shlib_list *shlib_head = NULL, **shlib_tail = &shlib_head; -static char *dir_list; - -static int buildhints(void); -static int dodir(char *, int); -int dofile(char *, int); -static void enter(char *, char *, char *, int *, int); -static void listhints(void); -static int readhints(void); static void usage(void); -/* - * Note on aout/a.out support. - * To properly support shared libraries for compat2x, which are a.out, we need - * to support a.out here. As of 2013, bug reports are still coming in for this - * feature (on amd64 no less), so we know it is still in use. - */ - int main(int argc, char **argv) { - int i, c; - int rval = 0; - int is_aout = 0; + int c; int is_32 = 0; int is_soft = 0; while (argc > 1) { if (strcmp(argv[1], "-aout") == 0) { - warnx("aout support is deprecated"); - is_aout = 1; - argc--; - argv++; + errx(1, "aout is not supported"); } else if (strcmp(argv[1], "-elf") == 0) { - is_aout = 0; argc--; argv++; } else if (strcmp(argv[1], "-32") == 0) { @@ -142,9 +104,9 @@ main(int argc, char **argv) if (is_soft) hints_file = _PATH_ELFSOFT_HINTS; /* Never will have a.out softfloat */ else if (is_32) - hints_file = is_aout ? _PATH_LD32_HINTS : _PATH_ELF32_HINTS; + hints_file = _PATH_ELF32_HINTS; else - hints_file = is_aout ? _PATH_LD_HINTS : _PATH_ELF_HINTS; + hints_file = _PATH_ELF_HINTS; if (argc == 1) rescan = 1; else while((c = getopt(argc, argv, "Rf:imrsv")) != -1) { @@ -176,469 +138,18 @@ main(int argc, char **argv) } } - if (!is_aout) { - if (justread) - list_elf_hints(hints_file); - else - update_elf_hints(hints_file, argc - optind, - argv + optind, merge || rescan); - return 0; - } - - /* Here begins the aout libs processing */ - dir_list = strdup(""); - - if (justread || merge || rescan) { - if ((rval = readhints()) != 0) - return rval; - } - - if (!nostd && !merge && !rescan) - std_search_path(); - - /* Add any directories/files from the command line */ - if (!justread) { - for (i = optind; i < argc; i++) { - struct stat stbuf; - - if (stat(argv[i], &stbuf) == -1) { - warn("%s", argv[i]); - rval = -1; - } else if (strcmp(argv[i], "/usr/lib") == 0) { - warnx("WARNING! '%s' can not be used", argv[i]); - rval = -1; - } else { - /* - * See if this is a directory-containing - * file instead of a directory - */ - if (S_ISREG(stbuf.st_mode)) - rval |= dofile(argv[i], 0); - else - add_search_path(argv[i]); - } - } - } - - for (i = 0; i < n_search_dirs; i++) { - char *cp = concat(dir_list, *dir_list?":":"", search_dirs[i]); - free(dir_list); - dir_list = cp; - } - - if (justread) { - listhints(); - return 0; - } - - for (i = 0; i < n_search_dirs; i++) - rval |= dodir(search_dirs[i], 1); - - rval |= buildhints(); - - return rval; + if (justread) + list_elf_hints(hints_file); + else + update_elf_hints(hints_file, argc - optind, + argv + optind, merge || rescan); + return 0; } static void usage(void) { fprintf(stderr, - "usage: ldconfig [-32] [-aout | -elf] [-Rimrsv] [-f hints_file] [directory | file ...]\n"); + "usage: ldconfig [-32] [-elf] [-Rimrsv] [-f hints_file] [directory | file ...]\n"); exit(1); } - -int -dofile(char *fname, int silent) -{ - FILE *hfp; - char buf[MAXPATHLEN]; - int rval = 0; - char *cp, *sp; - - if ((hfp = fopen(fname, "r")) == NULL) { - warn("%s", fname); - return -1; - } - - while (fgets(buf, sizeof(buf), hfp)) { - cp = buf; - while (isspace(*cp)) - cp++; - if (*cp == '#' || *cp == '\0') - continue; - sp = cp; - while (!isspace(*cp) && *cp != '\0') - cp++; - - if (*cp != '\n') { - *cp = '\0'; - warnx("%s: trailing characters ignored", sp); - } - - *cp = '\0'; - - rval |= dodir(sp, silent); - } - - (void)fclose(hfp); - return rval; -} - -int -dodir(char *dir, int silent) -{ - DIR *dd; - struct dirent *dp; - char name[MAXPATHLEN]; - int dewey[MAXDEWEY], ndewey; - - if ((dd = opendir(dir)) == NULL) { - if (silent && errno == ENOENT) /* Ignore the error */ - return 0; - warn("%s", dir); - return -1; - } - - while ((dp = readdir(dd)) != NULL) { - int n; - char *cp; - - /* Check for `lib' prefix */ - if (dp->d_name[0] != 'l' || - dp->d_name[1] != 'i' || - dp->d_name[2] != 'b') - continue; - - /* Copy the entry minus prefix */ - (void)strcpy(name, dp->d_name + 3); - n = strlen(name); - if (n < 4) - continue; - - /* Find ".so." in name */ - for (cp = name + n - 4; cp > name; --cp) { - if (cp[0] == '.' && - cp[1] == 's' && - cp[2] == 'o' && - cp[3] == '.') - break; - } - if (cp <= name) - continue; - - *cp = '\0'; - if (!isdigit(*(cp+4))) - continue; - - bzero((caddr_t)dewey, sizeof(dewey)); - ndewey = getdewey(dewey, cp + 4); - if (ndewey < 2) - continue; - enter(dir, dp->d_name, name, dewey, ndewey); - } - - closedir(dd); - return 0; -} - -static void -enter(char *dir, char *file, char *name, int dewey[], int ndewey) -{ - struct shlib_list *shp; - - for (shp = shlib_head; shp; shp = shp->next) { - if (strcmp(name, shp->name) != 0 || major != shp->major) - continue; - - /* Name matches existing entry */ - if (cmpndewey(dewey, ndewey, shp->dewey, shp->ndewey) > 0) { - - /* Update this entry with higher versioned lib */ - if (verbose) - printf("Updating lib%s.%d.%d to %s/%s\n", - shp->name, shp->major, shp->minor, - dir, file); - - free(shp->name); - shp->name = strdup(name); - free(shp->path); - shp->path = concat(dir, "/", file); - bcopy(dewey, shp->dewey, sizeof(shp->dewey)); - shp->ndewey = ndewey; - } - break; - } - - if (shp) - /* Name exists: older version or just updated */ - return; - - /* Allocate new list element */ - if (verbose) - printf("Adding %s/%s\n", dir, file); - - shp = (struct shlib_list *)xmalloc(sizeof *shp); - shp->name = strdup(name); - shp->path = concat(dir, "/", file); - bcopy(dewey, shp->dewey, sizeof(shp->dewey)); - shp->ndewey = ndewey; - shp->next = NULL; - - *shlib_tail = shp; - shlib_tail = &shp->next; -} - - -static int -hinthash(char *cp, int vmajor) -{ - int k = 0; - - while (*cp) - k = (((k << 1) + (k >> 14)) ^ (*cp++)) & 0x3fff; - - k = (((k << 1) + (k >> 14)) ^ (vmajor*257)) & 0x3fff; - - return k; -} - -int -buildhints(void) -{ - struct hints_header hdr; - struct hints_bucket *blist; - struct shlib_list *shp; - char *strtab; - int i, n, str_index = 0; - int strtab_sz = 0; /* Total length of strings */ - int nhints = 0; /* Total number of hints */ - int fd; - char *tmpfilename; - - for (shp = shlib_head; shp; shp = shp->next) { - strtab_sz += 1 + strlen(shp->name); - strtab_sz += 1 + strlen(shp->path); - nhints++; - } - - /* Fill hints file header */ - hdr.hh_magic = HH_MAGIC; - hdr.hh_version = LD_HINTS_VERSION_2; - hdr.hh_nbucket = 1 * nhints; - n = hdr.hh_nbucket * sizeof(struct hints_bucket); - hdr.hh_hashtab = sizeof(struct hints_header); - hdr.hh_strtab = hdr.hh_hashtab + n; - hdr.hh_dirlist = strtab_sz; - strtab_sz += 1 + strlen(dir_list); - hdr.hh_strtab_sz = strtab_sz; - hdr.hh_ehints = hdr.hh_strtab + hdr.hh_strtab_sz; - - if (verbose) - printf("Totals: entries %d, buckets %ld, string size %d\n", - nhints, (long)hdr.hh_nbucket, strtab_sz); - - /* Allocate buckets and string table */ - blist = (struct hints_bucket *)xmalloc(n); - bzero((char *)blist, n); - for (i = 0; i < hdr.hh_nbucket; i++) - /* Empty all buckets */ - blist[i].hi_next = -1; - - strtab = (char *)xmalloc(strtab_sz); - - /* Enter all */ - for (shp = shlib_head; shp; shp = shp->next) { - struct hints_bucket *bp; - - bp = blist + - (hinthash(shp->name, shp->major) % hdr.hh_nbucket); - - if (bp->hi_pathx) { - int j; - - for (j = 0; j < hdr.hh_nbucket; j++) { - if (blist[j].hi_pathx == 0) - break; - } - if (j == hdr.hh_nbucket) { - warnx("bummer!"); - return -1; - } - while (bp->hi_next != -1) - bp = &blist[bp->hi_next]; - bp->hi_next = j; - bp = blist + j; - } - - /* Insert strings in string table */ - bp->hi_namex = str_index; - strcpy(strtab + str_index, shp->name); - str_index += 1 + strlen(shp->name); - - bp->hi_pathx = str_index; - strcpy(strtab + str_index, shp->path); - str_index += 1 + strlen(shp->path); - - /* Copy versions */ - bcopy(shp->dewey, bp->hi_dewey, sizeof(bp->hi_dewey)); - bp->hi_ndewey = shp->ndewey; - } - - /* Copy search directories */ - strcpy(strtab + str_index, dir_list); - str_index += 1 + strlen(dir_list); - - /* Sanity check */ - if (str_index != strtab_sz) { - errx(1, "str_index(%d) != strtab_sz(%d)", str_index, strtab_sz); - } - - tmpfilename = concat(hints_file, ".XXXXXXXXXX", ""); - umask(0); /* Create with exact permissions */ - if ((fd = mkstemp(tmpfilename)) == -1) { - warn("%s", tmpfilename); - return -1; - } - fchmod(fd, 0444); - - if (write(fd, &hdr, sizeof(struct hints_header)) != - sizeof(struct hints_header)) { - warn("%s", hints_file); - return -1; - } - if (write(fd, blist, hdr.hh_nbucket * sizeof(*blist)) != - (ssize_t)(hdr.hh_nbucket * sizeof(*blist))) { - warn("%s", hints_file); - return -1; - } - if (write(fd, strtab, strtab_sz) != strtab_sz) { - warn("%s", hints_file); - return -1; - } - if (close(fd) != 0) { - warn("%s", hints_file); - return -1; - } - if (rename(tmpfilename, hints_file) != 0) { - warn("%s", hints_file); - return -1; - } - - return 0; -} - -static int -readhints(void) -{ - int fd; - void *addr; - long fsize; - long msize; - struct hints_header *hdr; - struct hints_bucket *blist; - char *strtab; - struct shlib_list *shp; - int i; - - if ((fd = open(hints_file, O_RDONLY, 0)) == -1) { - warn("%s", hints_file); - return -1; - } - - msize = PAGE_SIZE; - addr = mmap(0, msize, PROT_READ, MAP_PRIVATE, fd, 0); - - if (addr == MAP_FAILED) { - warn("%s", hints_file); - return -1; - } - - hdr = (struct hints_header *)addr; - if (HH_BADMAG(*hdr)) { - warnx("%s: bad magic: %lo", hints_file, - (unsigned long)hdr->hh_magic); - return -1; - } - - if (hdr->hh_version != LD_HINTS_VERSION_1 && - hdr->hh_version != LD_HINTS_VERSION_2) { - warnx("unsupported version: %ld", (long)hdr->hh_version); - return -1; - } - - if (hdr->hh_ehints > msize) { - fsize = hdr->hh_ehints; - munmap(addr, msize); - addr = mmap(0, fsize, PROT_READ, MAP_PRIVATE, fd, 0); - if (addr == MAP_FAILED) { - warn("%s", hints_file); - return -1; - } - hdr = (struct hints_header *)addr; - } - close(fd); - - strtab = (char *)addr + hdr->hh_strtab; - - if (hdr->hh_version >= LD_HINTS_VERSION_2) - add_search_path(strtab + hdr->hh_dirlist); - else if (rescan) - errx(1, "%s too old and does not contain the search path", - hints_file); - - if (rescan) - return 0; - - blist = malloc(sizeof(*blist) * hdr->hh_nbucket); - if (blist == NULL) - err(1, "readhints"); - memcpy(blist, (char *)addr + hdr->hh_hashtab, - sizeof(*blist) * hdr->hh_nbucket); - - - for (i = 0; i < hdr->hh_nbucket; i++) { - struct hints_bucket *bp = &blist[i]; - - /* Sanity check */ - if (bp->hi_namex >= hdr->hh_strtab_sz) { - warnx("bad name index: %#x", bp->hi_namex); - free(blist); - return -1; - } - if (bp->hi_pathx >= hdr->hh_strtab_sz) { - warnx("bad path index: %#x", bp->hi_pathx); - free(blist); - return -1; - } - - /* Allocate new list element */ - shp = (struct shlib_list *)xmalloc(sizeof *shp); - shp->name = strdup(strtab + bp->hi_namex); - shp->path = strdup(strtab + bp->hi_pathx); - bcopy(bp->hi_dewey, shp->dewey, sizeof(shp->dewey)); - shp->ndewey = bp->hi_ndewey; - shp->next = NULL; - - *shlib_tail = shp; - shlib_tail = &shp->next; - } - - free(blist); - return 0; -} - -static void -listhints(void) -{ - struct shlib_list *shp; - int i; - - printf("%s:\n", hints_file); - printf("\tsearch directories: %s\n", dir_list); - - for (i = 0, shp = shlib_head; shp; i++, shp = shp->next) - printf("\t%d:-l%s.%d.%d => %s\n", - i, shp->name, shp->major, shp->minor, shp->path); - - return; -} From owner-dev-commits-src-all@freebsd.org Thu Dec 31 15:29:52 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BFE9E4C4F6F; Thu, 31 Dec 2020 15:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6Bsr55Yrz4tR8; Thu, 31 Dec 2020 15:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A0E1F12DEF; Thu, 31 Dec 2020 15:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVFTqUk056563; Thu, 31 Dec 2020 15:29:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVFTq1s056562; Thu, 31 Dec 2020 15:29:52 GMT (envelope-from git) Date: Thu, 31 Dec 2020 15:29:52 GMT Message-Id: <202012311529.0BVFTq1s056562@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Glen Barber Subject: git: c3e89a30fdc2 - main - copyrights: Happy New Year 2021 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c3e89a30fdc2c985b73f46ab2f414d53945fc00b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 15:29:52 -0000 The branch main has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=c3e89a30fdc2c985b73f46ab2f414d53945fc00b commit c3e89a30fdc2c985b73f46ab2f414d53945fc00b Author: Glen Barber AuthorDate: 2020-12-31 15:23:36 +0000 Commit: Glen Barber CommitDate: 2020-12-31 15:29:44 +0000 copyrights: Happy New Year 2021 Good riddance 2020. Sponsored by: Rubicon Communications, LLC (netgate.com) --- COPYRIGHT | 3 +-- sys/sys/copyright.h | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/COPYRIGHT b/COPYRIGHT index 4a40a9f3c6cf..3cf4fa961551 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,10 +1,9 @@ -# $FreeBSD$ # @(#)COPYRIGHT 8.2 (Berkeley) 3/21/94 The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2020 The FreeBSD Project. +Copyright (c) 1992-2021 The FreeBSD Project. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions diff --git a/sys/sys/copyright.h b/sys/sys/copyright.h index b7b4090be317..c9e070859e6c 100644 --- a/sys/sys/copyright.h +++ b/sys/sys/copyright.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (C) 1992-2020 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2021 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,8 +23,6 @@ * 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$ */ /* Copyrights macros */ @@ -35,7 +33,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2020 The FreeBSD Project.\n" + "Copyright (c) 1992-2021 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-dev-commits-src-all@freebsd.org Thu Dec 31 15:32:40 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 93C994C5221; Thu, 31 Dec 2020 15:32:40 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 4D6Bx43JGZz4thl; Thu, 31 Dec 2020 15:32:39 +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 2E4A2260E1B; Thu, 31 Dec 2020 16:32:38 +0100 (CET) Subject: Re: git: c3e89a30fdc2 - main - copyrights: Happy New Year 2021 To: Glen Barber , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202012311529.0BVFTq1s056562@gitrepo.freebsd.org> From: Hans Petter Selasky Message-ID: <1b83bf26-d7ca-9c22-3302-901e4bb0f254@selasky.org> Date: Thu, 31 Dec 2020 16:32:28 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <202012311529.0BVFTq1s056562@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4D6Bx43JGZz4thl X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 15:32:40 -0000 On 12/31/20 4:29 PM, Glen Barber wrote: > The branch main has been updated by gjb: > > URL: https://cgit.FreeBSD.org/src/commit/?id=c3e89a30fdc2c985b73f46ab2f414d53945fc00b > > commit c3e89a30fdc2c985b73f46ab2f414d53945fc00b > Author: Glen Barber > AuthorDate: 2020-12-31 15:23:36 +0000 > Commit: Glen Barber > CommitDate: 2020-12-31 15:29:44 +0000 > > copyrights: Happy New Year 2021 > > Good riddance 2020. > Hey hey, it is not midnight yet ;-) --HPS From owner-dev-commits-src-all@freebsd.org Thu Dec 31 15:38:36 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B44F4C53BE; Thu, 31 Dec 2020 15:38:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6C3w3bjbz4v9m; Thu, 31 Dec 2020 15:38:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6EBEE12BCB; Thu, 31 Dec 2020 15:38:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVFcawY068485; Thu, 31 Dec 2020 15:38:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVFcagC068484; Thu, 31 Dec 2020 15:38:36 GMT (envelope-from git) Date: Thu, 31 Dec 2020 15:38:36 GMT Message-Id: <202012311538.0BVFcagC068484@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: dfa4fe11d6fe - stable/12 - copyrights: Happy New Year 2021 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: dfa4fe11d6fe90936836c28ec4f70181f0165ca4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 15:38:36 -0000 The branch stable/12 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=dfa4fe11d6fe90936836c28ec4f70181f0165ca4 commit dfa4fe11d6fe90936836c28ec4f70181f0165ca4 Author: Glen Barber AuthorDate: 2020-12-31 15:23:36 +0000 Commit: Glen Barber CommitDate: 2020-12-31 15:32:52 +0000 copyrights: Happy New Year 2021 Good riddance 2020. Sponsored by: Rubicon Communications, LLC (netgate.com) (cherry picked from commit c3e89a30fdc2c985b73f46ab2f414d53945fc00b) --- COPYRIGHT | 3 +-- sys/sys/copyright.h | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/COPYRIGHT b/COPYRIGHT index 4a40a9f3c6cf..3cf4fa961551 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,10 +1,9 @@ -# $FreeBSD$ # @(#)COPYRIGHT 8.2 (Berkeley) 3/21/94 The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2020 The FreeBSD Project. +Copyright (c) 1992-2021 The FreeBSD Project. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions diff --git a/sys/sys/copyright.h b/sys/sys/copyright.h index 55a91c06e048..9bb86f18da22 100644 --- a/sys/sys/copyright.h +++ b/sys/sys/copyright.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (C) 1992-2020 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2021 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,8 +23,6 @@ * 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$ */ @@ -36,7 +34,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2020 The FreeBSD Project.\n" + "Copyright (c) 1992-2021 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-dev-commits-src-all@freebsd.org Thu Dec 31 15:40:43 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 815084C5610; Thu, 31 Dec 2020 15:40:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6C6M2k3Nz4vFJ; Thu, 31 Dec 2020 15:40:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 503BF12CD3; Thu, 31 Dec 2020 15:40:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVFeh47076286; Thu, 31 Dec 2020 15:40:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVFehiX076285; Thu, 31 Dec 2020 15:40:43 GMT (envelope-from git) Date: Thu, 31 Dec 2020 15:40:43 GMT Message-Id: <202012311540.0BVFehiX076285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: 446867bf801a - stable/11 - copyrights: Happy New Year 2021 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 446867bf801ae39b9a42df2ba6c9444a0c236d42 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 15:40:43 -0000 The branch stable/11 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=446867bf801ae39b9a42df2ba6c9444a0c236d42 commit 446867bf801ae39b9a42df2ba6c9444a0c236d42 Author: Glen Barber AuthorDate: 2020-12-31 15:23:36 +0000 Commit: Glen Barber CommitDate: 2020-12-31 15:40:15 +0000 copyrights: Happy New Year 2021 Good riddance 2020. Sponsored by: Rubicon Communications, LLC (netgate.com) (cherry picked from commit c3e89a30fdc2c985b73f46ab2f414d53945fc00b) --- COPYRIGHT | 3 +-- sys/sys/copyright.h | 10 +++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/COPYRIGHT b/COPYRIGHT index 4a40a9f3c6cf..3cf4fa961551 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,10 +1,9 @@ -# $FreeBSD$ # @(#)COPYRIGHT 8.2 (Berkeley) 3/21/94 The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2020 The FreeBSD Project. +Copyright (c) 1992-2021 The FreeBSD Project. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions diff --git a/sys/sys/copyright.h b/sys/sys/copyright.h index 8c33d74c700b..8df68cbc4aec 100644 --- a/sys/sys/copyright.h +++ b/sys/sys/copyright.h @@ -1,5 +1,11 @@ /*- +<<<<<<< HEAD * Copyright (C) 1992-2020 The FreeBSD Project. All rights reserved. +======= + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (C) 1992-2021 The FreeBSD Project. All rights reserved. +>>>>>>> c3e89a30fdc... copyrights: Happy New Year 2021 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -21,8 +27,6 @@ * 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$ */ @@ -34,7 +38,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2020 The FreeBSD Project.\n" + "Copyright (c) 1992-2021 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-dev-commits-src-all@freebsd.org Thu Dec 31 15:40:45 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 525C54C53F6; Thu, 31 Dec 2020 15:40:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6C6P1YHgz4vBw; Thu, 31 Dec 2020 15:40:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1239A129E5; Thu, 31 Dec 2020 15:40:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVFeiEp076391; Thu, 31 Dec 2020 15:40:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVFeifw076390; Thu, 31 Dec 2020 15:40:44 GMT (envelope-from git) Date: Thu, 31 Dec 2020 15:40:44 GMT Message-Id: <202012311540.0BVFeifw076390@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 68de3bb59f64 - main - VOP_PATHCONF.9: add a LOCKS section MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 68de3bb59f64a37f3473517a56c2767e652c36b8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 15:40:45 -0000 The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=68de3bb59f64a37f3473517a56c2767e652c36b8 commit 68de3bb59f64a37f3473517a56c2767e652c36b8 Author: Alan Somers AuthorDate: 2020-12-31 15:35:13 +0000 Commit: Alan Somers CommitDate: 2020-12-31 15:38:52 +0000 VOP_PATHCONF.9: add a LOCKS section MFC after: 2 weeks Reviewed By: jhb, bjk Differential Revision: https://reviews.freebsd.org/D27842 --- share/man/man9/VOP_PATHCONF.9 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man9/VOP_PATHCONF.9 b/share/man/man9/VOP_PATHCONF.9 index 4b4d87025b7a..feab41a86813 100644 --- a/share/man/man9/VOP_PATHCONF.9 +++ b/share/man/man9/VOP_PATHCONF.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 21, 2019 +.Dd December 31, 2020 .Dt VOP_PATHCONF 9 .Os .Sh NAME @@ -72,6 +72,8 @@ Return 1 if file names longer than .Dv KERN_NAME_MAX are truncated. .El +.Sh LOCKS +The vnode will be locked on entry and should remain locked on return. .Sh RETURN VALUES If .Fa name From owner-dev-commits-src-all@freebsd.org Thu Dec 31 15:45:23 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B06E4C5A4E; Thu, 31 Dec 2020 15:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6CCl3VP7z3C42; Thu, 31 Dec 2020 15:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B2D013017; Thu, 31 Dec 2020 15:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVFjNpS080378; Thu, 31 Dec 2020 15:45:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVFjNvE080377; Thu, 31 Dec 2020 15:45:23 GMT (envelope-from git) Date: Thu, 31 Dec 2020 15:45:23 GMT Message-Id: <202012311545.0BVFjNvE080377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: 320f0e909d00 - stable/12 - copyrights: Happy New Year 2021 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 320f0e909d003e23d7712a0c1e83a04f33dde2e0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 15:45:23 -0000 The branch stable/12 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=320f0e909d003e23d7712a0c1e83a04f33dde2e0 commit 320f0e909d003e23d7712a0c1e83a04f33dde2e0 Author: Glen Barber AuthorDate: 2020-12-31 15:44:52 +0000 Commit: Glen Barber CommitDate: 2020-12-31 15:44:52 +0000 copyrights: Happy New Year 2021 Good riddance 2020. (This fixes the previous MFC) Sponsored by: Rubicon Communications, LLC (netgate.com) --- COPYRIGHT | 1 + sys/sys/copyright.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/COPYRIGHT b/COPYRIGHT index 3cf4fa961551..18faf948fbba 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,3 +1,4 @@ +# $FreeBSD$ # @(#)COPYRIGHT 8.2 (Berkeley) 3/21/94 The compilation of software known as FreeBSD is distributed under the diff --git a/sys/sys/copyright.h b/sys/sys/copyright.h index 9bb86f18da22..b34d6d20de23 100644 --- a/sys/sys/copyright.h +++ b/sys/sys/copyright.h @@ -23,6 +23,8 @@ * 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$ */ From owner-dev-commits-src-all@freebsd.org Thu Dec 31 15:45:33 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C8C44C593F; Thu, 31 Dec 2020 15:45:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6CCw65Ffz3C58; Thu, 31 Dec 2020 15:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB05D13018; Thu, 31 Dec 2020 15:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVFjWeL080516; Thu, 31 Dec 2020 15:45:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVFjWV2080515; Thu, 31 Dec 2020 15:45:32 GMT (envelope-from git) Date: Thu, 31 Dec 2020 15:45:32 GMT Message-Id: <202012311545.0BVFjWV2080515@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: 057a5704a32a - stable/11 - copyrights: Happy New Year 2021 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 057a5704a32a3495c35ae8d80b64d4ecd2ee6ac0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 15:45:33 -0000 The branch stable/11 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=057a5704a32a3495c35ae8d80b64d4ecd2ee6ac0 commit 057a5704a32a3495c35ae8d80b64d4ecd2ee6ac0 Author: Glen Barber AuthorDate: 2020-12-31 15:44:24 +0000 Commit: Glen Barber CommitDate: 2020-12-31 15:44:24 +0000 copyrights: Happy New Year 2021 Good riddance 2020. (This fixes the previous MFC) Sponsored by: Rubicon Communications, LLC (netgate.com) --- COPYRIGHT | 1 + sys/sys/copyright.h | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/COPYRIGHT b/COPYRIGHT index 3cf4fa961551..18faf948fbba 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,3 +1,4 @@ +# $FreeBSD$ # @(#)COPYRIGHT 8.2 (Berkeley) 3/21/94 The compilation of software known as FreeBSD is distributed under the diff --git a/sys/sys/copyright.h b/sys/sys/copyright.h index 8df68cbc4aec..dfcd2dc013cc 100644 --- a/sys/sys/copyright.h +++ b/sys/sys/copyright.h @@ -1,11 +1,7 @@ /*- -<<<<<<< HEAD - * Copyright (C) 1992-2020 The FreeBSD Project. All rights reserved. -======= * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (C) 1992-2021 The FreeBSD Project. All rights reserved. ->>>>>>> c3e89a30fdc... copyrights: Happy New Year 2021 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,6 +23,8 @@ * 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$ */ From owner-dev-commits-src-all@freebsd.org Thu Dec 31 15:52:09 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E53C4C5E50; Thu, 31 Dec 2020 15:52:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6CMY3f3bz3CcQ; Thu, 31 Dec 2020 15:52:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6F6D412C78; Thu, 31 Dec 2020 15:52:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVFq92b092664; Thu, 31 Dec 2020 15:52:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVFq9cE092663; Thu, 31 Dec 2020 15:52:09 GMT (envelope-from git) Date: Thu, 31 Dec 2020 15:52:09 GMT Message-Id: <202012311552.0BVFq9cE092663@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 37df9d3bba85 - main - fusefs: update FUSE protocol to 7.24 and implement FUSE_LSEEK MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 37df9d3bba8577fcdd63382ff5a4a5cbb4aa55b4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 15:52:09 -0000 The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=37df9d3bba8577fcdd63382ff5a4a5cbb4aa55b4 commit 37df9d3bba8577fcdd63382ff5a4a5cbb4aa55b4 Author: Alan Somers AuthorDate: 2020-12-29 00:26:31 +0000 Commit: Alan Somers CommitDate: 2020-12-31 15:51:47 +0000 fusefs: update FUSE protocol to 7.24 and implement FUSE_LSEEK FUSE_LSEEK reports holes on fuse file systems, and is used for example by bsdtar. MFC after: 2 weeks Relnotes: yes Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D27804 --- sys/fs/fuse/fuse_internal.c | 9 +- sys/fs/fuse/fuse_ipc.c | 8 +- sys/fs/fuse/fuse_ipc.h | 37 ++++- sys/fs/fuse/fuse_kernel.h | 17 +- sys/fs/fuse/fuse_vfsops.c | 2 +- sys/fs/fuse/fuse_vnops.c | 141 +++++++++++++++-- tests/sys/fs/fusefs/Makefile | 1 + tests/sys/fs/fusefs/lseek.cc | 360 ++++++++++++++++++++++++++++++++++++++++++ tests/sys/fs/fusefs/mockfs.cc | 35 +++- tests/sys/fs/fusefs/mockfs.hh | 2 + 10 files changed, 587 insertions(+), 25 deletions(-) diff --git a/sys/fs/fuse/fuse_internal.c b/sys/fs/fuse/fuse_internal.c index 79365b8802df..2faad7cd8651 100644 --- a/sys/fs/fuse/fuse_internal.c +++ b/sys/fs/fuse/fuse_internal.c @@ -219,7 +219,7 @@ fuse_internal_access(struct vnode *vp, SDT_PROBE0(fusefs, , internal, access_vadmin); } - if (!fsess_isimpl(mp, FUSE_ACCESS)) + if (fsess_not_impl(mp, FUSE_ACCESS)) return 0; if ((mode & (VWRITE | VAPPEND)) != 0) @@ -337,14 +337,14 @@ fuse_internal_fsync(struct vnode *vp, int op = FUSE_FSYNC; int err = 0; - if (!fsess_isimpl(vnode_mount(vp), + if (fsess_not_impl(vnode_mount(vp), (vnode_vtype(vp) == VDIR ? FUSE_FSYNCDIR : FUSE_FSYNC))) { return 0; } if (vnode_isdir(vp)) op = FUSE_FSYNCDIR; - if (!fsess_isimpl(mp, op)) + if (fsess_not_impl(mp, op)) return 0; fdisp_init(&fdi, sizeof(*ffsi)); @@ -1051,6 +1051,9 @@ fuse_internal_init_callback(struct fuse_ticket *tick, struct uio *uio) else data->cache_mode = FUSE_CACHE_WT; + if (!fuse_libabi_geq(data, 7, 24)) + fsess_set_notimpl(data->mp, FUSE_LSEEK); + out: if (err) { fdata_set_dead(data); diff --git a/sys/fs/fuse/fuse_ipc.c b/sys/fs/fuse/fuse_ipc.c index 776a4ecd11d7..d3738da26b34 100644 --- a/sys/fs/fuse/fuse_ipc.c +++ b/sys/fs/fuse/fuse_ipc.c @@ -230,7 +230,7 @@ fuse_interrupt_send(struct fuse_ticket *otick, int err) * If the fuse daemon doesn't support interrupts, then there's * nothing more that we can do */ - if (!fsess_isimpl(data->mp, FUSE_INTERRUPT)) + if (fsess_not_impl(data->mp, FUSE_INTERRUPT)) return; /* @@ -423,7 +423,7 @@ fticket_wait_answer(struct fuse_ticket *ftick) struct fuse_data *data = ftick->tk_data; bool interrupted = false; - if (fsess_isimpl(ftick->tk_data->mp, FUSE_INTERRUPT) && + if (fsess_maybe_impl(ftick->tk_data->mp, FUSE_INTERRUPT) && data->dataflags & FSESS_INTR) { SIGEMPTYSET(blockedset); } else { @@ -851,6 +851,10 @@ fuse_body_audit(struct fuse_ticket *ftick, size_t blen) err = (blen == 0) ? 0 : EINVAL; break; + case FUSE_LSEEK: + err = (blen == sizeof(struct fuse_lseek_out)) ? 0 : EINVAL; + break; + default: panic("FUSE: opcodes out of sync (%d)\n", opcode); } diff --git a/sys/fs/fuse/fuse_ipc.h b/sys/fs/fuse/fuse_ipc.h index c8a665abded7..2ed75b3319e3 100644 --- a/sys/fs/fuse/fuse_ipc.h +++ b/sys/fs/fuse/fuse_ipc.h @@ -212,7 +212,15 @@ struct fuse_data { int daemon_timeout; int linux_errnos; unsigned time_gran; + /* A bitmask of FUSE RPCs that are not implemented by the server */ uint64_t notimpl; + /* + * A bitmask of FUSE RPCs that are implemented by the server. + * If an operation is not present in either notimpl or isimpl, then it + * may be implemented by the server, but the kernel doesn't know for + * sure. + */ + uint64_t isimpl; uint64_t mnt_flag; enum fuse_data_cache_mode cache_mode; }; @@ -240,13 +248,40 @@ fuse_get_mpdata(struct mount *mp) } static inline bool -fsess_isimpl(struct mount *mp, int opcode) +fsess_is_impl(struct mount *mp, int opcode) +{ + struct fuse_data *data = fuse_get_mpdata(mp); + + return ((data->isimpl & (1ULL << opcode)) != 0); + +} + +static inline bool +fsess_maybe_impl(struct mount *mp, int opcode) { struct fuse_data *data = fuse_get_mpdata(mp); return ((data->notimpl & (1ULL << opcode)) == 0); } + +static inline bool +fsess_not_impl(struct mount *mp, int opcode) +{ + struct fuse_data *data = fuse_get_mpdata(mp); + + return ((data->notimpl & (1ULL << opcode)) != 0); + +} + +static inline void +fsess_set_impl(struct mount *mp, int opcode) +{ + struct fuse_data *data = fuse_get_mpdata(mp); + + data->isimpl |= (1ULL << opcode); +} + static inline void fsess_set_notimpl(struct mount *mp, int opcode) { diff --git a/sys/fs/fuse/fuse_kernel.h b/sys/fs/fuse/fuse_kernel.h index fa3c63417f19..6e97b04a733f 100644 --- a/sys/fs/fuse/fuse_kernel.h +++ b/sys/fs/fuse/fuse_kernel.h @@ -102,6 +102,9 @@ * - add ctime and ctimensec to fuse_setattr_in * - add FUSE_RENAME2 request * - add FUSE_NO_OPEN_SUPPORT flag + * + * 7.24 + * - add FUSE_LSEEK for SEEK_HOLE and SEEK_DATA support */ #ifndef _FUSE_FUSE_KERNEL_H @@ -117,7 +120,7 @@ #define FUSE_KERNEL_VERSION 7 /** Minor version number of this interface */ -#define FUSE_KERNEL_MINOR_VERSION 23 +#define FUSE_KERNEL_MINOR_VERSION 24 /** The node ID of the root inode */ #define FUSE_ROOT_ID 1 @@ -340,6 +343,7 @@ enum fuse_opcode { FUSE_FALLOCATE = 43, FUSE_READDIRPLUS = 44, FUSE_RENAME2 = 45, + FUSE_LSEEK = 46, #ifdef linux /* CUSE specific operations */ @@ -751,4 +755,15 @@ struct fuse_notify_retrieve_in { uint64_t dummy4; }; +struct fuse_lseek_in { + uint64_t fh; + uint64_t offset; + uint32_t whence; + uint32_t padding; +}; + +struct fuse_lseek_out { + uint64_t offset; +}; + #endif /* _FUSE_FUSE_KERNEL_H */ diff --git a/sys/fs/fuse/fuse_vfsops.c b/sys/fs/fuse/fuse_vfsops.c index 04d273127ade..7f47f8800994 100644 --- a/sys/fs/fuse/fuse_vfsops.c +++ b/sys/fs/fuse/fuse_vfsops.c @@ -501,7 +501,7 @@ fuse_vfsop_unmount(struct mount *mp, int mntflags) if (fdata_get_dead(data)) { goto alreadydead; } - if (fsess_isimpl(mp, FUSE_DESTROY)) { + if (fsess_maybe_impl(mp, FUSE_DESTROY)) { fdisp_init(&fdi, 0); fdisp_make(&fdi, FUSE_DESTROY, mp, 0, td, NULL); diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index fde673d1f5f3..efac7e041cf6 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -136,6 +137,7 @@ static vop_fsync_t fuse_vnop_fsync; static vop_getattr_t fuse_vnop_getattr; static vop_getextattr_t fuse_vnop_getextattr; static vop_inactive_t fuse_vnop_inactive; +static vop_ioctl_t fuse_vnop_ioctl; static vop_link_t fuse_vnop_link; static vop_listextattr_t fuse_vnop_listextattr; static vop_lookup_t fuse_vnop_lookup; @@ -190,11 +192,7 @@ struct vop_vector fuse_vnops = { .vop_getattr = fuse_vnop_getattr, .vop_getextattr = fuse_vnop_getextattr, .vop_inactive = fuse_vnop_inactive, - /* - * TODO: implement vop_ioctl after upgrading to protocol 7.16. - * FUSE_IOCTL was added in 7.11, but 32-bit compat is broken until - * 7.16. - */ + .vop_ioctl = fuse_vnop_ioctl, .vop_link = fuse_vnop_link, .vop_listextattr = fuse_vnop_listextattr, .vop_lookup = fuse_vnop_lookup, @@ -284,7 +282,7 @@ fuse_flush(struct vnode *vp, struct ucred *cred, pid_t pid, int fflag) struct mount *mp = vnode_mount(vp); int err; - if (!fsess_isimpl(vnode_mount(vp), FUSE_FLUSH)) + if (fsess_not_impl(vnode_mount(vp), FUSE_FLUSH)) return 0; err = fuse_filehandle_getrw(vp, fflag, &fufh, cred, pid); @@ -318,6 +316,42 @@ fuse_fifo_close(struct vop_close_args *ap) return (fifo_specops.vop_close(ap)); } +/* Send FUSE_LSEEK for this node */ +static int +fuse_vnop_do_lseek(struct vnode *vp, struct thread *td, struct ucred *cred, + pid_t pid, off_t *offp, int whence) +{ + struct fuse_dispatcher fdi; + struct fuse_filehandle *fufh; + struct fuse_lseek_in *flsi; + struct fuse_lseek_out *flso; + struct mount *mp = vnode_mount(vp); + int err; + + MPASS(VOP_ISLOCKED(vp)); + + err = fuse_filehandle_getrw(vp, FREAD, &fufh, cred, pid); + if (err) + return (err); + fdisp_init(&fdi, sizeof(*flsi)); + fdisp_make_vp(&fdi, FUSE_LSEEK, vp, td, cred); + flsi = fdi.indata; + flsi->fh = fufh->fh_id; + flsi->offset = *offp; + flsi->whence = whence; + err = fdisp_wait_answ(&fdi); + if (err == ENOSYS) { + fsess_set_notimpl(mp, FUSE_LSEEK); + } else if (err == 0) { + fsess_set_impl(mp, FUSE_LSEEK); + flso = fdi.answ; + *offp = flso->offset; + } + fdisp_destroy(&fdi); + + return (err); +} + /* struct vnop_access_args { struct vnode *a_vp; @@ -516,7 +550,7 @@ fuse_vnop_bmap(struct vop_bmap_args *ap) *runp = 0; } - if (fsess_isimpl(mp, FUSE_BMAP)) { + if (fsess_maybe_impl(mp, FUSE_BMAP)) { fdisp_init(&fdi, sizeof(*fbi)); fdisp_make_vp(&fdi, FUSE_BMAP, vp, td, td->td_ucred); fbi = fdi.indata; @@ -652,7 +686,7 @@ fuse_vnop_create(struct vop_create_args *ap) if (vap->va_type != VREG) return (EINVAL); - if (!fsess_isimpl(mp, FUSE_CREATE) || vap->va_type == VSOCK) { + if (fsess_not_impl(mp, FUSE_CREATE) || vap->va_type == VSOCK) { /* Fallback to FUSE_MKNOD/FUSE_OPEN */ fdisp_make_mknod_for_fallback(fdip, cnp, dvp, parentnid, td, cred, mode, &op); @@ -883,6 +917,56 @@ fuse_vnop_inactive(struct vop_inactive_args *ap) return 0; } +/* + struct vnop_ioctl_args { + struct vnode *a_vp; + u_long a_command; + caddr_t a_data; + int a_fflag; + struct ucred *a_cred; + struct thread *a_td; + }; +*/ +static int +fuse_vnop_ioctl(struct vop_ioctl_args *ap) +{ + struct vnode *vp = ap->a_vp; + struct mount *mp = vnode_mount(vp); + struct ucred *cred = ap->a_cred; + off_t *offp; + pid_t pid = ap->a_td->td_proc->p_pid; + int err; + + switch (ap->a_command) { + case FIOSEEKDATA: + case FIOSEEKHOLE: + /* Call FUSE_LSEEK, if we can, or fall back to vop_stdioctl */ + if (fsess_maybe_impl(mp, FUSE_LSEEK)) { + int whence; + + offp = ap->a_data; + if (ap->a_command == FIOSEEKDATA) + whence = SEEK_DATA; + else + whence = SEEK_HOLE; + + vn_lock(vp, LK_SHARED | LK_RETRY); + err = fuse_vnop_do_lseek(vp, ap->a_td, cred, pid, offp, + whence); + VOP_UNLOCK(vp); + } + if (fsess_not_impl(mp, FUSE_LSEEK)) + err = vop_stdioctl(ap); + break; + default: + /* TODO: implement FUSE_IOCTL */ + err = ENOTTY; + break; + } + return (err); +} + + /* struct vnop_link_args { struct vnode *a_tdvp; @@ -1337,6 +1421,8 @@ fuse_vnop_open(struct vop_open_args *ap) static int fuse_vnop_pathconf(struct vop_pathconf_args *ap) { + struct vnode *vp = ap->a_vp; + struct mount *mp; switch (ap->a_name) { case _PC_FILESIZEBITS: @@ -1354,6 +1440,35 @@ fuse_vnop_pathconf(struct vop_pathconf_args *ap) case _PC_NO_TRUNC: *ap->a_retval = 1; return (0); + case _PC_MIN_HOLE_SIZE: + /* + * The FUSE protocol provides no mechanism for a server to + * report _PC_MIN_HOLE_SIZE. It's a protocol bug. Instead, + * return EINVAL if the server does not support FUSE_LSEEK, or + * 1 if it does. + */ + mp = vnode_mount(vp); + if (!fsess_is_impl(mp, FUSE_LSEEK) && + !fsess_not_impl(mp, FUSE_LSEEK)) { + off_t offset = 0; + + /* Issue a FUSE_LSEEK to find out if it's implemented */ + fuse_vnop_do_lseek(vp, curthread, curthread->td_ucred, + curthread->td_proc->p_pid, &offset, SEEK_DATA); + } + + if (fsess_is_impl(mp, FUSE_LSEEK)) { + *ap->a_retval = 1; + return (0); + } else { + /* + * Probably FUSE_LSEEK is not implemented. It might + * be, if the FUSE_LSEEK above returned an error like + * EACCES, but in that case we can't tell, so it's + * safest to report EINVAL anyway. + */ + return (EINVAL); + } default: return (vop_stdpathconf(ap)); } @@ -2035,7 +2150,7 @@ fuse_vnop_getextattr(struct vop_getextattr_args *ap) if (fuse_isdeadfs(vp)) return (ENXIO); - if (!fsess_isimpl(mp, FUSE_GETXATTR)) + if (fsess_not_impl(mp, FUSE_GETXATTR)) return EOPNOTSUPP; err = fuse_extattr_check_cred(vp, ap->a_attrnamespace, cred, td, VREAD); @@ -2121,7 +2236,7 @@ fuse_vnop_setextattr(struct vop_setextattr_args *ap) if (fuse_isdeadfs(vp)) return (ENXIO); - if (!fsess_isimpl(mp, FUSE_SETXATTR)) + if (fsess_not_impl(mp, FUSE_SETXATTR)) return EOPNOTSUPP; if (vfs_isrdonly(mp)) @@ -2133,7 +2248,7 @@ fuse_vnop_setextattr(struct vop_setextattr_args *ap) * If we got here as fallback from VOP_DELETEEXTATTR, then * return EOPNOTSUPP. */ - if (!fsess_isimpl(mp, FUSE_REMOVEXATTR)) + if (fsess_not_impl(mp, FUSE_REMOVEXATTR)) return (EOPNOTSUPP); else return (EINVAL); @@ -2286,7 +2401,7 @@ fuse_vnop_listextattr(struct vop_listextattr_args *ap) if (fuse_isdeadfs(vp)) return (ENXIO); - if (!fsess_isimpl(mp, FUSE_LISTXATTR)) + if (fsess_not_impl(mp, FUSE_LISTXATTR)) return EOPNOTSUPP; err = fuse_extattr_check_cred(vp, ap->a_attrnamespace, cred, td, VREAD); @@ -2409,7 +2524,7 @@ fuse_vnop_deleteextattr(struct vop_deleteextattr_args *ap) if (fuse_isdeadfs(vp)) return (ENXIO); - if (!fsess_isimpl(mp, FUSE_REMOVEXATTR)) + if (fsess_not_impl(mp, FUSE_REMOVEXATTR)) return EOPNOTSUPP; if (vfs_isrdonly(mp)) diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile index 253078f8b1a7..8d199a53c074 100644 --- a/tests/sys/fs/fusefs/Makefile +++ b/tests/sys/fs/fusefs/Makefile @@ -29,6 +29,7 @@ GTESTS+= io GTESTS+= link GTESTS+= locks GTESTS+= lookup +GTESTS+= lseek GTESTS+= mkdir GTESTS+= mknod GTESTS+= mount diff --git a/tests/sys/fs/fusefs/lseek.cc b/tests/sys/fs/fusefs/lseek.cc new file mode 100644 index 000000000000..089b0f86a7f6 --- /dev/null +++ b/tests/sys/fs/fusefs/lseek.cc @@ -0,0 +1,360 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Alan Somers + * + * 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$ + */ + +extern "C" { +#include + +#include +} + +#include "mockfs.hh" +#include "utils.hh" + +using namespace testing; + +class Lseek: public FuseTest {}; +class LseekPathconf: public Lseek {}; +class LseekPathconf_7_23: public LseekPathconf { +public: +virtual void SetUp() { + m_kernel_minor_version = 23; + FuseTest::SetUp(); +} +}; +class LseekSeekHole: public Lseek {}; +class LseekSeekData: public Lseek {}; + +/* + * If a previous lseek operation has already returned enosys, then pathconf can + * return EINVAL immediately. + */ +TEST_F(LseekPathconf, already_enosys) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const uint64_t ino = 42; + off_t fsize = 1 << 30; /* 1 GiB */ + off_t offset_in = 1 << 28; + int fd; + + expect_lookup(RELPATH, ino, S_IFREG | 0644, fsize, 1); + expect_open(ino, 0, 1); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_LSEEK); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnErrno(ENOSYS))); + + fd = open(FULLPATH, O_RDONLY); + + EXPECT_EQ(offset_in, lseek(fd, offset_in, SEEK_DATA)); + EXPECT_EQ(-1, fpathconf(fd, _PC_MIN_HOLE_SIZE)); + EXPECT_EQ(EINVAL, errno); +} + +/* + * If a previous lseek operation has already returned successfully, then + * pathconf can return 1 immediately. 1 means "holes are reported, but size is + * not specified". + */ +TEST_F(LseekPathconf, already_seeked) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const uint64_t ino = 42; + off_t fsize = 1 << 30; /* 1 GiB */ + off_t offset = 1 << 28; + int fd; + + expect_lookup(RELPATH, ino, S_IFREG | 0644, fsize, 1); + expect_open(ino, 0, 1); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_LSEEK); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnImmediate([=](auto i, auto& out) { + SET_OUT_HEADER_LEN(out, lseek); + out.body.lseek.offset = i.body.lseek.offset; + }))); + fd = open(FULLPATH, O_RDONLY); + EXPECT_EQ(offset, lseek(fd, offset, SEEK_DATA)); + + EXPECT_EQ(1, fpathconf(fd, _PC_MIN_HOLE_SIZE)); +} + +/* + * If no FUSE_LSEEK operation has been attempted since mount, try once as soon + * as a pathconf request comes in. + */ +TEST_F(LseekPathconf, enosys_now) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const uint64_t ino = 42; + off_t fsize = 1 << 30; /* 1 GiB */ + int fd; + + expect_lookup(RELPATH, ino, S_IFREG | 0644, fsize, 1); + expect_open(ino, 0, 1); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_LSEEK); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnErrno(ENOSYS))); + + fd = open(FULLPATH, O_RDONLY); + + EXPECT_EQ(-1, fpathconf(fd, _PC_MIN_HOLE_SIZE)); + EXPECT_EQ(EINVAL, errno); +} + +/* + * If no FUSE_LSEEK operation has been attempted since mount, try one as soon + * as a pathconf request comes in. This is the typical pattern of bsdtar. It + * will only try SEEK_HOLE/SEEK_DATA if fpathconf says they're supported. + */ +TEST_F(LseekPathconf, seek_now) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const uint64_t ino = 42; + off_t fsize = 1 << 30; /* 1 GiB */ + off_t offset_initial = 1 << 27; + off_t offset_out = 1 << 29; + int fd; + + expect_lookup(RELPATH, ino, S_IFREG | 0644, fsize, 1); + expect_open(ino, 0, 1); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_LSEEK); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnImmediate([=](auto i __unused, auto& out) { + SET_OUT_HEADER_LEN(out, lseek); + out.body.lseek.offset = offset_out; + }))); + + fd = open(FULLPATH, O_RDONLY); + EXPECT_EQ(offset_initial, lseek(fd, offset_initial, SEEK_SET)); + EXPECT_EQ(1, fpathconf(fd, _PC_MIN_HOLE_SIZE)); + /* And check that the file pointer hasn't changed */ + EXPECT_EQ(offset_initial, lseek(fd, 0, SEEK_CUR)); +} + +/* + * For servers using older protocol versions, no FUSE_LSEEK should be attempted + */ +TEST_F(LseekPathconf_7_23, already_enosys) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const uint64_t ino = 42; + off_t fsize = 1 << 30; /* 1 GiB */ + int fd; + + expect_lookup(RELPATH, ino, S_IFREG | 0644, fsize, 1); + expect_open(ino, 0, 1); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_LSEEK); + }, Eq(true)), + _) + ).Times(0); + + fd = open(FULLPATH, O_RDONLY); + EXPECT_EQ(-1, fpathconf(fd, _PC_MIN_HOLE_SIZE)); + EXPECT_EQ(EINVAL, errno); +} + +TEST_F(LseekSeekData, ok) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const uint64_t ino = 42; + off_t fsize = 1 << 30; /* 1 GiB */ + off_t offset_in = 1 << 28; + off_t offset_out = 1 << 29; + int fd; + + expect_lookup(RELPATH, ino, S_IFREG | 0644, fsize, 1); + expect_open(ino, 0, 1); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_LSEEK && + in.header.nodeid == ino && + in.body.lseek.fh == FH && + (off_t)in.body.lseek.offset == offset_in && + in.body.lseek.whence == SEEK_DATA); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnImmediate([=](auto i __unused, auto& out) { + SET_OUT_HEADER_LEN(out, lseek); + out.body.lseek.offset = offset_out; + }))); + fd = open(FULLPATH, O_RDONLY); + EXPECT_EQ(offset_out, lseek(fd, offset_in, SEEK_DATA)); + EXPECT_EQ(offset_out, lseek(fd, 0, SEEK_CUR)); +} + +/* + * If the server returns ENOSYS, fusefs should fall back to the default + * behavior, and never query the server again. + */ +TEST_F(LseekSeekData, enosys) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const uint64_t ino = 42; + off_t fsize = 1 << 30; /* 1 GiB */ + off_t offset_in = 1 << 28; + int fd; + + expect_lookup(RELPATH, ino, S_IFREG | 0644, fsize, 1); + expect_open(ino, 0, 1); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_LSEEK && + in.header.nodeid == ino && + in.body.lseek.fh == FH && + (off_t)in.body.lseek.offset == offset_in && + in.body.lseek.whence == SEEK_DATA); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnErrno(ENOSYS))); + fd = open(FULLPATH, O_RDONLY); + + /* + * Default behavior: ENXIO if offset is < 0 or >= fsize, offset + * otherwise. + */ + EXPECT_EQ(offset_in, lseek(fd, offset_in, SEEK_DATA)); + EXPECT_EQ(-1, lseek(fd, -1, SEEK_HOLE)); + EXPECT_EQ(ENXIO, errno); + EXPECT_EQ(-1, lseek(fd, fsize, SEEK_HOLE)); + EXPECT_EQ(ENXIO, errno); +} + +TEST_F(LseekSeekHole, ok) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const uint64_t ino = 42; + off_t fsize = 1 << 30; /* 1 GiB */ + off_t offset_in = 1 << 28; + off_t offset_out = 1 << 29; + int fd; + + expect_lookup(RELPATH, ino, S_IFREG | 0644, fsize, 1); + expect_open(ino, 0, 1); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_LSEEK && + in.header.nodeid == ino && + in.body.lseek.fh == FH && + (off_t)in.body.lseek.offset == offset_in && + in.body.lseek.whence == SEEK_HOLE); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnImmediate([=](auto i __unused, auto& out) { + SET_OUT_HEADER_LEN(out, lseek); + out.body.lseek.offset = offset_out; + }))); + fd = open(FULLPATH, O_RDONLY); + EXPECT_EQ(offset_out, lseek(fd, offset_in, SEEK_HOLE)); + EXPECT_EQ(offset_out, lseek(fd, 0, SEEK_CUR)); +} + +/* + * If the server returns ENOSYS, fusefs should fall back to the default + * behavior, and never query the server again. + */ +TEST_F(LseekSeekHole, enosys) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const uint64_t ino = 42; + off_t fsize = 1 << 30; /* 1 GiB */ + off_t offset_in = 1 << 28; + int fd; + + expect_lookup(RELPATH, ino, S_IFREG | 0644, fsize, 1); + expect_open(ino, 0, 1); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_LSEEK && + in.header.nodeid == ino && + in.body.lseek.fh == FH && + (off_t)in.body.lseek.offset == offset_in && + in.body.lseek.whence == SEEK_HOLE); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnErrno(ENOSYS))); + fd = open(FULLPATH, O_RDONLY); + + /* + * Default behavior: ENXIO if offset is < 0 or >= fsize, fsize + * otherwise. + */ + EXPECT_EQ(fsize, lseek(fd, offset_in, SEEK_HOLE)); + EXPECT_EQ(-1, lseek(fd, -1, SEEK_HOLE)); + EXPECT_EQ(ENXIO, errno); + EXPECT_EQ(-1, lseek(fd, fsize, SEEK_HOLE)); + EXPECT_EQ(ENXIO, errno); +} + +/* lseek should return ENXIO when offset points to EOF */ +TEST_F(LseekSeekHole, enxio) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const uint64_t ino = 42; + off_t fsize = 1 << 30; /* 1 GiB */ + off_t offset_in = fsize; + int fd; + + expect_lookup(RELPATH, ino, S_IFREG | 0644, fsize, 1); + expect_open(ino, 0, 1); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_LSEEK && + in.header.nodeid == ino && + in.body.lseek.fh == FH && + (off_t)in.body.lseek.offset == offset_in && + in.body.lseek.whence == SEEK_HOLE); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnErrno(ENXIO))); + fd = open(FULLPATH, O_RDONLY); + EXPECT_EQ(-1, lseek(fd, offset_in, SEEK_HOLE)); + EXPECT_EQ(ENXIO, errno); +} diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc index f977c705331f..32d8fc7f6129 100644 --- a/tests/sys/fs/fusefs/mockfs.cc +++ b/tests/sys/fs/fusefs/mockfs.cc @@ -62,8 +62,7 @@ int verbosity = 0; const char* opcode2opname(uint32_t opcode) { - const int NUM_OPS = 39; - const char* table[NUM_OPS] = { + const char* table[] = { "Unknown (opcode 0)", "LOOKUP", "FORGET", @@ -102,9 +101,17 @@ const char* opcode2opname(uint32_t opcode) "CREATE", "INTERRUPT", "BMAP", - "DESTROY" + "DESTROY", + "IOCTL", + "POLL", + "NOTIFY_REPLY", + "BATCH_FORGET", + "FALLOCATE", + "READDIRPLUS", + "RENAME2", + "LSEEK", }; - if (opcode >= NUM_OPS) + if (opcode >= nitems(table)) return ("Unknown (opcode > max)"); else return (table[opcode]); @@ -211,6 +218,22 @@ void MockFS::debug_request(const mockfs_buf_in &in, ssize_t buflen) case FUSE_LOOKUP: printf(" %s", in.body.lookup); break; + case FUSE_LSEEK: + switch (in.body.lseek.whence) { + case SEEK_HOLE: + printf(" SEEK_HOLE offset=%ld", + in.body.lseek.offset); + break; + case SEEK_DATA: + printf(" SEEK_DATA offset=%ld", + in.body.lseek.offset); + break; + default: + printf(" whence=%u offset=%ld", + in.body.lseek.whence, in.body.lseek.offset); + break; + } + break; case FUSE_MKDIR: name = (const char*)in.body.bytes + sizeof(fuse_mkdir_in); @@ -636,6 +659,10 @@ void MockFS::audit_request(const mockfs_buf_in &in, ssize_t buflen) { EXPECT_EQ(inlen, fih + sizeof(in.body.bmap)); EXPECT_EQ((size_t)buflen, inlen); break; + case FUSE_LSEEK: + EXPECT_EQ(inlen, fih + sizeof(in.body.lseek)); + EXPECT_EQ((size_t)buflen, inlen); + break; case FUSE_NOTIFY_REPLY: case FUSE_BATCH_FORGET: case FUSE_FALLOCATE: diff --git a/tests/sys/fs/fusefs/mockfs.hh b/tests/sys/fs/fusefs/mockfs.hh index 138c125649fd..6fb15089bc23 100644 --- a/tests/sys/fs/fusefs/mockfs.hh +++ b/tests/sys/fs/fusefs/mockfs.hh @@ -170,6 +170,7 @@ union fuse_payloads_in { fuse_link_in link; fuse_listxattr_in listxattr; char lookup[0]; + fuse_lseek_in lseek; fuse_mkdir_in mkdir; fuse_mknod_in mknod; fuse_open_in open; @@ -210,6 +211,7 @@ union fuse_payloads_out { fuse_getxattr_out getxattr; fuse_init_out init; fuse_init_out_7_22 init_7_22; + fuse_lseek_out lseek; /* The inval_entry structure should be followed by the entry's name */ fuse_notify_inval_entry_out inval_entry; fuse_notify_inval_inode_out inval_inode; From owner-dev-commits-src-all@freebsd.org Thu Dec 31 16:36:06 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B701B4C7381; Thu, 31 Dec 2020 16:36:06 +0000 (UTC) (envelope-from gjb@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6DLG4sT2z3FVt; Thu, 31 Dec 2020 16:36:06 +0000 (UTC) (envelope-from gjb@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1609432566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vPys9o4lvgl5Cv29o7h7/Tzd/bWAIBqipqK3AGyUpKo=; b=POZQWKPL48DCIcNxkqbLThhtKj4FFieghT2d/qhBxqLhSLHpYjJg2eL7RD2k5K2XMsHMjn Z5jz/swB+q/WD/ahtQSQPmcUU6lrXsPmic7Kw0fgfOXcyMp4GX0dWC3lWTWdX1kjcPNLcT hhdIUT7G6O6riAOITAM2W/iKgYo4/dtDPGiJhAtAqckPG9NW5dAPi8ioiRFDrsnJdGkjXI lvRWpHgW676HC0AZJJtAh1zAziG41US64Yzw0QLPBXQhgdQFye7MXLXh3TDuiZ1pY7O4se bJH87AOuC61SHoN1S/zT8zpwmMBCccScCTa+kZf3d/1x9oFQpsJvRjQPf9UWlw== Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 445ADEE0B; Thu, 31 Dec 2020 16:36:06 +0000 (UTC) (envelope-from gjb@freebsd.org) Date: Thu, 31 Dec 2020 16:36:03 +0000 From: Glen Barber To: Hans Petter Selasky Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c3e89a30fdc2 - main - copyrights: Happy New Year 2021 Message-ID: <20201231163603.GI1206@FreeBSD.org> References: <202012311529.0BVFTq1s056562@gitrepo.freebsd.org> <1b83bf26-d7ca-9c22-3302-901e4bb0f254@selasky.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="enLffk0M6cffIOOh" Content-Disposition: inline In-Reply-To: <1b83bf26-d7ca-9c22-3302-901e4bb0f254@selasky.org> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1609432566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vPys9o4lvgl5Cv29o7h7/Tzd/bWAIBqipqK3AGyUpKo=; b=M29mUUOtnoEDmhxOrhyD1imriBAhnZLqEdjnH+YF3At91Beu9yV4R7X1u2v0I2yzDSvRtB 0JoZewErQZ6UkEC6sXjaHsKS7qUM2sokpV9MI2qN+NhEeP9TBHGoDfi2UPuLznCDnbj4X2 XRbub0JZKzt1/mGa24Xj7+M6xgw+upR6gh7ka65N8ytasTSVZKYKGHjZctrcDpD57fb627 /yJjEfFYUfos7i0CVsrWX2J/9Vav7b6evPA1oRuKcKqTLCV9wNeDOjLzcz09/md6FnX+rX Y46N53DfE/78Mj5tpaGAlV1hK/Ji3tM22jyK1uhO0sJp5wq3+ln/LookNunA8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1609432566; a=rsa-sha256; cv=none; b=uf18F0d7K4s7ktid22NSa+KOfoSKC4lpJ6Wljjf3yxf1D+/mQCNfGcD6zNOyTa7ApIH0MD kFhH9zU+r7SPuNCV5vqut4MJj4i8YC/puTET3NjTGWQqUciTtiaSdqGFHfdnlUTPKwCEgs Th4Z+3MSzAIXUv2o8TpMOifmBYPqCZ6CIshppLl9r0AsmTEacTMJpRFEguoi8Y0E1+5yx2 gFcq3QKLt96m0KqPtIvJPh6IIvM4Vhwgm5BdE8po2F7xQm/NIbZqHDckZxYFl8Xp+bZ6hi T5NCSYyOCjebFUnsJLXdk186jD2RcvEkkyArHODYQ1CbJH+xELfms0x/43u46w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 16:36:06 -0000 --enLffk0M6cffIOOh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 31, 2020 at 04:32:28PM +0100, Hans Petter Selasky wrote: > On 12/31/20 4:29 PM, Glen Barber wrote: > > The branch main has been updated by gjb: > >=20 > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc3e89a30fdc2c985b73f46ab= 2f414d53945fc00b > >=20 > > commit c3e89a30fdc2c985b73f46ab2f414d53945fc00b > > Author: Glen Barber > > AuthorDate: 2020-12-31 15:23:36 +0000 > > Commit: Glen Barber > > CommitDate: 2020-12-31 15:29:44 +0000 > >=20 > > copyrights: Happy New Year 2021 > > Good riddance 2020. >=20 > Hey hey, it is not midnight yet ;-) >=20 It's 5 o'clock somewhere. :-) Glen --enLffk0M6cffIOOh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAl/t/fMACgkQAxRYpUeP 4pMSJxAAm9bZ3IdcIyUJGAauVKKapDK5uWa2r687vDG38vqYRdEF8s73XO8iE8Om dClPllf4ZoJm6GdBikPP0RPVmme0AKozqDE2AvKzEV4Nj8XNT7Y2DjHBSYS6sJgc YPjX+UARMoJ8gkeG54+EV1X8IA6xPjexhSov0KASdN2PTaHaS0l6OZ8EQrUr7Jeu 7RqE65NupMSP/3ZajGU/s1nzapui/8dXbEnc+7ZxZah8xaqfBYBfJkuKOufh9jX7 8GG1+rpieTPwmvm/t3+D4x8EqpnVTMfZ9umUvF6lKyQRZMwm7e1j4IR3C/PNPCmq kSxluz9W6LV7BYvVkW5wFwM0ChrtZoKzT2IbrJ07gWQtFp9i7WWIL92x7d2pcAaB pjv4d86PIeQ2/YRAS0dqjRo8zp6Aq81iKfaIHq5vqxy3+fhl0xKPKgj7Y9h5ah2I xDsgKfZwmqSvi3bTBlxfP1HO/jyCCyDSVeT33XK0Dz04sZD0mUoUflahR6so0n7m 5yrtPzV9S9etO69TB/qqtYw63ZjODp5qDkdh6wJtLmW38ezUxM5meQoncDsNDIO2 lZ8G0GjnqM2Yq/x3cKE+Sk1blrAiL0G+hQzwT3gW6GeCD5AsxUVXD4wmsm85+hbL pw7AESoYcmOKyBhDV6wDHpY7Ihln7sqTEq4KWd27ACescsqmo38= =4bYo -----END PGP SIGNATURE----- --enLffk0M6cffIOOh-- From owner-dev-commits-src-all@freebsd.org Thu Dec 31 16:37:13 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5A7944C714D; Thu, 31 Dec 2020 16:37:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6DMY2695z3FlR; Thu, 31 Dec 2020 16:37:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3AAB313A97; Thu, 31 Dec 2020 16:37:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVGbDcq043612; Thu, 31 Dec 2020 16:37:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVGbDYN043611; Thu, 31 Dec 2020 16:37:13 GMT (envelope-from git) Date: Thu, 31 Dec 2020 16:37:13 GMT Message-Id: <202012311637.0BVGbDYN043611@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 72cf7db3aaf1 - main - lualoader: add loader_conf_dirs support (loader.conf.d) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 72cf7db3aaf17db412183886f19320e5074dc8b7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 16:37:13 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=72cf7db3aaf17db412183886f19320e5074dc8b7 commit 72cf7db3aaf17db412183886f19320e5074dc8b7 Author: Kyle Evans AuthorDate: 2020-07-10 01:50:15 +0000 Commit: Kyle Evans CommitDate: 2020-12-31 16:37:05 +0000 lualoader: add loader_conf_dirs support (loader.conf.d) loader_conf_dirs is the supporting mechanism for the included /boot/loader.conf.d directory. When lualoader finishes processing all of the loader_conf_files it finds after walking /boot/defaults/loader.conf, it will now check any and all loader_conf_dirs and process files ending in ".conf" as if they were a loader.conf. Note that loader_conf_files may be specified in a loader.conf.d config file, but loader_conf_dirs may *not*. It will only be processed as specified in /boot/defaults/loader.conf and any loader_conf_files that were loaded from there. Reviewed by: allanjude, freqlabs, rpokala, tsoome Includes suggestion from: imp Relnotes: yes Differential Revision: https://reviews.freebsd.org/D25608 --- etc/mtree/BSD.root.dist | 2 ++ stand/defaults/loader.conf | 1 + stand/defaults/loader.conf.5 | 9 ++++++++- stand/lua/config.lua | 24 ++++++++++++++++++++++++ 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist index f93d36a9128d..7e5917c049b9 100644 --- a/etc/mtree/BSD.root.dist +++ b/etc/mtree/BSD.root.dist @@ -22,6 +22,8 @@ .. firmware .. + loader.conf.d tags=package=bootloader + .. lua .. kernel diff --git a/stand/defaults/loader.conf b/stand/defaults/loader.conf index 55f9983dfc8b..7bca621e6703 100644 --- a/stand/defaults/loader.conf +++ b/stand/defaults/loader.conf @@ -15,6 +15,7 @@ kernel="kernel" # /boot sub-directory containing kernel and modules bootfile="kernel" # Kernel name (possibly absolute path) kernel_options="" # Flags to be passed to the kernel loader_conf_files="/boot/device.hints /boot/loader.conf /boot/loader.conf.local" +loader_conf_dirs="/boot/loader.conf.d" nextboot_conf="/boot/nextboot.conf" verbose_loading="NO" # Set to YES for verbose loader output diff --git a/stand/defaults/loader.conf.5 b/stand/defaults/loader.conf.5 index 35e59bc920c6..1053191ec181 100644 --- a/stand/defaults/loader.conf.5 +++ b/stand/defaults/loader.conf.5 @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd April 29, 2020 +.Dd December 31, 2020 .Dt LOADER.CONF 5 .Os .Sh NAME @@ -87,6 +87,11 @@ than so its use should be avoided. Multiple instances of it will be processed independently. +.It Ar loader_conf_dirs +Space separated list of directories to process for configuration files. +The lua-based loader will process files with a +.Dq .conf +suffix that are placed in these directories. .It Ar loader_conf_files Defines additional configuration files to be processed right after the present file. @@ -252,6 +257,8 @@ The following values are accepted: Space or comma separated list of kernels to present in the boot menu. .It Va loader_conf_files .Pq Dq Pa /boot/loader.conf /boot/loader.conf.local +.It Va loader_conf_dirs +.Pq Dq Pa /boot/loader.conf.d .It Va splash_bmp_load .Pq Dq NO If set to diff --git a/stand/lua/config.lua b/stand/lua/config.lua index 2eb10f7c7727..095d354c637b 100644 --- a/stand/lua/config.lua +++ b/stand/lua/config.lua @@ -39,6 +39,7 @@ local env_changed = {} -- Values to restore env to (nil to unset) local env_restore = {} +local MSG_FAILDIR = "Failed to load conf dir '%s': not a directory" local MSG_FAILEXEC = "Failed to exec '%s'" local MSG_FAILSETENV = "Failed to '%s' with value: %s" local MSG_FAILOPENCFG = "Failed to open config: '%s'" @@ -506,6 +507,8 @@ function config.readConf(file, loaded_files) return end + -- We'll process loader_conf_dirs at the top-level readConf + local load_conf_dirs = next(loaded_files) == nil print("Loading " .. file) -- The final value of loader_conf_files is not important, so just @@ -529,6 +532,27 @@ function config.readConf(file, loaded_files) config.readConf(name, loaded_files) end end + + if load_conf_dirs then + local loader_conf_dirs = getEnv("loader_conf_dirs") + if loader_conf_dirs ~= nil then + for name in loader_conf_dirs:gmatch("[%w%p]+") do + if lfs.attributes(name, "mode") ~= "directory" then + print(MSG_FAILDIR:format(name)) + goto nextdir + end + for cfile in lfs.dir(name) do + if cfile:match(".conf$") then + local fpath = name .. "/" .. cfile + if lfs.attributes(fpath, "mode") == "file" then + config.readConf(fpath, loaded_files) + end + end + end + ::nextdir:: + end + end + end end -- other_kernel is optionally the name of a kernel to load, if not the default From owner-dev-commits-src-all@freebsd.org Thu Dec 31 17:05:34 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E4FE54C86A5; Thu, 31 Dec 2020 17:05:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6F0G67zNz3HpB; Thu, 31 Dec 2020 17:05:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6131140AC; Thu, 31 Dec 2020 17:05:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVH5YNo080198; Thu, 31 Dec 2020 17:05:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVH5YNB080196; Thu, 31 Dec 2020 17:05:34 GMT (envelope-from git) Date: Thu, 31 Dec 2020 17:05:34 GMT Message-Id: <202012311705.0BVH5YNB080196@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Stefan Eßer Subject: git: de924aa90ca0 - stable/12 - MFC: Fix calendar -a processing of files included in the user's home directory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: de924aa90ca0d5bd7bbb31125864f0ffca021495 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 17:05:35 -0000 The branch stable/12 has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=de924aa90ca0d5bd7bbb31125864f0ffca021495 commit de924aa90ca0d5bd7bbb31125864f0ffca021495 Author: Stefan Eßer AuthorDate: 2020-10-29 08:26:38 +0000 Commit: Stefan Eßer CommitDate: 2020-12-31 17:04:47 +0000 MFC: Fix calendar -a processing of files included in the user's home directory The existing code performed a chdir() into the home directory, but the parser fell back to using the invoking user's home directory as the base directory for the search for an include file. Since use of the -a option is limited to UID==0, the directory searched was typically ~root/.calendar, not the .calendar directory of the user whose file is being processed. PR: 205580 Reported by: greg.bal4@gmail.com (Greg Balfour) MFC after: 3 days (cherry picked from commit 3fa2a149d68d22fa32ba7b6c09773388ac490fd1) The code in -CURRENT is quite different (forks sub-processes tp process the files for each user) but this change should provide the same functionality as the referenced commit to -CURRENT. --- usr.bin/calendar/calendar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.bin/calendar/calendar.c b/usr.bin/calendar/calendar.c index a9e6c19e9a0d..6293d15a4e10 100644 --- a/usr.bin/calendar/calendar.c +++ b/usr.bin/calendar/calendar.c @@ -221,8 +221,10 @@ main(int argc, char *argv[]) (void)setegid(pw->pw_gid); (void)initgroups(pw->pw_name, pw->pw_gid); (void)seteuid(pw->pw_uid); - if (!chdir(pw->pw_dir)) + if (!chdir(pw->pw_dir)) { + setenv("HOME", pw->pw_dir, 1); cal(); + } (void)seteuid(0); } else From owner-dev-commits-src-all@freebsd.org Thu Dec 31 17:10:18 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 586A44C8751; Thu, 31 Dec 2020 17:10:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6F5k25MTz3JWF; Thu, 31 Dec 2020 17:10:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3ACA313E51; Thu, 31 Dec 2020 17:10:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVHAIH8086988; Thu, 31 Dec 2020 17:10:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVHAIOI086982; Thu, 31 Dec 2020 17:10:18 GMT (envelope-from git) Date: Thu, 31 Dec 2020 17:10:18 GMT Message-Id: <202012311710.0BVHAIOI086982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: be4663433724 - main - vt: more carefully handle vt_allocate_keyboard grab work MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be46634337248029333a434c235c8424279b30b4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 17:10:18 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=be46634337248029333a434c235c8424279b30b4 commit be46634337248029333a434c235c8424279b30b4 Author: Kyle Evans AuthorDate: 2020-12-31 16:45:41 +0000 Commit: Kyle Evans CommitDate: 2020-12-31 17:10:11 +0000 vt: more carefully handle vt_allocate_keyboard grab work vt_allocate_keyboard only needs to unwind the effects of keyboard-grabbing, rather than any associated vt window action that may have also happened. Split out the bits that do the keyboard work into *_noswitch equivalents, and use those in keyboard allocation. This will be less error-prone when a later change will offer up different window state behavior when the console is ungrabbed. Reviewed by: ray Differential Revision: https://reviews.freebsd.org/D27110 --- sys/dev/vt/vt_core.c | 79 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 55 insertions(+), 24 deletions(-) diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index f840f7ba37f6..c273b703de93 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -63,6 +63,9 @@ __FBSDID("$FreeBSD$"); #include #endif +static int vtterm_cngrab_noswitch(struct vt_device *, struct vt_window *); +static int vtterm_cnungrab_noswitch(struct vt_device *, struct vt_window *); + static tc_bell_t vtterm_bell; static tc_cursor_t vtterm_cursor; static tc_putchar_t vtterm_putchar; @@ -1030,7 +1033,7 @@ vt_allocate_keyboard(struct vt_device *vd) if (vd->vd_curwindow == &vt_conswindow) { grabbed = vd->vd_curwindow->vw_grabbed; for (i = 0; i < grabbed; ++i) - vtterm_cnungrab(vd->vd_curwindow->vw_terminal); + vtterm_cnungrab_noswitch(vd, vd->vd_curwindow); } idx0 = kbd_allocate("kbdmux", -1, vd, vt_kbdevent, vd); @@ -1068,7 +1071,7 @@ vt_allocate_keyboard(struct vt_device *vd) if (vd->vd_curwindow == &vt_conswindow) { for (i = 0; i < grabbed; ++i) - vtterm_cngrab(vd->vd_curwindow->vw_terminal); + vtterm_cngrab_noswitch(vd, vd->vd_curwindow); } return (idx0); @@ -1740,24 +1743,24 @@ vtterm_cngetc(struct terminal *tm) return (-1); } -static void -vtterm_cngrab(struct terminal *tm) +/* + * These two do most of what we want to do in vtterm_cnungrab, but without + * actually switching windows. This is necessary for, e.g., + * vt_allocate_keyboard() to get the current keyboard into the state it needs to + * be in without damaging the device's window state. + * + * Both return the current grab count, though it's only used in vtterm_cnungrab. + */ +static int +vtterm_cngrab_noswitch(struct vt_device *vd, struct vt_window *vw) { - struct vt_device *vd; - struct vt_window *vw; keyboard_t *kbd; - vw = tm->tm_softc; - vd = vw->vw_device; - - if (!cold) - vt_window_switch(vw); + if (vw->vw_grabbed++ > 0) + return (vw->vw_grabbed); if ((kbd = vd->vd_keyboard) == NULL) - return; - - if (vw->vw_grabbed++ > 0) - return; + return (1); /* * Make sure the keyboard is accessible even when the kbd device @@ -1771,29 +1774,57 @@ vtterm_cngrab(struct terminal *tm) vt_update_kbd_mode(vw, kbd); kbdd_poll(kbd, TRUE); + return (1); +} + +static int +vtterm_cnungrab_noswitch(struct vt_device *vd, struct vt_window *vw) +{ + keyboard_t *kbd; + + if (--vw->vw_grabbed > 0) + return (vw->vw_grabbed); + + if ((kbd = vd->vd_keyboard) == NULL) + return (0); + + kbdd_poll(kbd, FALSE); + + vw->vw_kbdmode = vw->vw_prev_kbdmode; + vt_update_kbd_mode(vw, kbd); + kbdd_disable(kbd); + return (0); } static void -vtterm_cnungrab(struct terminal *tm) +vtterm_cngrab(struct terminal *tm) { struct vt_device *vd; struct vt_window *vw; - keyboard_t *kbd; vw = tm->tm_softc; vd = vw->vw_device; - if ((kbd = vd->vd_keyboard) == NULL) - return; - if (--vw->vw_grabbed > 0) + if (!cold) + vt_window_switch(vw); + + vtterm_cngrab_noswitch(vd, vw); +} + +static void +vtterm_cnungrab(struct terminal *tm) +{ + struct vt_device *vd; + struct vt_window *vw; + + vw = tm->tm_softc; + vd = vw->vw_device; + + if (vtterm_cnungrab_noswitch(vd, vw) != 0) return; - kbdd_poll(kbd, FALSE); - vw->vw_kbdmode = vw->vw_prev_kbdmode; - vt_update_kbd_mode(vw, kbd); - kbdd_disable(kbd); } static void From owner-dev-commits-src-all@freebsd.org Thu Dec 31 17:10:18 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F52A4C8997; Thu, 31 Dec 2020 17:10:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6F5k1Hztz3JSD; Thu, 31 Dec 2020 17:10:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F90B13E50; Thu, 31 Dec 2020 17:10:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVHAIk8086936; Thu, 31 Dec 2020 17:10:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVHAIfK086928; Thu, 31 Dec 2020 17:10:18 GMT (envelope-from git) Date: Thu, 31 Dec 2020 17:10:18 GMT Message-Id: <202012311710.0BVHAIfK086928@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: c4a0333b55e0 - main - vt: restore tty when console is ungrabbed MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c4a0333b55e08f38985828a3a2d3ee533325c568 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 17:10:18 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=c4a0333b55e08f38985828a3a2d3ee533325c568 commit c4a0333b55e08f38985828a3a2d3ee533325c568 Author: Kyle Evans AuthorDate: 2020-12-31 16:50:43 +0000 Commit: Kyle Evans CommitDate: 2020-12-31 17:10:11 +0000 vt: restore tty when console is ungrabbed When a break-to-debugger is triggered, kdb will grab the console and vt(4) will generally switch back to ttyv0. If one issues a continue from the debugger, then kdb will ungrab the console and the system rolls on. This change adds a perhaps minor feature: when we're down to grab == 0 and if vt actually switched away to ttyv0, switch back to the tty it was previously on before the console was grabbed. The justification behind this is that a typical flow is to work in !ttyv0 to avoid console spam while occasionally dropping to ddb to inspect system state before returning. This could easily enough be tossed behind a sysctl or something if it's not generally appreciated, but I anticipate indifference. Reviewed by: ray Differential Revision: https://reviews.freebsd.org/D27110 --- sys/dev/vt/vt.h | 1 + sys/dev/vt/vt_core.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/sys/dev/vt/vt.h b/sys/dev/vt/vt.h index 7d960f68e83f..2d671d692384 100644 --- a/sys/dev/vt/vt.h +++ b/sys/dev/vt/vt.h @@ -124,6 +124,7 @@ struct vt_device { struct vt_window *vd_windows[VT_MAXWINDOWS]; /* (c) Windows. */ struct vt_window *vd_curwindow; /* (d) Current window. */ struct vt_window *vd_savedwindow;/* (?) Saved for suspend. */ + struct vt_window *vd_grabwindow; /* (?) Saved before cngrab. */ struct vt_pastebuf vd_pastebuf; /* (?) Copy/paste buf. */ const struct vt_driver *vd_driver; /* (c) Graphics driver. */ void *vd_softc; /* (u) Driver data. */ diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index c273b703de93..2352ed823424 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -1805,6 +1805,9 @@ vtterm_cngrab(struct terminal *tm) vw = tm->tm_softc; vd = vw->vw_device; + /* To be restored after we ungrab. */ + if (vd->vd_grabwindow == NULL) + vd->vd_grabwindow = vd->vd_curwindow; if (!cold) vt_window_switch(vw); @@ -1821,10 +1824,14 @@ vtterm_cnungrab(struct terminal *tm) vw = tm->tm_softc; vd = vw->vw_device; + MPASS(vd->vd_grabwindow != NULL); if (vtterm_cnungrab_noswitch(vd, vw) != 0) return; + if (!cold && vd->vd_grabwindow != vw) + vt_window_switch(vd->vd_grabwindow); + vd->vd_grabwindow = NULL; } static void From owner-dev-commits-src-all@freebsd.org Thu Dec 31 17:13:33 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B9E14C8A47; Thu, 31 Dec 2020 17:13:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6F9T0FYtz3KSb; Thu, 31 Dec 2020 17:13:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFB18141C8; Thu, 31 Dec 2020 17:13:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVHDWqY092198; Thu, 31 Dec 2020 17:13:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVHDWuB092197; Thu, 31 Dec 2020 17:13:32 GMT (envelope-from git) Date: Thu, 31 Dec 2020 17:13:32 GMT Message-Id: <202012311713.0BVHDWuB092197@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 202aea9c82ea - main - arm: tune vmparam.h towards a little more modern MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 202aea9c82eaab1c73351d4e971347c4109ef59b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 17:13:33 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=202aea9c82eaab1c73351d4e971347c4109ef59b commit 202aea9c82eaab1c73351d4e971347c4109ef59b Author: Kyle Evans AuthorDate: 2020-12-31 17:12:39 +0000 Commit: Kyle Evans CommitDate: 2020-12-31 17:13:13 +0000 arm: tune vmparam.h towards a little more modern An 8MB max stack size is quite limiting in today's world, and in-fact is the *default* stack size for almost every other arch (including mips). Raise the default to 4MB (should be pretty reasonable) and the max to 64MB. NetBSD made a similar move back in 2015 and raised MAXDSIZ to 1856 at the same time, so let's just roll that in as well. They later lowered it, but eventually raised it back to 1856 in order to build rust. This was noticed while looking at qemu-bsd-user's default stack sizes and growth behavior (or lack thereof). Reviewed by: ian Differential Revision: https://reviews.freebsd.org/D27218 --- sys/arm/include/vmparam.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm/include/vmparam.h b/sys/arm/include/vmparam.h index 2fa2c59305cb..d37a81ae6212 100644 --- a/sys/arm/include/vmparam.h +++ b/sys/arm/include/vmparam.h @@ -50,13 +50,13 @@ #define DFLDSIZ (128UL*1024*1024) /* initial data size limit */ #endif #ifndef MAXDSIZ -#define MAXDSIZ (512UL*1024*1024) /* max data size */ +#define MAXDSIZ (1856UL*1024*1024) /* max data size */ #endif #ifndef DFLSSIZ -#define DFLSSIZ (2UL*1024*1024) /* initial stack size limit */ +#define DFLSSIZ (4UL*1024*1024) /* initial stack size limit */ #endif #ifndef MAXSSIZ -#define MAXSSIZ (8UL*1024*1024) /* max stack size */ +#define MAXSSIZ (64UL*1024*1024) /* max stack size */ #endif #ifndef SGROWSIZ #define SGROWSIZ (128UL*1024) /* amount to grow stack */ From owner-dev-commits-src-all@freebsd.org Thu Dec 31 17:17:51 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A16644C8CC6; Thu, 31 Dec 2020 17:17:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6FGR48ZWz3Kp4; Thu, 31 Dec 2020 17:17:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 817AD14510; Thu, 31 Dec 2020 17:17:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVHHpxK092949; Thu, 31 Dec 2020 17:17:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVHHp4G092948; Thu, 31 Dec 2020 17:17:51 GMT (envelope-from git) Date: Thu, 31 Dec 2020 17:17:51 GMT Message-Id: <202012311717.0BVHHp4G092948@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: ac5f382a9d0a - main - stand: properly declare subdir deps or .WAIT, do parallel build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ac5f382a9d0a26685b92b49abb845d3b30ea5f91 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 17:17:51 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=ac5f382a9d0a26685b92b49abb845d3b30ea5f91 commit ac5f382a9d0a26685b92b49abb845d3b30ea5f91 Author: Kyle Evans AuthorDate: 2020-12-31 17:15:45 +0000 Commit: Kyle Evans CommitDate: 2020-12-31 17:15:45 +0000 stand: properly declare subdir deps or .WAIT, do parallel build buildworld already runs the stand build in parallel[1], so make it easier to identify ordering issues by properly establishing dependencies or adding .WAIT where needed. Everything in stand/ relies on libsa, either directly or indirectly, because libsa build is where the stand headers get installed and it gets linked in most places. Interpreters depend on their libs, machine dirs usually depend on top-level libs that are getting built and at least one of the interpreter flavors. For i386, order btx/libi386/libfirewire before everything else using a big-ol-.WAIT hammer. btx is the most common dependency, but the others are used sporadically. This seems to be where the race reporting on the mailing list is- AFAICT, the following sequence is happening: 1.) One of the loaders gets built based on stale btx/btxldr 2.) btx/btxldr gets rebuilt 3.) installworld triggers loader rebuild because btx was rebuilt after This seems like the most plausible explanation, as they've verified system time and timestamps. While we're here, let's switch stand/ over to a completely parallel build so we can work out these kinds of issues in isolation rather than in the middle of a larger build. Reviewed by: bdragon, sjg, tsoome Tested by: bdragon (-j1024, no failures, significant speed improvement) Differential Revision: https://reviews.freebsd.org/D23411 --- stand/Makefile | 40 ++++++++++++++++++++++++++++++++++++++-- stand/Makefile.amd64 | 4 ++++ stand/Makefile.inc | 2 ++ stand/efi/Makefile | 6 +++++- stand/i386/Makefile | 13 ++++++++++--- 5 files changed, 59 insertions(+), 6 deletions(-) diff --git a/stand/Makefile b/stand/Makefile index bacf39e26eca..d7bcb4bfbca2 100644 --- a/stand/Makefile +++ b/stand/Makefile @@ -11,22 +11,44 @@ LIB32LIST=libsa ficl liblua S.yes+= libsa +S.${MK_LOADER_OFW}+= libofw +S.${MK_FDT}+= fdt + S.${MK_FORTH}+= ficl S.${MK_FORTH}+= forth S.${MK_LOADER_LUA}+= liblua S.${MK_LOADER_LUA}+= lua -S.${MK_FDT}+= fdt -S.${MK_LOADER_OFW}+= libofw S.yes+= defaults S.yes+= man +.if ${MK_FORTH} != "no" +INTERP_DEPENDS+= forth +.endif +.if ${MK_LOADER_LUA} != "no" +INTERP_DEPENDS+= lua +.endif + .include S.${MK_EFI}+= efi S.${MK_LOADER_UBOOT}+= uboot +.if defined(LIB32LIST) +LIB32DEPENDS= ${LIB32LIST:S/$/32/} +.endif + .if exists(${.CURDIR}/${MACHINE}/.) S.yes+= ${MACHINE} +SUBDIR_DEPEND_${MACHINE}+= ${INTERP_DEPENDS} +.if ${MK_FDT} != "no" +SUBDIR_DEPEND_${MACHINE}+= fdt +.endif +.if ${MK_LOADER_UBOOT} != "no" +SUBDIR_DEPEND_${MACHINE}+= uboot +.endif +.if ${MK_LOADER_OFW} != "no" +SUBDIR_DEPEND_${MACHINE}+= libofw +.endif .endif # Build the actual subdir list from S.yes, adding in the 32-bit @@ -36,6 +58,20 @@ SUBDIR+=${_x} .if defined(LIB32LIST) && ${LIB32LIST:M${_x}} SUBDIR+=${_x}32 .endif +.if ${_x} != "libsa" +SUBDIR_DEPEND_${_x}+= libsa +SUBDIR_DEPEND_${_x}32+= libsa32 +.endif .endfor +# Remaining dependencies +SUBDIR_DEPEND_libsa32+= libsa + +SUBDIR_DEPEND_forth+= ficl +SUBDIR_DEPEND_lua+= liblua + +SUBDIR_DEPEND_efi+= fdt + +SUBDIR_PARALLEL= yes + .include diff --git a/stand/Makefile.amd64 b/stand/Makefile.amd64 index b2b918ebed5b..9ee3649071b2 100644 --- a/stand/Makefile.amd64 +++ b/stand/Makefile.amd64 @@ -2,3 +2,7 @@ S.yes+= userboot S.yes+= i386 + +SUBDIR_DEPEND_userboot+= ${INTERP_DEPENDS} +# These won't get tacked on in an amd64 build +SUBDIR_DEPEND_i386+= ${LIB32DEPENDS} ${INTERP_DEPENDS} diff --git a/stand/Makefile.inc b/stand/Makefile.inc index d7b9d228287e..aa7cfa14542f 100644 --- a/stand/Makefile.inc +++ b/stand/Makefile.inc @@ -1,3 +1,5 @@ # $FreeBSD$ +SUBDIR_PARALLEL= yes + .include "defs.mk" diff --git a/stand/efi/Makefile b/stand/efi/Makefile index f6cbede52bd5..94cb5bba5638 100644 --- a/stand/efi/Makefile +++ b/stand/efi/Makefile @@ -4,8 +4,12 @@ NO_OBJ=t .include +SUBDIR.yes+= libefi SUBDIR.${MK_FDT}+= fdt -SUBDIR.yes+= libefi boot1 gptboot +SUBDIR.yes+= .WAIT + +SUBDIR.yes+= boot1 gptboot + SUBDIR.${MK_FORTH}+= loader_4th SUBDIR.${MK_LOADER_LUA}+= loader_lua SUBDIR.yes+= loader_simp diff --git a/stand/i386/Makefile b/stand/i386/Makefile index a9d402acf609..9aa33462f309 100644 --- a/stand/i386/Makefile +++ b/stand/i386/Makefile @@ -4,10 +4,15 @@ NO_OBJ=t .include -SUBDIR.yes= mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot \ - isoboot libi386 - +# Almost everything else here relies on btxldr, so we must make sure it's built +# before everything else proceeds so we don't end up building against a stale +# btxldr and ending up with a build-during-install scenario. +SUBDIR.yes+= btx libi386 SUBDIR.${MK_LOADER_FIREWIRE}+= libfirewire +SUBDIR.yes+= .WAIT + +SUBDIR.yes+= mbr pmbr boot0 boot0sio boot2 cdboot gptboot \ + isoboot SUBDIR.${MK_FORTH}+= loader_4th SUBDIR.${MK_LOADER_LUA}+= loader_lua @@ -18,4 +23,6 @@ SUBDIR.yes+= pxeldr SUBDIR.${MK_LOADER_ZFS}+= zfsboot gptzfsboot +SUBDIR_DEPEND_pxeldr+= loader_${LOADER_DEFAULT_INTERP} + .include From owner-dev-commits-src-all@freebsd.org Thu Dec 31 18:25:36 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 810114CA7D1; Thu, 31 Dec 2020 18:25:36 +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 4D6Gmc2z75z3Nsv; Thu, 31 Dec 2020 18:25:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:6d91:ae61:b3ec:ca03]) (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 6EC7B219AC; Thu, 31 Dec 2020 18:25:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL To: rgrimes@freebsd.org, Ryan Libby Cc: Warner Losh , Glen Barber , Kyle Evans , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202012302118.0BULIuGd083574@gndrsh.dnsmgr.net> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Thu, 31 Dec 2020 10:25:34 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <202012302118.0BULIuGd083574@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 18:25:36 -0000 On 12/30/20 1:18 PM, Rodney W. Grimes wrote: > Take for example all the files in /etc, these files can easily > at present often be tracked back to exactly what release installed > them cause the $FreeBSD$ points you at it. These files are often > modified by local administrators, and with out knowing what version > they started out it is a crap shoot to ever figure it out unless > the local mods are minor and you get lucky. > > Contractors are some times hired to go in and upgrade or clean up > after someone else did work, and not having this information and > telling them to go dig in git to try and figure out the state of > there system is pretty much a non-started, well at least it is for > me. Have you seen 'etcupdate diff'? With pkgbase I'm hopeful we will have a similar 'pkg confdiff' type functionality (for ports as well as base) where packages keep stock config files around while installed that existing ones can be compared against (and that can be used for 3 way merges during upgrades similar to what etcupdate does). (etcupdate diff is explicitly designed due to experience in sysadmin mode and etcupdate in general is designed with the goal of rolling out new snapshots to fleets of machines requiring minimal user intervention) -- John Baldwin From owner-dev-commits-src-all@freebsd.org Thu Dec 31 18:32:20 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 316D64CAC67; Thu, 31 Dec 2020 18:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6GwN0vSrz3PWl; Thu, 31 Dec 2020 18:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 113FA14F5D; Thu, 31 Dec 2020 18:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVIWKis088826; Thu, 31 Dec 2020 18:32:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVIWKwI088825; Thu, 31 Dec 2020 18:32:20 GMT (envelope-from git) Date: Thu, 31 Dec 2020 18:32:20 GMT Message-Id: <202012311832.0BVIWKwI088825@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 1fc421287d5d - main - libc: tests: add some tests for cpuset(2) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1fc421287d5ddbcfba99412cf968ee3490383fe7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 18:32:20 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=1fc421287d5ddbcfba99412cf968ee3490383fe7 commit 1fc421287d5ddbcfba99412cf968ee3490383fe7 Author: Kyle Evans AuthorDate: 2020-12-31 18:30:43 +0000 Commit: Kyle Evans CommitDate: 2020-12-31 18:31:54 +0000 libc: tests: add some tests for cpuset(2) The cpuset(2) tests should be run as root (require.user properly set) with >= 3 cpus for maximum coverage. All tests that want to modify the cpuset don't assume any particular cpu layout (i.e. the first cpu may not be 0, the last may not be first + count) and the following scenarios are tested: 1.) newset: basic execute cpuset() to grab a new cpuset, make sure the assigned cpuset then has a different ID. 2.) transient: create a new cpuset then assign the process its original cpuset, ensuring that the one we created is now gone. 3.) deadlk: test assigning an anonymous mask, then resetting the process base affinity with 1-cpu overlap w.r.t. the anonymous mask and with 0-cpu overlap w.r.t. the anonymous mask. 4.) jail_attach_newbase: process attaches to a jail with its own cpuset+mask (e.g. cpuset -c -l 1,2 jail -c path=/ command=/bin/sh) 5.) jail_attach_newbase_plain: process attaches to a jail with its own cpuset (e.g. cpuset -c jail -c path=/ command=/bin/sh) 6.) jail_attach_prevbase: process attaches to a jail with the containing jail's root cpuset (e.g. jail -c path=/ command=/bin/sh) 7.) jail_attach_plain: process attaches to a jail with the containing jail's root cpuset+mask. 8.) badparent: creates a new cpuset and modifies the anonymous thread mask, then setid's back to the original and checks that cpuset_getid() returns the expected set. Differential Revision: https://reviews.freebsd.org/D27307 --- lib/libc/tests/sys/Makefile | 1 + lib/libc/tests/sys/cpuset_test.c | 493 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 494 insertions(+) diff --git a/lib/libc/tests/sys/Makefile b/lib/libc/tests/sys/Makefile index 1aa0443afd8b..e4a1bf30a8f9 100644 --- a/lib/libc/tests/sys/Makefile +++ b/lib/libc/tests/sys/Makefile @@ -7,6 +7,7 @@ PACKAGE= tests .if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "riscv" ATF_TESTS_C+= brk_test .endif +ATF_TESTS_C+= cpuset_test ATF_TESTS_C+= queue_test ATF_TESTS_C+= sendfile_test diff --git a/lib/libc/tests/sys/cpuset_test.c b/lib/libc/tests/sys/cpuset_test.c new file mode 100644 index 000000000000..d6dd69e7e3c1 --- /dev/null +++ b/lib/libc/tests/sys/cpuset_test.c @@ -0,0 +1,493 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2020 Kyle Evans + * + * 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 + +#define SP_PARENT 0 +#define SP_CHILD 1 + +struct jail_test_info { + cpuset_t jail_tidmask; + cpusetid_t jail_cpuset; + cpusetid_t jail_child_cpuset; +}; + +struct jail_test_cb_params { + struct jail_test_info info; + cpuset_t mask; + cpusetid_t rootid; + cpusetid_t setid; +}; + +typedef void (*jail_test_cb)(struct jail_test_cb_params *); + +#define FAILURE_JAIL 42 +#define FAILURE_MASK 43 +#define FAILURE_JAILSET 44 +#define FAILURE_PIDSET 45 +#define FAILURE_SEND 46 + +static const char * +do_jail_errstr(int error) +{ + + switch (error) { + case FAILURE_JAIL: + return ("jail_set(2) failed"); + case FAILURE_MASK: + return ("Failed to get the thread cpuset mask"); + case FAILURE_JAILSET: + return ("Failed to get the jail setid"); + case FAILURE_PIDSET: + return ("Failed to get the pid setid"); + case FAILURE_SEND: + return ("Failed to send(2) cpuset information"); + default: + return (NULL); + } +} + +static void +skip_ltncpu(int ncpu, cpuset_t *mask) +{ + + CPU_ZERO(mask); + ATF_REQUIRE_EQ(0, cpuset_getaffinity(CPU_LEVEL_CPUSET, CPU_WHICH_PID, + -1, sizeof(*mask), mask)); + if (CPU_COUNT(mask) < ncpu) + atf_tc_skip("Test requires %d or more cores.", ncpu); +} + +ATF_TC(newset); +ATF_TC_HEAD(newset, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test cpuset(2)"); +} +ATF_TC_BODY(newset, tc) +{ + cpusetid_t nsetid, setid, qsetid; + + /* Obtain our initial set id. */ + ATF_REQUIRE_EQ(0, cpuset_getid(CPU_LEVEL_CPUSET, CPU_WHICH_TID, -1, + &setid)); + + /* Create a new one. */ + ATF_REQUIRE_EQ(0, cpuset(&nsetid)); + ATF_CHECK(nsetid != setid); + + /* Query id again, make sure it's equal to the one we just got. */ + ATF_REQUIRE_EQ(0, cpuset_getid(CPU_LEVEL_CPUSET, CPU_WHICH_TID, -1, + &qsetid)); + ATF_CHECK_EQ(nsetid, qsetid); +} + +ATF_TC(transient); +ATF_TC_HEAD(transient, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test that transient cpusets are freed."); +} +ATF_TC_BODY(transient, tc) +{ + cpusetid_t isetid, scratch, setid; + + ATF_REQUIRE_EQ(0, cpuset_getid(CPU_LEVEL_CPUSET, CPU_WHICH_PID, -1, + &isetid)); + + ATF_REQUIRE_EQ(0, cpuset(&setid)); + ATF_REQUIRE_EQ(0, cpuset_getid(CPU_LEVEL_CPUSET, CPU_WHICH_CPUSET, + setid, &scratch)); + + /* + * Return back to our initial cpuset; the kernel should free the cpuset + * we just created. + */ + ATF_REQUIRE_EQ(0, cpuset_setid(CPU_WHICH_PID, -1, isetid)); + ATF_REQUIRE_EQ(-1, cpuset_getid(CPU_LEVEL_CPUSET, CPU_WHICH_CPUSET, + setid, &scratch)); + ATF_CHECK_EQ(ESRCH, errno); +} + +ATF_TC(deadlk); +ATF_TC_HEAD(deadlk, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test against disjoint cpusets."); + atf_tc_set_md_var(tc, "require.user", "root"); +} +ATF_TC_BODY(deadlk, tc) +{ + cpusetid_t setid; + cpuset_t dismask, mask, omask; + int fcpu, i, found, ncpu, second; + + /* Make sure we have 3 cpus, so we test partial overlap. */ + skip_ltncpu(3, &omask); + + ATF_REQUIRE_EQ(0, cpuset(&setid)); + CPU_ZERO(&mask); + CPU_ZERO(&dismask); + CPU_COPY(&omask, &mask); + CPU_COPY(&omask, &dismask); + fcpu = CPU_FFS(&mask); + ncpu = CPU_COUNT(&mask); + + /* + * Turn off all but the first two for mask, turn off the first for + * dismask and turn them all off for both after the third. + */ + for (i = fcpu - 1, found = 0; i < CPU_MAXSIZE && found != ncpu; i++) { + if (CPU_ISSET(i, &omask)) { + found++; + if (found == 1) { + CPU_CLR(i, &dismask); + } else if (found == 2) { + second = i; + } else if (found >= 3) { + CPU_CLR(i, &mask); + if (found > 3) + CPU_CLR(i, &dismask); + } + } + } + + ATF_REQUIRE_EQ(0, cpuset_setaffinity(CPU_LEVEL_CPUSET, CPU_WHICH_PID, + -1, sizeof(mask), &mask)); + + /* Must be a strict subset! */ + ATF_REQUIRE_EQ(-1, cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, + -1, sizeof(dismask), &dismask)); + ATF_REQUIRE_EQ(EINVAL, errno); + + /* + * We'll set our anonymous set to the 0,1 set that currently matches + * the process. If we then set the process to the 1,2 set that's in + * dismask, we should then personally be restricted down to the single + * overlapping CPOU. + */ + ATF_REQUIRE_EQ(0, cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, + -1, sizeof(mask), &mask)); + ATF_REQUIRE_EQ(0, cpuset_setaffinity(CPU_LEVEL_CPUSET, CPU_WHICH_PID, + -1, sizeof(dismask), &dismask)); + ATF_REQUIRE_EQ(0, cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, + -1, sizeof(mask), &mask)); + ATF_REQUIRE_EQ(1, CPU_COUNT(&mask)); + ATF_REQUIRE(CPU_ISSET(second, &mask)); + + /* + * Finally, clearing the overlap and attempting to set the process + * cpuset to a completely disjoint mask should fail, because this + * process will then not have anything to run on. + */ + CPU_CLR(second, &dismask); + ATF_REQUIRE_EQ(-1, cpuset_setaffinity(CPU_LEVEL_CPUSET, CPU_WHICH_PID, + -1, sizeof(dismask), &dismask)); + ATF_REQUIRE_EQ(EDEADLK, errno); +} + +static int +do_jail(int sock) +{ + struct jail_test_info info; + struct iovec iov[2]; + char *name; + int error; + + if (asprintf(&name, "cpuset_%d", getpid()) == -1) + _exit(42); + + iov[0].iov_base = "name"; + iov[0].iov_len = 5; + + iov[1].iov_base = name; + iov[1].iov_len = strlen(name) + 1; + + if (jail_set(iov, 2, JAIL_CREATE | JAIL_ATTACH) < 0) + return (FAILURE_JAIL); + + /* Record parameters, kick them over, then make a swift exit. */ + CPU_ZERO(&info.jail_tidmask); + error = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, + -1, sizeof(info.jail_tidmask), &info.jail_tidmask); + if (error != 0) + return (FAILURE_MASK); + + error = cpuset_getid(CPU_LEVEL_ROOT, CPU_WHICH_TID, -1, + &info.jail_cpuset); + if (error != 0) + return (FAILURE_JAILSET); + error = cpuset_getid(CPU_LEVEL_CPUSET, CPU_WHICH_TID, -1, + &info.jail_child_cpuset); + if (error != 0) + return (FAILURE_PIDSET); + if (send(sock, &info, sizeof(info), 0) != sizeof(info)) + return (FAILURE_SEND); + return (0); +} + +static void +do_jail_test(int ncpu, bool newset, jail_test_cb prologue, + jail_test_cb epilogue) +{ + struct jail_test_cb_params cbp; + const char *errstr; + pid_t pid; + int error, sock, sockpair[2], status; + + memset(&cbp.info, '\0', sizeof(cbp.info)); + + skip_ltncpu(ncpu, &cbp.mask); + + ATF_REQUIRE_EQ(0, cpuset_getid(CPU_LEVEL_ROOT, CPU_WHICH_PID, -1, + &cbp.rootid)); + if (newset) + ATF_REQUIRE_EQ(0, cpuset(&cbp.setid)); + else + ATF_REQUIRE_EQ(0, cpuset_getid(CPU_LEVEL_CPUSET, CPU_WHICH_PID, + -1, &cbp.setid)); + /* Special hack for prison0; it uses cpuset 1 as the root. */ + if (cbp.rootid == 0) + cbp.rootid = 1; + + /* Not every test needs early setup. */ + if (prologue != NULL) + (*prologue)(&cbp); + + ATF_REQUIRE_EQ(0, socketpair(PF_UNIX, SOCK_STREAM, 0, sockpair)); + ATF_REQUIRE((pid = fork()) != -1); + + if (pid == 0) { + /* Child */ + close(sockpair[SP_PARENT]); + sock = sockpair[SP_CHILD]; + + _exit(do_jail(sock)); + } else { + /* Parent */ + sock = sockpair[SP_PARENT]; + close(sockpair[SP_CHILD]); + + while ((error = waitpid(pid, &status, 0)) == -1 && + errno == EINTR) { + } + + ATF_REQUIRE_EQ(sizeof(cbp.info), recv(sock, &cbp.info, + sizeof(cbp.info), 0)); + + /* Sanity check the exit info. */ + ATF_REQUIRE_EQ(pid, error); + ATF_REQUIRE(WIFEXITED(status)); + if (WEXITSTATUS(status) != 0) { + errstr = do_jail_errstr(WEXITSTATUS(status)); + if (errstr != NULL) + atf_tc_fail("%s", errstr); + else + atf_tc_fail("Unknown error '%d'", + WEXITSTATUS(status)); + } + + epilogue(&cbp); + } +} + +static void +jail_attach_mutate_pro(struct jail_test_cb_params *cbp) +{ + cpuset_t *mask; + int count; + + mask = &cbp->mask; + + /* Knock out the first cpu. */ + count = CPU_COUNT(mask); + CPU_CLR(CPU_FFS(mask) - 1, mask); + ATF_REQUIRE_EQ(count - 1, CPU_COUNT(mask)); + ATF_REQUIRE_EQ(0, cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, + -1, sizeof(*mask), mask)); +} + +static void +jail_attach_newbase_epi(struct jail_test_cb_params *cbp) +{ + struct jail_test_info *info; + cpuset_t *mask; + + info = &cbp->info; + mask = &cbp->mask; + + /* + * The rootid test has been thrown in because a bug was discovered + * where any newly derived cpuset during attach would be parented to + * the wrong cpuset. Otherwise, we should observe that a new cpuset + * has been created for this process. + */ + ATF_REQUIRE(info->jail_cpuset != cbp->rootid); + ATF_REQUIRE(info->jail_cpuset != cbp->setid); + ATF_REQUIRE(info->jail_cpuset != info->jail_child_cpuset); + ATF_REQUIRE_EQ(0, CPU_CMP(mask, &info->jail_tidmask)); +} + +ATF_TC(jail_attach_newbase); +ATF_TC_HEAD(jail_attach_newbase, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test jail attachment effect on affinity with a new base cpuset."); + atf_tc_set_md_var(tc, "require.user", "root"); +} +ATF_TC_BODY(jail_attach_newbase, tc) +{ + + /* Need >= 2 cpus to test restriction. */ + do_jail_test(2, true, &jail_attach_mutate_pro, + &jail_attach_newbase_epi); +} + +ATF_TC(jail_attach_newbase_plain); +ATF_TC_HEAD(jail_attach_newbase_plain, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test jail attachment effect on affinity with a new, unmodified base cpuset."); + atf_tc_set_md_var(tc, "require.user", "root"); +} +ATF_TC_BODY(jail_attach_newbase_plain, tc) +{ + + do_jail_test(2, true, NULL, &jail_attach_newbase_epi); +} + +/* + * Generic epilogue for tests that are expecting to use the jail's root cpuset + * with their own mask, whether that's been modified or not. + */ +static void +jail_attach_jset_epi(struct jail_test_cb_params *cbp) +{ + struct jail_test_info *info; + cpuset_t *mask; + + info = &cbp->info; + mask = &cbp->mask; + + ATF_REQUIRE(info->jail_cpuset != cbp->setid); + ATF_REQUIRE_EQ(info->jail_cpuset, info->jail_child_cpuset); + ATF_REQUIRE_EQ(0, CPU_CMP(mask, &info->jail_tidmask)); +} + +ATF_TC(jail_attach_prevbase); +ATF_TC_HEAD(jail_attach_prevbase, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test jail attachment effect on affinity without a new base."); + atf_tc_set_md_var(tc, "require.user", "root"); +} +ATF_TC_BODY(jail_attach_prevbase, tc) +{ + + do_jail_test(2, false, &jail_attach_mutate_pro, &jail_attach_jset_epi); +} + +static void +jail_attach_plain_pro(struct jail_test_cb_params *cbp) +{ + + if (cbp->setid != cbp->rootid) + atf_tc_skip("Must be running with the root cpuset."); +} + +ATF_TC(jail_attach_plain); +ATF_TC_HEAD(jail_attach_plain, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test jail attachment effect on affinity without specialization."); + atf_tc_set_md_var(tc, "require.user", "root"); +} +ATF_TC_BODY(jail_attach_plain, tc) +{ + + do_jail_test(1, false, &jail_attach_plain_pro, &jail_attach_jset_epi); +} + +ATF_TC(badparent); +ATF_TC_HEAD(badparent, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test parent assignment when assigning a new cpuset."); +} +ATF_TC_BODY(badparent, tc) +{ + cpuset_t mask; + cpusetid_t finalsetid, origsetid, setid; + + /* Need to mask off at least one CPU. */ + skip_ltncpu(2, &mask); + + ATF_REQUIRE_EQ(0, cpuset_getid(CPU_LEVEL_CPUSET, CPU_WHICH_TID, -1, + &origsetid)); + + ATF_REQUIRE_EQ(0, cpuset(&setid)); + + /* + * Mask off the first CPU, then we'll reparent ourselves to our original + * set. + */ + CPU_CLR(CPU_FFS(&mask) - 1, &mask); + ATF_REQUIRE_EQ(0, cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, + -1, sizeof(mask), &mask)); + + ATF_REQUIRE_EQ(0, cpuset_setid(CPU_WHICH_PID, -1, origsetid)); + ATF_REQUIRE_EQ(0, cpuset_getid(CPU_LEVEL_CPUSET, CPU_WHICH_TID, -1, + &finalsetid)); + + ATF_REQUIRE_EQ(finalsetid, origsetid); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, newset); + ATF_TP_ADD_TC(tp, transient); + ATF_TP_ADD_TC(tp, deadlk); + ATF_TP_ADD_TC(tp, jail_attach_newbase); + ATF_TP_ADD_TC(tp, jail_attach_newbase_plain); + ATF_TP_ADD_TC(tp, jail_attach_prevbase); + ATF_TP_ADD_TC(tp, jail_attach_plain); + ATF_TP_ADD_TC(tp, badparent); + return (atf_no_error()); +} From owner-dev-commits-src-all@freebsd.org Thu Dec 31 18:32:20 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 40C564CAB0B; Thu, 31 Dec 2020 18:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6GwN1QPHz3PfB; Thu, 31 Dec 2020 18:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2317315496; Thu, 31 Dec 2020 18:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVIWKxD088843; Thu, 31 Dec 2020 18:32:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVIWK8E088842; Thu, 31 Dec 2020 18:32:20 GMT (envelope-from git) Date: Thu, 31 Dec 2020 18:32:20 GMT Message-Id: <202012311832.0BVIWK8E088842@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 9e1281eabafa - main - libc: tests: hook CPUSET(9) test up to the build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e1281eabafa4aaf84828e70488c1802717b59af Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 18:32:20 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=9e1281eabafa4aaf84828e70488c1802717b59af commit 9e1281eabafa4aaf84828e70488c1802717b59af Author: Kyle Evans AuthorDate: 2020-12-31 18:26:01 +0000 Commit: Kyle Evans CommitDate: 2020-12-31 18:26:01 +0000 libc: tests: hook CPUSET(9) test up to the build Add shims to map NetBSD's API to CPUSET(9). Obviously the invalid input parts of these tests are relatively useless since we're just testing the shims that aren't used elsewhere, there's still some amount of value in the parts testing valid inputs. Differential Revision: https://reviews.freebsd.org/D27307 --- contrib/netbsd-tests/lib/libc/gen/t_cpuset.c | 40 ++++++++++++++++++++++++++++ lib/libc/tests/gen/Makefile | 3 ++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/contrib/netbsd-tests/lib/libc/gen/t_cpuset.c b/contrib/netbsd-tests/lib/libc/gen/t_cpuset.c index 9eca03bae2b0..56ab7364af2a 100644 --- a/contrib/netbsd-tests/lib/libc/gen/t_cpuset.c +++ b/contrib/netbsd-tests/lib/libc/gen/t_cpuset.c @@ -36,6 +36,46 @@ __RCSID("$NetBSD: t_cpuset.c,v 1.1 2011/11/08 05:47:00 jruoho Exp $"); #include #include +#ifdef __FreeBSD__ +#include + +#include + +#define cpuset_create() calloc(1, sizeof(cpuset_t)) +#define cpuset_destroy(cs) free(cs) + +static inline int +cpuset_set(size_t i, cpuset_t *cs) +{ + + if (i > CPU_SETSIZE) + return (-1); + CPU_SET(i, cs); + return (0); +} + +static inline int +cpuset_clr(size_t i, cpuset_t *cs) +{ + + if (i > CPU_SETSIZE) + return (-1); + CPU_CLR(i, cs); + return (0); +} + +static inline int +cpuset_isset(size_t i, cpuset_t *cs) +{ + + if (i > CPU_SETSIZE) + return (-1); + return (CPU_ISSET(i, cs)); +} + +#define cpuset_size(cs) sizeof(*cs) +#endif + ATF_TC(cpuset_err); ATF_TC_HEAD(cpuset_err, tc) { diff --git a/lib/libc/tests/gen/Makefile b/lib/libc/tests/gen/Makefile index 2096f2066e52..a808f6617ec7 100644 --- a/lib/libc/tests/gen/Makefile +++ b/lib/libc/tests/gen/Makefile @@ -20,7 +20,7 @@ ATF_TESTS_C+= realpath2_test ATF_TESTS_C+= sigsetops_test ATF_TESTS_C+= wordexp_test -# TODO: t_closefrom, t_cpuset, t_fmtcheck, t_randomid, +# TODO: t_closefrom, t_fmtcheck, t_randomid, # TODO: t_siginfo (fixes require further inspection) # TODO: t_sethostname_test (consistently screws up the hostname) @@ -47,6 +47,7 @@ CFLAGS+= -D__HAVE_LONG_DOUBLE NETBSD_ATF_TESTS_C= alarm_test NETBSD_ATF_TESTS_C+= assert_test NETBSD_ATF_TESTS_C+= basedirname_test +NETBSD_ATF_TESTS_C+= cpuset_test NETBSD_ATF_TESTS_C+= dir_test NETBSD_ATF_TESTS_C+= floatunditf_test NETBSD_ATF_TESTS_C+= fnmatch_test From owner-dev-commits-src-all@freebsd.org Thu Dec 31 18:35:13 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0496A4CAF87; Thu, 31 Dec 2020 18:35:13 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) (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 4D6Gzh6V5Lz3QHN; Thu, 31 Dec 2020 18:35:12 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-ot1-x32e.google.com with SMTP id n42so18590293ota.12; Thu, 31 Dec 2020 10:35:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BGnLJuSUk63Bik6bcg2FM3EJXIfw+U854rPDOdXdZRY=; b=nJVxGDr2h+cC23f07f94SgYnt7pg8ggGQcE0H5oxIqdJA0tff8xHtAy45wnfE84yTp +aEqhWP2xAXbXpnfPov0j9vswLFfS40B3rGa65r8BfS7ChTcJNsP45OpoUUK3wrmq7S9 WvMjsY011qKbuL3ajjzMAsi+7ociWT09n8OogbkZXtH6ZmKnUBDPlum+zUhZsmSrPiEa R/U1rrzS5d0cIcGlmjfDEoPrEstHsguyjF589kxjlMliThJOXzl7D0tCcuRCNMC2IC9+ C7pZqqdAKai0U4jBU6GKUDAV26weE1Dosm/G9UswpC27KYL0GYlwNMUTIXiBYdjeTjHF drGQ== 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=BGnLJuSUk63Bik6bcg2FM3EJXIfw+U854rPDOdXdZRY=; b=Ghv2d7An1WtXugtv76wOhHM7EZaLsP7ejHSw8GYG2Sl4rISBEo7KbTUda7B8Ami9mX A+qlhJZ1v061KB2dKTf/vyKgdJVYK3ppC7vKzFKYXm4D9MscCaCrAumMZqHj6OiN+yYi hGwcfm89CLOMbFudCUPjtlFZN+e6ruKaCK4xbUgragzrSnvCJCsNcz76RCzJzMFuNPcj Y1SysRS8uk3fdmwPMzNjaqFg5kCrAHWnatYB83SWSJmEZEC6E4IDGGTrNIUCDNwryFtx ziMYX5W+0CQi+i4qLGmK7WYlHwkLleONzTGo1y1maaZlytLT/cRHuUv5mc6G/tRZVDNw 7JJw== X-Gm-Message-State: AOAM530gAaPvn/oZ963HTmhR/OIXQbR0f01MEu8K/iPeNjLIj6tLcyLG /okfqYEvwraBvY2GmbGHKtsWwwTe9i5lnC8v0epb1JciLaM= X-Google-Smtp-Source: ABdhPJwW1OmESjJetLdrqcHu1szC72ybzOC1mqZv+CcfQk6J8cN7HhOM9f7mT0aXhCHlsuWAo1pf/KLpUsd7dtrJtvM= X-Received: by 2002:a9d:3645:: with SMTP id w63mr41463405otb.117.1609439711761; Thu, 31 Dec 2020 10:35:11 -0800 (PST) MIME-Version: 1.0 References: <202012302118.0BULIuGd083574@gndrsh.dnsmgr.net> In-Reply-To: From: Benjamin Kaduk Date: Thu, 31 Dec 2020 10:35:01 -0800 Message-ID: Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL To: John Baldwin Cc: "Rodney W. Grimes" , Ryan Libby , Warner Losh , Glen Barber , Kyle Evans , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4D6Gzh6V5Lz3QHN X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 18:35:13 -0000 On Thu, Dec 31, 2020 at 10:25 AM John Baldwin wrote: > On 12/30/20 1:18 PM, Rodney W. Grimes wrote: > > Take for example all the files in /etc, these files can easily > > at present often be tracked back to exactly what release installed > > them cause the $FreeBSD$ points you at it. These files are often > > modified by local administrators, and with out knowing what version > > they started out it is a crap shoot to ever figure it out unless > > the local mods are minor and you get lucky. > > > > Contractors are some times hired to go in and upgrade or clean up > > after someone else did work, and not having this information and > > telling them to go dig in git to try and figure out the state of > > there system is pretty much a non-started, well at least it is for > > me. > > Have you seen 'etcupdate diff'? With pkgbase I'm hopeful we will > have a similar 'pkg confdiff' type functionality (for ports as well as > base) where packages keep stock config files around while installed > that existing ones can be compared against (and that can be used for > 3 way merges during upgrades similar to what etcupdate does). > > (etcupdate diff is explicitly designed due to experience in sysadmin > mode and etcupdate in general is designed with the goal of rolling > out new snapshots to fleets of machines requiring minimal user > intervention) > > More generally I would make the analogy to keeping metadata about a given data object in-band with the data vs. separately tracked. Generally, the in-band data cannot be authenticated very well and can be malleable, letting the metadata get out of sync with the data both when the data is modified and when the metadata is modified. It's generally easier to build robust and secure systems when the metadata is tracked separately from the data itself. This is the general model that etcupdate fits into (keeping a pristine copy of the file along with versioning/identification information), as well as puppet and similar fleet-management tools. In the latter case the expected configuration and versioning is tracked and authenticated centrally, and any local modifications or deviations from the expected state can be flagged for follow-up. -Ben From owner-dev-commits-src-all@freebsd.org Thu Dec 31 19:42:41 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B38E74CCDEA; Thu, 31 Dec 2020 19:42:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6JTY4gwTz3kgc; Thu, 31 Dec 2020 19:42:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 93E49162D6; Thu, 31 Dec 2020 19:42:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVJgfde075194; Thu, 31 Dec 2020 19:42:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVJgfDk075193; Thu, 31 Dec 2020 19:42:41 GMT (envelope-from git) Date: Thu, 31 Dec 2020 19:42:41 GMT Message-Id: <202012311942.0BVJgfDk075193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: e36ac668971c - stable/12 - Use the 't' modifier to print a ptrdiff_t. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: e36ac668971c1bdf97e099bda88cb9cae3ea74c9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 19:42:41 -0000 The branch stable/12 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e36ac668971c1bdf97e099bda88cb9cae3ea74c9 commit e36ac668971c1bdf97e099bda88cb9cae3ea74c9 Author: John Baldwin AuthorDate: 2020-12-16 00:11:30 +0000 Commit: John Baldwin CommitDate: 2020-12-31 18:54:49 +0000 Use the 't' modifier to print a ptrdiff_t. Obtained from: CheriBSD Sponsored by: DARPA (cherry picked from commit ce8395ecfda2c8e332a2adf9a9432c2e7f35ea81) --- sys/compat/linuxkpi/common/include/linux/printk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/printk.h b/sys/compat/linuxkpi/common/include/linux/printk.h index 31802bdd2c99..e6510e9e9834 100644 --- a/sys/compat/linuxkpi/common/include/linux/printk.h +++ b/sys/compat/linuxkpi/common/include/linux/printk.h @@ -68,7 +68,7 @@ print_hex_dump(const char *level, const char *prefix_str, printf("[%p] ", buf); break; case DUMP_PREFIX_OFFSET: - printf("[%p] ", (const char *)((const char *)buf - + printf("[%#tx] ", ((const char *)buf - (const char *)buf_old)); break; default: From owner-dev-commits-src-all@freebsd.org Thu Dec 31 19:42:41 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C20A24CCFF1; Thu, 31 Dec 2020 19:42:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6JTY59FXz3kb5; Thu, 31 Dec 2020 19:42:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A4AF1163BF; Thu, 31 Dec 2020 19:42:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVJgfSk075211; Thu, 31 Dec 2020 19:42:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVJgf3d075210; Thu, 31 Dec 2020 19:42:41 GMT (envelope-from git) Date: Thu, 31 Dec 2020 19:42:41 GMT Message-Id: <202012311942.0BVJgf3d075210@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 14c77f30b201 - stable/12 - Don't transmit mbufs that aren't yet ready on TOE sockets. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 14c77f30b201bf76119d59678e72051c093333c2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 19:42:41 -0000 The branch stable/12 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=14c77f30b201bf76119d59678e72051c093333c2 commit 14c77f30b201bf76119d59678e72051c093333c2 Author: John Baldwin AuthorDate: 2020-12-03 22:01:13 +0000 Commit: John Baldwin CommitDate: 2020-12-31 18:54:49 +0000 Don't transmit mbufs that aren't yet ready on TOE sockets. This includes mbufs waiting for data from sendfile() I/O requests, or mbufs awaiting encryption for KTLS. Sponsored by: Chelsio Communications (cherry picked from commit 99963f5343a017e934e4d8ea2371a86789a46ff9) --- sys/dev/cxgbe/tom/t4_cpl_io.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index 8e8c2b8639e6..43861f10b689 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -746,6 +746,8 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep, int drop) for (m = sndptr; m != NULL; m = m->m_next) { int n; + if ((m->m_flags & M_NOTAVAIL) != 0) + break; if (IS_AIOTX_MBUF(m)) n = sglist_count_vmpages(aiotx_mbuf_pages(m), aiotx_mbuf_pgoff(m), m->m_len); @@ -821,8 +823,9 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep, int drop) /* nothing to send */ if (plen == 0) { - KASSERT(m == NULL, - ("%s: nothing to send, but m != NULL", __func__)); + KASSERT(m == NULL || (m->m_flags & M_NOTAVAIL) != 0, + ("%s: nothing to send, but m != NULL is ready", + __func__)); break; } @@ -910,7 +913,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep, int drop) toep->txsd_avail--; t4_l2t_send(sc, wr, toep->l2te); - } while (m != NULL); + } while (m != NULL && (m->m_flags & M_NOTAVAIL) == 0); /* Send a FIN if requested, but only if there's no more data to send */ if (m == NULL && toep->flags & TPF_SEND_FIN) From owner-dev-commits-src-all@freebsd.org Thu Dec 31 19:56:08 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C0704CD6CE; Thu, 31 Dec 2020 19:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6Jn42XPPz3lbC; Thu, 31 Dec 2020 19:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 49BC416420; Thu, 31 Dec 2020 19:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVJu8IW088472; Thu, 31 Dec 2020 19:56:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVJu3lI088462; Thu, 31 Dec 2020 19:56:03 GMT (envelope-from git) Date: Thu, 31 Dec 2020 19:56:03 GMT Message-Id: <202012311956.0BVJu3lI088462@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: f492599d7bc4 - main - Remove unused contrib/gdb MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f492599d7bc48b64bf039c5a61295a31fb6887da Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 19:56:08 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f492599d7bc48b64bf039c5a61295a31fb6887da commit f492599d7bc48b64bf039c5a61295a31fb6887da Author: Ed Maste AuthorDate: 2020-12-31 18:36:55 +0000 Commit: Ed Maste CommitDate: 2020-12-31 18:41:17 +0000 Remove unused contrib/gdb As of 1c0ea326aa6d in-tree gdb is not used. Clean up the contrib directory. Reported by: kib Sponsored by: The FreeBSD Foundation --- contrib/gdb/COPYING | 340 - contrib/gdb/COPYING.LIB | 482 - contrib/gdb/FREEBSD-Xlist | 77 - contrib/gdb/FREEBSD-diffs | 965 - contrib/gdb/FREEBSD-upgrade | 9 - contrib/gdb/README | 47 - contrib/gdb/config-ml.in | 877 - contrib/gdb/djunpack.bat | 52 - contrib/gdb/gdb/CONTRIBUTE | 143 - contrib/gdb/gdb/COPYING | 340 - contrib/gdb/gdb/MAINTAINERS | 445 - contrib/gdb/gdb/NEWS | 2504 --- contrib/gdb/gdb/PROBLEMS | 113 - contrib/gdb/gdb/README | 573 - contrib/gdb/gdb/TODO | 333 - contrib/gdb/gdb/abug-rom.c | 182 - contrib/gdb/gdb/acinclude.m4 | 998 -- contrib/gdb/gdb/aclocal.m4 | 1040 -- contrib/gdb/gdb/ada-exp.c | 2642 --- contrib/gdb/gdb/ada-exp.y | 969 - contrib/gdb/gdb/ada-lang.c | 8254 --------- contrib/gdb/gdb/ada-lang.h | 392 - contrib/gdb/gdb/ada-lex.l | 928 - contrib/gdb/gdb/ada-tasks.c | 819 - contrib/gdb/gdb/ada-typeprint.c | 852 - contrib/gdb/gdb/ada-valprint.c | 987 - contrib/gdb/gdb/alpha-mdebug-tdep.c | 386 - contrib/gdb/gdb/alpha-nat.c | 272 - contrib/gdb/gdb/alpha-tdep.c | 1615 -- contrib/gdb/gdb/alpha-tdep.h | 110 - contrib/gdb/gdb/alphabsd-nat.c | 151 - contrib/gdb/gdb/alphabsd-tdep.c | 55 - contrib/gdb/gdb/alphabsd-tdep.h | 33 - contrib/gdb/gdb/alphafbsd-tdep.c | 124 - contrib/gdb/gdb/alphanbsd-tdep.c | 234 - contrib/gdb/gdb/amd64-nat.c | 163 - contrib/gdb/gdb/amd64-nat.h | 53 - contrib/gdb/gdb/amd64-tdep.c | 1199 -- contrib/gdb/gdb/amd64-tdep.h | 93 - contrib/gdb/gdb/amd64bsd-nat.c | 107 - contrib/gdb/gdb/amd64fbsd-nat.c | 235 - contrib/gdb/gdb/amd64fbsd-tdep.c | 155 - contrib/gdb/gdb/amd64nbsd-nat.c | 68 - contrib/gdb/gdb/amd64nbsd-tdep.c | 135 - contrib/gdb/gdb/amd64obsd-nat.c | 68 - contrib/gdb/gdb/amd64obsd-tdep.c | 224 - contrib/gdb/gdb/annotate.c | 585 - contrib/gdb/gdb/annotate.h | 106 - contrib/gdb/gdb/arch-utils.c | 754 - contrib/gdb/gdb/arch-utils.h | 167 - contrib/gdb/gdb/arm-tdep.c | 3000 ---- contrib/gdb/gdb/arm-tdep.h | 149 - contrib/gdb/gdb/armnbsd-nat.c | 464 - contrib/gdb/gdb/armnbsd-tdep.c | 105 - contrib/gdb/gdb/auxv.c | 300 - contrib/gdb/gdb/auxv.h | 75 - contrib/gdb/gdb/ax-gdb.c | 1846 -- contrib/gdb/gdb/ax-gdb.h | 113 - contrib/gdb/gdb/ax-general.c | 542 - contrib/gdb/gdb/ax.h | 292 - contrib/gdb/gdb/bcache.c | 439 - contrib/gdb/gdb/bcache.h | 170 - contrib/gdb/gdb/bfd-target.c | 131 - contrib/gdb/gdb/bfd-target.h | 39 - contrib/gdb/gdb/block.c | 295 - contrib/gdb/gdb/block.h | 174 - contrib/gdb/gdb/blockframe.c | 643 - contrib/gdb/gdb/breakpoint.c | 8101 --------- contrib/gdb/gdb/breakpoint.h | 805 - contrib/gdb/gdb/buildsym.c | 1151 -- contrib/gdb/gdb/buildsym.h | 293 - contrib/gdb/gdb/c-exp.c | 3443 ---- contrib/gdb/gdb/c-exp.y | 1811 -- contrib/gdb/gdb/c-lang.c | 713 - contrib/gdb/gdb/c-lang.h | 91 - contrib/gdb/gdb/c-typeprint.c | 1212 -- contrib/gdb/gdb/c-valprint.c | 598 - contrib/gdb/gdb/call-cmds.h | 35 - contrib/gdb/gdb/charset.c | 1277 -- contrib/gdb/gdb/charset.h | 109 - contrib/gdb/gdb/cli-out.c | 405 - contrib/gdb/gdb/cli-out.h | 32 - contrib/gdb/gdb/cli/cli-cmds.c | 1287 -- contrib/gdb/gdb/cli/cli-cmds.h | 125 - contrib/gdb/gdb/cli/cli-decode.c | 1546 -- contrib/gdb/gdb/cli/cli-decode.h | 323 - contrib/gdb/gdb/cli/cli-dump.c | 796 - contrib/gdb/gdb/cli/cli-dump.h | 40 - contrib/gdb/gdb/cli/cli-interp.c | 157 - contrib/gdb/gdb/cli/cli-logging.c | 205 - contrib/gdb/gdb/cli/cli-script.c | 1304 -- contrib/gdb/gdb/cli/cli-script.h | 56 - contrib/gdb/gdb/cli/cli-setshow.c | 386 - contrib/gdb/gdb/cli/cli-setshow.h | 38 - contrib/gdb/gdb/cli/cli-utils.c | 21 - contrib/gdb/gdb/cli/cli-utils.h | 22 - contrib/gdb/gdb/coff-pe-read.c | 346 - contrib/gdb/gdb/coff-pe-read.h | 32 - contrib/gdb/gdb/coff-solib.c | 134 - contrib/gdb/gdb/coff-solib.h | 186 - contrib/gdb/gdb/coffread.c | 2140 --- contrib/gdb/gdb/command.h | 299 - contrib/gdb/gdb/complaints.c | 321 - contrib/gdb/gdb/complaints.h | 53 - contrib/gdb/gdb/completer.c | 728 - contrib/gdb/gdb/completer.h | 42 - contrib/gdb/gdb/config/alpha/alpha-osf2.mh | 6 - contrib/gdb/gdb/config/alpha/alpha-osf3.mh | 6 - contrib/gdb/gdb/config/alpha/alpha.mt | 2 - contrib/gdb/gdb/config/alpha/fbsd.mh | 5 - contrib/gdb/gdb/config/alpha/fbsd.mt | 3 - contrib/gdb/gdb/config/alpha/nbsd.mh | 4 - contrib/gdb/gdb/config/alpha/nbsd.mt | 4 - contrib/gdb/gdb/config/alpha/nm-fbsd.h | 43 - contrib/gdb/gdb/config/alpha/nm-nbsd.h | 31 - contrib/gdb/gdb/config/alpha/nm-osf.h | 50 - contrib/gdb/gdb/config/alpha/nm-osf2.h | 52 - contrib/gdb/gdb/config/alpha/nm-osf3.h | 27 - contrib/gdb/gdb/config/alpha/tm-alpha.h | 74 - contrib/gdb/gdb/config/alpha/tm-fbsd.h | 27 - contrib/gdb/gdb/config/alpha/tm-nbsd.h | 28 - contrib/gdb/gdb/config/alpha/xm-alphaosf.h | 24 - contrib/gdb/gdb/config/arm/embed.mt | 7 - contrib/gdb/gdb/config/arm/nbsd.mt | 3 - contrib/gdb/gdb/config/arm/nbsdaout.mh | 5 - contrib/gdb/gdb/config/arm/nbsdelf.mh | 4 - contrib/gdb/gdb/config/arm/nm-nbsd.h | 27 - contrib/gdb/gdb/config/arm/nm-nbsdaout.h | 29 - contrib/gdb/gdb/config/arm/tm-arm.h | 32 - contrib/gdb/gdb/config/arm/tm-embed.h | 52 - contrib/gdb/gdb/config/arm/tm-nbsd.h | 26 - contrib/gdb/gdb/config/arm/tm-wince.h | 34 - contrib/gdb/gdb/config/arm/wince.mt | 5 - contrib/gdb/gdb/config/arm/xm-nbsd.h | 22 - contrib/gdb/gdb/config/i386/embed.mt | 3 - contrib/gdb/gdb/config/i386/fbsd.mh | 5 - contrib/gdb/gdb/config/i386/fbsd.mt | 4 - contrib/gdb/gdb/config/i386/fbsd64.mh | 5 - contrib/gdb/gdb/config/i386/fbsd64.mt | 5 - contrib/gdb/gdb/config/i386/go32.mh | 13 - contrib/gdb/gdb/config/i386/go32.mt | 3 - contrib/gdb/gdb/config/i386/i386aout.mt | 3 - contrib/gdb/gdb/config/i386/i386gnu.mh | 33 - contrib/gdb/gdb/config/i386/i386gnu.mt | 3 - contrib/gdb/gdb/config/i386/i386lynx.mh | 6 - contrib/gdb/gdb/config/i386/i386lynx.mt | 3 - contrib/gdb/gdb/config/i386/i386nw.mt | 3 - contrib/gdb/gdb/config/i386/i386sco.mh | 12 - contrib/gdb/gdb/config/i386/i386sco4.mh | 11 - contrib/gdb/gdb/config/i386/i386sco5.mh | 16 - contrib/gdb/gdb/config/i386/i386sol2.mh | 8 - contrib/gdb/gdb/config/i386/i386sol2.mt | 3 - contrib/gdb/gdb/config/i386/i386v.mh | 7 - contrib/gdb/gdb/config/i386/i386v.mt | 3 - contrib/gdb/gdb/config/i386/i386v4.mh | 10 - contrib/gdb/gdb/config/i386/i386v42mp.mh | 20 - contrib/gdb/gdb/config/i386/nbsd.mt | 4 - contrib/gdb/gdb/config/i386/nbsd64.mh | 5 - contrib/gdb/gdb/config/i386/nbsd64.mt | 4 - contrib/gdb/gdb/config/i386/nbsdaout.mh | 5 - contrib/gdb/gdb/config/i386/nbsdelf.mh | 4 - contrib/gdb/gdb/config/i386/ncr3000.mh | 16 - contrib/gdb/gdb/config/i386/ncr3000.mt | 3 - contrib/gdb/gdb/config/i386/nm-fbsd.h | 148 - contrib/gdb/gdb/config/i386/nm-fbsd64.h | 37 - contrib/gdb/gdb/config/i386/nm-go32.h | 36 - contrib/gdb/gdb/config/i386/nm-i386.h | 122 - contrib/gdb/gdb/config/i386/nm-i386gnu.h | 38 - contrib/gdb/gdb/config/i386/nm-i386lynx.h | 26 - contrib/gdb/gdb/config/i386/nm-i386sco.h | 33 - contrib/gdb/gdb/config/i386/nm-i386sco4.h | 33 - contrib/gdb/gdb/config/i386/nm-i386sco5.h | 78 - contrib/gdb/gdb/config/i386/nm-i386sol2.h | 61 - contrib/gdb/gdb/config/i386/nm-i386v.h | 44 - contrib/gdb/gdb/config/i386/nm-i386v4.h | 26 - contrib/gdb/gdb/config/i386/nm-i386v42mp.h | 92 - contrib/gdb/gdb/config/i386/nm-nbsd.h | 29 - contrib/gdb/gdb/config/i386/nm-nbsdaout.h | 31 - contrib/gdb/gdb/config/i386/nm-nto.h | 6 - contrib/gdb/gdb/config/i386/nm-obsd.h | 112 - contrib/gdb/gdb/config/i386/nto.mh | 7 - contrib/gdb/gdb/config/i386/nto.mt | 4 - contrib/gdb/gdb/config/i386/obsd.mh | 4 - contrib/gdb/gdb/config/i386/obsd.mt | 4 - contrib/gdb/gdb/config/i386/obsd64.mh | 5 - contrib/gdb/gdb/config/i386/obsd64.mt | 5 - contrib/gdb/gdb/config/i386/obsdaout.mh | 5 - contrib/gdb/gdb/config/i386/tm-fbsd.h | 31 - contrib/gdb/gdb/config/i386/tm-go32.h | 28 - contrib/gdb/gdb/config/i386/tm-i386.h | 25 - contrib/gdb/gdb/config/i386/tm-i386lynx.h | 29 - contrib/gdb/gdb/config/i386/tm-i386sol2.h | 34 - contrib/gdb/gdb/config/i386/tm-nbsd.h | 27 - contrib/gdb/gdb/config/i386/tm-nto.h | 33 - contrib/gdb/gdb/config/i386/tm-vxworks.h | 28 - contrib/gdb/gdb/config/i386/vxworks.mt | 3 - contrib/gdb/gdb/config/i386/xm-go32.h | 26 - contrib/gdb/gdb/config/i386/xm-i386.h | 31 - contrib/gdb/gdb/config/i386/xm-i386sco.h | 31 - contrib/gdb/gdb/config/i386/xm-i386v.h | 43 - contrib/gdb/gdb/config/i386/xm-i386v4.h | 28 - contrib/gdb/gdb/config/i386/xm-nbsd.h | 25 - contrib/gdb/gdb/config/ia64/fbsd.mh | 3 - contrib/gdb/gdb/config/ia64/fbsd.mt | 2 - contrib/gdb/gdb/config/ia64/ia64.mt | 2 - contrib/gdb/gdb/config/ia64/nm-fbsd.h | 24 - contrib/gdb/gdb/config/ia64/tm-fbsd.h | 34 - contrib/gdb/gdb/config/ia64/tm-ia64.h | 201 - contrib/gdb/gdb/config/mips/decstation.mh | 4 - contrib/gdb/gdb/config/mips/embed.mt | 4 - contrib/gdb/gdb/config/mips/littlemips.mh | 3 - contrib/gdb/gdb/config/mips/mipsv4.mh | 6 - contrib/gdb/gdb/config/mips/mipsv4.mt | 3 - contrib/gdb/gdb/config/mips/nbsd.mh | 4 - contrib/gdb/gdb/config/mips/nbsd.mt | 7 - contrib/gdb/gdb/config/mips/news-mips.mh | 3 - contrib/gdb/gdb/config/mips/nm-fbsd.h | 48 - contrib/gdb/gdb/config/mips/nm-mips.h | 34 - contrib/gdb/gdb/config/mips/nm-nbsd.h | 28 - contrib/gdb/gdb/config/mips/nm-news-mips.h | 43 - contrib/gdb/gdb/config/mips/nm-riscos.h | 60 - contrib/gdb/gdb/config/mips/riscos.mh | 16 - contrib/gdb/gdb/config/mips/tm-fbsd.h | 43 - contrib/gdb/gdb/config/mips/tm-mips.h | 119 - contrib/gdb/gdb/config/mips/tm-mipsv4.h | 37 - contrib/gdb/gdb/config/mips/tm-nbsd.h | 37 - contrib/gdb/gdb/config/mips/tm-vxmips.h | 23 - contrib/gdb/gdb/config/mips/tm-wince.h | 33 - contrib/gdb/gdb/config/mips/vxmips.mt | 3 - contrib/gdb/gdb/config/mips/wince.mt | 5 - contrib/gdb/gdb/config/mips/xm-mips.h | 59 - contrib/gdb/gdb/config/mips/xm-mipsv4.h | 22 - contrib/gdb/gdb/config/mips/xm-riscos.h | 25 - contrib/gdb/gdb/config/nm-gnu.h | 43 - contrib/gdb/gdb/config/nm-lynx.h | 86 - contrib/gdb/gdb/config/nm-nbsd.h | 27 - contrib/gdb/gdb/config/nm-nbsdaout.h | 72 - contrib/gdb/gdb/config/nm-sysv4.h | 34 - contrib/gdb/gdb/config/powerpc/fbsd.mh | 5 - contrib/gdb/gdb/config/powerpc/fbsd.mt | 4 - contrib/gdb/gdb/config/powerpc/nbsd.mh | 3 - contrib/gdb/gdb/config/powerpc/nbsd.mt | 7 - contrib/gdb/gdb/config/powerpc/nm-fbsd.h | 18 - contrib/gdb/gdb/config/powerpc/nm-nbsd.h | 27 - contrib/gdb/gdb/config/powerpc/ppc-eabi.mt | 3 - contrib/gdb/gdb/config/powerpc/ppc-sim.mt | 6 - contrib/gdb/gdb/config/powerpc/tm-nbsd.h | 26 - contrib/gdb/gdb/config/powerpc/tm-ppc-eabi.h | 40 - contrib/gdb/gdb/config/powerpc/tm-ppcle-eabi.h | 28 - contrib/gdb/gdb/config/powerpc/tm-ppcle-sim.h | 26 - contrib/gdb/gdb/config/powerpc/tm-vxworks.h | 28 - contrib/gdb/gdb/config/powerpc/vxworks.mt | 3 - contrib/gdb/gdb/config/rs6000/nm-rs6000.h | 69 - contrib/gdb/gdb/config/rs6000/nm-rs6000ly.h | 26 - contrib/gdb/gdb/config/rs6000/rs6000.mh | 11 - contrib/gdb/gdb/config/rs6000/rs6000.mt | 3 - contrib/gdb/gdb/config/rs6000/rs6000lynx.mh | 6 - contrib/gdb/gdb/config/rs6000/rs6000lynx.mt | 3 - contrib/gdb/gdb/config/rs6000/tm-rs6000.h | 103 - contrib/gdb/gdb/config/rs6000/tm-rs6000ly.h | 31 - contrib/gdb/gdb/config/rs6000/xm-rs6000.h | 94 - contrib/gdb/gdb/config/s390/s390.mh | 5 - contrib/gdb/gdb/config/s390/s390.mt | 5 - contrib/gdb/gdb/config/sparc/fbsd.mh | 5 - contrib/gdb/gdb/config/sparc/fbsd.mt | 3 - contrib/gdb/gdb/config/sparc/nbsd.mt | 4 - contrib/gdb/gdb/config/sparc/nbsd64.mh | 4 - contrib/gdb/gdb/config/sparc/nbsd64.mt | 5 - contrib/gdb/gdb/config/sparc/nbsdaout.mh | 4 - contrib/gdb/gdb/config/sparc/nbsdelf.mh | 4 - contrib/gdb/gdb/config/sparc/nm-fbsd.h | 39 - contrib/gdb/gdb/config/sparc/nm-nbsd.h | 42 - contrib/gdb/gdb/config/sparc/nm-nbsdaout.h | 30 - contrib/gdb/gdb/config/sparc/nm-sol2.h | 65 - contrib/gdb/gdb/config/sparc/obsd.mt | 4 - contrib/gdb/gdb/config/sparc/obsd64.mt | 5 - contrib/gdb/gdb/config/sparc/sol2-64.mt | 3 - contrib/gdb/gdb/config/sparc/sol2.mh | 6 - contrib/gdb/gdb/config/sparc/sol2.mt | 3 - contrib/gdb/gdb/config/sparc/sparc.mt | 2 - contrib/gdb/gdb/config/sparc/sparc64.mt | 2 - contrib/gdb/gdb/config/sparc/tm-fbsd.h | 27 - contrib/gdb/gdb/config/sparc/tm-nbsd.h | 30 - contrib/gdb/gdb/config/sparc/tm-nbsd64.h | 27 - contrib/gdb/gdb/config/sparc/tm-sol2.h | 40 - contrib/gdb/gdb/config/sparc/tm-vxworks.h | 31 - contrib/gdb/gdb/config/sparc/vxworks.mt | 4 - contrib/gdb/gdb/config/tm-lynx.h | 32 - contrib/gdb/gdb/config/tm-nto.h | 61 - contrib/gdb/gdb/config/tm-sunos.h | 32 - contrib/gdb/gdb/config/tm-sysv4.h | 37 - contrib/gdb/gdb/config/tm-vxworks.h | 23 - contrib/gdb/gdb/config/xm-nbsd.h | 26 - contrib/gdb/gdb/config/xm-sysv4.h | 29 - contrib/gdb/gdb/copying.awk | 77 - contrib/gdb/gdb/copying.c | 323 - contrib/gdb/gdb/core-aout.c | 146 - contrib/gdb/gdb/core-regset.c | 119 - contrib/gdb/gdb/corefile.c | 458 - contrib/gdb/gdb/corelow.c | 655 - contrib/gdb/gdb/cp-abi.c | 252 - contrib/gdb/gdb/cp-abi.h | 172 - contrib/gdb/gdb/cp-namespace.c | 871 - contrib/gdb/gdb/cp-support.c | 757 - contrib/gdb/gdb/cp-support.h | 120 - contrib/gdb/gdb/cp-valprint.c | 836 - contrib/gdb/gdb/cpu32bug-rom.c | 180 - contrib/gdb/gdb/dbug-rom.c | 178 - contrib/gdb/gdb/dbxread.c | 3577 ---- contrib/gdb/gdb/dcache.c | 604 - contrib/gdb/gdb/dcache.h | 43 - contrib/gdb/gdb/defs.h | 1335 -- contrib/gdb/gdb/delta68-nat.c | 90 - contrib/gdb/gdb/demangle.c | 203 - contrib/gdb/gdb/dictionary.c | 836 - contrib/gdb/gdb/dictionary.h | 156 - contrib/gdb/gdb/dink32-rom.c | 178 - contrib/gdb/gdb/disasm.c | 395 - contrib/gdb/gdb/disasm.h | 38 - contrib/gdb/gdb/doc/GDBvn.texi | 1 - contrib/gdb/gdb/doc/LRS | 197 - contrib/gdb/gdb/doc/a4rc.sed | 11 - contrib/gdb/gdb/doc/agentexpr.texi | 837 - contrib/gdb/gdb/doc/all-cfg.texi | 45 - contrib/gdb/gdb/doc/annotate.texinfo | 834 - contrib/gdb/gdb/doc/fdl.texi | 452 - contrib/gdb/gdb/doc/gdb.info-1 | 7636 -------- contrib/gdb/gdb/doc/gdb.info-2 | 9133 ---------- contrib/gdb/gdb/doc/gdb.info-3 | 6665 ------- contrib/gdb/gdb/doc/gdb.texinfo | 21780 ----------------------- contrib/gdb/gdb/doc/gdbint.texinfo | 6757 ------- contrib/gdb/gdb/doc/gpl.texi | 409 - contrib/gdb/gdb/doc/lpsrc.sed | 13 - contrib/gdb/gdb/doc/observer.texi | 70 - contrib/gdb/gdb/doc/psrc.sed | 13 - contrib/gdb/gdb/doc/refcard.tex | 647 - contrib/gdb/gdb/doc/stabs.texinfo | 4046 ----- contrib/gdb/gdb/doublest.c | 824 - contrib/gdb/gdb/doublest.h | 90 - contrib/gdb/gdb/dpx2-nat.c | 83 - contrib/gdb/gdb/dsrec.c | 313 - contrib/gdb/gdb/dummy-frame.c | 466 - contrib/gdb/gdb/dummy-frame.h | 86 - contrib/gdb/gdb/dve3900-rom.c | 1069 -- contrib/gdb/gdb/dwarf2-frame.c | 1621 -- contrib/gdb/gdb/dwarf2-frame.h | 98 - contrib/gdb/gdb/dwarf2expr.c | 726 - contrib/gdb/gdb/dwarf2expr.h | 141 - contrib/gdb/gdb/dwarf2loc.c | 592 - contrib/gdb/gdb/dwarf2loc.h | 70 - contrib/gdb/gdb/dwarf2read.c | 8130 --------- contrib/gdb/gdb/dwarfread.c | 3816 ---- contrib/gdb/gdb/elfread.c | 774 - contrib/gdb/gdb/environ.c | 186 - contrib/gdb/gdb/environ.h | 51 - contrib/gdb/gdb/eval.c | 2275 --- contrib/gdb/gdb/event-loop.c | 1158 -- contrib/gdb/gdb/event-loop.h | 96 - contrib/gdb/gdb/event-top.c | 1186 -- contrib/gdb/gdb/event-top.h | 124 - contrib/gdb/gdb/exc_request.defs | 51 - contrib/gdb/gdb/exec.c | 761 - contrib/gdb/gdb/exec.h | 39 - contrib/gdb/gdb/expprint.c | 1069 -- contrib/gdb/gdb/expression.h | 419 - contrib/gdb/gdb/f-exp.c | 2564 --- contrib/gdb/gdb/f-exp.y | 1188 -- contrib/gdb/gdb/f-lang.c | 986 - contrib/gdb/gdb/f-lang.h | 98 - contrib/gdb/gdb/f-typeprint.c | 406 - contrib/gdb/gdb/f-valprint.c | 775 - contrib/gdb/gdb/fbsd-proc.c | 171 - contrib/gdb/gdb/findvar.c | 808 - contrib/gdb/gdb/fork-child.c | 469 - contrib/gdb/gdb/frame-base.c | 150 - contrib/gdb/gdb/frame-base.h | 93 - contrib/gdb/gdb/frame-unwind.c | 103 - contrib/gdb/gdb/frame-unwind.h | 141 - contrib/gdb/gdb/frame.c | 2384 --- contrib/gdb/gdb/frame.h | 707 - contrib/gdb/gdb/gcore.c | 501 - contrib/gdb/gdb/gdb-events.c | 444 - contrib/gdb/gdb/gdb-events.h | 129 - contrib/gdb/gdb/gdb-events.sh | 620 - contrib/gdb/gdb/gdb-stabs.h | 90 - contrib/gdb/gdb/gdb.1 | 381 - contrib/gdb/gdb/gdb.c | 36 - contrib/gdb/gdb/gdb.gdb | 35 - contrib/gdb/gdb/gdb.h | 62 - contrib/gdb/gdb/gdb_assert.h | 58 - contrib/gdb/gdb/gdb_curses.h | 31 - contrib/gdb/gdb/gdb_dirent.h | 42 - contrib/gdb/gdb/gdb_gcore.sh | 81 - contrib/gdb/gdb/gdb_indent.sh | 86 - contrib/gdb/gdb/gdb_locale.h | 46 - contrib/gdb/gdb/gdb_mbuild.sh | 333 - contrib/gdb/gdb/gdb_obstack.h | 39 - contrib/gdb/gdb/gdb_proc_service.h | 86 - contrib/gdb/gdb/gdb_regex.h | 32 - contrib/gdb/gdb/gdb_stat.h | 74 - contrib/gdb/gdb/gdb_string.h | 67 - contrib/gdb/gdb/gdb_thread_db.h | 461 - contrib/gdb/gdb/gdb_vfork.h | 28 - contrib/gdb/gdb/gdb_wait.h | 121 - contrib/gdb/gdb/gdbarch.c | 5885 ------ contrib/gdb/gdb/gdbarch.h | 2581 --- contrib/gdb/gdb/gdbarch.sh | 2320 --- contrib/gdb/gdb/gdbcmd.h | 122 - contrib/gdb/gdb/gdbcore.h | 209 - contrib/gdb/gdb/gdbinit.in | 17 - contrib/gdb/gdb/gdbserver/README | 138 - contrib/gdb/gdb/gdbserver/acinclude.m4 | 41 - contrib/gdb/gdb/gdbserver/aclocal.m4 | 54 - contrib/gdb/gdb/gdbserver/gdbreplay.c | 329 - contrib/gdb/gdb/gdbserver/gdbserver.1 | 116 - contrib/gdb/gdb/gdbserver/i387-fp.c | 290 - contrib/gdb/gdb/gdbserver/i387-fp.h | 33 - contrib/gdb/gdb/gdbserver/inferiors.c | 199 - contrib/gdb/gdb/gdbserver/mem-break.c | 278 - contrib/gdb/gdb/gdbserver/mem-break.h | 71 - contrib/gdb/gdb/gdbserver/proc-service.c | 256 - contrib/gdb/gdb/gdbserver/regcache.c | 239 - contrib/gdb/gdb/gdbserver/regcache.h | 72 - contrib/gdb/gdb/gdbserver/remote-utils.c | 736 - contrib/gdb/gdb/gdbserver/server.c | 621 - contrib/gdb/gdb/gdbserver/server.h | 181 - contrib/gdb/gdb/gdbserver/target.c | 112 - contrib/gdb/gdb/gdbserver/target.h | 171 - contrib/gdb/gdb/gdbserver/terminal.h | 51 - contrib/gdb/gdb/gdbserver/thread-db.c | 342 - contrib/gdb/gdb/gdbserver/utils.c | 96 - contrib/gdb/gdb/gdbthread.h | 156 - contrib/gdb/gdb/gdbtypes.c | 3505 ---- contrib/gdb/gdb/gdbtypes.h | 1284 -- contrib/gdb/gdb/glibc-tdep.c | 101 - contrib/gdb/gdb/glibc-tdep.h | 30 - contrib/gdb/gdb/gnu-nat.c | 3409 ---- contrib/gdb/gdb/gnu-nat.h | 101 - contrib/gdb/gdb/gnu-v2-abi.c | 413 - contrib/gdb/gdb/gnu-v3-abi.c | 447 - contrib/gdb/gdb/go32-nat.c | 1963 -- contrib/gdb/gdb/gregset.h | 69 - contrib/gdb/gdb/hpacc-abi.c | 329 - contrib/gdb/gdb/hpread.c | 6328 ------- contrib/gdb/gdb/i386-nat.c | 670 - contrib/gdb/gdb/i386-nto-tdep.c | 306 - contrib/gdb/gdb/i386-sol2-tdep.c | 120 - contrib/gdb/gdb/i386-stub.c | 952 - contrib/gdb/gdb/i386-tdep.c | 2109 --- contrib/gdb/gdb/i386-tdep.h | 233 - contrib/gdb/gdb/i386bsd-nat.c | 456 - contrib/gdb/gdb/i386bsd-tdep.c | 170 - contrib/gdb/gdb/i386fbsd-nat.c | 107 - contrib/gdb/gdb/i386fbsd-tdep.c | 175 - contrib/gdb/gdb/i386gnu-nat.c | 293 - contrib/gdb/gdb/i386gnu-tdep.c | 44 - contrib/gdb/gdb/i386ly-tdep.c | 81 - contrib/gdb/gdb/i386nbsd-tdep.c | 286 - contrib/gdb/gdb/i386obsd-nat.c | 60 - contrib/gdb/gdb/i386obsd-tdep.c | 277 - contrib/gdb/gdb/i386v-nat.c | 277 - contrib/gdb/gdb/i386v4-nat.c | 160 - contrib/gdb/gdb/i387-tdep.c | 774 - contrib/gdb/gdb/i387-tdep.h | 118 - contrib/gdb/gdb/ia64-fbsd-nat.c | 137 - contrib/gdb/gdb/ia64-fbsd-tdep.c | 289 - contrib/gdb/gdb/ia64-tdep.c | 3382 ---- contrib/gdb/gdb/ia64-tdep.h | 46 - contrib/gdb/gdb/inf-loop.c | 132 - contrib/gdb/gdb/inf-loop.h | 29 - contrib/gdb/gdb/infcall.c | 1103 -- contrib/gdb/gdb/infcall.h | 43 - contrib/gdb/gdb/infcmd.c | 2159 --- contrib/gdb/gdb/inferior.h | 495 - contrib/gdb/gdb/inflow.c | 771 - contrib/gdb/gdb/inflow.h | 51 - contrib/gdb/gdb/infptrace.c | 688 - contrib/gdb/gdb/infrun.c | 4220 ----- contrib/gdb/gdb/inftarg.c | 713 - contrib/gdb/gdb/infttrace.c | 5607 ------ contrib/gdb/gdb/infttrace.h | 28 - contrib/gdb/gdb/interps.c | 486 - contrib/gdb/gdb/interps.h | 76 - contrib/gdb/gdb/jv-exp.c | 2842 --- contrib/gdb/gdb/jv-exp.y | 1469 -- contrib/gdb/gdb/jv-lang.c | 1100 -- contrib/gdb/gdb/jv-lang.h | 73 - contrib/gdb/gdb/jv-typeprint.c | 343 - contrib/gdb/gdb/jv-valprint.c | 531 - contrib/gdb/gdb/kod-cisco.c | 317 - contrib/gdb/gdb/kod.c | 241 - contrib/gdb/gdb/kod.h | 61 - contrib/gdb/gdb/language.c | 1442 -- contrib/gdb/gdb/language.h | 514 - contrib/gdb/gdb/libunwind-frame.c | 387 - contrib/gdb/gdb/libunwind-frame.h | 64 - contrib/gdb/gdb/lin-lwp.c | 1882 -- contrib/gdb/gdb/linespec.c | 1850 -- contrib/gdb/gdb/linespec.h | 29 - contrib/gdb/gdb/lynx-nat.c | 624 - contrib/gdb/gdb/m2-exp.c | 2600 --- contrib/gdb/gdb/m2-exp.y | 1108 -- contrib/gdb/gdb/m2-lang.c | 473 - contrib/gdb/gdb/m2-lang.h | 31 - contrib/gdb/gdb/m2-typeprint.c | 41 - contrib/gdb/gdb/m2-valprint.c | 39 - contrib/gdb/gdb/macrocmd.c | 289 - contrib/gdb/gdb/macroexp.c | 1169 -- contrib/gdb/gdb/macroexp.h | 90 - contrib/gdb/gdb/macroscope.c | 132 - contrib/gdb/gdb/macroscope.h | 63 - contrib/gdb/gdb/macrotab.c | 892 - contrib/gdb/gdb/macrotab.h | 304 - contrib/gdb/gdb/main.c | 890 - contrib/gdb/gdb/main.h | 35 - contrib/gdb/gdb/maint.c | 868 - contrib/gdb/gdb/mdebugread.c | 4996 ------ contrib/gdb/gdb/mem-break.c | 92 - contrib/gdb/gdb/memattr.c | 549 - contrib/gdb/gdb/memattr.h | 91 - contrib/gdb/gdb/mi/mi-cmd-break.c | 240 - contrib/gdb/gdb/mi/mi-cmd-disas.c | 163 - contrib/gdb/gdb/mi/mi-cmd-env.c | 259 - contrib/gdb/gdb/mi/mi-cmd-file.c | 67 - contrib/gdb/gdb/mi/mi-cmd-stack.c | 349 - contrib/gdb/gdb/mi/mi-cmd-var.c | 538 - contrib/gdb/gdb/mi/mi-cmds.c | 267 - contrib/gdb/gdb/mi/mi-cmds.h | 152 - contrib/gdb/gdb/mi/mi-console.c | 125 - contrib/gdb/gdb/mi/mi-console.h | 29 - contrib/gdb/gdb/mi/mi-getopt.c | 92 - contrib/gdb/gdb/mi/mi-getopt.h | 80 - contrib/gdb/gdb/mi/mi-interp.c | 406 - contrib/gdb/gdb/mi/mi-main.c | 1494 -- contrib/gdb/gdb/mi/mi-main.h | 33 - contrib/gdb/gdb/mi/mi-out.c | 409 - contrib/gdb/gdb/mi/mi-out.h | 36 - contrib/gdb/gdb/mi/mi-parse.c | 233 - contrib/gdb/gdb/mi/mi-parse.h | 55 - contrib/gdb/gdb/mi/mi-symbol-cmds.c | 67 - contrib/gdb/gdb/minimon.h | 601 - contrib/gdb/gdb/minsyms.c | 996 -- contrib/gdb/gdb/mips-nat.c | 254 - contrib/gdb/gdb/mips-tdep.c | 6202 ------- contrib/gdb/gdb/mips-tdep.h | 88 - contrib/gdb/gdb/mipsfbsd-nat.c | 108 - contrib/gdb/gdb/mipsfbsd-tdep.c | 591 - contrib/gdb/gdb/mipsfbsd-tdep.h | 40 - contrib/gdb/gdb/mipsnbsd-nat.c | 101 - contrib/gdb/gdb/mipsnbsd-tdep.c | 370 - contrib/gdb/gdb/mipsnbsd-tdep.h | 33 - contrib/gdb/gdb/mipsread.c | 444 - contrib/gdb/gdb/mipsv4-nat.c | 168 - contrib/gdb/gdb/monitor.c | 2310 --- contrib/gdb/gdb/monitor.h | 260 - contrib/gdb/gdb/msg.defs | 1 - contrib/gdb/gdb/msg_reply.defs | 1 - contrib/gdb/gdb/nbsd-tdep.c | 109 - contrib/gdb/gdb/nbsd-tdep.h | 30 - contrib/gdb/gdb/nlmread.c | 248 - contrib/gdb/gdb/notify.defs | 1 - contrib/gdb/gdb/nto-procfs.c | 1389 -- contrib/gdb/gdb/nto-tdep.c | 337 - contrib/gdb/gdb/nto-tdep.h | 156 - contrib/gdb/gdb/objc-exp.c | 3464 ---- contrib/gdb/gdb/objc-exp.y | 1820 -- contrib/gdb/gdb/objc-lang.c | 1929 -- contrib/gdb/gdb/objc-lang.h | 68 - contrib/gdb/gdb/objfiles.c | 896 - contrib/gdb/gdb/objfiles.h | 663 - contrib/gdb/gdb/observer.c | 222 - contrib/gdb/gdb/observer.h | 35 - contrib/gdb/gdb/ocd.c | 1169 -- contrib/gdb/gdb/ocd.h | 142 - contrib/gdb/gdb/osabi.c | 664 - contrib/gdb/gdb/osabi.h | 55 - contrib/gdb/gdb/p-exp.c | 2974 ---- contrib/gdb/gdb/p-exp.y | 1650 -- contrib/gdb/gdb/p-lang.c | 485 - contrib/gdb/gdb/p-lang.h | 76 - contrib/gdb/gdb/p-typeprint.c | 817 - contrib/gdb/gdb/p-valprint.c | 1108 -- contrib/gdb/gdb/pa64solib.c | 1247 -- contrib/gdb/gdb/pa64solib.h | 149 - contrib/gdb/gdb/parse.c | 1314 -- contrib/gdb/gdb/parser-defs.h | 279 - contrib/gdb/gdb/ppc-bdm.c | 356 - contrib/gdb/gdb/ppc-sysv-tdep.c | 1002 -- contrib/gdb/gdb/ppc-tdep.h | 113 - contrib/gdb/gdb/ppcbug-rom.c | 225 - contrib/gdb/gdb/ppcfbsd-nat.c | 169 - contrib/gdb/gdb/ppcfbsd-tdep.c | 560 - contrib/gdb/gdb/ppcfbsd-tdep.h | 30 - contrib/gdb/gdb/ppcnbsd-nat.c | 121 - contrib/gdb/gdb/ppcnbsd-tdep.c | 250 - contrib/gdb/gdb/ppcnbsd-tdep.h | 30 - contrib/gdb/gdb/printcmd.c | 2172 --- contrib/gdb/gdb/proc-api.c | 797 - contrib/gdb/gdb/proc-events.c | 1777 -- contrib/gdb/gdb/proc-flags.c | 291 - contrib/gdb/gdb/proc-service.c | 312 - contrib/gdb/gdb/proc-utils.h | 95 - contrib/gdb/gdb/proc-why.c | 175 - contrib/gdb/gdb/process_reply.defs | 1 - contrib/gdb/gdb/procfs.c | 5960 ------- contrib/gdb/gdb/regcache.c | 1742 -- contrib/gdb/gdb/regcache.h | 255 - contrib/gdb/gdb/regformats/reg-arm.dat | 28 - contrib/gdb/gdb/regformats/reg-i386.dat | 43 - contrib/gdb/gdb/regformats/reg-ia64.dat | 603 - contrib/gdb/gdb/regformats/reg-m68k.dat | 33 - contrib/gdb/gdb/regformats/reg-mips.dat | 112 - contrib/gdb/gdb/regformats/reg-ppc.dat | 76 - contrib/gdb/gdb/regformats/reg-s390.dat | 53 - contrib/gdb/gdb/regformats/reg-s390x.dat | 53 - contrib/gdb/gdb/regformats/reg-sh.dat | 62 - contrib/gdb/gdb/regformats/reg-x86-64.dat | 59 - contrib/gdb/gdb/regformats/regdat.sh | 169 - contrib/gdb/gdb/regformats/regdef.h | 46 - contrib/gdb/gdb/reggroups.c | 288 - contrib/gdb/gdb/reggroups.h | 64 - contrib/gdb/gdb/regset.h | 41 - contrib/gdb/gdb/remote-e7000.c | 2194 --- contrib/gdb/gdb/remote-est.c | 186 - contrib/gdb/gdb/remote-fileio.c | 1384 -- contrib/gdb/gdb/remote-fileio.h | 38 - contrib/gdb/gdb/remote-hms.c | 159 - contrib/gdb/gdb/remote-mips.c | 3421 ---- contrib/gdb/gdb/remote-rdi.c | 1026 -- contrib/gdb/gdb/remote-rdp.c | 1431 -- contrib/gdb/gdb/remote-sds.c | 1130 -- contrib/gdb/gdb/remote-sim.c | 900 - contrib/gdb/gdb/remote-st.c | 803 - contrib/gdb/gdb/remote-utils.c | 609 - contrib/gdb/gdb/remote-utils.h | 135 - contrib/gdb/gdb/remote-vx.c | 1409 -- contrib/gdb/gdb/remote-vx68.c | 160 - contrib/gdb/gdb/remote-vxmips.c | 201 - contrib/gdb/gdb/remote-vxsparc.c | 128 - contrib/gdb/gdb/remote.c | 5730 ------ contrib/gdb/gdb/remote.h | 64 - contrib/gdb/gdb/reply_mig_hack.awk | 123 - contrib/gdb/gdb/rom68k-rom.c | 264 - contrib/gdb/gdb/rs6000-nat.c | 1227 -- contrib/gdb/gdb/rs6000-tdep.c | 2981 ---- contrib/gdb/gdb/s390-nat.c | 359 - contrib/gdb/gdb/s390-tdep.c | 3102 ---- contrib/gdb/gdb/s390-tdep.h | 105 - contrib/gdb/gdb/scm-exp.c | 496 - contrib/gdb/gdb/scm-lang.c | 287 - contrib/gdb/gdb/scm-lang.h | 72 - contrib/gdb/gdb/scm-tags.h | 379 - contrib/gdb/gdb/scm-valprint.c | 394 - contrib/gdb/gdb/sentinel-frame.c | 92 - contrib/gdb/gdb/sentinel-frame.h | 41 - contrib/gdb/gdb/ser-e7kpc.c | 436 - contrib/gdb/gdb/ser-go32.c | 964 - contrib/gdb/gdb/ser-pipe.c | 161 - contrib/gdb/gdb/ser-tcp.c | 231 - contrib/gdb/gdb/ser-unix.c | 1364 -- contrib/gdb/gdb/ser-unix.h | 54 - contrib/gdb/gdb/serial.c | 712 - contrib/gdb/gdb/serial.h | 243 - contrib/gdb/gdb/signals/signals.c | 830 - contrib/gdb/gdb/sim-regno.h | 45 - contrib/gdb/gdb/sol-thread.c | 1720 -- contrib/gdb/gdb/solib-legacy.c | 153 - contrib/gdb/gdb/solib-osf.c | 623 - contrib/gdb/gdb/solib-sunos.c | 898 - contrib/gdb/gdb/solib-svr4.c | 1605 -- contrib/gdb/gdb/solib-svr4.h | 90 - contrib/gdb/gdb/solib.c | 912 - contrib/gdb/gdb/solib.h | 110 - contrib/gdb/gdb/solist.h | 134 - contrib/gdb/gdb/somread.c | 736 - contrib/gdb/gdb/somsolib.c | 1624 -- contrib/gdb/gdb/somsolib.h | 178 - contrib/gdb/gdb/source.c | 1596 -- contrib/gdb/gdb/source.h | 68 - contrib/gdb/gdb/sparc-nat.c | 330 - contrib/gdb/gdb/sparc-nat.h | 40 - contrib/gdb/gdb/sparc-sol2-nat.c | 98 - contrib/gdb/gdb/sparc-sol2-tdep.c | 201 - contrib/gdb/gdb/sparc-stub.c | 778 - contrib/gdb/gdb/sparc-tdep.c | 1488 -- contrib/gdb/gdb/sparc-tdep.h | 204 - contrib/gdb/gdb/sparc64-nat.c | 87 - contrib/gdb/gdb/sparc64-sol2-tdep.c | 182 - contrib/gdb/gdb/sparc64-tdep.c | 1433 -- contrib/gdb/gdb/sparc64-tdep.h | 123 - contrib/gdb/gdb/sparc64fbsd-nat.c | 34 - contrib/gdb/gdb/sparc64fbsd-tdep.c | 250 - contrib/gdb/gdb/sparc64nbsd-nat.c | 139 - contrib/gdb/gdb/sparc64nbsd-tdep.c | 256 - contrib/gdb/gdb/sparc64obsd-tdep.c | 210 - contrib/gdb/gdb/sparcnbsd-nat.c | 34 - contrib/gdb/gdb/sparcnbsd-tdep.c | 358 - contrib/gdb/gdb/sparcobsd-tdep.c | 171 - contrib/gdb/gdb/srec.h | 39 - contrib/gdb/gdb/stabsread.c | 4456 ----- contrib/gdb/gdb/stabsread.h | 207 - contrib/gdb/gdb/stack.c | 2178 --- contrib/gdb/gdb/stack.h | 27 - contrib/gdb/gdb/standalone.c | 580 - contrib/gdb/gdb/std-regs.c | 160 - contrib/gdb/gdb/stop-gdb.c | 109 - contrib/gdb/gdb/sun3-nat.c | 166 - contrib/gdb/gdb/symfile.c | 3610 ---- contrib/gdb/gdb/symfile.h | 340 - contrib/gdb/gdb/symmisc.c | 1258 -- contrib/gdb/gdb/symtab.c | 4042 ----- contrib/gdb/gdb/symtab.h | 1368 -- contrib/gdb/gdb/target.c | 2458 --- contrib/gdb/gdb/target.h | 1251 -- contrib/gdb/gdb/terminal.h | 91 - contrib/gdb/gdb/thread-db.c | 1314 -- contrib/gdb/gdb/thread.c | 743 - contrib/gdb/gdb/top.c | 1911 -- contrib/gdb/gdb/top.h | 84 - contrib/gdb/gdb/tracepoint.c | 2810 --- contrib/gdb/gdb/tracepoint.h | 134 - contrib/gdb/gdb/trad-frame.c | 134 - contrib/gdb/gdb/trad-frame.h | 88 - contrib/gdb/gdb/tui/tui-command.c | 131 - contrib/gdb/gdb/tui/tui-command.h | 30 - contrib/gdb/gdb/tui/tui-data.c | 924 - contrib/gdb/gdb/tui/tui-data.h | 351 - contrib/gdb/gdb/tui/tui-disasm.c | 397 - contrib/gdb/gdb/tui/tui-disasm.h | 37 - contrib/gdb/gdb/tui/tui-file.c | 238 - contrib/gdb/gdb/tui/tui-file.h | 29 - contrib/gdb/gdb/tui/tui-hooks.c | 320 - contrib/gdb/gdb/tui/tui-hooks.h | 28 - contrib/gdb/gdb/tui/tui-interp.c | 210 - contrib/gdb/gdb/tui/tui-io.c | 708 - contrib/gdb/gdb/tui/tui-io.h | 55 - contrib/gdb/gdb/tui/tui-layout.c | 1072 -- contrib/gdb/gdb/tui/tui-layout.h | 38 - contrib/gdb/gdb/tui/tui-main.c | 37 - contrib/gdb/gdb/tui/tui-out.c | 413 - contrib/gdb/gdb/tui/tui-regs.c | 754 - contrib/gdb/gdb/tui/tui-regs.h | 39 - contrib/gdb/gdb/tui/tui-source.c | 352 - contrib/gdb/gdb/tui/tui-source.h | 40 - contrib/gdb/gdb/tui/tui-stack.c | 427 - contrib/gdb/gdb/tui/tui-stack.h | 34 - contrib/gdb/gdb/tui/tui-win.c | 1520 -- contrib/gdb/gdb/tui/tui-win.h | 59 - contrib/gdb/gdb/tui/tui-windata.c | 304 - contrib/gdb/gdb/tui/tui-windata.h | 41 - contrib/gdb/gdb/tui/tui-wingeneral.c | 276 - contrib/gdb/gdb/tui/tui-wingeneral.h | 45 - contrib/gdb/gdb/tui/tui-winsource.c | 654 - contrib/gdb/gdb/tui/tui-winsource.h | 73 - contrib/gdb/gdb/tui/tui.c | 590 - contrib/gdb/gdb/tui/tui.h | 100 - contrib/gdb/gdb/typeprint.c | 368 - contrib/gdb/gdb/typeprint.h | 31 - contrib/gdb/gdb/ui-file.c | 617 - contrib/gdb/gdb/ui-file.h | 105 - contrib/gdb/gdb/ui-out.c | 1163 -- contrib/gdb/gdb/ui-out.h | 276 - contrib/gdb/gdb/user-regs.c | 211 - contrib/gdb/gdb/user-regs.h | 71 - contrib/gdb/gdb/utils.c | 3059 ---- contrib/gdb/gdb/uw-thread.c | 1067 -- contrib/gdb/gdb/valarith.c | 1419 -- contrib/gdb/gdb/valops.c | 2934 --- contrib/gdb/gdb/valprint.c | 1486 -- contrib/gdb/gdb/valprint.h | 72 - contrib/gdb/gdb/value.h | 577 - contrib/gdb/gdb/values.c | 1346 -- contrib/gdb/gdb/varobj.c | 2562 --- contrib/gdb/gdb/varobj.h | 100 - contrib/gdb/gdb/version.h | 33 - contrib/gdb/gdb/version.in | 1 - contrib/gdb/gdb/win32-nat.c | 2460 --- contrib/gdb/gdb/wince-stub.c | 592 - contrib/gdb/gdb/wince-stub.h | 48 - contrib/gdb/gdb/wince.c | 2049 --- contrib/gdb/gdb/wrapper.c | 333 - contrib/gdb/gdb/wrapper.h | 51 - contrib/gdb/gdb/xcoffread.c | 3033 ---- contrib/gdb/gdb/xcoffsolib.c | 196 - contrib/gdb/gdb/xcoffsolib.h | 66 - contrib/gdb/gdb/xmodem.c | 275 - contrib/gdb/gdb/xmodem.h | 32 - contrib/gdb/gettext.m4 | 344 - contrib/gdb/include/COPYING | 340 - contrib/gdb/include/MAINTAINERS | 1 - contrib/gdb/include/alloca-conf.h | 24 - contrib/gdb/include/ansidecl.h | 315 - contrib/gdb/include/bfdlink.h | 686 - contrib/gdb/include/bin-bugs.h | 3 - contrib/gdb/include/bout.h | 191 - contrib/gdb/include/demangle.h | 533 - contrib/gdb/include/dis-asm.h | 317 - contrib/gdb/include/dyn-string.h | 63 - contrib/gdb/include/fibheap.h | 86 - contrib/gdb/include/filenames.h | 51 - contrib/gdb/include/floatformat.h | 133 - contrib/gdb/include/fnmatch.h | 70 - contrib/gdb/include/fopen-bin.h | 27 - contrib/gdb/include/fopen-same.h | 27 - contrib/gdb/include/fopen-vms.h | 24 - contrib/gdb/include/gdb/callback.h | 272 - contrib/gdb/include/gdb/fileio.h | 146 - contrib/gdb/include/gdb/remote-sim.h | 282 - contrib/gdb/include/gdb/signals.h | 237 - contrib/gdb/include/gdb/sim-arm.h | 114 - contrib/gdb/include/gdb/sim-d10v.h | 142 - contrib/gdb/include/gdb/sim-frv.h | 53 - contrib/gdb/include/gdb/sim-h8300.h | 78 - contrib/gdb/include/gdb/sim-sh.h | 161 - contrib/gdb/include/gdbm.h | 91 - contrib/gdb/include/getopt.h | 144 - contrib/gdb/include/hashtab.h | 195 - contrib/gdb/include/hp-symtab.h | 1866 -- contrib/gdb/include/ieee.h | 165 - contrib/gdb/include/libiberty.h | 335 - contrib/gdb/include/md5.h | 142 - contrib/gdb/include/oasys.h | 192 - contrib/gdb/include/objalloc.h | 115 - contrib/gdb/include/obstack.h | 611 - contrib/gdb/include/os9k.h | 181 - contrib/gdb/include/partition.h | 85 - contrib/gdb/include/progress.h | 37 - contrib/gdb/include/safe-ctype.h | 119 - contrib/gdb/include/sort.h | 48 - contrib/gdb/include/splay-tree.h | 159 - contrib/gdb/include/symcat.h | 49 - contrib/gdb/include/ternary.h | 51 - contrib/gdb/include/xregex.h | 28 - contrib/gdb/include/xregex2.h | 571 - contrib/gdb/include/xtensa-isa-internal.h | 114 - contrib/gdb/include/xtensa-isa.h | 230 - contrib/gdb/install-sh | 316 - contrib/gdb/libtool.m4 | 893 - contrib/gdb/ltcf-c.sh | 824 - contrib/gdb/ltcf-cxx.sh | 1021 -- contrib/gdb/ltcf-gcj.sh | 651 - contrib/gdb/ltconfig | 2833 --- contrib/gdb/ltmain.sh | 5469 ------ contrib/gdb/md5.sum | 5330 ------ contrib/gdb/missing | 336 - contrib/gdb/mkinstalldirs | 150 - contrib/gdb/move-if-change | 32 - contrib/gdb/src-release | 336 - contrib/gdb/symlink-tree | 78 - contrib/gdb/ylwrap | 123 - 850 files changed, 487696 deletions(-) diff --git a/contrib/gdb/COPYING b/contrib/gdb/COPYING deleted file mode 100644 index 60549be514af..000000000000 --- a/contrib/gdb/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on *** 492679 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Thu Dec 31 20:47:20 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 993F24CF609; Thu, 31 Dec 2020 20:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6Kw83w4dz3qMy; Thu, 31 Dec 2020 20:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7905516BF5; Thu, 31 Dec 2020 20:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVKlKmw049561; Thu, 31 Dec 2020 20:47:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVKlKZp049560; Thu, 31 Dec 2020 20:47:20 GMT (envelope-from git) Date: Thu, 31 Dec 2020 20:47:20 GMT Message-Id: <202012312047.0BVKlKZp049560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ryan Libby Subject: git: 939430f23771 - stable/12 - Fix the build of scandir_b with GCC. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 939430f23771bb2bdd85337a58f5ba0757f60782 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 20:47:20 -0000 The branch stable/12 has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=939430f23771bb2bdd85337a58f5ba0757f60782 commit 939430f23771bb2bdd85337a58f5ba0757f60782 Author: John Baldwin AuthorDate: 2020-08-31 21:55:25 +0000 Commit: Ryan Libby CommitDate: 2020-12-31 19:56:33 +0000 Fix the build of scandir_b with GCC. Use explicit typedefs for block thunk structures as in r264143. Reviewed by: kib, adrian MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D26256 (cherry picked from commit d10af81d2defe43db0db0a7dca3eefb047bd8ddc) --- lib/libc/gen/scandir.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/libc/gen/scandir.c b/lib/libc/gen/scandir.c index 2b8d244bcc59..10cd7633dac1 100644 --- a/lib/libc/gen/scandir.c +++ b/lib/libc/gen/scandir.c @@ -56,15 +56,18 @@ void qsort_b(void *, size_t, size_t, void *); #define SELECT(x) select(x) #endif -#ifndef I_AM_SCANDIR_B +#ifdef I_AM_SCANDIR_B +typedef DECLARE_BLOCK(int, select_block, const struct dirent *); +typedef DECLARE_BLOCK(int, dcomp_block, const struct dirent **, + const struct dirent **); +#else static int alphasort_thunk(void *thunk, const void *p1, const void *p2); #endif int #ifdef I_AM_SCANDIR_B -scandir_b(const char *dirname, struct dirent ***namelist, - DECLARE_BLOCK(int, select, const struct dirent *), - DECLARE_BLOCK(int, dcomp, const struct dirent **, const struct dirent **)) +scandir_b(const char *dirname, struct dirent ***namelist, select_block select, + dcomp_block dcomp) #else scandir(const char *dirname, struct dirent ***namelist, int (*select)(const struct dirent *), int (*dcomp)(const struct dirent **, From owner-dev-commits-src-all@freebsd.org Thu Dec 31 20:47:20 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ABF4A4CF1C8; Thu, 31 Dec 2020 20:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6Kw84Wqdz3qN0; Thu, 31 Dec 2020 20:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A6AA1708B; Thu, 31 Dec 2020 20:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVKlKcY049578; Thu, 31 Dec 2020 20:47:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVKlKjF049577; Thu, 31 Dec 2020 20:47:20 GMT (envelope-from git) Date: Thu, 31 Dec 2020 20:47:20 GMT Message-Id: <202012312047.0BVKlKjF049577@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ryan Libby Subject: git: 24236af8d5eb - stable/12 - libc: hide alphasort_thunk behind I_AM_SCANDIR_B MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 24236af8d5eb595eaf8c171eca53df23e755c432 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 20:47:20 -0000 The branch stable/12 has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=24236af8d5eb595eaf8c171eca53df23e755c432 commit 24236af8d5eb595eaf8c171eca53df23e755c432 Author: Mateusz Guzik AuthorDate: 2020-08-23 11:06:59 +0000 Commit: Ryan Libby CommitDate: 2020-12-31 19:56:33 +0000 libc: hide alphasort_thunk behind I_AM_SCANDIR_B Should unbreak gcc build as reported by tinderbox: lib/libc/gen/scandir.c:59:12: warning: 'alphasort_thunk' declared 'static' but never defined [-Wunused-function] (cherry picked from commit 992bcb37c28ad1a6426df7996f297187ae3d901a) --- lib/libc/gen/scandir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libc/gen/scandir.c b/lib/libc/gen/scandir.c index 7e5bcce905fb..2b8d244bcc59 100644 --- a/lib/libc/gen/scandir.c +++ b/lib/libc/gen/scandir.c @@ -56,7 +56,9 @@ void qsort_b(void *, size_t, size_t, void *); #define SELECT(x) select(x) #endif +#ifndef I_AM_SCANDIR_B static int alphasort_thunk(void *thunk, const void *p1, const void *p2); +#endif int #ifdef I_AM_SCANDIR_B From owner-dev-commits-src-all@freebsd.org Thu Dec 31 20:56:59 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2D8494CF752; Thu, 31 Dec 2020 20:56:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6L7H0p0Wz3qvG; Thu, 31 Dec 2020 20:56:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E7871709C; Thu, 31 Dec 2020 20:56:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVKuwfW061610; Thu, 31 Dec 2020 20:56:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVKuw0X061609; Thu, 31 Dec 2020 20:56:58 GMT (envelope-from git) Date: Thu, 31 Dec 2020 20:56:58 GMT Message-Id: <202012312056.0BVKuw0X061609@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 1e54857bd9f5 - main - Stop defaulting to DWRAF2 in kernel compilation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e54857bd9f5791ec1edfc5c21edb374519e9061 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 20:56:59 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1e54857bd9f5791ec1edfc5c21edb374519e9061 commit 1e54857bd9f5791ec1edfc5c21edb374519e9061 Author: Ed Maste AuthorDate: 2020-12-31 19:31:12 +0000 Commit: Ed Maste CommitDate: 2020-12-31 20:56:18 +0000 Stop defaulting to DWRAF2 in kernel compilation After the removal of obsolete GDB 6.1.1 from the base system in 1c0ea326aa6d we no longer need to downgrade to DWARF2 debug info. We will need to ensure that our tools (e.g. ctfconvert) handle DWARF5 prior to it becoming the default in the Clang and GCC versions we use. Reported by: jhb Relnotes: Yes Sponsored by: The FreeBSD Foundation --- sys/conf/kern.mk | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index e897249c32e6..8f0163a3d0a0 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -245,17 +245,6 @@ CFLAGS+= -ftrivial-auto-var-init=pattern .endif .endif -# -# Add -gdwarf-2 when compiling -g. The default starting in clang v3.4 -# and gcc 4.8 is to generate DWARF version 4. However, our tools don't -# cope well with DWARF 4, so force it to genereate DWARF2, which they -# understand. Do this unconditionally as it is harmless when not needed, -# but critical for these newer versions. -# -.if ${CFLAGS:M-g} != "" && ${CFLAGS:M-gdwarf*} == "" -CFLAGS+= -gdwarf-2 -.endif - CFLAGS+= ${CWARNFLAGS:M*} ${CWARNFLAGS.${.IMPSRC:T}} CFLAGS+= ${CWARNFLAGS.${COMPILER_TYPE}} CFLAGS+= ${CFLAGS.${COMPILER_TYPE}} ${CFLAGS.${.IMPSRC:T}} From owner-dev-commits-src-all@freebsd.org Thu Dec 31 21:03:39 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 58EAD4CFD8D; Thu, 31 Dec 2020 21:03:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6LGz1xDLz3rPP; Thu, 31 Dec 2020 21:03:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 347CD170BE; Thu, 31 Dec 2020 21:03:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVL3dN9073809; Thu, 31 Dec 2020 21:03:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVL3dGu073808; Thu, 31 Dec 2020 21:03:39 GMT (envelope-from git) Date: Thu, 31 Dec 2020 21:03:39 GMT Message-Id: <202012312103.0BVL3dGu073808@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 942951ba46ec - main - uma dbg: catch more corruption with atomics MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 942951ba46ecd5ebab18de006a24dc52e2d3f745 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 21:03:39 -0000 The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=942951ba46ecd5ebab18de006a24dc52e2d3f745 commit 942951ba46ecd5ebab18de006a24dc52e2d3f745 Author: Ryan Libby AuthorDate: 2020-12-31 21:02:45 +0000 Commit: Ryan Libby CommitDate: 2020-12-31 21:02:45 +0000 uma dbg: catch more corruption with atomics Use atomic testandset and testandclear to catch concurrent double free, and to reduce the number of atomic operations. Submitted by: jeff Reviewed by: cem, kib, markj (all previous version) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D22703 --- sys/vm/uma_core.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index a0192642205d..39c846effac8 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -5392,10 +5392,10 @@ uma_dbg_alloc(uma_zone_t zone, uma_slab_t slab, void *item) keg = zone->uz_keg; freei = slab_item_index(slab, keg, item); - if (BIT_ISSET(keg->uk_ipers, freei, slab_dbg_bits(slab, keg))) + if (BIT_TEST_SET_ATOMIC(keg->uk_ipers, freei, + slab_dbg_bits(slab, keg))) panic("Duplicate alloc of %p from zone %p(%s) slab %p(%d)", item, zone, zone->uz_name, slab, freei); - BIT_SET_ATOMIC(keg->uk_ipers, freei, slab_dbg_bits(slab, keg)); } /* @@ -5426,11 +5426,10 @@ uma_dbg_free(uma_zone_t zone, uma_slab_t slab, void *item) panic("Unaligned free of %p from zone %p(%s) slab %p(%d)", item, zone, zone->uz_name, slab, freei); - if (!BIT_ISSET(keg->uk_ipers, freei, slab_dbg_bits(slab, keg))) + if (!BIT_TEST_CLR_ATOMIC(keg->uk_ipers, freei, + slab_dbg_bits(slab, keg))) panic("Duplicate free of %p from zone %p(%s) slab %p(%d)", item, zone, zone->uz_name, slab, freei); - - BIT_CLR_ATOMIC(keg->uk_ipers, freei, slab_dbg_bits(slab, keg)); } #endif /* INVARIANTS */ From owner-dev-commits-src-all@freebsd.org Thu Dec 31 21:03:39 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 65D9F4CFBA6; Thu, 31 Dec 2020 21:03:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6LGz2PQKz3rJl; Thu, 31 Dec 2020 21:03:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 45DEE17149; Thu, 31 Dec 2020 21:03:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVL3dZ4073826; Thu, 31 Dec 2020 21:03:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVL3dP0073825; Thu, 31 Dec 2020 21:03:39 GMT (envelope-from git) Date: Thu, 31 Dec 2020 21:03:39 GMT Message-Id: <202012312103.0BVL3dP0073825@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: ae4a8e52072a - main - bitset: implement BIT_TEST_CLR_ATOMIC & BIT_TEST_SET_ATOMIC MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ae4a8e52072a87bfd49d553b9b14450c626269f8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 21:03:39 -0000 The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=ae4a8e52072a87bfd49d553b9b14450c626269f8 commit ae4a8e52072a87bfd49d553b9b14450c626269f8 Author: Ryan Libby AuthorDate: 2020-12-31 21:02:45 +0000 Commit: Ryan Libby CommitDate: 2020-12-31 21:02:45 +0000 bitset: implement BIT_TEST_CLR_ATOMIC & BIT_TEST_SET_ATOMIC That is, provide wrappers around the atomic_testandclear and atomic_testandset primitives. Submitted by: jeff Reviewed by: cem, kib, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D22702 --- share/man/man9/bitset.9 | 14 +++++++++++++- sys/sys/bitset.h | 14 ++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/share/man/man9/bitset.9 b/share/man/man9/bitset.9 index d597282fea9a..1e080f515788 100644 --- a/share/man/man9/bitset.9 +++ b/share/man/man9/bitset.9 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 25, 2020 +.Dd December 31, 2020 .Dt BITSET 9 .Os .Sh NAME @@ -60,6 +60,8 @@ .Nm BIT_CLR_ATOMIC , .Nm BIT_SET_ATOMIC , .Nm BIT_SET_ATOMIC_ACQ , +.Nm BIT_TEST_SET_ATOMIC , +.Nm BIT_TEST_CLR_ATOMIC , .Nm BIT_AND_ATOMIC , .Nm BIT_OR_ATOMIC , .Nm BIT_COPY_STORE_REL @@ -137,6 +139,10 @@ .Fn BIT_CLR_ATOMIC "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset" .Fn BIT_SET_ATOMIC "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset" .Fn BIT_SET_ATOMIC_ACQ "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset" +.Ft bool +.Fn BIT_TEST_SET_ATOMIC "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset" +.Ft bool +.Fn BIT_TEST_CLR_ATOMIC "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset" .\" .Fo BIT_AND_ATOMIC .Fa "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src" @@ -205,6 +211,9 @@ in the bitset pointed to by The .Fn BIT_CLR_ATOMIC macro is identical, but the bit is cleared atomically. +The +.Fn BIT_TEST_CLR_ATOMIC +macro atomically clears the bit and returns whether it was set. .Pp The .Fn BIT_COPY @@ -236,6 +245,9 @@ macro is identical, but the bit is set atomically. The .Fn BIT_SET_ATOMIC_ACQ macro sets the bit with acquire semantics. +The +.Fn BIT_TEST_SET_ATOMIC +macro atomically sets the bit and returns whether it was set. .Pp The .Fn BIT_ZERO diff --git a/sys/sys/bitset.h b/sys/sys/bitset.h index 97f18def7236..2b5df78a8193 100644 --- a/sys/sys/bitset.h +++ b/sys/sys/bitset.h @@ -173,6 +173,12 @@ (d)->__bits[__i] = (s1)->__bits[__i] ^ (s2)->__bits[__i];\ } while (0) +/* + * Note, the atomic(9) API is not consistent between clear/set and + * testandclear/testandset in whether the value argument is a mask + * or a bit index. + */ + #define BIT_CLR_ATOMIC(_s, n, p) \ atomic_clear_long(&(p)->__bits[__bitset_word(_s, n)], \ __bitset_mask((_s), n)) @@ -185,6 +191,14 @@ atomic_set_acq_long(&(p)->__bits[__bitset_word(_s, n)], \ __bitset_mask((_s), n)) +#define BIT_TEST_CLR_ATOMIC(_s, n, p) \ + (atomic_testandclear_long( \ + &(p)->__bits[__bitset_word((_s), (n))], (n)) != 0) + +#define BIT_TEST_SET_ATOMIC(_s, n, p) \ + (atomic_testandset_long( \ + &(p)->__bits[__bitset_word((_s), (n))], (n)) != 0) + /* Convenience functions catering special cases. */ #define BIT_AND_ATOMIC(_s, d, s) do { \ __size_t __i; \ From owner-dev-commits-src-all@freebsd.org Thu Dec 31 22:21:55 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0E7E4D1EBD; Thu, 31 Dec 2020 22:21:55 +0000 (UTC) (envelope-from grog@lemis.com) Received: from lax.lemis.com (www.lemis.com [45.32.70.18]) by mx1.freebsd.org (Postfix) with ESMTP id 4D6N1H40Ldz4R6L; Thu, 31 Dec 2020 22:21:55 +0000 (UTC) (envelope-from grog@lemis.com) Received: from eureka.lemis.com (aussie-gw.lemis.com [167.179.139.35]) by lax.lemis.com (Postfix) with ESMTP id 5DCF328150; Thu, 31 Dec 2020 22:21:54 +0000 (UTC) Received: by eureka.lemis.com (Postfix, from userid 1004) id A30D22635BC; Fri, 1 Jan 2021 09:21:53 +1100 (AEDT) Date: Fri, 1 Jan 2021 09:21:53 +1100 From: Greg 'groggy' Lehey To: Hans Petter Selasky Cc: Glen Barber , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: c3e89a30fdc2 - main - copyrights: Happy New Year 2021 Message-ID: <20201231222153.GF92720@eureka.lemis.com> References: <202012311529.0BVFTq1s056562@gitrepo.freebsd.org> <1b83bf26-d7ca-9c22-3302-901e4bb0f254@selasky.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: <1b83bf26-d7ca-9c22-3302-901e4bb0f254@selasky.org> Organization: The FreeBSD Project Phone: +61-3-5309-0418 Mobile: +61-490-494-038. Use only as instructed. WWW-Home-Page: http://www.FreeBSD X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 User-Agent: Mutt/1.6.1 (2016-04-27) X-Rspamd-Queue-Id: 4D6N1H40Ldz4R6L X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 22:21:55 -0000 --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thursday, 31 December 2020 at 16:32:28 +0100, Hans Petter Selasky wrote: > On 12/31/20 4:29 PM, Glen Barber wrote: >> The branch main has been updated by gjb: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=c3e89a30fdc2c985b73f46ab2f414d53945fc00b >> >> commit c3e89a30fdc2c985b73f46ab2f414d53945fc00b >> Author: Glen Barber >> AuthorDate: 2020-12-31 15:23:36 +0000 >> Commit: Glen Barber >> CommitDate: 2020-12-31 15:29:44 +0000 >> >> copyrights: Happy New Year 2021 >> >> Good riddance 2020. > > Hey hey, it is not midnight yet ;-) > From owner-src-committers@freebsd.org Fri Jan 1 03:36:17 2021 > gpg: Signature made Fri 1 Jan 03:36:03 2021 AEDT using RSA key ID 478FE293 Long gone. And a Happy New Year to all. Greg -- Sent from my desktop computer. See complete headers for address and phone numbers. This message is digitally signed. If your Microsoft mail program reports problems, please read http://lemis.com/broken-MUA --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iEUEARECAAYFAl/uTwAACgkQIubykFB6QiMHSgCfYOxqaTaAazy+jf0lpm7l/2tZ JMEAliIohlai/IEO1B2uCS6gCIwf/aA= =SRcf -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+-- From owner-dev-commits-src-all@freebsd.org Thu Dec 31 23:10:05 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D19264D4318; Thu, 31 Dec 2020 23:10:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 4D6P4s5Lmrz4WHj; Thu, 31 Dec 2020 23:10:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:6d91:ae61:b3ec:ca03]) (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 93F0D241FE; Thu, 31 Dec 2020 23:10:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL To: rgrimes@freebsd.org, Benjamin Kaduk Cc: Ryan Libby , Warner Losh , Glen Barber , Kyle Evans , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202012312240.0BVMehp3088202@gndrsh.dnsmgr.net> 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: <35f3f84a-5397-9ea7-38ed-d488610cd583@FreeBSD.org> Date: Thu, 31 Dec 2020 15:10:02 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <202012312240.0BVMehp3088202@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 23:10:05 -0000 On 12/31/20 2:40 PM, Rodney W. Grimes wrote: >> On Thu, Dec 31, 2020 at 10:25 AM John Baldwin wrote: >> >>> On 12/30/20 1:18 PM, Rodney W. Grimes wrote: >>>> Take for example all the files in /etc, these files can easily >>>> at present often be tracked back to exactly what release installed >>>> them cause the $FreeBSD$ points you at it. These files are often >>>> modified by local administrators, and with out knowing what version >>>> they started out it is a crap shoot to ever figure it out unless >>>> the local mods are minor and you get lucky. >>>> >>>> Contractors are some times hired to go in and upgrade or clean up >>>> after someone else did work, and not having this information and >>>> telling them to go dig in git to try and figure out the state of >>>> there system is pretty much a non-started, well at least it is for >>>> me. >>> >>> Have you seen 'etcupdate diff'? With pkgbase I'm hopeful we will >>> have a similar 'pkg confdiff' type functionality (for ports as well as >>> base) where packages keep stock config files around while installed >>> that existing ones can be compared against (and that can be used for >>> 3 way merges during upgrades similar to what etcupdate does). >>> >>> (etcupdate diff is explicitly designed due to experience in sysadmin >>> mode and etcupdate in general is designed with the goal of rolling >>> out new snapshots to fleets of machines requiring minimal user >>> intervention) >>> >>> >> More generally I would make the analogy to keeping metadata about >> a given data object in-band with the data vs. separately tracked. >> Generally, the in-band data cannot be authenticated very well and >> can be malleable, letting the metadata get out of sync with the data >> both when the data is modified and when the metadata is modified. >> It's generally easier to build robust and secure systems when the >> metadata is tracked separately from the data itself. This is the general >> model that etcupdate fits into (keeping a pristine copy of the file along >> with versioning/identification information), as well as puppet and similar >> fleet-management tools. In the latter case the expected configuration >> and versioning is tracked and authenticated centrally, and any local >> modifications or deviations from the expected state can be flagged for >> follow-up. > > And that works GREAT when people are disaplined enough to follow > it, it all fails misserable when you have not so experienced people > setting up a bunch of systems... that then leave or are dismissed > and you end up called in to to try and pick up the pieces. This > is when that FreeBSD string is a total ass saver. > > If you have ever had to go into and clean up after some one > makes a mess you'll know what I am talking about if you have > not done this type of work.. well you just probably not going > to get it. The id strings do not solve all problems. In the case of a total tire fire, you can't trust the strings anyway. People are free to merge in the other changes to files without updating the strings, etc. Binaries are harder to munge in that fashion, but it's quite easy to avoid updating the FreeBSD string in an /etc file (e.g. if someone incorrectly assumed the values meant something and had to be preserved to not "break the system" which is the kind of thing I've run into in past tire fires). At that point you are best left with doing a bisect of a source tree to line up which source tree is closest to the files you have in /etc. -- John Baldwin From owner-dev-commits-src-all@freebsd.org Thu Dec 31 23:19:02 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 595DF4D44DD; Thu, 31 Dec 2020 23:19:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6PHB23glz4Wvy; Thu, 31 Dec 2020 23:19:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 39C3818CCF; Thu, 31 Dec 2020 23:19:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVNJ2vY032963; Thu, 31 Dec 2020 23:19:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVNJ2rI032962; Thu, 31 Dec 2020 23:19:02 GMT (envelope-from git) Date: Thu, 31 Dec 2020 23:19:02 GMT Message-Id: <202012312319.0BVNJ2rI032962@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jamie Gritton Subject: git: b4e87a632955 - main - jail: Clean up allprison_lock handing in kern_jail_set MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b4e87a632955a3a10ef6031c3d3e51c64e410749 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 23:19:02 -0000 The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=b4e87a632955a3a10ef6031c3d3e51c64e410749 commit b4e87a632955a3a10ef6031c3d3e51c64e410749 Author: Jamie Gritton AuthorDate: 2020-12-31 23:18:43 +0000 Commit: Jamie Gritton CommitDate: 2020-12-31 23:18:43 +0000 jail: Clean up allprison_lock handing in kern_jail_set Keep explicit track of the allprison_lock state during the final part of kern_jail_set, instead of deducing it from the JAIL_ATTACH flag. Also properly clean up when the attachment fails, fixing a long- standing (though minor) memory leak. --- sys/kern/kern_jail.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index fb77cf87126d..1ecb023717bd 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -526,7 +526,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) #endif unsigned long hid; size_t namelen, onamelen, pnamelen; - int born, created, cuflags, descend, enforce; + int born, created, cuflags, descend, enforce, slocked; int error, errmsg_len, errmsg_pos; int gotchildmax, gotenforce, gothid, gotrsnum, gotslevel; int jid, jsys, len, level; @@ -1828,24 +1828,32 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) } /* Attach this process to the prison if requested. */ + slocked = PD_LIST_SLOCKED; if (flags & JAIL_ATTACH) { mtx_lock(&pr->pr_mtx); error = do_jail_attach(td, pr); + slocked = 0; if (error) { vfs_opterror(opts, "attach failed"); - if (!created) - prison_deref(pr, PD_DEREF); + if (born) { + sx_slock(&allprison_lock); + slocked = PD_LIST_SLOCKED; + (void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL); + } + prison_deref(pr, created + ? slocked + : PD_DEREF | slocked); goto done_errmsg; } } #ifdef RACCT if (racct_enable && !created) { - if (!(flags & JAIL_ATTACH)) + if (slocked) { sx_sunlock(&allprison_lock); + slocked = 0; + } prison_racct_modify(pr); - if (!(flags & JAIL_ATTACH)) - sx_slock(&allprison_lock); } #endif @@ -1857,18 +1865,16 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) * (which was not done earlier so that the prison would not be publicly * visible). */ - if (!created) { - prison_deref(pr, (flags & JAIL_ATTACH) - ? PD_DEREF - : PD_DEREF | PD_LIST_SLOCKED); - } else { + if (!created) + prison_deref(pr, PD_DEREF | slocked); + else { if (pr_flags & PR_PERSIST) { mtx_lock(&pr->pr_mtx); pr->pr_ref++; pr->pr_uref++; mtx_unlock(&pr->pr_mtx); } - if (!(flags & JAIL_ATTACH)) + if (slocked) sx_sunlock(&allprison_lock); } From owner-dev-commits-src-all@freebsd.org Thu Dec 31 23:32:17 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 507204D4B1F; Thu, 31 Dec 2020 23:32:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 4D6PZT1rVJz4Xfn; Thu, 31 Dec 2020 23:32:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 324EA191A2; Thu, 31 Dec 2020 23:32:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVNWHCC056602; Thu, 31 Dec 2020 23:32:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVNWHP2056601; Thu, 31 Dec 2020 23:32:17 GMT (envelope-from git) Date: Thu, 31 Dec 2020 23:32:17 GMT Message-Id: <202012312332.0BVNWHP2056601@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 68dc94c7d314 - main - Correct and add some comments. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 68dc94c7d314b02ef80fe972f524a2b3c6e68a1c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 23:32:17 -0000 The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=68dc94c7d314b02ef80fe972f524a2b3c6e68a1c commit 68dc94c7d314b02ef80fe972f524a2b3c6e68a1c Author: Kirk McKusick AuthorDate: 2020-12-31 23:15:44 +0000 Commit: Kirk McKusick CommitDate: 2020-12-31 23:36:33 +0000 Correct and add some comments. Sponsored by: Netflix --- sbin/fsck_ffs/fsck.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sbin/fsck_ffs/fsck.h b/sbin/fsck_ffs/fsck.h index 8c7fe6d693c9..a471d1979438 100644 --- a/sbin/fsck_ffs/fsck.h +++ b/sbin/fsck_ffs/fsck.h @@ -137,11 +137,11 @@ extern struct inostatlist { */ struct bufarea { TAILQ_ENTRY(bufarea) b_list; /* buffer list */ - ufs2_daddr_t b_bno; - int b_size; - int b_errs; - int b_flags; - int b_type; + ufs2_daddr_t b_bno; /* disk block number */ + int b_size; /* size of I/O */ + int b_errs; /* I/O error */ + int b_flags; /* B_ flags below */ + int b_type; /* BT_ type below */ union { char *b_buf; /* buffer space */ ufs1_daddr_t *b_indir1; /* UFS1 indirect block */ @@ -172,14 +172,14 @@ struct bufarea { /* * Type of data in buffer */ -#define BT_UNKNOWN 0 /* Buffer holds a superblock */ +#define BT_UNKNOWN 0 /* Buffer type is unknown */ #define BT_SUPERBLK 1 /* Buffer holds a superblock */ #define BT_CYLGRP 2 /* Buffer holds a cylinder group map */ #define BT_LEVEL1 3 /* Buffer holds single level indirect */ #define BT_LEVEL2 4 /* Buffer holds double level indirect */ #define BT_LEVEL3 5 /* Buffer holds triple level indirect */ #define BT_EXTATTR 6 /* Buffer holds external attribute data */ -#define BT_INODES 7 /* Buffer holds external attribute data */ +#define BT_INODES 7 /* Buffer holds inodes */ #define BT_DIRDATA 8 /* Buffer holds directory data */ #define BT_DATA 9 /* Buffer holds user data */ #define BT_NUMBUFTYPES 10