From owner-dev-commits-src-main@freebsd.org Mon Feb 22 12:02:05 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5FC9A55325B; Mon, 22 Feb 2021 12:02: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dkgld2FS6z3JMT; Mon, 22 Feb 2021 12:02: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 3FF2E253A6; Mon, 22 Feb 2021 12:02: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 11MC25F7071532; Mon, 22 Feb 2021 12:02:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MC24EB071531; Mon, 22 Feb 2021 12:02:04 GMT (envelope-from git) Date: Mon, 22 Feb 2021 12:02:04 GMT Message-Id: <202102221202.11MC24EB071531@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: ba27dd8be821 - main - zfs: merge OpenZFS master-9312e0fd1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ba27dd8be821792e15bdabfac69fd6cab0cf9dd3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 12:02:05 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=ba27dd8be821792e15bdabfac69fd6cab0cf9dd3 commit ba27dd8be821792e15bdabfac69fd6cab0cf9dd3 Merge: c02a28754bc2 0626917d0786 Author: Martin Matuska AuthorDate: 2021-02-22 11:35:56 +0000 Commit: Martin Matuska CommitDate: 2021-02-22 12:01:17 +0000 zfs: merge OpenZFS master-9312e0fd1 Notable upstream changes: 778869fa1 Fix reporting of mount progress e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD 03e02e5b5 Fix checksum errors not being counted on repeated repair 64e0fe14f Restore FreeBSD resource usage accounting 11f2e9a49 Fix panic if scrubbing after removing a slog device MFC after: 2 weeks cddl/lib/libzpool/Makefile | 1 + stand/libsa/zfs/zstd_shim.c | 5 + sys/contrib/openzfs/cmd/zfs/zfs_main.c | 3 - sys/contrib/openzfs/cmd/ztest/ztest.c | 113 ++++++++- .../openzfs/include/os/freebsd/spl/sys/uio.h | 43 +--- sys/contrib/openzfs/include/os/linux/spl/sys/uio.h | 22 +- .../include/os/linux/zfs/sys/zfs_context_os.h | 1 - sys/contrib/openzfs/include/sys/Makefile.am | 1 + sys/contrib/openzfs/include/sys/spa.h | 3 +- sys/contrib/openzfs/include/sys/uio_impl.h | 21 +- sys/contrib/openzfs/include/sys/zfs_context.h | 3 +- sys/contrib/openzfs/include/sys/zfs_racct.h | 37 +++ sys/contrib/openzfs/lib/libzpool/Makefile.am | 1 + sys/contrib/openzfs/lib/libzpool/util.c | 74 ++++-- .../lib/libzutil/os/linux/zutil_device_path_os.c | 252 ++++++++++++--------- sys/contrib/openzfs/module/Makefile.bsd | 1 + .../openzfs/module/os/freebsd/spl/spl_uio.c | 9 +- .../openzfs/module/os/freebsd/zfs/crypto_os.c | 15 +- .../openzfs/module/os/freebsd/zfs/zfs_racct.c | 55 +++++ .../openzfs/module/os/linux/zfs/Makefile.in | 1 + .../openzfs/module/os/linux/zfs/zfs_racct.c | 36 +++ sys/contrib/openzfs/module/zfs/arc.c | 2 + sys/contrib/openzfs/module/zfs/dmu.c | 5 + sys/contrib/openzfs/module/zfs/dsl_scan.c | 6 +- sys/contrib/openzfs/module/zfs/spa_config.c | 2 +- sys/contrib/openzfs/module/zfs/vdev.c | 9 +- sys/contrib/openzfs/module/zfs/vdev_indirect.c | 10 +- sys/contrib/openzfs/module/zfs/vdev_raidz.c | 20 +- sys/contrib/openzfs/module/zfs/vdev_rebuild.c | 3 + sys/contrib/openzfs/module/zfs/zfs_fm.c | 46 +++- sys/contrib/openzfs/module/zfs/zfs_ioctl.c | 2 +- sys/contrib/openzfs/module/zfs/zfs_vnops.c | 2 +- sys/contrib/openzfs/module/zfs/zio.c | 11 +- sys/contrib/openzfs/scripts/zfs.sh | 2 +- sys/contrib/openzfs/tests/runfiles/common.run | 3 +- .../functional/cli_root/zpool_events/Makefile.am | 3 +- .../zpool_events/zpool_events_clear_retained.ksh | 135 +++++++++++ .../zpool_events/zpool_events_duplicates.ksh | 11 - sys/modules/zfs/Makefile | 1 + sys/modules/zfs/zfs_config.h | 2 +- 40 files changed, 724 insertions(+), 248 deletions(-) diff --cc cddl/lib/libzpool/Makefile index d9b2e67094e3,000000000000..6893e31ff20a mode 100644,000000..100644 --- a/cddl/lib/libzpool/Makefile +++ b/cddl/lib/libzpool/Makefile @@@ -1,266 -1,0 +1,267 @@@ +# $FreeBSD$ + +ZFSTOP= ${SRCTOP}/sys/contrib/openzfs + +# ZFS_COMMON_SRCS +.PATH: ${ZFSTOP}/module/zfs +.PATH: ${ZFSTOP}/module/zcommon +.PATH: ${ZFSTOP}/module/unicode +# LUA_SRCS +.PATH: ${ZFSTOP}/module/lua +# ZSTD_SRCS +.PATH: ${ZFSTOP}/module/zstd +.PATH: ${ZFSTOP}/module/zstd/lib + +.PATH: ${ZFSTOP}/module/os/linux/zfs + +.PATH: ${ZFSTOP}/lib/libzpool + +.if exists(${SRCTOP}/sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH}/opensolaris_atomic.S) +.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH} +ATOMIC_SRCS= opensolaris_atomic.S +ACFLAGS+= -Wa,--noexecstack +.else +.PATH: ${SRCTOP}/sys/cddl/compat/opensolaris/kern +ATOMIC_SRCS= opensolaris_atomic.c +.endif + +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe" +# Don't waste GOT entries on small data. +PICFLAG= -fPIC +.endif + +LIB= zpool + +USER_C = \ + kernel.c \ + taskq.c \ + util.c + +KERNEL_C = \ + zfeature_common.c \ + zfs_comutil.c \ + zfs_deleg.c \ + zfs_fletcher.c \ + zfs_fletcher_superscalar.c \ + zfs_fletcher_superscalar4.c \ + zfs_namecheck.c \ + zfs_prop.c \ + zfs_zstd.c \ + zpool_prop.c \ + zprop_common.c \ + abd.c \ + abd_os.c \ + aggsum.c \ + arc.c \ + arc_os.c \ + blkptr.c \ + bplist.c \ + bpobj.c \ + bptree.c \ + btree.c \ + bqueue.c \ + cityhash.c \ + dbuf.c \ + dbuf_stats.c \ + ddt.c \ + ddt_zap.c \ + dmu.c \ + dmu_diff.c \ + dmu_object.c \ + dmu_objset.c \ + dmu_recv.c \ + dmu_redact.c \ + dmu_send.c \ + dmu_traverse.c \ + dmu_tx.c \ + dmu_zfetch.c \ + dnode.c \ + dnode_sync.c \ + dsl_bookmark.c \ + dsl_dataset.c \ + dsl_deadlist.c \ + dsl_deleg.c \ + dsl_dir.c \ + dsl_crypt.c \ + dsl_pool.c \ + dsl_prop.c \ + dsl_scan.c \ + dsl_synctask.c \ + dsl_destroy.c \ + dsl_userhold.c \ + edonr_zfs.c \ + hkdf.c \ + fm.c \ + gzip.c \ + lzjb.c \ + lz4.c \ + metaslab.c \ + mmp.c \ + multilist.c \ + objlist.c \ + pathname.c \ + range_tree.c \ + refcount.c \ + rrwlock.c \ + sa.c \ + sha256.c \ + skein_zfs.c \ + spa.c \ + spa_boot.c \ + spa_checkpoint.c \ + spa_config.c \ + spa_errlog.c \ + spa_history.c \ + spa_log_spacemap.c \ + spa_misc.c \ + spa_stats.c \ + space_map.c \ + space_reftree.c \ + txg.c \ + trace.c \ + uberblock.c \ + unique.c \ + vdev.c \ + vdev_cache.c \ + vdev_draid.c \ + vdev_draid_rand.c \ + vdev_file.c \ + vdev_indirect_births.c \ + vdev_indirect.c \ + vdev_indirect_mapping.c \ + vdev_initialize.c \ + vdev_label.c \ + vdev_mirror.c \ + vdev_missing.c \ + vdev_queue.c \ + vdev_raidz.c \ + vdev_raidz_math_aarch64_neon.c \ + vdev_raidz_math_aarch64_neonx2.c \ + vdev_raidz_math_avx2.c \ + vdev_raidz_math_avx512bw.c \ + vdev_raidz_math_avx512f.c \ + vdev_raidz_math.c \ + vdev_raidz_math_scalar.c \ + vdev_rebuild.c \ + vdev_removal.c \ + vdev_root.c \ + vdev_trim.c \ + zap.c \ + zap_leaf.c \ + zap_micro.c \ + zcp.c \ + zcp_get.c \ + zcp_global.c \ + zcp_iter.c \ + zcp_set.c \ + zcp_synctask.c \ + zfeature.c \ + zfs_byteswap.c \ + zfs_debug.c \ + zfs_fm.c \ + zfs_fuid.c \ + zfs_sa.c \ + zfs_znode.c \ ++ zfs_racct.c \ + zfs_ratelimit.c \ + zfs_rlock.c \ + zil.c \ + zio.c \ + zio_checksum.c \ + zio_compress.c \ + zio_crypt.c \ + zio_inject.c \ + zle.c \ + zrlock.c \ + zstd.c \ + zthr.c + +ARCH_C = +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +ARCH_C += vdev_raidz_math_sse2.c \ + vdev_raidz_math_ssse3.c \ + zfs_fletcher_intel.c \ + zfs_fletcher_sse.c +CFLAGS += -DHAVE_SSE2 -DHAVE_SSE3 +.endif +.if ${MACHINE_ARCH} == "amd64" +ARCH_C += zfs_fletcher_avx512.c +CFLAGS+= -DHAVE_AVX2 -DHAVE_AVX -D__x86_64 -DHAVE_AVX512F \ + -DHAVE_AVX512BW +.endif +.if ${MACHINE_CPUARCH} == "aarch64" +ARCH_C += zfs_fletcher_aarch64_neon.c +.endif + +LUA_C = \ + lapi.c \ + lauxlib.c \ + lbaselib.c \ + lcode.c \ + lcompat.c \ + lcorolib.c \ + lctype.c \ + ldebug.c \ + ldo.c \ + lfunc.c \ + lgc.c \ + llex.c \ + lmem.c \ + lobject.c \ + lopcodes.c \ + lparser.c \ + lstate.c \ + lstring.c \ + lstrlib.c \ + ltable.c \ + ltablib.c \ + ltm.c \ + lvm.c \ + lzio.c + +UNICODE_C = u8_textprep.c uconv.c + +SRCS= ${USER_C} ${KERNEL_C} ${LUA_C} ${UNICODE_C} ${ARCH_C} + +WARNS?= 2 +CFLAGS+= \ + -DIN_BASE \ + -I${ZFSTOP}/include \ + -I${ZFSTOP}/lib/libspl/include \ + -I${ZFSTOP}/lib/libspl/include/os/freebsd \ + -I${SRCTOP}/sys \ + -I${ZFSTOP}/include/os/freebsd/zfs \ + -I${SRCTOP}/cddl/compat/opensolaris/include \ + -I${ZFSTOP}/module/icp/include \ + -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \ + -DHAVE_ISSETUGID \ + -include ${SRCTOP}/sys/modules/zfs/zfs_config.h \ + -I${SRCTOP}/sys/modules/zfs \ + -I${ZFSTOP}/include/os/freebsd/zfs \ + -DLIB_ZPOOL_BUILD -DZFS_DEBUG \ + +# XXX: pthread doesn't have mutex_owned() equivalent, so we need to look +# into libthr private structures. That's sooo evil, but it's only for +# ZFS debugging tools needs. +CFLAGS+= -DWANTS_MUTEX_OWNED +CFLAGS+= -I${SRCTOP}/lib/libpthread/thread +CFLAGS+= -I${SRCTOP}/lib/libpthread/sys +CFLAGS+= -I${SRCTOP}/lib/libthr/arch/${MACHINE_CPUARCH}/include +CFLAGS.gcc+= -fms-extensions + +LIBADD= md pthread z spl icp nvpair avl umem + +# atomic.S doesn't like profiling. +MK_PROFILE= no + +CSTD= c99 + +# Since there are many asserts in this library, it makes no sense to compile +# it without debugging. + +CFLAGS+= -g -DDEBUG=1 + +CFLAGS.zfs_zstd.c= -Wno-cast-qual -Wno-pointer-arith +CFLAGS.zstd.c+= -fno-tree-vectorize + +.include diff --cc stand/libsa/zfs/zstd_shim.c index b94df6f51913,000000000000..91f5171a72b5 mode 100644,000000..100644 --- a/stand/libsa/zfs/zstd_shim.c +++ b/stand/libsa/zfs/zstd_shim.c @@@ -1,40 -1,0 +1,45 @@@ +/*- + * Copyright (c) 2020 M. Warner Losh + * + * 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$"); + +/* + * Small amount of shim code needed to get zfs_zstd.c to compile. These items + * here should all be defined in the SPL or as part of libstand somewhere, but + * aren't for reasons that haven't been tracked down yet. Ideally, they would + * all go away and we'd compile zfs_zstd.c directly. Based on an original by + * Matt Macey, but only the #include remains untouched from that. + */ + +#define ZFS_MODULE_PARAM_ARGS void +typedef int boolean_t; /* This one may be tough to get rid of */ + ++/* TODO: openzfs/include/sys/uio_impl.h must not be included */ ++#ifndef _SYS_UIO_IMPL_H ++#define _SYS_UIO_IMPL_H ++#endif ++ +#include diff --cc sys/contrib/openzfs/include/sys/zfs_racct.h index 000000000000,cfcdd336ea42..cfcdd336ea42 mode 000000,100644..100644 --- a/sys/contrib/openzfs/include/sys/zfs_racct.h +++ b/sys/contrib/openzfs/include/sys/zfs_racct.h diff --cc sys/contrib/openzfs/module/os/freebsd/zfs/zfs_racct.c index 000000000000,b46cc046268e..b46cc046268e mode 000000,100644..100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_racct.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_racct.c diff --cc sys/contrib/openzfs/module/os/linux/zfs/zfs_racct.c index 000000000000,7897e0f9edc1..7897e0f9edc1 mode 000000,100644..100644 --- a/sys/contrib/openzfs/module/os/linux/zfs/zfs_racct.c +++ b/sys/contrib/openzfs/module/os/linux/zfs/zfs_racct.c diff --cc sys/contrib/openzfs/module/zfs/zfs_ioctl.c index 0e35fd069cbb,000000000000..922253469fba mode 100644,000000..100644 --- a/sys/contrib/openzfs/module/zfs/zfs_ioctl.c +++ b/sys/contrib/openzfs/module/zfs/zfs_ioctl.c @@@ -1,7688 -1,0 +1,7688 @@@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Portions Copyright 2011 Martin Matuska + * Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved. + * Portions Copyright 2012 Pawel Jakub Dawidek + * Copyright (c) 2014, 2016 Joyent, Inc. All rights reserved. + * Copyright 2016 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2014, Joyent, Inc. All rights reserved. + * Copyright (c) 2011, 2020 by Delphix. All rights reserved. + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright (c) 2013 Steven Hartland. All rights reserved. + * Copyright (c) 2014 Integros [integros.com] + * Copyright 2016 Toomas Soome + * Copyright (c) 2016 Actifio, Inc. All rights reserved. + * Copyright (c) 2018, loli10K . All rights reserved. + * Copyright 2017 RackTop Systems. + * Copyright (c) 2017 Open-E, Inc. All Rights Reserved. + * Copyright (c) 2019 Datto Inc. + * Copyright (c) 2019, 2020 by Christian Schwarz. All rights reserved. + * Copyright (c) 2019, Klara Inc. + * Copyright (c) 2019, Allan Jude + */ + +/* + * ZFS ioctls. + * + * This file handles the ioctls to /dev/zfs, used for configuring ZFS storage + * pools and filesystems, e.g. with /sbin/zfs and /sbin/zpool. + * + * There are two ways that we handle ioctls: the legacy way where almost + * all of the logic is in the ioctl callback, and the new way where most + * of the marshalling is handled in the common entry point, zfsdev_ioctl(). + * + * Non-legacy ioctls should be registered by calling + * zfs_ioctl_register() from zfs_ioctl_init(). The ioctl is invoked + * from userland by lzc_ioctl(). + * + * The registration arguments are as follows: + * + * const char *name + * The name of the ioctl. This is used for history logging. If the + * ioctl returns successfully (the callback returns 0), and allow_log + * is true, then a history log entry will be recorded with the input & + * output nvlists. The log entry can be printed with "zpool history -i". + * + * zfs_ioc_t ioc + * The ioctl request number, which userland will pass to ioctl(2). + * We want newer versions of libzfs and libzfs_core to run against + * existing zfs kernel modules (i.e. a deferred reboot after an update). + * Therefore the ioctl numbers cannot change from release to release. + * + * zfs_secpolicy_func_t *secpolicy + * This function will be called before the zfs_ioc_func_t, to + * determine if this operation is permitted. It should return EPERM + * on failure, and 0 on success. Checks include determining if the + * dataset is visible in this zone, and if the user has either all + * zfs privileges in the zone (SYS_MOUNT), or has been granted permission + * to do this operation on this dataset with "zfs allow". + * + * zfs_ioc_namecheck_t namecheck + * This specifies what to expect in the zfs_cmd_t:zc_name -- a pool + * name, a dataset name, or nothing. If the name is not well-formed, + * the ioctl will fail and the callback will not be called. + * Therefore, the callback can assume that the name is well-formed + * (e.g. is null-terminated, doesn't have more than one '@' character, + * doesn't have invalid characters). + * + * zfs_ioc_poolcheck_t pool_check + * This specifies requirements on the pool state. If the pool does + * not meet them (is suspended or is readonly), the ioctl will fail + * and the callback will not be called. If any checks are specified + * (i.e. it is not POOL_CHECK_NONE), namecheck must not be NO_NAME. + * Multiple checks can be or-ed together (e.g. POOL_CHECK_SUSPENDED | + * POOL_CHECK_READONLY). + * + * zfs_ioc_key_t *nvl_keys + * The list of expected/allowable innvl input keys. This list is used + * to validate the nvlist input to the ioctl. + * + * boolean_t smush_outnvlist + * If smush_outnvlist is true, then the output is presumed to be a + * list of errors, and it will be "smushed" down to fit into the + * caller's buffer, by removing some entries and replacing them with a + * single "N_MORE_ERRORS" entry indicating how many were removed. See + * nvlist_smush() for details. If smush_outnvlist is false, and the + * outnvlist does not fit into the userland-provided buffer, then the + * ioctl will fail with ENOMEM. + * + * zfs_ioc_func_t *func + * The callback function that will perform the operation. + * + * The callback should return 0 on success, or an error number on + * failure. If the function fails, the userland ioctl will return -1, + * and errno will be set to the callback's return value. The callback + * will be called with the following arguments: + * + * const char *name + * The name of the pool or dataset to operate on, from + * zfs_cmd_t:zc_name. The 'namecheck' argument specifies the + * expected type (pool, dataset, or none). + * + * nvlist_t *innvl + * The input nvlist, deserialized from zfs_cmd_t:zc_nvlist_src. Or + * NULL if no input nvlist was provided. Changes to this nvlist are + * ignored. If the input nvlist could not be deserialized, the + * ioctl will fail and the callback will not be called. + * + * nvlist_t *outnvl + * The output nvlist, initially empty. The callback can fill it in, + * and it will be returned to userland by serializing it into + * zfs_cmd_t:zc_nvlist_dst. If it is non-empty, and serialization + * fails (e.g. because the caller didn't supply a large enough + * buffer), then the overall ioctl will fail. See the + * 'smush_nvlist' argument above for additional behaviors. + * + * There are two typical uses of the output nvlist: + * - To return state, e.g. property values. In this case, + * smush_outnvlist should be false. If the buffer was not large + * enough, the caller will reallocate a larger buffer and try + * the ioctl again. + * + * - To return multiple errors from an ioctl which makes on-disk + * changes. In this case, smush_outnvlist should be true. + * Ioctls which make on-disk modifications should generally not + * use the outnvl if they succeed, because the caller can not + * distinguish between the operation failing, and + * deserialization failing. + * + * IOCTL Interface Errors + * + * The following ioctl input errors can be returned: + * ZFS_ERR_IOC_CMD_UNAVAIL the ioctl number is not supported by kernel + * ZFS_ERR_IOC_ARG_UNAVAIL an input argument is not supported by kernel + * ZFS_ERR_IOC_ARG_REQUIRED a required input argument is missing + * ZFS_ERR_IOC_ARG_BADTYPE an input argument has an invalid type + */ + +#include +#include +#include - #include ++#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "zfs_namecheck.h" +#include "zfs_prop.h" +#include "zfs_deleg.h" +#include "zfs_comutil.h" + +#include +#include +#include + +kmutex_t zfsdev_state_lock; +zfsdev_state_t *zfsdev_state_list; + +/* + * Limit maximum nvlist size. We don't want users passing in insane values + * for zc->zc_nvlist_src_size, since we will need to allocate that much memory. + * Defaults to 0=auto which is handled by platform code. + */ +unsigned long zfs_max_nvlist_src_size = 0; + +/* + * When logging the output nvlist of an ioctl in the on-disk history, limit + * the logged size to this many bytes. This must be less then DMU_MAX_ACCESS. + * This applies primarily to zfs_ioc_channel_program(). + */ +unsigned long zfs_history_output_max = 1024 * 1024; + +uint_t zfs_fsyncer_key; +uint_t zfs_allow_log_key; + +/* DATA_TYPE_ANY is used when zkey_type can vary. */ +#define DATA_TYPE_ANY DATA_TYPE_UNKNOWN + +typedef struct zfs_ioc_vec { + zfs_ioc_legacy_func_t *zvec_legacy_func; + zfs_ioc_func_t *zvec_func; + zfs_secpolicy_func_t *zvec_secpolicy; + zfs_ioc_namecheck_t zvec_namecheck; + boolean_t zvec_allow_log; + zfs_ioc_poolcheck_t zvec_pool_check; + boolean_t zvec_smush_outnvlist; + const char *zvec_name; + const zfs_ioc_key_t *zvec_nvl_keys; + size_t zvec_nvl_key_count; +} zfs_ioc_vec_t; + +/* This array is indexed by zfs_userquota_prop_t */ +static const char *userquota_perms[] = { + ZFS_DELEG_PERM_USERUSED, + ZFS_DELEG_PERM_USERQUOTA, + ZFS_DELEG_PERM_GROUPUSED, + ZFS_DELEG_PERM_GROUPQUOTA, + ZFS_DELEG_PERM_USEROBJUSED, + ZFS_DELEG_PERM_USEROBJQUOTA, + ZFS_DELEG_PERM_GROUPOBJUSED, + ZFS_DELEG_PERM_GROUPOBJQUOTA, + ZFS_DELEG_PERM_PROJECTUSED, + ZFS_DELEG_PERM_PROJECTQUOTA, + ZFS_DELEG_PERM_PROJECTOBJUSED, + ZFS_DELEG_PERM_PROJECTOBJQUOTA, +}; + +static int zfs_ioc_userspace_upgrade(zfs_cmd_t *zc); +static int zfs_ioc_id_quota_upgrade(zfs_cmd_t *zc); +static int zfs_check_settable(const char *name, nvpair_t *property, + cred_t *cr); +static int zfs_check_clearable(const char *dataset, nvlist_t *props, + nvlist_t **errors); +static int zfs_fill_zplprops_root(uint64_t, nvlist_t *, nvlist_t *, + boolean_t *); +int zfs_set_prop_nvlist(const char *, zprop_source_t, nvlist_t *, nvlist_t *); +static int get_nvlist(uint64_t nvl, uint64_t size, int iflag, nvlist_t **nvp); + +static void +history_str_free(char *buf) +{ + kmem_free(buf, HIS_MAX_RECORD_LEN); +} + +static char * +history_str_get(zfs_cmd_t *zc) +{ + char *buf; + + if (zc->zc_history == 0) + return (NULL); + + buf = kmem_alloc(HIS_MAX_RECORD_LEN, KM_SLEEP); + if (copyinstr((void *)(uintptr_t)zc->zc_history, + buf, HIS_MAX_RECORD_LEN, NULL) != 0) { + history_str_free(buf); + return (NULL); + } + + buf[HIS_MAX_RECORD_LEN -1] = '\0'; + + return (buf); +} + +/* + * Return non-zero if the spa version is less than requested version. + */ +static int +zfs_earlier_version(const char *name, int version) +{ + spa_t *spa; + + if (spa_open(name, &spa, FTAG) == 0) { + if (spa_version(spa) < version) { + spa_close(spa, FTAG); + return (1); + } + spa_close(spa, FTAG); + } + return (0); +} + +/* + * Return TRUE if the ZPL version is less than requested version. + */ +static boolean_t +zpl_earlier_version(const char *name, int version) +{ + objset_t *os; + boolean_t rc = B_TRUE; + + if (dmu_objset_hold(name, FTAG, &os) == 0) { + uint64_t zplversion; + + if (dmu_objset_type(os) != DMU_OST_ZFS) { + dmu_objset_rele(os, FTAG); + return (B_TRUE); + } + /* XXX reading from non-owned objset */ + if (zfs_get_zplprop(os, ZFS_PROP_VERSION, &zplversion) == 0) + rc = zplversion < version; + dmu_objset_rele(os, FTAG); + } + return (rc); +} + +static void +zfs_log_history(zfs_cmd_t *zc) +{ + spa_t *spa; + char *buf; + + if ((buf = history_str_get(zc)) == NULL) + return; + + if (spa_open(zc->zc_name, &spa, FTAG) == 0) { + if (spa_version(spa) >= SPA_VERSION_ZPOOL_HISTORY) + (void) spa_history_log(spa, buf); + spa_close(spa, FTAG); + } + history_str_free(buf); +} + +/* + * Policy for top-level read operations (list pools). Requires no privileges, + * and can be used in the local zone, as there is no associated dataset. + */ +/* ARGSUSED */ +static int +zfs_secpolicy_none(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) +{ + return (0); +} + +/* + * Policy for dataset read operations (list children, get statistics). Requires + * no privileges, but must be visible in the local zone. + */ +/* ARGSUSED */ +static int +zfs_secpolicy_read(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) +{ + if (INGLOBALZONE(curproc) || + zone_dataset_visible(zc->zc_name, NULL)) + return (0); + + return (SET_ERROR(ENOENT)); +} + +static int +zfs_dozonecheck_impl(const char *dataset, uint64_t zoned, cred_t *cr) +{ + int writable = 1; + + /* + * The dataset must be visible by this zone -- check this first + * so they don't see EPERM on something they shouldn't know about. + */ + if (!INGLOBALZONE(curproc) && + !zone_dataset_visible(dataset, &writable)) + return (SET_ERROR(ENOENT)); + + if (INGLOBALZONE(curproc)) { + /* + * If the fs is zoned, only root can access it from the + * global zone. + */ + if (secpolicy_zfs(cr) && zoned) + return (SET_ERROR(EPERM)); + } else { + /* + * If we are in a local zone, the 'zoned' property must be set. + */ + if (!zoned) + return (SET_ERROR(EPERM)); + + /* must be writable by this zone */ + if (!writable) + return (SET_ERROR(EPERM)); + } + return (0); +} + +static int +zfs_dozonecheck(const char *dataset, cred_t *cr) +{ + uint64_t zoned; + + if (dsl_prop_get_integer(dataset, zfs_prop_to_name(ZFS_PROP_ZONED), + &zoned, NULL)) + return (SET_ERROR(ENOENT)); + + return (zfs_dozonecheck_impl(dataset, zoned, cr)); +} + +static int +zfs_dozonecheck_ds(const char *dataset, dsl_dataset_t *ds, cred_t *cr) +{ + uint64_t zoned; + + if (dsl_prop_get_int_ds(ds, zfs_prop_to_name(ZFS_PROP_ZONED), &zoned)) + return (SET_ERROR(ENOENT)); + + return (zfs_dozonecheck_impl(dataset, zoned, cr)); +} + +static int +zfs_secpolicy_write_perms_ds(const char *name, dsl_dataset_t *ds, + const char *perm, cred_t *cr) +{ + int error; + + error = zfs_dozonecheck_ds(name, ds, cr); + if (error == 0) { + error = secpolicy_zfs(cr); + if (error != 0) + error = dsl_deleg_access_impl(ds, perm, cr); + } + return (error); +} + +static int +zfs_secpolicy_write_perms(const char *name, const char *perm, cred_t *cr) +{ + int error; + dsl_dataset_t *ds; + dsl_pool_t *dp; + + /* + * First do a quick check for root in the global zone, which + * is allowed to do all write_perms. This ensures that zfs_ioc_* + * will get to handle nonexistent datasets. + */ + if (INGLOBALZONE(curproc) && secpolicy_zfs(cr) == 0) + return (0); + + error = dsl_pool_hold(name, FTAG, &dp); + if (error != 0) + return (error); + + error = dsl_dataset_hold(dp, name, FTAG, &ds); + if (error != 0) { + dsl_pool_rele(dp, FTAG); + return (error); + } + + error = zfs_secpolicy_write_perms_ds(name, ds, perm, cr); + + dsl_dataset_rele(ds, FTAG); + dsl_pool_rele(dp, FTAG); + return (error); +} + +/* + * Policy for setting the security label property. + * + * Returns 0 for success, non-zero for access and other errors. + */ +static int +zfs_set_slabel_policy(const char *name, const char *strval, cred_t *cr) +{ +#ifdef HAVE_MLSLABEL + char ds_hexsl[MAXNAMELEN]; + bslabel_t ds_sl, new_sl; + boolean_t new_default = FALSE; + uint64_t zoned; + int needed_priv = -1; + int error; + + /* First get the existing dataset label. */ + error = dsl_prop_get(name, zfs_prop_to_name(ZFS_PROP_MLSLABEL), + 1, sizeof (ds_hexsl), &ds_hexsl, NULL); + if (error != 0) + return (SET_ERROR(EPERM)); + + if (strcasecmp(strval, ZFS_MLSLABEL_DEFAULT) == 0) + new_default = TRUE; + + /* The label must be translatable */ + if (!new_default && (hexstr_to_label(strval, &new_sl) != 0)) + return (SET_ERROR(EINVAL)); + + /* + * In a non-global zone, disallow attempts to set a label that + * doesn't match that of the zone; otherwise no other checks + * are needed. + */ + if (!INGLOBALZONE(curproc)) { + if (new_default || !blequal(&new_sl, CR_SL(CRED()))) + return (SET_ERROR(EPERM)); + return (0); + } + + /* + * For global-zone datasets (i.e., those whose zoned property is + * "off", verify that the specified new label is valid for the + * global zone. + */ + if (dsl_prop_get_integer(name, + zfs_prop_to_name(ZFS_PROP_ZONED), &zoned, NULL)) + return (SET_ERROR(EPERM)); + if (!zoned) { + if (zfs_check_global_label(name, strval) != 0) + return (SET_ERROR(EPERM)); + } + + /* + * If the existing dataset label is nondefault, check if the + * dataset is mounted (label cannot be changed while mounted). + * Get the zfsvfs_t; if there isn't one, then the dataset isn't + * mounted (or isn't a dataset, doesn't exist, ...). + */ + if (strcasecmp(ds_hexsl, ZFS_MLSLABEL_DEFAULT) != 0) { + objset_t *os; + static const char *setsl_tag = "setsl_tag"; + + /* + * Try to own the dataset; abort if there is any error, + * (e.g., already mounted, in use, or other error). + */ + error = dmu_objset_own(name, DMU_OST_ZFS, B_TRUE, B_TRUE, + setsl_tag, &os); + if (error != 0) + return (SET_ERROR(EPERM)); + + dmu_objset_disown(os, B_TRUE, setsl_tag); + + if (new_default) { + needed_priv = PRIV_FILE_DOWNGRADE_SL; *** 13292 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Mon Feb 22 14:01:52 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BA57E5555B1; Mon, 22 Feb 2021 14:01:52 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DkkPr2bBCz3QWf; Mon, 22 Feb 2021 14:01:52 +0000 (UTC) (envelope-from ohartmann@walstatt.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1614002510; bh=RshxKn7DxHBVrpQFHH9KW00K6KP1MchdXQIihxjjFDU=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=FkrMHOYnYdt4/NWzl9j+f5rkDLO22EtWp5Nwqftcsxd9ehF4hg6Qu2K+yQiHSb8if x21kGhKKCiMGRY86fdDGPLLVJRWqGLez6WhXp1FyaUvQYN0fgN8sCCqAkLm0BQbXKr 6LFTXGf5L6hG/4OENX+XzN301FigQMd4SfY4YFUE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from thor.intern.walstatt.dynvpn.de ([78.54.86.30]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MowGU-1lckN92ZY6-00qThr; Mon, 22 Feb 2021 15:01:49 +0100 Date: Mon, 22 Feb 2021 15:01:15 +0100 From: "O. Hartmann" To: Martin Matuska Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: ba27dd8be821 - main - zfs: merge OpenZFS master-9312e0fd1 Message-ID: <20210222150142.4b76b7c6@thor.intern.walstatt.dynvpn.de> In-Reply-To: <202102221202.11MC24EB071531@gitrepo.freebsd.org> References: <202102221202.11MC24EB071531@gitrepo.freebsd.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:H6bAXWu+woGj6FYzyVt9ydG9d011msmErMRVoTp63+Chr6c7Sio +FXNYrfG7Ox3Ojg82XJWB1trztPj0tplwuSl9GMkbOIacjSezTiouKljyQHKFQMQhVE2lrJ S754erfwzvSFl9PfTLAtDWUfPS4bNIX3gibsgwAfvaXQCQHRENJVrFsAiYHz14DQe70W+Fg yzDpwNUFiBm2gh1vl2qwA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:D+m0HsgFXjo=:gwdKAGPNriQZD5ExDy6pFE wkjs7BsZ2H5j8VfTCbdufHpoLp6zhJXPQBWMawG0PLQq9eSucw9r1O7R83w/wYEh7oH1JwMLJ 3lo0Fo76Lw1nQ4ONtq5slvSLTCiXuFpgPD26SPeiq6/DA+URopTKVqONhe0uiZcLdptv7EGtF 0u4zCn3xk+q++ixEQMK/RYoOpWODASfyAojYHkHZ8ojVv4UmwUh9CMxT6PnJwc8qvsfm9ZJy1 5en+KxICAuujSLUUhUTyMa097Maq3YSjpyQ3Nculea1fD7siWaE/iNujri4E7eec8b/sq0mvd Gp2rkl9U+sJlWYEcxAlWTnKK0M1MERuaNia0xAdNvAjgmhWccbdv3XFnXYA4RAbkoCi/vlEPk muzwxZb3hQ7iVy9QnS4OMZkkG25kmvpuAX0uXYoU2Phl986wvNYu1Q6vx2K7pAS5FgtxIavAx mG3cdBlmbzQsukFfOPt7NUXG+IifDd2mvuJ+CSAIVGYv8yunwQ2xaQFHEFuc9S8Xebkgv3zY6 OgZe3aOxwxLvskbkSd/CP1gHC+BZExesY1OKneN5U5jDBj4vgrzWQ5EU7hgeit1ks2pmsa3nb +/VVTByWjtCtS+PESOvsVXacGPlAMRZoJjtcIrQbG0a45GIw+1f/FrI1YNGZMYx+tIKopBF76 LYHe7YFN01QNDR0zxQiBfbyNJS4i677ID+j7SmNXzkTtsbqetj5R0QeP5N2O7LRyWrKPSdf3F 42Xfw31CiPK+gbkhQpe4eyFz9hyg8qPjfQg7iPsoSFeAJRtgRY9KmBH73ropnqeoRHNJ3Z2Sw nlk0Ft+wExka+tZz2RCNM0Wxp0rOde+1RFbxybHAE36qRsYXKqR1Ey4BimCS9eWtfPLFhIFtx iqlkmeu7MWug5blI5eVA== X-Rspamd-Queue-Id: 4DkkPr2bBCz3QWf 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 14:01:52 -0000 LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBMjU2DQoNCkFtIE1v biwgMjIgRmViIDIwMjEgMTI6MDI6MDQgR01UDQpNYXJ0aW4gTWF0dXNrYSA8bW1ARnJlZUJTRC5v cmc+IHNjaHJpZWI6DQoNCj4gVGhlIGJyYW5jaCBtYWluIGhhcyBiZWVuIHVwZGF0ZWQgYnkgbW06 DQo+IA0KPiBVUkw6IGh0dHBzOi8vY2dpdC5GcmVlQlNELm9yZy9zcmMvY29tbWl0Lz9pZD1iYTI3 ZGQ4YmU4MjE3OTJlMTViZGFiZmFjNjlmZDZjYWIwY2Y5ZGQzDQo+IA0KPiBjb21taXQgYmEyN2Rk OGJlODIxNzkyZTE1YmRhYmZhYzY5ZmQ2Y2FiMGNmOWRkMw0KPiBNZXJnZTogYzAyYTI4NzU0YmMy IDA2MjY5MTdkMDc4Ng0KPiBBdXRob3I6ICAgICBNYXJ0aW4gTWF0dXNrYSA8bW1ARnJlZUJTRC5v cmc+DQo+IEF1dGhvckRhdGU6IDIwMjEtMDItMjIgMTE6MzU6NTYgKzAwMDANCj4gQ29tbWl0OiAg ICAgTWFydGluIE1hdHVza2EgPG1tQEZyZWVCU0Qub3JnPg0KPiBDb21taXREYXRlOiAyMDIxLTAy LTIyIDEyOjAxOjE3ICswMDAwDQo+IA0KPiAgICAgemZzOiBtZXJnZSBPcGVuWkZTIG1hc3Rlci05 MzEyZTBmZDENCj4gICAgIA0KPiAgICAgTm90YWJsZSB1cHN0cmVhbSBjaGFuZ2VzOg0KPiAgICAg ICA3Nzg4NjlmYTEgRml4IHJlcG9ydGluZyBvZiBtb3VudCBwcm9ncmVzcw0KPiAgICAgICBlN2Fk Y2NmN2YgRGlzYWJsZSB1c2Ugb2YgaGFyZHdhcmUgY3J5cHRvIG9mZmxvYWQgZHJpdmVycyBvbiBG cmVlQlNEDQo+ICAgICAgIDAzZTAyZTViNSBGaXggY2hlY2tzdW0gZXJyb3JzIG5vdCBiZWluZyBj b3VudGVkIG9uIHJlcGVhdGVkIHJlcGFpcg0KPiAgICAgICA2NGUwZmUxNGYgUmVzdG9yZSBGcmVl QlNEIHJlc291cmNlIHVzYWdlIGFjY291bnRpbmcNCj4gICAgICAgMTFmMmU5YTQ5IEZpeCBwYW5p YyBpZiBzY3J1YmJpbmcgYWZ0ZXIgcmVtb3ZpbmcgYSBzbG9nIGRldmljZQ0KPiAgICAgDQo+ICAg ICBNRkMgYWZ0ZXI6ICAgICAgMiB3ZWVrcw0KPiANCj4gIGNkZGwvbGliL2xpYnpwb29sL01ha2Vm aWxlICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAxICsNCj4gIHN0YW5kL2xpYnNhL3pmcy96 c3RkX3NoaW0uYyAgICAgICAgICAgICAgICAgICAgICAgIHwgICA1ICsNCj4gIHN5cy9jb250cmli L29wZW56ZnMvY21kL3pmcy96ZnNfbWFpbi5jICAgICAgICAgICAgIHwgICAzIC0NCj4gIHN5cy9j b250cmliL29wZW56ZnMvY21kL3p0ZXN0L3p0ZXN0LmMgICAgICAgICAgICAgIHwgMTEzICsrKysr KysrLQ0KPiAgLi4uL29wZW56ZnMvaW5jbHVkZS9vcy9mcmVlYnNkL3NwbC9zeXMvdWlvLmggICAg ICAgfCAgNDMgKy0tLQ0KPiAgc3lzL2NvbnRyaWIvb3Blbnpmcy9pbmNsdWRlL29zL2xpbnV4L3Nw bC9zeXMvdWlvLmggfCAgMjIgKy0NCj4gIC4uLi9pbmNsdWRlL29zL2xpbnV4L3pmcy9zeXMvemZz X2NvbnRleHRfb3MuaCAgICAgIHwgICAxIC0NCj4gIHN5cy9jb250cmliL29wZW56ZnMvaW5jbHVk ZS9zeXMvTWFrZWZpbGUuYW0gICAgICAgIHwgICAxICsNCj4gIHN5cy9jb250cmliL29wZW56ZnMv aW5jbHVkZS9zeXMvc3BhLmggICAgICAgICAgICAgIHwgICAzICstDQo+ICBzeXMvY29udHJpYi9v cGVuemZzL2luY2x1ZGUvc3lzL3Vpb19pbXBsLmggICAgICAgICB8ICAyMSArLQ0KPiAgc3lzL2Nv bnRyaWIvb3Blbnpmcy9pbmNsdWRlL3N5cy96ZnNfY29udGV4dC5oICAgICAgfCAgIDMgKy0NCj4g IHN5cy9jb250cmliL29wZW56ZnMvaW5jbHVkZS9zeXMvemZzX3JhY2N0LmggICAgICAgIHwgIDM3 ICsrKw0KPiAgc3lzL2NvbnRyaWIvb3Blbnpmcy9saWIvbGlienBvb2wvTWFrZWZpbGUuYW0gICAg ICAgfCAgIDEgKw0KPiAgc3lzL2NvbnRyaWIvb3Blbnpmcy9saWIvbGlienBvb2wvdXRpbC5jICAg ICAgICAgICAgfCAgNzQgKysrKy0tDQo+ICAuLi4vbGliL2xpYnp1dGlsL29zL2xpbnV4L3p1dGls X2RldmljZV9wYXRoX29zLmMgICB8IDI1MiArKysrKysrKysrKystLS0tLS0tLS0NCj4gIHN5cy9j b250cmliL29wZW56ZnMvbW9kdWxlL01ha2VmaWxlLmJzZCAgICAgICAgICAgIHwgICAxICsNCj4g IC4uLi9vcGVuemZzL21vZHVsZS9vcy9mcmVlYnNkL3NwbC9zcGxfdWlvLmMgICAgICAgIHwgICA5 ICstDQo+ICAuLi4vb3Blbnpmcy9tb2R1bGUvb3MvZnJlZWJzZC96ZnMvY3J5cHRvX29zLmMgICAg ICB8ICAxNSArLQ0KPiAgLi4uL29wZW56ZnMvbW9kdWxlL29zL2ZyZWVic2QvemZzL3pmc19yYWNj dC5jICAgICAgfCAgNTUgKysrKysNCj4gIC4uLi9vcGVuemZzL21vZHVsZS9vcy9saW51eC96ZnMv TWFrZWZpbGUuaW4gICAgICAgIHwgICAxICsNCj4gIC4uLi9vcGVuemZzL21vZHVsZS9vcy9saW51 eC96ZnMvemZzX3JhY2N0LmMgICAgICAgIHwgIDM2ICsrKw0KPiAgc3lzL2NvbnRyaWIvb3Blbnpm cy9tb2R1bGUvemZzL2FyYy5jICAgICAgICAgICAgICAgfCAgIDIgKw0KPiAgc3lzL2NvbnRyaWIv b3Blbnpmcy9tb2R1bGUvemZzL2RtdS5jICAgICAgICAgICAgICAgfCAgIDUgKw0KPiAgc3lzL2Nv bnRyaWIvb3Blbnpmcy9tb2R1bGUvemZzL2RzbF9zY2FuLmMgICAgICAgICAgfCAgIDYgKy0NCj4g IHN5cy9jb250cmliL29wZW56ZnMvbW9kdWxlL3pmcy9zcGFfY29uZmlnLmMgICAgICAgIHwgICAy ICstDQo+ICBzeXMvY29udHJpYi9vcGVuemZzL21vZHVsZS96ZnMvdmRldi5jICAgICAgICAgICAg ICB8ICAgOSArLQ0KPiAgc3lzL2NvbnRyaWIvb3Blbnpmcy9tb2R1bGUvemZzL3ZkZXZfaW5kaXJl Y3QuYyAgICAgfCAgMTAgKy0NCj4gIHN5cy9jb250cmliL29wZW56ZnMvbW9kdWxlL3pmcy92ZGV2 X3JhaWR6LmMgICAgICAgIHwgIDIwICstDQo+ICBzeXMvY29udHJpYi9vcGVuemZzL21vZHVsZS96 ZnMvdmRldl9yZWJ1aWxkLmMgICAgICB8ICAgMyArDQo+ICBzeXMvY29udHJpYi9vcGVuemZzL21v ZHVsZS96ZnMvemZzX2ZtLmMgICAgICAgICAgICB8ICA0NiArKystDQo+ICBzeXMvY29udHJpYi9v cGVuemZzL21vZHVsZS96ZnMvemZzX2lvY3RsLmMgICAgICAgICB8ICAgMiArLQ0KPiAgc3lzL2Nv bnRyaWIvb3Blbnpmcy9tb2R1bGUvemZzL3pmc192bm9wcy5jICAgICAgICAgfCAgIDIgKy0NCj4g IHN5cy9jb250cmliL29wZW56ZnMvbW9kdWxlL3pmcy96aW8uYyAgICAgICAgICAgICAgIHwgIDEx ICstDQo+ICBzeXMvY29udHJpYi9vcGVuemZzL3NjcmlwdHMvemZzLnNoICAgICAgICAgICAgICAg ICB8ICAgMiArLQ0KPiAgc3lzL2NvbnRyaWIvb3Blbnpmcy90ZXN0cy9ydW5maWxlcy9jb21tb24u cnVuICAgICAgfCAgIDMgKy0NCj4gIC4uLi9mdW5jdGlvbmFsL2NsaV9yb290L3pwb29sX2V2ZW50 cy9NYWtlZmlsZS5hbSAgIHwgICAzICstDQo+ICAuLi4venBvb2xfZXZlbnRzL3pwb29sX2V2ZW50 c19jbGVhcl9yZXRhaW5lZC5rc2ggICB8IDEzNSArKysrKysrKysrKw0KPiAgLi4uL3pwb29sX2V2 ZW50cy96cG9vbF9ldmVudHNfZHVwbGljYXRlcy5rc2ggICAgICAgfCAgMTEgLQ0KPiAgc3lzL21v ZHVsZXMvemZzL01ha2VmaWxlICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgIDEgKw0KPiAg c3lzL21vZHVsZXMvemZzL3pmc19jb25maWcuaCAgICAgICAgICAgICAgICAgICAgICAgfCAgIDIg Ky0NCj4gIDQwIGZpbGVzIGNoYW5nZWQsIDcyNCBpbnNlcnRpb25zKCspLCAyNDggZGVsZXRpb25z KC0pDQo+IA0KPiBkaWZmIC0tY2MgY2RkbC9saWIvbGlienBvb2wvTWFrZWZpbGUNCj4gaW5kZXgg ZDliMmU2NzA5NGUzLDAwMDAwMDAwMDAwMC4uNjg5M2UzMWZmMjBhDQo+IG1vZGUgMTAwNjQ0LDAw MDAwMC4uMTAwNjQ0DQo+IC0tLSBhL2NkZGwvbGliL2xpYnpwb29sL01ha2VmaWxlDQo+ICsrKyBi L2NkZGwvbGliL2xpYnpwb29sL01ha2VmaWxlDQo+IEBAQCAtMSwyNjYgLTEsMCArMSwyNjcgQEBA DQo+ICArIyAkRnJlZUJTRCQNCj4gICsNCj4gICtaRlNUT1A9CSR7U1JDVE9QfS9zeXMvY29udHJp Yi9vcGVuemZzDQo+ICArDQo+ICArIyBaRlNfQ09NTU9OX1NSQ1MNCj4gICsuUEFUSDogJHtaRlNU T1B9L21vZHVsZS96ZnMNCj4gICsuUEFUSDogJHtaRlNUT1B9L21vZHVsZS96Y29tbW9uDQo+ICAr LlBBVEg6ICR7WkZTVE9QfS9tb2R1bGUvdW5pY29kZQ0KPiAgKyMgTFVBX1NSQ1MNCj4gICsuUEFU SDogJHtaRlNUT1B9L21vZHVsZS9sdWENCj4gICsjIFpTVERfU1JDUw0KPiAgKy5QQVRIOiAke1pG U1RPUH0vbW9kdWxlL3pzdGQNCj4gICsuUEFUSDogJHtaRlNUT1B9L21vZHVsZS96c3RkL2xpYg0K PiAgKw0KPiAgKy5QQVRIOiAke1pGU1RPUH0vbW9kdWxlL29zL2xpbnV4L3pmcw0KPiAgKw0KPiAg Ky5QQVRIOiAke1pGU1RPUH0vbGliL2xpYnpwb29sDQo+ICArDQo+ICArLmlmDQo+IGV4aXN0cygk e1NSQ1RPUH0vc3lzL2NkZGwvY29udHJpYi9vcGVuc29sYXJpcy9jb21tb24vYXRvbWljLyR7TUFD SElORV9BUkNIfS9vcGVuc29sYXJpc19hdG9taWMuUykNCj4gKy5QQVRIOiAke1NSQ1RPUH0vc3lz L2NkZGwvY29udHJpYi9vcGVuc29sYXJpcy9jb21tb24vYXRvbWljLyR7TUFDSElORV9BUkNIfQ0K PiArQVRPTUlDX1NSQ1M9CW9wZW5zb2xhcmlzX2F0b21pYy5TICtBQ0ZMQUdTKz0JLVdhLC0tbm9l eGVjc3RhY2sNCj4gICsuZWxzZQ0KPiAgKy5QQVRIOiAke1NSQ1RPUH0vc3lzL2NkZGwvY29tcGF0 L29wZW5zb2xhcmlzL2tlcm4NCj4gICtBVE9NSUNfU1JDUz0Jb3BlbnNvbGFyaXNfYXRvbWljLmMN Cj4gICsuZW5kaWYNCj4gICsNCj4gICsuaWYgJHtNQUNISU5FX0FSQ0h9ID09ICJwb3dlcnBjIiB8 fCAke01BQ0hJTkVfQVJDSH0gPT0gInBvd2VycGNzcGUiDQo+ICArIyBEb24ndCB3YXN0ZSBHT1Qg ZW50cmllcyBvbiBzbWFsbCBkYXRhLg0KPiAgK1BJQ0ZMQUc9CS1mUElDDQo+ICArLmVuZGlmDQo+ ICArDQo+ICArTElCPQkJenBvb2wNCj4gICsNCj4gICtVU0VSX0MgPSBcDQo+ICArCWtlcm5lbC5j IFwNCj4gICsJdGFza3EuYyBcDQo+ICArCXV0aWwuYw0KPiAgKw0KPiAgK0tFUk5FTF9DID0gXA0K PiAgKwl6ZmVhdHVyZV9jb21tb24uYyBcDQo+ICArCXpmc19jb211dGlsLmMgXA0KPiAgKwl6ZnNf ZGVsZWcuYyBcDQo+ICArCXpmc19mbGV0Y2hlci5jIFwNCj4gICsJemZzX2ZsZXRjaGVyX3N1cGVy c2NhbGFyLmMgXA0KPiAgKwl6ZnNfZmxldGNoZXJfc3VwZXJzY2FsYXI0LmMgXA0KPiAgKwl6ZnNf bmFtZWNoZWNrLmMgXA0KPiAgKwl6ZnNfcHJvcC5jIFwNCj4gICsJemZzX3pzdGQuYyBcDQo+ICAr CXpwb29sX3Byb3AuYyBcDQo+ICArCXpwcm9wX2NvbW1vbi5jIFwNCj4gICsJYWJkLmMgXA0KPiAg KwlhYmRfb3MuYyBcDQo+ICArCWFnZ3N1bS5jIFwNCj4gICsJYXJjLmMgXA0KPiAgKwlhcmNfb3Mu YyBcDQo+ICArCWJsa3B0ci5jIFwNCj4gICsJYnBsaXN0LmMgXA0KPiAgKwlicG9iai5jIFwNCj4g ICsJYnB0cmVlLmMgXA0KPiAgKwlidHJlZS5jIFwNCj4gICsJYnF1ZXVlLmMgXA0KPiAgKwljaXR5 aGFzaC5jIFwNCj4gICsJZGJ1Zi5jIFwNCj4gICsJZGJ1Zl9zdGF0cy5jIFwNCj4gICsJZGR0LmMg XA0KPiAgKwlkZHRfemFwLmMgXA0KPiAgKwlkbXUuYyBcDQo+ICArCWRtdV9kaWZmLmMgXA0KPiAg KwlkbXVfb2JqZWN0LmMgXA0KPiAgKwlkbXVfb2Jqc2V0LmMgXA0KPiAgKwlkbXVfcmVjdi5jIFwN Cj4gICsJZG11X3JlZGFjdC5jIFwNCj4gICsJZG11X3NlbmQuYyBcDQo+ICArCWRtdV90cmF2ZXJz ZS5jIFwNCj4gICsJZG11X3R4LmMgXA0KPiAgKwlkbXVfemZldGNoLmMgXA0KPiAgKwlkbm9kZS5j IFwNCj4gICsJZG5vZGVfc3luYy5jIFwNCj4gICsJZHNsX2Jvb2ttYXJrLmMgXA0KPiAgKwlkc2xf ZGF0YXNldC5jIFwNCj4gICsJZHNsX2RlYWRsaXN0LmMgXA0KPiAgKwlkc2xfZGVsZWcuYyBcDQo+ ICArCWRzbF9kaXIuYyBcDQo+ICArCWRzbF9jcnlwdC5jIFwNCj4gICsJZHNsX3Bvb2wuYyBcDQo+ ICArCWRzbF9wcm9wLmMgXA0KPiAgKwlkc2xfc2Nhbi5jIFwNCj4gICsJZHNsX3N5bmN0YXNrLmMg XA0KPiAgKwlkc2xfZGVzdHJveS5jIFwNCj4gICsJZHNsX3VzZXJob2xkLmMgXA0KPiAgKwllZG9u cl96ZnMuYyBcDQo+ICArCWhrZGYuYyBcDQo+ICArCWZtLmMgXA0KPiAgKwlnemlwLmMgXA0KPiAg KwlsempiLmMgXA0KPiAgKwlsejQuYyBcDQo+ICArCW1ldGFzbGFiLmMgXA0KPiAgKwltbXAuYyBc DQo+ICArCW11bHRpbGlzdC5jIFwNCj4gICsJb2JqbGlzdC5jIFwNCj4gICsJcGF0aG5hbWUuYyBc DQo+ICArCXJhbmdlX3RyZWUuYyBcDQo+ICArCXJlZmNvdW50LmMgXA0KPiAgKwlycndsb2NrLmMg XA0KPiAgKwlzYS5jIFwNCj4gICsJc2hhMjU2LmMgXA0KPiAgKwlza2Vpbl96ZnMuYyBcDQo+ICAr CXNwYS5jIFwNCj4gICsJc3BhX2Jvb3QuYyBcDQo+ICArCXNwYV9jaGVja3BvaW50LmMgXA0KPiAg KwlzcGFfY29uZmlnLmMgXA0KPiAgKwlzcGFfZXJybG9nLmMgXA0KPiAgKwlzcGFfaGlzdG9yeS5j IFwNCj4gICsJc3BhX2xvZ19zcGFjZW1hcC5jIFwNCj4gICsJc3BhX21pc2MuYyBcDQo+ICArCXNw YV9zdGF0cy5jIFwNCj4gICsJc3BhY2VfbWFwLmMgXA0KPiAgKwlzcGFjZV9yZWZ0cmVlLmMgXA0K PiAgKwl0eGcuYyBcDQo+ICArCXRyYWNlLmMgXA0KPiAgKwl1YmVyYmxvY2suYyBcDQo+ICArCXVu aXF1ZS5jIFwNCj4gICsJdmRldi5jIFwNCj4gICsJdmRldl9jYWNoZS5jIFwNCj4gICsJdmRldl9k cmFpZC5jIFwNCj4gICsJdmRldl9kcmFpZF9yYW5kLmMgXA0KPiAgKwl2ZGV2X2ZpbGUuYyBcDQo+ ICArCXZkZXZfaW5kaXJlY3RfYmlydGhzLmMgXA0KPiAgKwl2ZGV2X2luZGlyZWN0LmMgXA0KPiAg Kwl2ZGV2X2luZGlyZWN0X21hcHBpbmcuYyBcDQo+ICArCXZkZXZfaW5pdGlhbGl6ZS5jIFwNCj4g ICsJdmRldl9sYWJlbC5jIFwNCj4gICsJdmRldl9taXJyb3IuYyBcDQo+ICArCXZkZXZfbWlzc2lu Zy5jIFwNCj4gICsJdmRldl9xdWV1ZS5jIFwNCj4gICsJdmRldl9yYWlkei5jIFwNCj4gICsJdmRl dl9yYWlkel9tYXRoX2FhcmNoNjRfbmVvbi5jIFwNCj4gICsJdmRldl9yYWlkel9tYXRoX2FhcmNo NjRfbmVvbngyLmMgXA0KPiAgKwl2ZGV2X3JhaWR6X21hdGhfYXZ4Mi5jIFwNCj4gICsJdmRldl9y YWlkel9tYXRoX2F2eDUxMmJ3LmMgXA0KPiAgKwl2ZGV2X3JhaWR6X21hdGhfYXZ4NTEyZi5jIFwN Cj4gICsJdmRldl9yYWlkel9tYXRoLmMgXA0KPiAgKwl2ZGV2X3JhaWR6X21hdGhfc2NhbGFyLmMg XA0KPiAgKwl2ZGV2X3JlYnVpbGQuYyBcDQo+ICArCXZkZXZfcmVtb3ZhbC5jIFwNCj4gICsJdmRl dl9yb290LmMgXA0KPiAgKwl2ZGV2X3RyaW0uYyBcDQo+ICArCXphcC5jIFwNCj4gICsJemFwX2xl YWYuYyBcDQo+ICArCXphcF9taWNyby5jIFwNCj4gICsJemNwLmMgXA0KPiAgKwl6Y3BfZ2V0LmMg XA0KPiAgKwl6Y3BfZ2xvYmFsLmMgXA0KPiAgKwl6Y3BfaXRlci5jIFwNCj4gICsJemNwX3NldC5j IFwNCj4gICsJemNwX3N5bmN0YXNrLmMgXA0KPiAgKwl6ZmVhdHVyZS5jIFwNCj4gICsJemZzX2J5 dGVzd2FwLmMgXA0KPiAgKwl6ZnNfZGVidWcuYyBcDQo+ICArCXpmc19mbS5jIFwNCj4gICsJemZz X2Z1aWQuYyBcDQo+ICArCXpmc19zYS5jIFwNCj4gICsJemZzX3pub2RlLmMgXA0KPiArKwl6ZnNf cmFjY3QuYyBcDQo+ICArCXpmc19yYXRlbGltaXQuYyBcDQo+ICArCXpmc19ybG9jay5jIFwNCj4g ICsJemlsLmMgXA0KPiAgKwl6aW8uYyBcDQo+ICArCXppb19jaGVja3N1bS5jIFwNCj4gICsJemlv X2NvbXByZXNzLmMgXA0KPiAgKwl6aW9fY3J5cHQuYyBcDQo+ICArCXppb19pbmplY3QuYyBcDQo+ ICArCXpsZS5jIFwNCj4gICsJenJsb2NrLmMgXA0KPiAgKwl6c3RkLmMgXA0KPiAgKwl6dGhyLmMN Cj4gICsNCj4gICtBUkNIX0MgPQ0KPiAgKy5pZiAke01BQ0hJTkVfQVJDSH0gPT0gImFtZDY0IiB8 fCAke01BQ0hJTkVfQVJDSH0gPT0gImkzODYiDQo+ICArQVJDSF9DICs9IAl2ZGV2X3JhaWR6X21h dGhfc3NlMi5jIFwNCj4gICsJCXZkZXZfcmFpZHpfbWF0aF9zc3NlMy5jIFwNCj4gICsJCXpmc19m bGV0Y2hlcl9pbnRlbC5jIFwNCj4gICsJCXpmc19mbGV0Y2hlcl9zc2UuYyANCj4gICtDRkxBR1Mg Kz0gIC1ESEFWRV9TU0UyIAktREhBVkVfU1NFMw0KPiAgKy5lbmRpZg0KPiAgKy5pZiAke01BQ0hJ TkVfQVJDSH0gPT0gImFtZDY0Ig0KPiAgK0FSQ0hfQyArPQl6ZnNfZmxldGNoZXJfYXZ4NTEyLmMN Cj4gICtDRkxBR1MrPSAtREhBVkVfQVZYMiAtREhBVkVfQVZYIC1EX194ODZfNjQgLURIQVZFX0FW WDUxMkYgXA0KPiAgKwktREhBVkVfQVZYNTEyQlcNCj4gICsuZW5kaWYNCj4gICsuaWYgJHtNQUNI SU5FX0NQVUFSQ0h9ID09ICJhYXJjaDY0Ig0KPiAgK0FSQ0hfQyArPQl6ZnNfZmxldGNoZXJfYWFy Y2g2NF9uZW9uLmMNCj4gICsuZW5kaWYNCj4gICsNCj4gICtMVUFfQyA9IFwNCj4gICsJbGFwaS5j IFwNCj4gICsJbGF1eGxpYi5jIFwNCj4gICsJbGJhc2VsaWIuYyBcDQo+ICArCWxjb2RlLmMgXA0K PiAgKwlsY29tcGF0LmMgXA0KPiAgKwlsY29yb2xpYi5jIFwNCj4gICsJbGN0eXBlLmMgXA0KPiAg KwlsZGVidWcuYyBcDQo+ICArCWxkby5jIFwNCj4gICsJbGZ1bmMuYyBcDQo+ICArCWxnYy5jIFwN Cj4gICsJbGxleC5jIFwNCj4gICsJbG1lbS5jIFwNCj4gICsJbG9iamVjdC5jIFwNCj4gICsJbG9w Y29kZXMuYyBcDQo+ICArCWxwYXJzZXIuYyBcDQo+ICArCWxzdGF0ZS5jIFwNCj4gICsJbHN0cmlu Zy5jIFwNCj4gICsJbHN0cmxpYi5jIFwNCj4gICsJbHRhYmxlLmMgXA0KPiAgKwlsdGFibGliLmMg XA0KPiAgKwlsdG0uYyBcDQo+ICArCWx2bS5jIFwNCj4gICsJbHppby5jDQo+ICArDQo+ICArVU5J Q09ERV9DID0gdThfdGV4dHByZXAuYyB1Y29udi5jDQo+ICArDQo+ICArU1JDUz0JCSR7VVNFUl9D fSAke0tFUk5FTF9DfSAke0xVQV9DfSAke1VOSUNPREVfQ30gJHtBUkNIX0N9DQo+ICArDQo+ICAr V0FSTlM/PQkJMg0KPiAgK0NGTEFHUys9IFwNCj4gICsJLURJTl9CQVNFIFwNCj4gICsJLUkke1pG U1RPUH0vaW5jbHVkZSBcDQo+ICArCS1JJHtaRlNUT1B9L2xpYi9saWJzcGwvaW5jbHVkZSBcDQo+ ICArCS1JJHtaRlNUT1B9L2xpYi9saWJzcGwvaW5jbHVkZS9vcy9mcmVlYnNkIFwNCj4gICsJLUkk e1NSQ1RPUH0vc3lzIFwNCj4gICsJLUkke1pGU1RPUH0vaW5jbHVkZS9vcy9mcmVlYnNkL3pmcyBc DQo+ICArCS1JJHtTUkNUT1B9L2NkZGwvY29tcGF0L29wZW5zb2xhcmlzL2luY2x1ZGUgXA0KPiAg KwktSSR7WkZTVE9QfS9tb2R1bGUvaWNwL2luY2x1ZGUgXA0KPiAgKwktaW5jbHVkZSAke1pGU1RP UH0vaW5jbHVkZS9vcy9mcmVlYnNkL3NwbC9zeXMvY2NvbXBpbGUuaCBcDQo+ICArCS1ESEFWRV9J U1NFVFVHSUQgXA0KPiAgKwktaW5jbHVkZSAke1NSQ1RPUH0vc3lzL21vZHVsZXMvemZzL3pmc19j b25maWcuaCBcDQo+ICArCS1JJHtTUkNUT1B9L3N5cy9tb2R1bGVzL3pmcyBcDQo+ICArCS1JJHta RlNUT1B9L2luY2x1ZGUvb3MvZnJlZWJzZC96ZnMgXA0KPiAgKwktRExJQl9aUE9PTF9CVUlMRCAt RFpGU19ERUJVRyBcDQo+ICArDQo+ICArIyBYWFg6IHB0aHJlYWQgZG9lc24ndCBoYXZlIG11dGV4 X293bmVkKCkgZXF1aXZhbGVudCwgc28gd2UgbmVlZCB0byBsb29rDQo+ICArIyAgICAgIGludG8g bGlidGhyIHByaXZhdGUgc3RydWN0dXJlcy4gVGhhdCdzIHNvb28gZXZpbCwgYnV0IGl0J3Mgb25s eSBmb3INCj4gICsjICAgICAgWkZTIGRlYnVnZ2luZyB0b29scyBuZWVkcy4NCj4gICtDRkxBR1Mr PQktRFdBTlRTX01VVEVYX09XTkVEDQo+ICArQ0ZMQUdTKz0JLUkke1NSQ1RPUH0vbGliL2xpYnB0 aHJlYWQvdGhyZWFkDQo+ICArQ0ZMQUdTKz0JLUkke1NSQ1RPUH0vbGliL2xpYnB0aHJlYWQvc3lz DQo+ICArQ0ZMQUdTKz0JLUkke1NSQ1RPUH0vbGliL2xpYnRoci9hcmNoLyR7TUFDSElORV9DUFVB UkNIfS9pbmNsdWRlDQo+ICArQ0ZMQUdTLmdjYys9CS1mbXMtZXh0ZW5zaW9ucw0KPiAgKw0KPiAg K0xJQkFERD0JCW1kIHB0aHJlYWQgeiBzcGwgaWNwIG52cGFpciBhdmwgdW1lbQ0KPiAgKw0KPiAg KyMgYXRvbWljLlMgZG9lc24ndCBsaWtlIHByb2ZpbGluZy4NCj4gICtNS19QUk9GSUxFPQlubw0K PiAgKw0KPiAgK0NTVEQ9CWM5OQ0KPiAgKw0KPiAgKyMgU2luY2UgdGhlcmUgYXJlIG1hbnkgYXNz ZXJ0cyBpbiB0aGlzIGxpYnJhcnksIGl0IG1ha2VzIG5vIHNlbnNlIHRvIGNvbXBpbGUNCj4gICsj IGl0IHdpdGhvdXQgZGVidWdnaW5nLg0KPiAgKw0KPiAgK0NGTEFHUys9CS1nIC1EREVCVUc9MQ0K PiAgKw0KPiAgK0NGTEFHUy56ZnNfenN0ZC5jPQktV25vLWNhc3QtcXVhbCAtV25vLXBvaW50ZXIt YXJpdGgNCj4gICtDRkxBR1MuenN0ZC5jKz0JLWZuby10cmVlLXZlY3Rvcml6ZQ0KPiAgKw0KPiAg Ky5pbmNsdWRlIDxic2QubGliLm1rPg0KPiBkaWZmIC0tY2Mgc3RhbmQvbGlic2EvemZzL3pzdGRf c2hpbS5jDQo+IGluZGV4IGI5NGRmNmY1MTkxMywwMDAwMDAwMDAwMDAuLjkxZjUxNzFhNzJiNQ0K PiBtb2RlIDEwMDY0NCwwMDAwMDAuLjEwMDY0NA0KPiAtLS0gYS9zdGFuZC9saWJzYS96ZnMvenN0 ZF9zaGltLmMNCj4gKysrIGIvc3RhbmQvbGlic2EvemZzL3pzdGRfc2hpbS5jDQo+IEBAQCAtMSw0 MCAtMSwwICsxLDQ1IEBAQA0KPiAgKy8qLQ0KPiAgKyAqIENvcHlyaWdodCAoYykgMjAyMCBNLiBX YXJuZXIgTG9zaCA8aW1wQEZyZWVCU0Qub3JnPg0KPiAgKyAqDQo+ICArICogUmVkaXN0cmlidXRp b24gYW5kIHVzZSBpbiBzb3VyY2UgYW5kIGJpbmFyeSBmb3Jtcywgd2l0aCBvciB3aXRob3V0DQo+ ICArICogbW9kaWZpY2F0aW9uLCBhcmUgcGVybWl0dGVkIHByb3ZpZGVkIHRoYXQgdGhlIGZvbGxv d2luZyBjb25kaXRpb25zDQo+ICArICogYXJlIG1ldDoNCj4gICsgKiAxLiBSZWRpc3RyaWJ1dGlv bnMgb2Ygc291cmNlIGNvZGUgbXVzdCByZXRhaW4gdGhlIGFib3ZlIGNvcHlyaWdodA0KPiAgKyAq ICAgIG5vdGljZSwgdGhpcyBsaXN0IG9mIGNvbmRpdGlvbnMgYW5kIHRoZSBmb2xsb3dpbmcgZGlz Y2xhaW1lci4NCj4gICsgKiAyLiBSZWRpc3RyaWJ1dGlvbnMgaW4gYmluYXJ5IGZvcm0gbXVzdCBy ZXByb2R1Y2UgdGhlIGFib3ZlIGNvcHlyaWdodA0KPiAgKyAqICAgIG5vdGljZSwgdGhpcyBsaXN0 IG9mIGNvbmRpdGlvbnMgYW5kIHRoZSBmb2xsb3dpbmcgZGlzY2xhaW1lciBpbiB0aGUNCj4gICsg KiAgICBkb2N1bWVudGF0aW9uIGFuZC9vciBvdGhlciBtYXRlcmlhbHMgcHJvdmlkZWQgd2l0aCB0 aGUgZGlzdHJpYnV0aW9uLg0KPiAgKyAqDQo+ICArICogVEhJUyBTT0ZUV0FSRSBJUyBQUk9WSURF RCBCWSBUSEUgQVVUSE9SIEFORCBDT05UUklCVVRPUlMgYGBBUyBJUycnIEFORA0KPiAgKyAqIEFO WSBFWFBSRVNTIE9SIElNUExJRUQgV0FSUkFOVElFUywgSU5DTFVESU5HLCBCVVQgTk9UIExJTUlU RUQgVE8sIFRIRQ0KPiAgKyAqIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkg QU5EIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFDQo+ICArICogQVJFIERJU0NMQUlN RUQuICBJTiBOTyBFVkVOVCBTSEFMTCBUSEUgQVVUSE9SIE9SIENPTlRSSUJVVE9SUyBCRSBMSUFC TEUNCj4gICsgKiBGT1IgQU5ZIERJUkVDVCwgSU5ESVJFQ1QsIElOQ0lERU5UQUwsIFNQRUNJQUws IEVYRU1QTEFSWSwgT1IgQ09OU0VRVUVOVElBTA0KPiAgKyAqIERBTUFHRVMgKElOQ0xVRElORywg QlVUIE5PVCBMSU1JVEVEIFRPLCBQUk9DVVJFTUVOVCBPRiBTVUJTVElUVVRFIEdPT0RTDQo+ICAr ICogT1IgU0VSVklDRVM7IExPU1MgT0YgVVNFLCBEQVRBLCBPUiBQUk9GSVRTOyBPUiBCVVNJTkVT UyBJTlRFUlJVUFRJT04pDQo+ICArICogSE9XRVZFUiBDQVVTRUQgQU5EIE9OIEFOWSBUSEVPUlkg T0YgTElBQklMSVRZLCBXSEVUSEVSIElOIENPTlRSQUNULCBTVFJJQ1QNCj4gICsgKiBMSUFCSUxJ VFksIE9SIFRPUlQgKElOQ0xVRElORyBORUdMSUdFTkNFIE9SIE9USEVSV0lTRSkgQVJJU0lORyBJ TiBBTlkgV0FZDQo+ICArICogT1VUIE9GIFRIRSBVU0UgT0YgVEhJUyBTT0ZUV0FSRSwgRVZFTiBJ RiBBRFZJU0VEIE9GIFRIRSBQT1NTSUJJTElUWSBPRg0KPiAgKyAqIFNVQ0ggREFNQUdFLg0KPiAg KyAqDQo+ICArICovDQo+ICArI2luY2x1ZGUgPHN5cy9jZGVmcy5oPg0KPiAgK19fRkJTRElEKCIk RnJlZUJTRCQiKTsNCj4gICsNCj4gICsvKg0KPiAgKyAqIFNtYWxsIGFtb3VudCBvZiBzaGltIGNv ZGUgbmVlZGVkIHRvIGdldCB6ZnNfenN0ZC5jIHRvIGNvbXBpbGUuIFRoZXNlIGl0ZW1zDQo+ICAr ICogaGVyZSBzaG91bGQgYWxsIGJlIGRlZmluZWQgaW4gdGhlIFNQTCBvciBhcyBwYXJ0IG9mIGxp YnN0YW5kIHNvbWV3aGVyZSwgYnV0DQo+ICArICogYXJlbid0IGZvciByZWFzb25zIHRoYXQgaGF2 ZW4ndCBiZWVuIHRyYWNrZWQgZG93biB5ZXQuIElkZWFsbHksIHRoZXkgd291bGQNCj4gICsgKiBh bGwgZ28gYXdheSBhbmQgd2UnZCBjb21waWxlIHpmc196c3RkLmMgZGlyZWN0bHkuIEJhc2VkIG9u IGFuIG9yaWdpbmFsIGJ5DQo+ICArICogTWF0dCBNYWNleSwgYnV0IG9ubHkgdGhlICNpbmNsdWRl IHJlbWFpbnMgdW50b3VjaGVkIGZyb20gdGhhdC4NCj4gICsgKi8NCj4gICsNCj4gICsjZGVmaW5l IFpGU19NT0RVTEVfUEFSQU1fQVJHUyB2b2lkDQo+ICArdHlwZWRlZiBpbnQgYm9vbGVhbl90Owkv KiBUaGlzIG9uZSBtYXkgYmUgdG91Z2ggdG8gZ2V0IHJpZCBvZiAqLw0KPiAgKw0KPiArKy8qIFRP RE86IG9wZW56ZnMvaW5jbHVkZS9zeXMvdWlvX2ltcGwuaCBtdXN0IG5vdCBiZSBpbmNsdWRlZCAq Lw0KPiArKyNpZm5kZWYgX1NZU19VSU9fSU1QTF9IDQo+ICsrI2RlZmluZSBfU1lTX1VJT19JTVBM X0gNCj4gKysjZW5kaWYNCj4gKysNCj4gICsjaW5jbHVkZSA8Y29udHJpYi9vcGVuemZzL21vZHVs ZS96c3RkL3pmc196c3RkLmM+DQo+IGRpZmYgLS1jYyBzeXMvY29udHJpYi9vcGVuemZzL2luY2x1 ZGUvc3lzL3pmc19yYWNjdC5oDQo+IGluZGV4IDAwMDAwMDAwMDAwMCxjZmNkZDMzNmVhNDIuLmNm Y2RkMzM2ZWE0Mg0KPiBtb2RlIDAwMDAwMCwxMDA2NDQuLjEwMDY0NA0KPiAtLS0gYS9zeXMvY29u dHJpYi9vcGVuemZzL2luY2x1ZGUvc3lzL3pmc19yYWNjdC5oDQo+ICsrKyBiL3N5cy9jb250cmli L29wZW56ZnMvaW5jbHVkZS9zeXMvemZzX3JhY2N0LmgNCj4gZGlmZiAtLWNjIHN5cy9jb250cmli L29wZW56ZnMvbW9kdWxlL29zL2ZyZWVic2QvemZzL3pmc19yYWNjdC5jDQo+IGluZGV4IDAwMDAw MDAwMDAwMCxiNDZjYzA0NjI2OGUuLmI0NmNjMDQ2MjY4ZQ0KPiBtb2RlIDAwMDAwMCwxMDA2NDQu LjEwMDY0NA0KPiAtLS0gYS9zeXMvY29udHJpYi9vcGVuemZzL21vZHVsZS9vcy9mcmVlYnNkL3pm cy96ZnNfcmFjY3QuYw0KPiArKysgYi9zeXMvY29udHJpYi9vcGVuemZzL21vZHVsZS9vcy9mcmVl YnNkL3pmcy96ZnNfcmFjY3QuYw0KPiBkaWZmIC0tY2Mgc3lzL2NvbnRyaWIvb3Blbnpmcy9tb2R1 bGUvb3MvbGludXgvemZzL3pmc19yYWNjdC5jDQo+IGluZGV4IDAwMDAwMDAwMDAwMCw3ODk3ZTBm OWVkYzEuLjc4OTdlMGY5ZWRjMQ0KPiBtb2RlIDAwMDAwMCwxMDA2NDQuLjEwMDY0NA0KPiAtLS0g YS9zeXMvY29udHJpYi9vcGVuemZzL21vZHVsZS9vcy9saW51eC96ZnMvemZzX3JhY2N0LmMNCj4g KysrIGIvc3lzL2NvbnRyaWIvb3Blbnpmcy9tb2R1bGUvb3MvbGludXgvemZzL3pmc19yYWNjdC5j DQo+IGRpZmYgLS1jYyBzeXMvY29udHJpYi9vcGVuemZzL21vZHVsZS96ZnMvemZzX2lvY3RsLmMN Cj4gaW5kZXggMGUzNWZkMDY5Y2JiLDAwMDAwMDAwMDAwMC4uOTIyMjUzNDY5ZmJhDQo+IG1vZGUg MTAwNjQ0LDAwMDAwMC4uMTAwNjQ0DQo+IC0tLSBhL3N5cy9jb250cmliL29wZW56ZnMvbW9kdWxl L3pmcy96ZnNfaW9jdGwuYw0KPiArKysgYi9zeXMvY29udHJpYi9vcGVuemZzL21vZHVsZS96ZnMv emZzX2lvY3RsLmMNCj4gQEBAIC0xLDc2ODggLTEsMCArMSw3Njg4IEBAQA0KPiAgKy8qDQo+ICAr ICogQ0RETCBIRUFERVIgU1RBUlQNCj4gICsgKg0KPiAgKyAqIFRoZSBjb250ZW50cyBvZiB0aGlz IGZpbGUgYXJlIHN1YmplY3QgdG8gdGhlIHRlcm1zIG9mIHRoZQ0KPiAgKyAqIENvbW1vbiBEZXZl bG9wbWVudCBhbmQgRGlzdHJpYnV0aW9uIExpY2Vuc2UgKHRoZSAiTGljZW5zZSIpLg0KPiAgKyAq IFlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUg TGljZW5zZS4NCj4gICsgKg0KPiAgKyAqIFlvdSBjYW4gb2J0YWluIGEgY29weSBvZiB0aGUgbGlj ZW5zZSBhdCB1c3Ivc3JjL09QRU5TT0xBUklTLkxJQ0VOU0UNCj4gICsgKiBvciBodHRwOi8vd3d3 Lm9wZW5zb2xhcmlzLm9yZy9vcy9saWNlbnNpbmcuDQo+ICArICogU2VlIHRoZSBMaWNlbnNlIGZv ciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zDQo+ICArICogYW5k IGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLg0KPiAgKyAqDQo+ICArICogV2hlbiBkaXN0 cmlidXRpbmcgQ292ZXJlZCBDb2RlLCBpbmNsdWRlIHRoaXMgQ0RETCBIRUFERVIgaW4gZWFjaA0K PiAgKyAqIGZpbGUgYW5kIGluY2x1ZGUgdGhlIExpY2Vuc2UgZmlsZSBhdCB1c3Ivc3JjL09QRU5T T0xBUklTLkxJQ0VOU0UuDQo+ICArICogSWYgYXBwbGljYWJsZSwgYWRkIHRoZSBmb2xsb3dpbmcg YmVsb3cgdGhpcyBDRERMIEhFQURFUiwgd2l0aCB0aGUNCj4gICsgKiBmaWVsZHMgZW5jbG9zZWQg YnkgYnJhY2tldHMgIltdIiByZXBsYWNlZCB3aXRoIHlvdXIgb3duIGlkZW50aWZ5aW5nDQo+ICAr ICogaW5mb3JtYXRpb246IFBvcnRpb25zIENvcHlyaWdodCBbeXl5eV0gW25hbWUgb2YgY29weXJp Z2h0IG93bmVyXQ0KPiAgKyAqDQo+ICArICogQ0RETCBIRUFERVIgRU5EDQo+ICArICovDQo+ICAr DQo+ICArLyoNCj4gICsgKiBDb3B5cmlnaHQgKGMpIDIwMDUsIDIwMTAsIE9yYWNsZSBhbmQvb3Ig aXRzIGFmZmlsaWF0ZXMuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQo+ICArICogUG9ydGlvbnMgQ29w eXJpZ2h0IDIwMTEgTWFydGluIE1hdHVza2ENCj4gICsgKiBDb3B5cmlnaHQgMjAxNSwgT21uaVRJ IENvbXB1dGVyIENvbnN1bHRpbmcsIEluYy4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCj4gICsgKiBQ b3J0aW9ucyBDb3B5cmlnaHQgMjAxMiBQYXdlbCBKYWt1YiBEYXdpZGVrIDxwYXdlbEBkYXdpZGVr Lm5ldD4NCj4gICsgKiBDb3B5cmlnaHQgKGMpIDIwMTQsIDIwMTYgSm95ZW50LCBJbmMuIEFsbCBy aWdodHMgcmVzZXJ2ZWQuDQo+ICArICogQ29weXJpZ2h0IDIwMTYgTmV4ZW50YSBTeXN0ZW1zLCBJ bmMuICBBbGwgcmlnaHRzIHJlc2VydmVkLg0KPiAgKyAqIENvcHlyaWdodCAoYykgMjAxNCwgSm95 ZW50LCBJbmMuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQo+ICArICogQ29weXJpZ2h0IChjKSAyMDEx LCAyMDIwIGJ5IERlbHBoaXguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQo+ICArICogQ29weXJpZ2h0 IChjKSAyMDEzIGJ5IFNhc28gS2lzZWxrb3YuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQo+ICArICog Q29weXJpZ2h0IChjKSAyMDEzIFN0ZXZlbiBIYXJ0bGFuZC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4N Cj4gICsgKiBDb3B5cmlnaHQgKGMpIDIwMTQgSW50ZWdyb3MgW2ludGVncm9zLmNvbV0NCj4gICsg KiBDb3B5cmlnaHQgMjAxNiBUb29tYXMgU29vbWUgPHRzb29tZUBtZS5jb20+DQo+ICArICogQ29w eXJpZ2h0IChjKSAyMDE2IEFjdGlmaW8sIEluYy4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCj4gICsg KiBDb3B5cmlnaHQgKGMpIDIwMTgsIGxvbGkxMEsgPGV6b21vcmkubm96b211QGdtYWlsLmNvbT4u IEFsbCByaWdodHMgcmVzZXJ2ZWQuDQo+ICArICogQ29weXJpZ2h0IDIwMTcgUmFja1RvcCBTeXN0 ZW1zLg0KPiAgKyAqIENvcHlyaWdodCAoYykgMjAxNyBPcGVuLUUsIEluYy4gQWxsIFJpZ2h0cyBS ZXNlcnZlZC4NCj4gICsgKiBDb3B5cmlnaHQgKGMpIDIwMTkgRGF0dG8gSW5jLg0KPiAgKyAqIENv cHlyaWdodCAoYykgMjAxOSwgMjAyMCBieSBDaHJpc3RpYW4gU2Nod2Fyei4gQWxsIHJpZ2h0cyBy ZXNlcnZlZC4NCj4gICsgKiBDb3B5cmlnaHQgKGMpIDIwMTksIEtsYXJhIEluYy4NCj4gICsgKiBD b3B5cmlnaHQgKGMpIDIwMTksIEFsbGFuIEp1ZGUNCj4gICsgKi8NCj4gICsNCj4gICsvKg0KPiAg KyAqIFpGUyBpb2N0bHMuDQo+ICArICoNCj4gICsgKiBUaGlzIGZpbGUgaGFuZGxlcyB0aGUgaW9j dGxzIHRvIC9kZXYvemZzLCB1c2VkIGZvciBjb25maWd1cmluZyBaRlMgc3RvcmFnZQ0KPiAgKyAq IHBvb2xzIGFuZCBmaWxlc3lzdGVtcywgZS5nLiB3aXRoIC9zYmluL3pmcyBhbmQgL3NiaW4venBv b2wuDQo+ICArICoNCj4gICsgKiBUaGVyZSBhcmUgdHdvIHdheXMgdGhhdCB3ZSBoYW5kbGUgaW9j dGxzOiB0aGUgbGVnYWN5IHdheSB3aGVyZSBhbG1vc3QNCj4gICsgKiBhbGwgb2YgdGhlIGxvZ2lj IGlzIGluIHRoZSBpb2N0bCBjYWxsYmFjaywgYW5kIHRoZSBuZXcgd2F5IHdoZXJlIG1vc3QNCj4g ICsgKiBvZiB0aGUgbWFyc2hhbGxpbmcgaXMgaGFuZGxlZCBpbiB0aGUgY29tbW9uIGVudHJ5IHBv aW50LCB6ZnNkZXZfaW9jdGwoKS4NCj4gICsgKg0KPiAgKyAqIE5vbi1sZWdhY3kgaW9jdGxzIHNo b3VsZCBiZSByZWdpc3RlcmVkIGJ5IGNhbGxpbmcNCj4gICsgKiB6ZnNfaW9jdGxfcmVnaXN0ZXIo KSBmcm9tIHpmc19pb2N0bF9pbml0KCkuICBUaGUgaW9jdGwgaXMgaW52b2tlZA0KPiAgKyAqIGZy b20gdXNlcmxhbmQgYnkgbHpjX2lvY3RsKCkuDQo+ICArICoNCj4gICsgKiBUaGUgcmVnaXN0cmF0 aW9uIGFyZ3VtZW50cyBhcmUgYXMgZm9sbG93czoNCj4gICsgKg0KPiAgKyAqIGNvbnN0IGNoYXIg Km5hbWUNCj4gICsgKiAgIFRoZSBuYW1lIG9mIHRoZSBpb2N0bC4gIFRoaXMgaXMgdXNlZCBmb3Ig aGlzdG9yeSBsb2dnaW5nLiAgSWYgdGhlDQo+ICArICogICBpb2N0bCByZXR1cm5zIHN1Y2Nlc3Nm dWxseSAodGhlIGNhbGxiYWNrIHJldHVybnMgMCksIGFuZCBhbGxvd19sb2cNCj4gICsgKiAgIGlz IHRydWUsIHRoZW4gYSBoaXN0b3J5IGxvZyBlbnRyeSB3aWxsIGJlIHJlY29yZGVkIHdpdGggdGhl IGlucHV0ICYNCj4gICsgKiAgIG91dHB1dCBudmxpc3RzLiAgVGhlIGxvZyBlbnRyeSBjYW4gYmUg cHJpbnRlZCB3aXRoICJ6cG9vbCBoaXN0b3J5IC1pIi4NCj4gICsgKg0KPiAgKyAqIHpmc19pb2Nf dCBpb2MNCj4gICsgKiAgIFRoZSBpb2N0bCByZXF1ZXN0IG51bWJlciwgd2hpY2ggdXNlcmxhbmQg d2lsbCBwYXNzIHRvIGlvY3RsKDIpLg0KPiAgKyAqICAgV2Ugd2FudCBuZXdlciB2ZXJzaW9ucyBv ZiBsaWJ6ZnMgYW5kIGxpYnpmc19jb3JlIHRvIHJ1biBhZ2FpbnN0DQo+ICArICogICBleGlzdGlu ZyB6ZnMga2VybmVsIG1vZHVsZXMgKGkuZS4gYSBkZWZlcnJlZCByZWJvb3QgYWZ0ZXIgYW4gdXBk YXRlKS4NCj4gICsgKiAgIFRoZXJlZm9yZSB0aGUgaW9jdGwgbnVtYmVycyBjYW5ub3QgY2hhbmdl IGZyb20gcmVsZWFzZSB0byByZWxlYXNlLg0KPiAgKyAqDQo+ICArICogemZzX3NlY3BvbGljeV9m dW5jX3QgKnNlY3BvbGljeQ0KPiAgKyAqICAgVGhpcyBmdW5jdGlvbiB3aWxsIGJlIGNhbGxlZCBi ZWZvcmUgdGhlIHpmc19pb2NfZnVuY190LCB0bw0KPiAgKyAqICAgZGV0ZXJtaW5lIGlmIHRoaXMg b3BlcmF0aW9uIGlzIHBlcm1pdHRlZC4gIEl0IHNob3VsZCByZXR1cm4gRVBFUk0NCj4gICsgKiAg IG9uIGZhaWx1cmUsIGFuZCAwIG9uIHN1Y2Nlc3MuICBDaGVja3MgaW5jbHVkZSBkZXRlcm1pbmlu ZyBpZiB0aGUNCj4gICsgKiAgIGRhdGFzZXQgaXMgdmlzaWJsZSBpbiB0aGlzIHpvbmUsIGFuZCBp ZiB0aGUgdXNlciBoYXMgZWl0aGVyIGFsbA0KPiAgKyAqICAgemZzIHByaXZpbGVnZXMgaW4gdGhl IHpvbmUgKFNZU19NT1VOVCksIG9yIGhhcyBiZWVuIGdyYW50ZWQgcGVybWlzc2lvbg0KPiAgKyAq ICAgdG8gZG8gdGhpcyBvcGVyYXRpb24gb24gdGhpcyBkYXRhc2V0IHdpdGggInpmcyBhbGxvdyIu DQo+ICArICoNCj4gICsgKiB6ZnNfaW9jX25hbWVjaGVja190IG5hbWVjaGVjaw0KPiAgKyAqICAg VGhpcyBzcGVjaWZpZXMgd2hhdCB0byBleHBlY3QgaW4gdGhlIHpmc19jbWRfdDp6Y19uYW1lIC0t IGEgcG9vbA0KPiAgKyAqICAgbmFtZSwgYSBkYXRhc2V0IG5hbWUsIG9yIG5vdGhpbmcuICBJZiB0 aGUgbmFtZSBpcyBub3Qgd2VsbC1mb3JtZWQsDQo+ICArICogICB0aGUgaW9jdGwgd2lsbCBmYWls IGFuZCB0aGUgY2FsbGJhY2sgd2lsbCBub3QgYmUgY2FsbGVkLg0KPiAgKyAqICAgVGhlcmVmb3Jl LCB0aGUgY2FsbGJhY2sgY2FuIGFzc3VtZSB0aGF0IHRoZSBuYW1lIGlzIHdlbGwtZm9ybWVkDQo+ ICArICogICAoZS5nLiBpcyBudWxsLXRlcm1pbmF0ZWQsIGRvZXNuJ3QgaGF2ZSBtb3JlIHRoYW4g b25lICdAJyBjaGFyYWN0ZXIsDQo+ICArICogICBkb2Vzbid0IGhhdmUgaW52YWxpZCBjaGFyYWN0 ZXJzKS4NCj4gICsgKg0KPiAgKyAqIHpmc19pb2NfcG9vbGNoZWNrX3QgcG9vbF9jaGVjaw0KPiAg KyAqICAgVGhpcyBzcGVjaWZpZXMgcmVxdWlyZW1lbnRzIG9uIHRoZSBwb29sIHN0YXRlLiAgSWYg dGhlIHBvb2wgZG9lcw0KPiAgKyAqICAgbm90IG1lZXQgdGhlbSAoaXMgc3VzcGVuZGVkIG9yIGlz IHJlYWRvbmx5KSwgdGhlIGlvY3RsIHdpbGwgZmFpbA0KPiAgKyAqICAgYW5kIHRoZSBjYWxsYmFj ayB3aWxsIG5vdCBiZSBjYWxsZWQuICBJZiBhbnkgY2hlY2tzIGFyZSBzcGVjaWZpZWQNCj4gICsg KiAgIChpLmUuIGl0IGlzIG5vdCBQT09MX0NIRUNLX05PTkUpLCBuYW1lY2hlY2sgbXVzdCBub3Qg YmUgTk9fTkFNRS4NCj4gICsgKiAgIE11bHRpcGxlIGNoZWNrcyBjYW4gYmUgb3ItZWQgdG9nZXRo ZXIgKGUuZy4gUE9PTF9DSEVDS19TVVNQRU5ERUQgfA0KPiAgKyAqICAgUE9PTF9DSEVDS19SRUFE T05MWSkuDQo+ICArICoNCj4gICsgKiB6ZnNfaW9jX2tleV90ICpudmxfa2V5cw0KPiAgKyAqICBU aGUgbGlzdCBvZiBleHBlY3RlZC9hbGxvd2FibGUgaW5udmwgaW5wdXQga2V5cy4gVGhpcyBsaXN0 IGlzIHVzZWQNCj4gICsgKiAgdG8gdmFsaWRhdGUgdGhlIG52bGlzdCBpbnB1dCB0byB0aGUgaW9j dGwuDQo+ICArICoNCj4gICsgKiBib29sZWFuX3Qgc211c2hfb3V0bnZsaXN0DQo+ICArICogICBJ ZiBzbXVzaF9vdXRudmxpc3QgaXMgdHJ1ZSwgdGhlbiB0aGUgb3V0cHV0IGlzIHByZXN1bWVkIHRv IGJlIGENCj4gICsgKiAgIGxpc3Qgb2YgZXJyb3JzLCBhbmQgaXQgd2lsbCBiZSAic211c2hlZCIg ZG93biB0byBmaXQgaW50byB0aGUNCj4gICsgKiAgIGNhbGxlcidzIGJ1ZmZlciwgYnkgcmVtb3Zp bmcgc29tZSBlbnRyaWVzIGFuZCByZXBsYWNpbmcgdGhlbSB3aXRoIGENCj4gICsgKiAgIHNpbmds ZSAiTl9NT1JFX0VSUk9SUyIgZW50cnkgaW5kaWNhdGluZyBob3cgbWFueSB3ZXJlIHJlbW92ZWQu ICBTZWUNCj4gICsgKiAgIG52bGlzdF9zbXVzaCgpIGZvciBkZXRhaWxzLiAgSWYgc211c2hfb3V0 bnZsaXN0IGlzIGZhbHNlLCBhbmQgdGhlDQo+ICArICogICBvdXRudmxpc3QgZG9lcyBub3QgZml0 IGludG8gdGhlIHVzZXJsYW5kLXByb3ZpZGVkIGJ1ZmZlciwgdGhlbiB0aGUNCj4gICsgKiAgIGlv Y3RsIHdpbGwgZmFpbCB3aXRoIEVOT01FTS4NCj4gICsgKg0KPiAgKyAqIHpmc19pb2NfZnVuY190 ICpmdW5jDQo+ICArICogICBUaGUgY2FsbGJhY2sgZnVuY3Rpb24gdGhhdCB3aWxsIHBlcmZvcm0g dGhlIG9wZXJhdGlvbi4NCj4gICsgKg0KPiAgKyAqICAgVGhlIGNhbGxiYWNrIHNob3VsZCByZXR1 cm4gMCBvbiBzdWNjZXNzLCBvciBhbiBlcnJvciBudW1iZXIgb24NCj4gICsgKiAgIGZhaWx1cmUu ICBJZiB0aGUgZnVuY3Rpb24gZmFpbHMsIHRoZSB1c2VybGFuZCBpb2N0bCB3aWxsIHJldHVybiAt MSwNCj4gICsgKiAgIGFuZCBlcnJubyB3aWxsIGJlIHNldCB0byB0aGUgY2FsbGJhY2sncyByZXR1 cm4gdmFsdWUuICBUaGUgY2FsbGJhY2sNCj4gICsgKiAgIHdpbGwgYmUgY2FsbGVkIHdpdGggdGhl IGZvbGxvd2luZyBhcmd1bWVudHM6DQo+ICArICoNCj4gICsgKiAgIGNvbnN0IGNoYXIgKm5hbWUN Cj4gICsgKiAgICAgVGhlIG5hbWUgb2YgdGhlIHBvb2wgb3IgZGF0YXNldCB0byBvcGVyYXRlIG9u LCBmcm9tDQo+ICArICogICAgIHpmc19jbWRfdDp6Y19uYW1lLiAgVGhlICduYW1lY2hlY2snIGFy Z3VtZW50IHNwZWNpZmllcyB0aGUNCj4gICsgKiAgICAgZXhwZWN0ZWQgdHlwZSAocG9vbCwgZGF0 YXNldCwgb3Igbm9uZSkuDQo+ICArICoNCj4gICsgKiAgIG52bGlzdF90ICppbm52bA0KPiAgKyAq ICAgICBUaGUgaW5wdXQgbnZsaXN0LCBkZXNlcmlhbGl6ZWQgZnJvbSB6ZnNfY21kX3Q6emNfbnZs aXN0X3NyYy4gIE9yDQo+ICArICogICAgIE5VTEwgaWYgbm8gaW5wdXQgbnZsaXN0IHdhcyBwcm92 aWRlZC4gIENoYW5nZXMgdG8gdGhpcyBudmxpc3QgYXJlDQo+ICArICogICAgIGlnbm9yZWQuICBJ ZiB0aGUgaW5wdXQgbnZsaXN0IGNvdWxkIG5vdCBiZSBkZXNlcmlhbGl6ZWQsIHRoZQ0KPiAgKyAq ICAgICBpb2N0bCB3aWxsIGZhaWwgYW5kIHRoZSBjYWxsYmFjayB3aWxsIG5vdCBiZSBjYWxsZWQu DQo+ICArICoNCj4gICsgKiAgIG52bGlzdF90ICpvdXRudmwNCj4gICsgKiAgICAgVGhlIG91dHB1 dCBudmxpc3QsIGluaXRpYWxseSBlbXB0eS4gIFRoZSBjYWxsYmFjayBjYW4gZmlsbCBpdCBpbiwN Cj4gICsgKiAgICAgYW5kIGl0IHdpbGwgYmUgcmV0dXJuZWQgdG8gdXNlcmxhbmQgYnkgc2VyaWFs aXppbmcgaXQgaW50bw0KPiAgKyAqICAgICB6ZnNfY21kX3Q6emNfbnZsaXN0X2RzdC4gIElmIGl0 IGlzIG5vbi1lbXB0eSwgYW5kIHNlcmlhbGl6YXRpb24NCj4gICsgKiAgICAgZmFpbHMgKGUuZy4g YmVjYXVzZSB0aGUgY2FsbGVyIGRpZG4ndCBzdXBwbHkgYSBsYXJnZSBlbm91Z2gNCj4gICsgKiAg ICAgYnVmZmVyKSwgdGhlbiB0aGUgb3ZlcmFsbCBpb2N0bCB3aWxsIGZhaWwuICBTZWUgdGhlDQo+ ICArICogICAgICdzbXVzaF9udmxpc3QnIGFyZ3VtZW50IGFib3ZlIGZvciBhZGRpdGlvbmFsIGJl aGF2aW9ycy4NCj4gICsgKg0KPiAgKyAqICAgICBUaGVyZSBhcmUgdHdvIHR5cGljYWwgdXNlcyBv ZiB0aGUgb3V0cHV0IG52bGlzdDoNCj4gICsgKiAgICAgICAtIFRvIHJldHVybiBzdGF0ZSwgZS5n LiBwcm9wZXJ0eSB2YWx1ZXMuICBJbiB0aGlzIGNhc2UsDQo+ICArICogICAgICAgICBzbXVzaF9v dXRudmxpc3Qgc2hvdWxkIGJlIGZhbHNlLiAgSWYgdGhlIGJ1ZmZlciB3YXMgbm90IGxhcmdlDQo+ ICArICogICAgICAgICBlbm91Z2gsIHRoZSBjYWxsZXIgd2lsbCByZWFsbG9jYXRlIGEgbGFyZ2Vy IGJ1ZmZlciBhbmQgdHJ5DQo+ICArICogICAgICAgICB0aGUgaW9jdGwgYWdhaW4uDQo+ICArICoN Cj4gICsgKiAgICAgICAtIFRvIHJldHVybiBtdWx0aXBsZSBlcnJvcnMgZnJvbSBhbiBpb2N0bCB3 aGljaCBtYWtlcyBvbi1kaXNrDQo+ICArICogICAgICAgICBjaGFuZ2VzLiAgSW4gdGhpcyBjYXNl LCBzbXVzaF9vdXRudmxpc3Qgc2hvdWxkIGJlIHRydWUuDQo+ICArICogICAgICAgICBJb2N0bHMg d2hpY2ggbWFrZSBvbi1kaXNrIG1vZGlmaWNhdGlvbnMgc2hvdWxkIGdlbmVyYWxseSBub3QNCj4g ICsgKiAgICAgICAgIHVzZSB0aGUgb3V0bnZsIGlmIHRoZXkgc3VjY2VlZCwgYmVjYXVzZSB0aGUg Y2FsbGVyIGNhbiBub3QNCj4gICsgKiAgICAgICAgIGRpc3Rpbmd1aXNoIGJldHdlZW4gdGhlIG9w ZXJhdGlvbiBmYWlsaW5nLCBhbmQNCj4gICsgKiAgICAgICAgIGRlc2VyaWFsaXphdGlvbiBmYWls aW5nLg0KPiAgKyAqDQo+ICArICogSU9DVEwgSW50ZXJmYWNlIEVycm9ycw0KPiAgKyAqDQo+ICAr ICogVGhlIGZvbGxvd2luZyBpb2N0bCBpbnB1dCBlcnJvcnMgY2FuIGJlIHJldHVybmVkOg0KPiAg KyAqICAgWkZTX0VSUl9JT0NfQ01EX1VOQVZBSUwJdGhlIGlvY3RsIG51bWJlciBpcyBub3Qgc3Vw cG9ydGVkIGJ5IGtlcm5lbA0KPiAgKyAqICAgWkZTX0VSUl9JT0NfQVJHX1VOQVZBSUwJYW4gaW5w dXQgYXJndW1lbnQgaXMgbm90IHN1cHBvcnRlZCBieSBrZXJuZWwNCj4gICsgKiAgIFpGU19FUlJf SU9DX0FSR19SRVFVSVJFRAlhIHJlcXVpcmVkIGlucHV0IGFyZ3VtZW50IGlzIG1pc3NpbmcNCj4g ICsgKiAgIFpGU19FUlJfSU9DX0FSR19CQURUWVBFCWFuIGlucHV0IGFyZ3VtZW50IGhhcyBhbiBp bnZhbGlkIHR5cGUNCj4gICsgKi8NCj4gICsNCj4gICsjaW5jbHVkZSA8c3lzL3R5cGVzLmg+DQo+ ICArI2luY2x1ZGUgPHN5cy9wYXJhbS5oPg0KPiAgKyNpbmNsdWRlIDxzeXMvZXJybm8uaD4NCj4g LSAjaW5jbHVkZSA8c3lzL3Vpby5oPg0KPiArKyNpbmNsdWRlIDxzeXMvdWlvX2ltcGwuaD4NCj4g ICsjaW5jbHVkZSA8c3lzL2ZpbGUuaD4NCj4gICsjaW5jbHVkZSA8c3lzL2ttZW0uaD4NCj4gICsj aW5jbHVkZSA8c3lzL2Ntbl9lcnIuaD4NCj4gICsjaW5jbHVkZSA8c3lzL3N0YXQuaD4NCj4gICsj aW5jbHVkZSA8c3lzL3pmc19pb2N0bC5oPg0KPiAgKyNpbmNsdWRlIDxzeXMvemZzX3F1b3RhLmg+ DQo+ICArI2luY2x1ZGUgPHN5cy96ZnNfdmZzb3BzLmg+DQo+ICArI2luY2x1ZGUgPHN5cy96ZnNf em5vZGUuaD4NCj4gICsjaW5jbHVkZSA8c3lzL3phcC5oPg0KPiAgKyNpbmNsdWRlIDxzeXMvc3Bh Lmg+DQo+ICArI2luY2x1ZGUgPHN5cy9zcGFfaW1wbC5oPg0KPiAgKyNpbmNsdWRlIDxzeXMvdmRl di5oPg0KPiAgKyNpbmNsdWRlIDxzeXMvdmRldl9pbXBsLmg+DQo+ICArI2luY2x1ZGUgPHN5cy9k bXUuaD4NCj4gICsjaW5jbHVkZSA8c3lzL2RzbF9kaXIuaD4NCj4gICsjaW5jbHVkZSA8c3lzL2Rz bF9kYXRhc2V0Lmg+DQo+ICArI2luY2x1ZGUgPHN5cy9kc2xfcHJvcC5oPg0KPiAgKyNpbmNsdWRl IDxzeXMvZHNsX2RlbGVnLmg+DQo+ICArI2luY2x1ZGUgPHN5cy9kbXVfb2Jqc2V0Lmg+DQo+ICAr I2luY2x1ZGUgPHN5cy9kbXVfaW1wbC5oPg0KPiAgKyNpbmNsdWRlIDxzeXMvZG11X3JlZGFjdC5o Pg0KPiAgKyNpbmNsdWRlIDxzeXMvZG11X3R4Lmg+DQo+ICArI2luY2x1ZGUgPHN5cy9zdW5kZGku aD4NCj4gICsjaW5jbHVkZSA8c3lzL3BvbGljeS5oPg0KPiAgKyNpbmNsdWRlIDxzeXMvem9uZS5o Pg0KPiAgKyNpbmNsdWRlIDxzeXMvbnZwYWlyLmg+DQo+ICArI2luY2x1ZGUgPHN5cy9wYXRobmFt ZS5oPg0KPiAgKyNpbmNsdWRlIDxzeXMvZnMvemZzLmg+DQo+ICArI2luY2x1ZGUgPHN5cy96ZnNf Y3RsZGlyLmg+DQo+ICArI2luY2x1ZGUgPHN5cy96ZnNfZGlyLmg+DQo+ICArI2luY2x1ZGUgPHN5 cy96ZnNfb25leGl0Lmg+DQo+ICArI2luY2x1ZGUgPHN5cy96dm9sLmg+DQo+ICArI2luY2x1ZGUg PHN5cy9kc2xfc2Nhbi5oPg0KPiAgKyNpbmNsdWRlIDxzeXMvZm0vdXRpbC5oPg0KPiAgKyNpbmNs dWRlIDxzeXMvZHNsX2NyeXB0Lmg+DQo+ICArI2luY2x1ZGUgPHN5cy9ycndsb2NrLmg+DQo+ICAr I2luY2x1ZGUgPHN5cy96ZnNfZmlsZS5oPg0KPiAgKw0KPiAgKyNpbmNsdWRlIDxzeXMvZG11X3Jl Y3YuaD4NCj4gICsjaW5jbHVkZSA8c3lzL2RtdV9zZW5kLmg+DQo+ICArI2luY2x1ZGUgPHN5cy9k bXVfcmVjdi5oPg0KPiAgKyNpbmNsdWRlIDxzeXMvZHNsX2Rlc3Ryb3kuaD4NCj4gICsjaW5jbHVk ZSA8c3lzL2RzbF9ib29rbWFyay5oPg0KPiAgKyNpbmNsdWRlIDxzeXMvZHNsX3VzZXJob2xkLmg+ DQo+ICArI2luY2x1ZGUgPHN5cy96ZmVhdHVyZS5oPg0KPiAgKyNpbmNsdWRlIDxzeXMvemNwLmg+ DQo+ICArI2luY2x1ZGUgPHN5cy96aW9fY2hlY2tzdW0uaD4NCj4gICsjaW5jbHVkZSA8c3lzL3Zk ZXZfcmVtb3ZhbC5oPg0KPiAgKyNpbmNsdWRlIDxzeXMvdmRldl9pbXBsLmg+DQo+ICArI2luY2x1 ZGUgPHN5cy92ZGV2X2luaXRpYWxpemUuaD4NCj4gICsjaW5jbHVkZSA8c3lzL3ZkZXZfdHJpbS5o Pg0KPiAgKw0KPiAgKyNpbmNsdWRlICJ6ZnNfbmFtZWNoZWNrLmgiDQo+ICArI2luY2x1ZGUgInpm c19wcm9wLmgiDQo+ICArI2luY2x1ZGUgInpmc19kZWxlZy5oIg0KPiAgKyNpbmNsdWRlICJ6ZnNf Y29tdXRpbC5oIg0KPiAgKw0KPiAgKyNpbmNsdWRlIDxzeXMvbHVhL2x1YS5oPg0KPiAgKyNpbmNs dWRlIDxzeXMvbHVhL2xhdXhsaWIuaD4NCj4gICsjaW5jbHVkZSA8c3lzL3pmc19pb2N0bF9pbXBs Lmg+DQo+ICArDQo+ICAra211dGV4X3QgemZzZGV2X3N0YXRlX2xvY2s7DQo+ICAremZzZGV2X3N0 YXRlX3QgKnpmc2Rldl9zdGF0ZV9saXN0Ow0KPiAgKw0KPiAgKy8qDQo+ICArICogTGltaXQgbWF4 aW11bSBudmxpc3Qgc2l6ZS4gIFdlIGRvbid0IHdhbnQgdXNlcnMgcGFzc2luZyBpbiBpbnNhbmUg dmFsdWVzDQo+ICArICogZm9yIHpjLT56Y19udmxpc3Rfc3JjX3NpemUsIHNpbmNlIHdlIHdpbGwg bmVlZCB0byBhbGxvY2F0ZSB0aGF0IG11Y2ggbWVtb3J5Lg0KPiAgKyAqIERlZmF1bHRzIHRvIDA9 YXV0byB3aGljaCBpcyBoYW5kbGVkIGJ5IHBsYXRmb3JtIGNvZGUuDQo+ICArICovDQo+ICArdW5z aWduZWQgbG9uZyB6ZnNfbWF4X252bGlzdF9zcmNfc2l6ZSA9IDA7DQo+ICArDQo+ICArLyoNCj4g ICsgKiBXaGVuIGxvZ2dpbmcgdGhlIG91dHB1dCBudmxpc3Qgb2YgYW4gaW9jdGwgaW4gdGhlIG9u LWRpc2sgaGlzdG9yeSwgbGltaXQNCj4gICsgKiB0aGUgbG9nZ2VkIHNpemUgdG8gdGhpcyBtYW55 IGJ5dGVzLiAgVGhpcyBtdXN0IGJlIGxlc3MgdGhlbiBETVVfTUFYX0FDQ0VTUy4NCj4gICsgKiBU aGlzIGFwcGxpZXMgcHJpbWFyaWx5IHRvIHpmc19pb2NfY2hhbm5lbF9wcm9ncmFtKCkuDQo+ICAr ICovDQo+ICArdW5zaWduZWQgbG9uZyB6ZnNfaGlzdG9yeV9vdXRwdXRfbWF4ID0gMTAyNCAqIDEw MjQ7DQo+ICArDQo+ICArdWludF90IHpmc19mc3luY2VyX2tleTsNCj4gICt1aW50X3QgemZzX2Fs bG93X2xvZ19rZXk7DQo+ICArDQo+ICArLyogREFUQV9UWVBFX0FOWSBpcyB1c2VkIHdoZW4gemtl eV90eXBlIGNhbiB2YXJ5LiAqLw0KPiAgKyNkZWZpbmUJREFUQV9UWVBFX0FOWQlEQVRBX1RZUEVf VU5LTk9XTg0KPiAgKw0KPiAgK3R5cGVkZWYgc3RydWN0IHpmc19pb2NfdmVjIHsNCj4gICsJemZz X2lvY19sZWdhY3lfZnVuY190CSp6dmVjX2xlZ2FjeV9mdW5jOw0KPiAgKwl6ZnNfaW9jX2Z1bmNf dAkJKnp2ZWNfZnVuYzsNCj4gICsJemZzX3NlY3BvbGljeV9mdW5jX3QJKnp2ZWNfc2VjcG9saWN5 Ow0KPiAgKwl6ZnNfaW9jX25hbWVjaGVja190CXp2ZWNfbmFtZWNoZWNrOw0KPiAgKwlib29sZWFu X3QJCXp2ZWNfYWxsb3dfbG9nOw0KPiAgKwl6ZnNfaW9jX3Bvb2xjaGVja190CXp2ZWNfcG9vbF9j aGVjazsNCj4gICsJYm9vbGVhbl90CQl6dmVjX3NtdXNoX291dG52bGlzdDsNCj4gICsJY29uc3Qg Y2hhcgkJKnp2ZWNfbmFtZTsNCj4gICsJY29uc3QgemZzX2lvY19rZXlfdAkqenZlY19udmxfa2V5 czsNCj4gICsJc2l6ZV90CQkJenZlY19udmxfa2V5X2NvdW50Ow0KPiAgK30gemZzX2lvY192ZWNf dDsNCj4gICsNCj4gICsvKiBUaGlzIGFycmF5IGlzIGluZGV4ZWQgYnkgemZzX3VzZXJxdW90YV9w cm9wX3QgKi8NCj4gICtzdGF0aWMgY29uc3QgY2hhciAqdXNlcnF1b3RhX3Blcm1zW10gPSB7DQo+ ICArCVpGU19ERUxFR19QRVJNX1VTRVJVU0VELA0KPiAgKwlaRlNfREVMRUdfUEVSTV9VU0VSUVVP VEEsDQo+ICArCVpGU19ERUxFR19QRVJNX0dST1VQVVNFRCwNCj4gICsJWkZTX0RFTEVHX1BFUk1f R1JPVVBRVU9UQSwNCj4gICsJWkZTX0RFTEVHX1BFUk1fVVNFUk9CSlVTRUQsDQo+ICArCVpGU19E RUxFR19QRVJNX1VTRVJPQkpRVU9UQSwNCj4gICsJWkZTX0RFTEVHX1BFUk1fR1JPVVBPQkpVU0VE LA0KPiAgKwlaRlNfREVMRUdfUEVSTV9HUk9VUE9CSlFVT1RBLA0KPiAgKwlaRlNfREVMRUdfUEVS TV9QUk9KRUNUVVNFRCwNCj4gICsJWkZTX0RFTEVHX1BFUk1fUFJPSkVDVFFVT1RBLA0KPiAgKwla RlNfREVMRUdfUEVSTV9QUk9KRUNUT0JKVVNFRCwNCj4gICsJWkZTX0RFTEVHX1BFUk1fUFJPSkVD VE9CSlFVT1RBLA0KPiAgK307DQo+ICArDQo+ICArc3RhdGljIGludCB6ZnNfaW9jX3VzZXJzcGFj ZV91cGdyYWRlKHpmc19jbWRfdCAqemMpOw0KPiAgK3N0YXRpYyBpbnQgemZzX2lvY19pZF9xdW90 YV91cGdyYWRlKHpmc19jbWRfdCAqemMpOw0KPiAgK3N0YXRpYyBpbnQgemZzX2NoZWNrX3NldHRh YmxlKGNvbnN0IGNoYXIgKm5hbWUsIG52cGFpcl90ICpwcm9wZXJ0eSwNCj4gICsgICAgY3JlZF90 ICpjcik7DQo+ICArc3RhdGljIGludCB6ZnNfY2hlY2tfY2xlYXJhYmxlKGNvbnN0IGNoYXIgKmRh dGFzZXQsIG52bGlzdF90ICpwcm9wcywNCj4gICsgICAgbnZsaXN0X3QgKiplcnJvcnMpOw0KPiAg K3N0YXRpYyBpbnQgemZzX2ZpbGxfenBscHJvcHNfcm9vdCh1aW50NjRfdCwgbnZsaXN0X3QgKiwg bnZsaXN0X3QgKiwNCj4gICsgICAgYm9vbGVhbl90ICopOw0KPiAgK2ludCB6ZnNfc2V0X3Byb3Bf bnZsaXN0KGNvbnN0IGNoYXIgKiwgenByb3Bfc291cmNlX3QsIG52bGlzdF90ICosIG52bGlzdF90 ICopOw0KPiAgK3N0YXRpYyBpbnQgZ2V0X252bGlzdCh1aW50NjRfdCBudmwsIHVpbnQ2NF90IHNp emUsIGludCBpZmxhZywgbnZsaXN0X3QgKipudnApOw0KPiAgKw0KPiAgK3N0YXRpYyB2b2lkDQo+ ICAraGlzdG9yeV9zdHJfZnJlZShjaGFyICpidWYpDQo+ICArew0KPiAgKwlrbWVtX2ZyZWUoYnVm LCBISVNfTUFYX1JFQ09SRF9MRU4pOw0KPiAgK30NCj4gICsNCj4gICtzdGF0aWMgY2hhciAqDQo+ ICAraGlzdG9yeV9zdHJfZ2V0KHpmc19jbWRfdCAqemMpDQo+ICArew0KPiAgKwljaGFyICpidWY7 DQo+ICArDQo+ICArCWlmICh6Yy0+emNfaGlzdG9yeSA9PSAwKQ0KPiAgKwkJcmV0dXJuIChOVUxM KTsNCj4gICsNCj4gICsJYnVmID0ga21lbV9hbGxvYyhISVNfTUFYX1JFQ09SRF9MRU4sIEtNX1NM RUVQKTsNCj4gICsJaWYgKGNvcHlpbnN0cigodm9pZCAqKSh1aW50cHRyX3QpemMtPnpjX2hpc3Rv cnksDQo+ICArCSAgICBidWYsIEhJU19NQVhfUkVDT1JEX0xFTiwgTlVMTCkgIT0gMCkgew0KPiAg KwkJaGlzdG9yeV9zdHJfZnJlZShidWYpOw0KPiAgKwkJcmV0dXJuIChOVUxMKTsNCj4gICsJfQ0K PiAgKw0KPiAgKwlidWZbSElTX01BWF9SRUNPUkRfTEVOIC0xXSA9ICdcMCc7DQo+ICArDQo+ICAr CXJldHVybiAoYnVmKTsNCj4gICt9DQo+ICArDQo+ICArLyoNCj4gICsgKiBSZXR1cm4gbm9uLXpl cm8gaWYgdGhlIHNwYSB2ZXJzaW9uIGlzIGxlc3MgdGhhbiByZXF1ZXN0ZWQgdmVyc2lvbi4NCj4g ICsgKi8NCj4gICtzdGF0aWMgaW50DQo+ICAremZzX2VhcmxpZXJfdmVyc2lvbihjb25zdCBjaGFy ICpuYW1lLCBpbnQgdmVyc2lvbikNCj4gICt7DQo+ICArCXNwYV90ICpzcGE7DQo+ICArDQo+ICAr CWlmIChzcGFfb3BlbihuYW1lLCAmc3BhLCBGVEFHKSA9PSAwKSB7DQo+ICArCQlpZiAoc3BhX3Zl cnNpb24oc3BhKSA8IHZlcnNpb24pIHsNCj4gICsJCQlzcGFfY2xvc2Uoc3BhLCBGVEFHKTsNCj4g ICsJCQlyZXR1cm4gKDEpOw0KPiAgKwkJfQ0KPiAgKwkJc3BhX2Nsb3NlKHNwYSwgRlRBRyk7DQo+ ICArCX0NCj4gICsJcmV0dXJuICgwKTsNCj4gICt9DQo+ICArDQo+ICArLyoNCj4gICsgKiBSZXR1 cm4gVFJVRSBpZiB0aGUgWlBMIHZlcnNpb24gaXMgbGVzcyB0aGFuIHJlcXVlc3RlZCB2ZXJzaW9u Lg0KPiAgKyAqLw0KPiAgK3N0YXRpYyBib29sZWFuX3QNCj4gICt6cGxfZWFybGllcl92ZXJzaW9u KGNvbnN0IGNoYXIgKm5hbWUsIGludCB2ZXJzaW9uKQ0KPiAgK3sNCj4gICsJb2Jqc2V0X3QgKm9z Ow0KPiAgKwlib29sZWFuX3QgcmMgPSBCX1RSVUU7DQo+ICArDQo+ICArCWlmIChkbXVfb2Jqc2V0 X2hvbGQobmFtZSwgRlRBRywgJm9zKSA9PSAwKSB7DQo+ICArCQl1aW50NjRfdCB6cGx2ZXJzaW9u Ow0KPiAgKw0KPiAgKwkJaWYgKGRtdV9vYmpzZXRfdHlwZShvcykgIT0gRE1VX09TVF9aRlMpIHsN Cj4gICsJCQlkbXVfb2Jqc2V0X3JlbGUob3MsIEZUQUcpOw0KPiAgKwkJCXJldHVybiAoQl9UUlVF KTsNCj4gICsJCX0NCj4gICsJCS8qIFhYWCByZWFkaW5nIGZyb20gbm9uLW93bmVkIG9ianNldCAq Lw0KPiAgKwkJaWYgKHpmc19nZXRfenBscHJvcChvcywgWkZTX1BST1BfVkVSU0lPTiwgJnpwbHZl cnNpb24pID09IDApDQo+ICArCQkJcmMgPSB6cGx2ZXJzaW9uIDwgdmVyc2lvbjsNCj4gICsJCWRt dV9vYmpzZXRfcmVsZShvcywgRlRBRyk7DQo+ICArCX0NCj4gICsJcmV0dXJuIChyYyk7DQo+ICAr fQ0KPiAgKw0KPiAgK3N0YXRpYyB2b2lkDQo+ICAremZzX2xvZ19oaXN0b3J5KHpmc19jbWRfdCAq emMpDQo+ICArew0KPiAgKwlzcGFfdCAqc3BhOw0KPiAgKwljaGFyICpidWY7DQo+ICArDQo+ICAr CWlmICgoYnVmID0gaGlzdG9yeV9zdHJfZ2V0KHpjKSkgPT0gTlVMTCkNCj4gICsJCXJldHVybjsN Cj4gICsNCj4gICsJaWYgKHNwYV9vcGVuKHpjLT56Y19uYW1lLCAmc3BhLCBGVEFHKSA9PSAwKSB7 DQo+ICArCQlpZiAoc3BhX3ZlcnNpb24oc3BhKSA+PSBTUEFfVkVSU0lPTl9aUE9PTF9ISVNUT1JZ KQ0KPiAgKwkJCSh2b2lkKSBzcGFfaGlzdG9yeV9sb2coc3BhLCBidWYpOw0KPiAgKwkJc3BhX2Ns b3NlKHNwYSwgRlRBRyk7DQo+ICArCX0NCj4gICsJaGlzdG9yeV9zdHJfZnJlZShidWYpOw0KPiAg K30NCj4gICsNCj4gICsvKg0KPiAgKyAqIFBvbGljeSBmb3IgdG9wLWxldmVsIHJlYWQgb3BlcmF0 aW9ucyAobGlzdCBwb29scykuICBSZXF1aXJlcyBubyBwcml2aWxlZ2VzLA0KPiAgKyAqIGFuZCBj YW4gYmUgdXNlZCBpbiB0aGUgbG9jYWwgem9uZSwgYXMgdGhlcmUgaXMgbm8gYXNzb2NpYXRlZCBk YXRhc2V0Lg0KPiAgKyAqLw0KPiAgKy8qIEFSR1NVU0VEICovDQo+ICArc3RhdGljIGludA0KPiAg K3pmc19zZWNwb2xpY3lfbm9uZSh6ZnNfY21kX3QgKnpjLCBudmxpc3RfdCAqaW5udmwsIGNyZWRf dCAqY3IpDQo+ICArew0KPiAgKwlyZXR1cm4gKDApOw0KPiAgK30NCj4gICsNCj4gICsvKg0KPiAg KyAqIFBvbGljeSBmb3IgZGF0YXNldCByZWFkIG9wZXJhdGlvbnMgKGxpc3QgY2hpbGRyZW4sIGdl dCBzdGF0aXN0aWNzKS4gIFJlcXVpcmVzDQo+ICArICogbm8gcHJpdmlsZWdlcywgYnV0IG11c3Qg YmUgdmlzaWJsZSBpbiB0aGUgbG9jYWwgem9uZS4NCj4gICsgKi8NCj4gICsvKiBBUkdTVVNFRCAq Lw0KPiAgK3N0YXRpYyBpbnQNCj4gICt6ZnNfc2VjcG9saWN5X3JlYWQoemZzX2NtZF90ICp6Yywg bnZsaXN0X3QgKmlubnZsLCBjcmVkX3QgKmNyKQ0KPiAgK3sNCj4gICsJaWYgKElOR0xPQkFMWk9O RShjdXJwcm9jKSB8fA0KPiAgKwkgICAgem9uZV9kYXRhc2V0X3Zpc2libGUoemMtPnpjX25hbWUs IE5VTEwpKQ0KPiAgKwkJcmV0dXJuICgwKTsNCj4gICsNCj4gICsJcmV0dXJuIChTRVRfRVJST1Io RU5PRU5UKSk7DQo+ICArfQ0KPiAgKw0KPiAgK3N0YXRpYyBpbnQNCj4gICt6ZnNfZG96b25lY2hl Y2tfaW1wbChjb25zdCBjaGFyICpkYXRhc2V0LCB1aW50NjRfdCB6b25lZCwgY3JlZF90ICpjcikN Cj4gICt7DQo+ICArCWludCB3cml0YWJsZSA9IDE7DQo+ICArDQo+ICArCS8qDQo+ICArCSAqIFRo ZSBkYXRhc2V0IG11c3QgYmUgdmlzaWJsZSBieSB0aGlzIHpvbmUgLS0gY2hlY2sgdGhpcyBmaXJz dA0KPiAgKwkgKiBzbyB0aGV5IGRvbid0IHNlZSBFUEVSTSBvbiBzb21ldGhpbmcgdGhleSBzaG91 bGRuJ3Qga25vdyBhYm91dC4NCj4gICsJICovDQo+ICArCWlmICghSU5HTE9CQUxaT05FKGN1cnBy b2MpICYmDQo+ICArCSAgICAhem9uZV9kYXRhc2V0X3Zpc2libGUoZGF0YXNldCwgJndyaXRhYmxl KSkNCj4gICsJCXJldHVybiAoU0VUX0VSUk9SKEVOT0VOVCkpOw0KPiAgKw0KPiAgKwlpZiAoSU5H TE9CQUxaT05FKGN1cnByb2MpKSB7DQo+ICArCQkvKg0KPiAgKwkJICogSWYgdGhlIGZzIGlzIHpv bmVkLCBvbmx5IHJvb3QgY2FuIGFjY2VzcyBpdCBmcm9tIHRoZQ0KPiAgKwkJICogZ2xvYmFsIHpv bmUuDQo+ICArCQkgKi8NCj4gICsJCWlmIChzZWNwb2xpY3lfemZzKGNyKSAmJiB6b25lZCkNCj4g ICsJCQlyZXR1cm4gKFNFVF9FUlJPUihFUEVSTSkpOw0KPiAgKwl9IGVsc2Ugew0KPiAgKwkJLyoN Cj4gICsJCSAqIElmIHdlIGFyZSBpbiBhIGxvY2FsIHpvbmUsIHRoZSAnem9uZWQnIHByb3BlcnR5 IG11c3QgYmUgc2V0Lg0KPiAgKwkJICovDQo+ICArCQlpZiAoIXpvbmVkKQ0KPiAgKwkJCXJldHVy biAoU0VUX0VSUk9SKEVQRVJNKSk7DQo+ICArDQo+ICArCQkvKiBtdXN0IGJlIHdyaXRhYmxlIGJ5 IHRoaXMgem9uZSAqLw0KPiAgKwkJaWYgKCF3cml0YWJsZSkNCj4gICsJCQlyZXR1cm4gKFNFVF9F UlJPUihFUEVSTSkpOw0KPiAgKwl9DQo+ICArCXJldHVybiAoMCk7DQo+ICArfQ0KPiAgKw0KPiAg K3N0YXRpYyBpbnQNCj4gICt6ZnNfZG96b25lY2hlY2soY29uc3QgY2hhciAqZGF0YXNldCwgY3Jl ZF90ICpjcikNCj4gICt7DQo+ICArCXVpbnQ2NF90IHpvbmVkOw0KPiAgKw0KPiAgKwlpZiAoZHNs X3Byb3BfZ2V0X2ludGVnZXIoZGF0YXNldCwgemZzX3Byb3BfdG9fbmFtZShaRlNfUFJPUF9aT05F RCksDQo+ICArCSAgICAmem9uZWQsIE5VTEwpKQ0KPiAgKwkJcmV0dXJuIChTRVRfRVJST1IoRU5P RU5UKSk7DQo+ICArDQo+ICArCXJldHVybiAoemZzX2Rvem9uZWNoZWNrX2ltcGwoZGF0YXNldCwg em9uZWQsIGNyKSk7DQo+ICArfQ0KPiAgKw0KPiAgK3N0YXRpYyBpbnQNCj4gICt6ZnNfZG96b25l Y2hlY2tfZHMoY29uc3QgY2hhciAqZGF0YXNldCwgZHNsX2RhdGFzZXRfdCAqZHMsIGNyZWRfdCAq Y3IpDQo+ICArew0KPiAgKwl1aW50NjRfdCB6b25lZDsNCj4gICsNCj4gICsJaWYgKGRzbF9wcm9w X2dldF9pbnRfZHMoZHMsIHpmc19wcm9wX3RvX25hbWUoWkZTX1BST1BfWk9ORUQpLCAmem9uZWQp KQ0KPiAgKwkJcmV0dXJuIChTRVRfRVJST1IoRU5PRU5UKSk7DQo+ICArDQo+ICArCXJldHVybiAo emZzX2Rvem9uZWNoZWNrX2ltcGwoZGF0YXNldCwgem9uZWQsIGNyKSk7DQo+ICArfQ0KPiAgKw0K PiAgK3N0YXRpYyBpbnQNCj4gICt6ZnNfc2VjcG9saWN5X3dyaXRlX3Blcm1zX2RzKGNvbnN0IGNo YXIgKm5hbWUsIGRzbF9kYXRhc2V0X3QgKmRzLA0KPiAgKyAgICBjb25zdCBjaGFyICpwZXJtLCBj cmVkX3QgKmNyKQ0KPiAgK3sNCj4gICsJaW50IGVycm9yOw0KPiAgKw0KPiAgKwllcnJvciA9IHpm c19kb3pvbmVjaGVja19kcyhuYW1lLCBkcywgY3IpOw0KPiAgKwlpZiAoZXJyb3IgPT0gMCkgew0K PiAgKwkJZXJyb3IgPSBzZWNwb2xpY3lfemZzKGNyKTsNCj4gICsJCWlmIChlcnJvciAhPSAwKQ0K PiAgKwkJCWVycm9yID0gZHNsX2RlbGVnX2FjY2Vzc19pbXBsKGRzLCBwZXJtLCBjcik7DQo+ICAr CX0NCj4gICsJcmV0dXJuIChlcnJvcik7DQo+ICArfQ0KPiAgKw0KPiAgK3N0YXRpYyBpbnQNCj4g ICt6ZnNfc2VjcG9saWN5X3dyaXRlX3Blcm1zKGNvbnN0IGNoYXIgKm5hbWUsIGNvbnN0IGNoYXIg KnBlcm0sIGNyZWRfdCAqY3IpDQo+ICArew0KPiAgKwlpbnQgZXJyb3I7DQo+ICArCWRzbF9kYXRh c2V0X3QgKmRzOw0KPiAgKwlkc2xfcG9vbF90ICpkcDsNCj4gICsNCj4gICsJLyoNCj4gICsJICog Rmlyc3QgZG8gYSBxdWljayBjaGVjayBmb3Igcm9vdCBpbiB0aGUgZ2xvYmFsIHpvbmUsIHdoaWNo DQo+ICArCSAqIGlzIGFsbG93ZWQgdG8gZG8gYWxsIHdyaXRlX3Blcm1zLiAgVGhpcyBlbnN1cmVz IHRoYXQgemZzX2lvY18qDQo+ICArCSAqIHdpbGwgZ2V0IHRvIGhhbmRsZSBub25leGlzdGVudCBk YXRhc2V0cy4NCj4gICsJICovDQo+ICArCWlmIChJTkdMT0JBTFpPTkUoY3VycHJvYykgJiYgc2Vj cG9saWN5X3pmcyhjcikgPT0gMCkNCj4gICsJCXJldHVybiAoMCk7DQo+ICArDQo+ICArCWVycm9y ID0gZHNsX3Bvb2xfaG9sZChuYW1lLCBGVEFHLCAmZHApOw0KPiAgKwlpZiAoZXJyb3IgIT0gMCkN Cj4gICsJCXJldHVybiAoZXJyb3IpOw0KPiAgKw0KPiAgKwllcnJvciA9IGRzbF9kYXRhc2V0X2hv bGQoZHAsIG5hbWUsIEZUQUcsICZkcyk7DQo+ICArCWlmIChlcnJvciAhPSAwKSB7DQo+ICArCQlk c2xfcG9vbF9yZWxlKGRwLCBGVEFHKTsNCj4gICsJCXJldHVybiAoZXJyb3IpOw0KPiAgKwl9DQo+ ICArDQo+ICArCWVycm9yID0gemZzX3NlY3BvbGljeV93cml0ZV9wZXJtc19kcyhuYW1lLCBkcywg cGVybSwgY3IpOw0KPiAgKw0KPiAgKwlkc2xfZGF0YXNldF9yZWxlKGRzLCBGVEFHKTsNCj4gICsJ ZHNsX3Bvb2xfcmVsZShkcCwgRlRBRyk7DQo+ICArCXJldHVybiAoZXJyb3IpOw0KPiAgK30NCj4g ICsNCj4gICsvKg0KPiAgKyAqIFBvbGljeSBmb3Igc2V0dGluZyB0aGUgc2VjdXJpdHkgbGFiZWwg cHJvcGVydHkuDQo+ICArICoNCj4gICsgKiBSZXR1cm5zIDAgZm9yIHN1Y2Nlc3MsIG5vbi16ZXJv IGZvciBhY2Nlc3MgYW5kIG90aGVyIGVycm9ycy4NCj4gICsgKi8NCj4gICtzdGF0aWMgaW50DQo+ ICAremZzX3NldF9zbGFiZWxfcG9saWN5KGNvbnN0IGNoYXIgKm5hbWUsIGNvbnN0IGNoYXIgKnN0 cnZhbCwgY3JlZF90ICpjcikNCj4gICt7DQo+ICArI2lmZGVmIEhBVkVfTUxTTEFCRUwNCj4gICsJ Y2hhcgkJZHNfaGV4c2xbTUFYTkFNRUxFTl07DQo+ICArCWJzbGFiZWxfdAlkc19zbCwgbmV3X3Ns Ow0KPiAgKwlib29sZWFuX3QJbmV3X2RlZmF1bHQgPSBGQUxTRTsNCj4gICsJdWludDY0X3QJem9u ZWQ7DQo+ICArCWludAkJbmVlZGVkX3ByaXYgPSAtMTsNCj4gICsJaW50CQllcnJvcjsNCj4gICsN Cj4gICsJLyogRmlyc3QgZ2V0IHRoZSBleGlzdGluZyBkYXRhc2V0IGxhYmVsLiAqLw0KPiAgKwll cnJvciA9IGRzbF9wcm9wX2dldChuYW1lLCB6ZnNfcHJvcF90b19uYW1lKFpGU19QUk9QX01MU0xB QkVMKSwNCj4gICsJICAgIDEsIHNpemVvZiAoZHNfaGV4c2wpLCAmZHNfaGV4c2wsIE5VTEwpOw0K PiAgKwlpZiAoZXJyb3IgIT0gMCkNCj4gICsJCXJldHVybiAoU0VUX0VSUk9SKEVQRVJNKSk7DQo+ ICArDQo+ICArCWlmIChzdHJjYXNlY21wKHN0cnZhbCwgWkZTX01MU0xBQkVMX0RFRkFVTFQpID09 IDApDQo+ICArCQluZXdfZGVmYXVsdCA9IFRSVUU7DQo+ICArDQo+ICArCS8qIFRoZSBsYWJlbCBt dXN0IGJlIHRyYW5zbGF0YWJsZSAqLw0KPiAgKwlpZiAoIW5ld19kZWZhdWx0ICYmIChoZXhzdHJf dG9fbGFiZWwoc3RydmFsLCAmbmV3X3NsKSAhPSAwKSkNCj4gICsJCXJldHVybiAoU0VUX0VSUk9S KEVJTlZBTCkpOw0KPiAgKw0KPiAgKwkvKg0KPiAgKwkgKiBJbiBhIG5vbi1nbG9iYWwgem9uZSwg ZGlzYWxsb3cgYXR0ZW1wdHMgdG8gc2V0IGEgbGFiZWwgdGhhdA0KPiAgKwkgKiBkb2Vzbid0IG1h dGNoIHRoYXQgb2YgdGhlIHpvbmU7IG90aGVyd2lzZSBubyBvdGhlciBjaGVja3MNCj4gICsJICog YXJlIG5lZWRlZC4NCj4gICsJICovDQo+ICArCWlmICghSU5HTE9CQUxaT05FKGN1cnByb2MpKSB7 DQo+ICArCQlpZiAobmV3X2RlZmF1bHQgfHwgIWJsZXF1YWwoJm5ld19zbCwgQ1JfU0woQ1JFRCgp KSkpDQo+ICArCQkJcmV0dXJuIChTRVRfRVJST1IoRVBFUk0pKTsNCj4gICsJCXJldHVybiAoMCk7 DQo+ICArCX0NCj4gICsNCj4gICsJLyoNCj4gICsJICogRm9yIGdsb2JhbC16b25lIGRhdGFzZXRz IChpLmUuLCB0aG9zZSB3aG9zZSB6b25lZCBwcm9wZXJ0eSBpcw0KPiAgKwkgKiAib2ZmIiwgdmVy aWZ5IHRoYXQgdGhlIHNwZWNpZmllZCBuZXcgbGFiZWwgaXMgdmFsaWQgZm9yIHRoZQ0KPiAgKwkg KiBnbG9iYWwgem9uZS4NCj4gICsJICovDQo+ICArCWlmIChkc2xfcHJvcF9nZXRfaW50ZWdlcihu YW1lLA0KPiAgKwkgICAgemZzX3Byb3BfdG9fbmFtZShaRlNfUFJPUF9aT05FRCksICZ6b25lZCwg TlVMTCkpDQo+ICArCQlyZXR1cm4gKFNFVF9FUlJPUihFUEVSTSkpOw0KPiAgKwlpZiAoIXpvbmVk KSB7DQo+ICArCQlpZiAoemZzX2NoZWNrX2dsb2JhbF9sYWJlbChuYW1lLCBzdHJ2YWwpICE9IDAp DQo+ICArCQkJcmV0dXJuIChTRVRfRVJST1IoRVBFUk0pKTsNCj4gICsJfQ0KPiAgKw0KPiAgKwkv Kg0KPiAgKwkgKiBJZiB0aGUgZXhpc3RpbmcgZGF0YXNldCBsYWJlbCBpcyBub25kZWZhdWx0LCBj aGVjayBpZiB0aGUNCj4gICsJICogZGF0YXNldCBpcyBtb3VudGVkIChsYWJlbCBjYW5ub3QgYmUg Y2hhbmdlZCB3aGlsZSBtb3VudGVkKS4NCj4gICsJICogR2V0IHRoZSB6ZnN2ZnNfdDsgaWYgdGhl cmUgaXNuJ3Qgb25lLCB0aGVuIHRoZSBkYXRhc2V0IGlzbid0DQo+ICArCSAqIG1vdW50ZWQgKG9y IGlzbid0IGEgZGF0YXNldCwgZG9lc24ndCBleGlzdCwgLi4uKS4NCj4gICsJICovDQo+ICArCWlm IChzdHJjYXNlY21wKGRzX2hleHNsLCBaRlNfTUxTTEFCRUxfREVGQVVMVCkgIT0gMCkgew0KPiAg KwkJb2Jqc2V0X3QgKm9zOw0KPiAgKwkJc3RhdGljIGNvbnN0IGNoYXIgKnNldHNsX3RhZyA9ICJz ZXRzbF90YWciOw0KPiAgKw0KPiAgKwkJLyoNCj4gICsJCSAqIFRyeSB0byBvd24gdGhlIGRhdGFz ZXQ7IGFib3J0IGlmIHRoZXJlIGlzIGFueSBlcnJvciwNCj4gICsJCSAqIChlLmcuLCBhbHJlYWR5 IG1vdW50ZWQsIGluIHVzZSwgb3Igb3RoZXIgZXJyb3IpLg0KPiAgKwkJICovDQo+ICArCQllcnJv ciA9IGRtdV9vYmpzZXRfb3duKG5hbWUsIERNVV9PU1RfWkZTLCBCX1RSVUUsIEJfVFJVRSwNCj4g ICsJCSAgICBzZXRzbF90YWcsICZvcyk7DQo+ICArCQlpZiAoZXJyb3IgIT0gMCkNCj4gICsJCQly ZXR1cm4gKFNFVF9FUlJPUihFUEVSTSkpOw0KPiAgKw0KPiAgKwkJZG11X29ianNldF9kaXNvd24o b3MsIEJfVFJVRSwgc2V0c2xfdGFnKTsNCj4gICsNCj4gICsJCWlmIChuZXdfZGVmYXVsdCkgew0K PiAgKwkJCW5lZWRlZF9wcml2ID0gUFJJVl9GSUxFX0RPV05HUkFERV9TTDsNCj4gKioqIDEzMjky IExJTkVTIFNLSVBQRUQgKioqDQo+IF9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fDQo+IGRldi1jb21taXRzLXNyYy1tYWluQGZyZWVic2Qub3JnIG1haWxpbmcg bGlzdA0KPiBodHRwczovL2xpc3RzLmZyZWVic2Qub3JnL21haWxtYW4vbGlzdGluZm8vZGV2LWNv bW1pdHMtc3JjLW1haW4NCj4gVG8gdW5zdWJzY3JpYmUsIHNlbmQgYW55IG1haWwgdG8gImRldi1j b21taXRzLXNyYy1tYWluLXVuc3Vic2NyaWJlQGZyZWVic2Qub3JnIg0KDQpPbiBGcmVlQlNEIDE0 LUNVUlJFTlQsIHdpdGggWkZTIHN0YXRpY2FsbHkgYnVpbHRpbiB0aGUga2VybmVsLCB0aGlzIGNv bW1pdCByZW5kZXJzICJtYWtlDQpidWlsZGtlcm5lbCIgdG8gZmFpbDoNCg0KWy4uLl0NCg0KPT09 PiBjYW0gKGFsbCkNCi0gLS0tIGtlcm5lbCAtLS0NCmxkOiBlcnJvcjogdW5kZWZpbmVkIHN5bWJv bDogemZzX3JhY2N0X3JlYWQNCj4+PiByZWZlcmVuY2VkIGJ5IGFyYy5jDQo+Pj4gICAgICAgICAg ICAgICBhcmMubzooYXJjX3JlYWQpDQotIC0tLSBtb2R1bGVzLWFsbCAtLS0NCi0gLS0tIGFsbF9z dWJkaXJfY2FyZGJ1cyAtLS0NCj09PT4gY2FyZGJ1cyAoYWxsKQ0KLSAtLS0ga2VybmVsIC0tLQ0K DQpsZDogZXJyb3I6IHVuZGVmaW5lZCBzeW1ib2w6IHpmc19yYWNjdF93cml0ZQ0KPj4+IHJlZmVy ZW5jZWQgYnkgZG11LmMNCj4+PiAgICAgICAgICAgICAgIGRtdS5vOihkbXVfYnVmX2hvbGRfYXJy YXlfYnlfZG5vZGUpDQo+Pj4gcmVmZXJlbmNlZCBieSBkbXUuYw0KPj4+ICAgICAgICAgICAgICAg ZG11Lm86KGRtdV9hc3NpZ25fYXJjYnVmX2J5X2Rub2RlKQ0KKioqIFtrZXJuZWxdIEVycm9yIGNv ZGUgMQ0KDQptYWtlWzJdOiBzdG9wcGVkIGluIC91c3Ivb2JqL3Vzci9zcmMvYW1kNjQuYW1kNjQv c3lzL0NVUlJFTlQxNA0KLSAtLS0gbW9kdWxlcy1hbGwgLS0tDQoqKiogW21vZHVsZXMtYWxsXSBF cnJvciBjb2RlIDYNCg0KDQoNCi0gLS0gDQpPLiBIYXJ0bWFubg0KDQpJY2ggd2lkZXJzcHJlY2hl IGRlciBOdXR6dW5nIG9kZXIgw5xiZXJtaXR0bHVuZyBtZWluZXIgRGF0ZW4gZsO8cg0KV2VyYmV6 d2Vja2Ugb2RlciBmw7xyIGRpZSBNYXJrdC0gb2RlciBNZWludW5nc2ZvcnNjaHVuZyAowqcgMjgg QWJzLiA0IEJEU0cpLg0KLS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0NCg0KaUhVRUFSWUlB QjBXSVFTeThJQnhBUERrcVZCYVRKNDROMVpaUGJhNVJ3VUNZRE81UmdBS0NSQTROMVpaUGJhNQ0K Uno0L0FRRGhoYnNJV1FZWjNaZ3JNZnpTczBtNDEwQ3B2bzVtek9VMXlJSDNQSVhKMUFEL2JVUHgv UlVoRXVZWA0KMTdXbVFSNSt1dVVMOXcxL3JUTldwczViYVBIbWFBdz0NCj03aWd0DQotLS0tLUVO RCBQR1AgU0lHTkFUVVJFLS0tLS0NCg== From owner-dev-commits-src-main@freebsd.org Mon Feb 22 14:07:19 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 65C7B55625A; Mon, 22 Feb 2021 14:07: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DkkX72VVWz3Qth; Mon, 22 Feb 2021 14:07: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 489D426C33; Mon, 22 Feb 2021 14:07: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 11ME7J8Q031515; Mon, 22 Feb 2021 14:07:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11ME7JRD031514; Mon, 22 Feb 2021 14:07:19 GMT (envelope-from git) Date: Mon, 22 Feb 2021 14:07:19 GMT Message-Id: <202102221407.11ME7JRD031514@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: a0ba293c2fa0 - main - Add missing entry for zfs_racct.c 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: a0ba293c2fa0c45532520f9a288f7422902c1ccc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 14:07:19 -0000 The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=a0ba293c2fa0c45532520f9a288f7422902c1ccc commit a0ba293c2fa0c45532520f9a288f7422902c1ccc Author: Stefan Eßer AuthorDate: 2021-02-22 14:06:48 +0000 Commit: Stefan Eßer CommitDate: 2021-02-22 14:06:48 +0000 Add missing entry for zfs_racct.c --- sys/conf/files | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/conf/files b/sys/conf/files index 8501f6fa9c1a..58ec6f3caf2a 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -217,6 +217,7 @@ contrib/openzfs/module/os/freebsd/zfs/zfs_dir.c optional zfs compile-with "${ZF contrib/openzfs/module/os/freebsd/zfs/zfs_file_os.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/os/freebsd/zfs/zfs_ioctl_compat.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/os/freebsd/zfs/zfs_ioctl_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_racct.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c optional zfs compile-with "${ZFS_C}" From owner-dev-commits-src-main@freebsd.org Mon Feb 22 15:05:08 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C795541BA6; Mon, 22 Feb 2021 15:05: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dklpr0GBvz3lXS; Mon, 22 Feb 2021 15:05: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 EFDCE27A98; Mon, 22 Feb 2021 15:05: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 11MF57u9009664; Mon, 22 Feb 2021 15:05:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MF57Fi009663; Mon, 22 Feb 2021 15:05:07 GMT (envelope-from git) Date: Mon, 22 Feb 2021 15:05:07 GMT Message-Id: <202102221505.11MF57Fi009663@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 608c44f96e88 - main - m_uiotombuf_nomap(): Stop clearing PG_ZERO in newly allocated pages MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 608c44f96e88f28f9607374a6c9327d13d3d3d0e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 15:05:08 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=608c44f96e88f28f9607374a6c9327d13d3d3d0e commit 608c44f96e88f28f9607374a6c9327d13d3d3d0e Author: Mark Johnston AuthorDate: 2021-02-22 15:03:37 +0000 Commit: Mark Johnston CommitDate: 2021-02-22 15:04:46 +0000 m_uiotombuf_nomap(): Stop clearing PG_ZERO in newly allocated pages The caller should not be passing M_ZERO in the first place, so PG_ZERO will not be preserved by the page allocator and clearing it accomplishes nothing. Reviewed by: gallatin, jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28808 --- sys/kern/uipc_mbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index f73bfab07eaf..5296aac0edc4 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -1656,6 +1656,7 @@ m_uiotombuf_nomap(struct uio *uio, int how, int len, int maxseg, int flags) VM_ALLOC_WIRED; MPASS((flags & M_PKTHDR) == 0); + MPASS((how & M_ZERO) == 0); /* * len can be zero or an arbitrary large value bound by @@ -1709,7 +1710,6 @@ retry_page: goto retry_page; } } - pg_array[i]->flags &= ~PG_ZERO; mb->m_epg_pa[i] = VM_PAGE_TO_PHYS(pg_array[i]); mb->m_epg_npgs++; } From owner-dev-commits-src-main@freebsd.org Mon Feb 22 15:31:59 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 957C9542969; Mon, 22 Feb 2021 15:31: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DkmPq3rb6z3nk7; Mon, 22 Feb 2021 15:31: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 76F0F27BDC; Mon, 22 Feb 2021 15:31: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 11MFVxTa048363; Mon, 22 Feb 2021 15:31:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MFVxQU048362; Mon, 22 Feb 2021 15:31:59 GMT (envelope-from git) Date: Mon, 22 Feb 2021 15:31:59 GMT Message-Id: <202102221531.11MFVxQU048362@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: aa8ae5fe17eb - main - git hooks: add "Fixes" trailer to commit message template 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: aa8ae5fe17eb380b0f30f1641f17a0b3d83a68c3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 15:31:59 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=aa8ae5fe17eb380b0f30f1641f17a0b3d83a68c3 commit aa8ae5fe17eb380b0f30f1641f17a0b3d83a68c3 Author: Ed Maste AuthorDate: 2021-02-20 18:49:31 +0000 Commit: Ed Maste CommitDate: 2021-02-22 15:29:56 +0000 git hooks: add "Fixes" trailer to commit message template A number of projects use "Fixes: " to identify a commit that is fixed by a given change. Adopt that convention. Differential Revision: https://reviews.freebsd.org/D28693 --- tools/tools/git/hooks/prepare-commit-msg | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/tools/git/hooks/prepare-commit-msg b/tools/tools/git/hooks/prepare-commit-msg index 4d1072700af0..761b4443cfd8 100755 --- a/tools/tools/git/hooks/prepare-commit-msg +++ b/tools/tools/git/hooks/prepare-commit-msg @@ -48,6 +48,7 @@ $(awk '1;/^#$/{exit}' $1) # Tested by: # Approved by: # Obtained from: +# Fixes: # MFC after: # MFH: # Relnotes: From owner-dev-commits-src-main@freebsd.org Mon Feb 22 15:50:00 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C55D5434ED; Mon, 22 Feb 2021 15:50: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dkmpc2Prnz3qNk; Mon, 22 Feb 2021 15:50: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 45C2E27FE9; Mon, 22 Feb 2021 15:50: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 11MFo0xY063261; Mon, 22 Feb 2021 15:50:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MFo03I063245; Mon, 22 Feb 2021 15:50:00 GMT (envelope-from git) Date: Mon, 22 Feb 2021 15:50:00 GMT Message-Id: <202102221550.11MFo03I063245@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: 808d4aad1022 - main - xen-blkback: fix leak of grant maps on ring setup failure 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: 808d4aad1022a2a33d222663b0c9badde30b9d45 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 15:50:00 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=808d4aad1022a2a33d222663b0c9badde30b9d45 commit 808d4aad1022a2a33d222663b0c9badde30b9d45 Author: Roger Pau Monné AuthorDate: 2021-01-20 18:40:51 +0000 Commit: Roger Pau Monné CommitDate: 2021-02-22 15:47:52 +0000 xen-blkback: fix leak of grant maps on ring setup failure Multi page rings are mapped using a single hypercall that gets passed an array of grants to map. One of the grants in the array failing to map would lead to the failure of the whole ring setup operation, but there was no cleanup of the rest of the grant maps in the array that could have likely been created as a result of the hypercall. Add proper cleanup on the failure path during ring setup to unmap any grants that could have been created. This is part of XSA-361. Sponsored by: Citrix Systems R&D --- sys/dev/xen/blkback/blkback.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sys/dev/xen/blkback/blkback.c b/sys/dev/xen/blkback/blkback.c index 762f25302c00..678472cc2ab8 100644 --- a/sys/dev/xen/blkback/blkback.c +++ b/sys/dev/xen/blkback/blkback.c @@ -2893,10 +2893,31 @@ xbb_connect_ring(struct xbb_softc *xbb) ring_idx < xbb->ring_config.ring_pages; ring_idx++, gnt++) { if (gnt->status != 0) { + struct gnttab_unmap_grant_ref unmap[XBB_MAX_RING_PAGES]; + unsigned int i, j; + xbb->ring_config.va = 0; xenbus_dev_fatal(xbb->dev, EACCES, "Ring shared page mapping failed. " "Status %d.", gnt->status); + + /* Unmap everything to avoid leaking grant table maps */ + for (i = 0, j = 0; i < xbb->ring_config.ring_pages; + i++) { + if (gnts[i].status != GNTST_okay) + continue; + + unmap[j].host_addr = gnts[i].host_addr; + unmap[j].dev_bus_addr = gnts[i].dev_bus_addr; + unmap[j++].handle = gnts[i].handle; + } + if (j != 0) { + error = HYPERVISOR_grant_table_op( + GNTTABOP_unmap_grant_ref, unmap, j); + if (error != 0) + panic("Unable to unmap grants (%d)", + error); + } return (EACCES); } xbb->ring_config.handle[ring_idx] = gnt->handle; From owner-dev-commits-src-main@freebsd.org Mon Feb 22 16:15:24 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6F50E544099; Mon, 22 Feb 2021 16:15: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DknMw2mHjz3rwf; Mon, 22 Feb 2021 16:15: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 51CA167B; Mon, 22 Feb 2021 16:15: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 11MGFODe001911; Mon, 22 Feb 2021 16:15:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MGFOkP001910; Mon, 22 Feb 2021 16:15:24 GMT (envelope-from git) Date: Mon, 22 Feb 2021 16:15:24 GMT Message-Id: <202102221615.11MGFOkP001910@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: 9febbc454190 - main - Fix for natd(8) sending wrong sequence number after TCP retransmission, terminating a TCP connection. 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: 9febbc4541903bb8e6b0f1c84988c98b2f7c96ef Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 16:15:24 -0000 The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=9febbc4541903bb8e6b0f1c84988c98b2f7c96ef commit 9febbc4541903bb8e6b0f1c84988c98b2f7c96ef Author: Hans Petter Selasky AuthorDate: 2021-02-22 10:58:46 +0000 Commit: Hans Petter Selasky CommitDate: 2021-02-22 16:13:58 +0000 Fix for natd(8) sending wrong sequence number after TCP retransmission, terminating a TCP connection. If a TCP packet must be retransmitted and the data length has changed in the retransmitted packet, due to the internal workings of TCP, typically when ACK packets are lost, then there is a 30% chance that the logic in GetDeltaSeqOut() will find the correct length, which is the last length received. This can be explained as follows: If a "227 Entering Passive Mode" packet must be retransmittet and the length changes from 51 to 50 bytes, for example, then we have three cases for the list scan in GetDeltaSeqOut(), depending on how many prior packets were received modulus N_LINK_TCP_DATA=3: case 1: index 0: original packet 51 index 1: retransmitted packet 50 index 2: not relevant case 2: index 0: not relevant index 1: original packet 51 index 2: retransmitted packet 50 case 3: index 0: retransmitted packet 50 index 1: not relevant index 2: original packet 51 This patch simply changes the searching order for TCP packets, always starting at the last received packet instead of any received packet, in GetDeltaAckIn() and GetDeltaSeqOut(). Else no functional changes. Discussed with: rscheff@ Submitted by: Andreas Longwitz PR: 230755 MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/netinet/libalias/alias_db.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/netinet/libalias/alias_db.c b/sys/netinet/libalias/alias_db.c index 1f85a606b2d5..c87273c863ca 100644 --- a/sys/netinet/libalias/alias_db.c +++ b/sys/netinet/libalias/alias_db.c @@ -1937,14 +1937,18 @@ TCP packet. To do this, a circular list of ACK numbers where the TCP packet size was altered is searched. */ - int i; + int i, j; int delta, ack_diff_min; delta = 0; ack_diff_min = -1; - for (i = 0; i < N_LINK_TCP_DATA; i++) { + i = lnk->data.tcp->state.index; + for (j = 0; j < N_LINK_TCP_DATA; j++) { struct ack_data_record x; + if (i == 0) + i = N_LINK_TCP_DATA; + i--; x = lnk->data.tcp->ack[i]; if (x.active == 1) { int ack_diff; @@ -1976,14 +1980,18 @@ TCP packet. To do this, a circular list of ACK numbers where the TCP packet size was altered is searched. */ - int i; + int i, j; int delta, seq_diff_min; delta = 0; seq_diff_min = -1; - for (i = 0; i < N_LINK_TCP_DATA; i++) { + i = lnk->data.tcp->state.index; + for (j = 0; j < N_LINK_TCP_DATA; j++) { struct ack_data_record x; + if (i == 0) + i = N_LINK_TCP_DATA; + i--; x = lnk->data.tcp->ack[i]; if (x.active == 1) { int seq_diff; From owner-dev-commits-src-main@freebsd.org Mon Feb 22 17:41:32 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A46A9546688; Mon, 22 Feb 2021 17:41: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DkqHJ4HFVz4SdQ; Mon, 22 Feb 2021 17:41: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 858981C8D; Mon, 22 Feb 2021 17:41: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 11MHfW6I020187; Mon, 22 Feb 2021 17:41:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MHfWSA020186; Mon, 22 Feb 2021 17:41:32 GMT (envelope-from git) Date: Mon, 22 Feb 2021 17:41:32 GMT Message-Id: <202102221741.11MHfWSA020186@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 1ec3feb64826 - main - Update libm tests from NetBSD MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1ec3feb64826d2a43d41e74684690985bf20e71c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 17:41:32 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=1ec3feb64826d2a43d41e74684690985bf20e71c commit 1ec3feb64826d2a43d41e74684690985bf20e71c Author: Alex Richardson AuthorDate: 2021-02-22 17:19:06 +0000 Commit: Alex Richardson CommitDate: 2021-02-22 17:41:04 +0000 Update libm tests from NetBSD I did this without a full vendor update since that would cause too many conflicts. Since these files now almost match the NetBSD sources the next git subtree merge should work just fine. Reviewed By: lwhsu Differential Revision: https://reviews.freebsd.org/D28797 --- contrib/netbsd-tests/lib/libm/t_acos.c | 4 +- contrib/netbsd-tests/lib/libm/t_asin.c | 35 ++++-- contrib/netbsd-tests/lib/libm/t_bit.c | 102 +++++++++++++++ contrib/netbsd-tests/lib/libm/t_cabsl.cxx | 66 ++++++++++ contrib/netbsd-tests/lib/libm/t_cbrt.c | 95 +++++++++----- contrib/netbsd-tests/lib/libm/t_cos.c | 196 ++++++++++++++++++++++++----- contrib/netbsd-tests/lib/libm/t_cosh.c | 58 +++++---- contrib/netbsd-tests/lib/libm/t_exp.c | 52 ++++---- contrib/netbsd-tests/lib/libm/t_fe_round.c | 138 +++++++++++++++++++- contrib/netbsd-tests/lib/libm/t_fenv.c | 12 +- contrib/netbsd-tests/lib/libm/t_fmod.c | 8 +- contrib/netbsd-tests/lib/libm/t_ilogb.c | 8 +- contrib/netbsd-tests/lib/libm/t_ldexp.c | 37 +++--- contrib/netbsd-tests/lib/libm/t_libm.h | 6 +- contrib/netbsd-tests/lib/libm/t_log.c | 18 +-- contrib/netbsd-tests/lib/libm/t_round.c | 55 +++++++- contrib/netbsd-tests/lib/libm/t_scalbn.c | 58 ++++++--- contrib/netbsd-tests/lib/libm/t_sin.c | 91 +++++++++----- contrib/netbsd-tests/lib/libm/t_sinh.c | 56 ++++----- contrib/netbsd-tests/lib/libm/t_sqrt.c | 84 ++++++++----- contrib/netbsd-tests/lib/libm/t_tan.c | 86 +++++++++---- lib/msun/tests/Makefile | 2 + 22 files changed, 946 insertions(+), 321 deletions(-) diff --git a/contrib/netbsd-tests/lib/libm/t_acos.c b/contrib/netbsd-tests/lib/libm/t_acos.c index f051fb64df42..973f0245cdab 100644 --- a/contrib/netbsd-tests/lib/libm/t_acos.c +++ b/contrib/netbsd-tests/lib/libm/t_acos.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_acos.c,v 1.10 2014/03/05 20:14:46 dsl Exp $ */ +/* $NetBSD: t_acos.c,v 1.11 2018/11/07 03:59:36 riastradh Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -72,7 +72,7 @@ ATF_LIBM_TEST(acos_inrange, "Test acos/acosf(x) for some valid values") { 0, M_PI / 2, }, { 0.1, 1.470628905633337, }, { 0.5, 1.047197551196598, }, - { 0.99, 0.141539473324427, }, + { 0.99, 0.1415394733244273, }, }; unsigned int i; diff --git a/contrib/netbsd-tests/lib/libm/t_asin.c b/contrib/netbsd-tests/lib/libm/t_asin.c index 06de85216429..213b1f875439 100644 --- a/contrib/netbsd-tests/lib/libm/t_asin.c +++ b/contrib/netbsd-tests/lib/libm/t_asin.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_asin.c,v 1.3 2014/03/03 10:39:08 martin Exp $ */ +/* $NetBSD: t_asin.c,v 1.4 2018/11/07 03:59:36 riastradh Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -30,6 +30,7 @@ */ #include +#include #include static const struct { @@ -117,13 +118,14 @@ ATF_TC_HEAD(asin_inrange, tc) ATF_TC_BODY(asin_inrange, tc) { - const double eps = 1.0e-15; - double y; + const double eps = DBL_EPSILON; size_t i; for (i = 0; i < __arraycount(values); i++) { - y = asin(values[i].x); - if (fabs(y - values[i].y) > eps) + double x = values[i].x; + double y = values[i].y; + + if (!(fabs((asin(x) - y)/y) <= eps)) atf_tc_fail_nonfatal("asin(%g) != %g", values[i].x, values[i].y); } @@ -230,16 +232,25 @@ ATF_TC_HEAD(asinf_inrange, tc) ATF_TC_BODY(asinf_inrange, tc) { - const float eps = 1.0e-6; - float x; - float y; + const float eps = FLT_EPSILON; size_t i; for (i = 0; i < __arraycount(values); i++) { - x = values[i].x; - y = values[i].y; - if (fabs(asinf(x) - y) > eps) - atf_tc_fail_nonfatal("asinf(%g) != %g", x, y); + float x = values[i].x; + float y = values[i].y; + +#ifdef __NetBSD__ + if (fabs(x) == 0.5) + atf_tc_expect_fail("asinf is busted," + " gives ~2ulp error"); +#endif + if (!(fabsf((asinf(x) - y)/y) <= eps)) { + atf_tc_fail_nonfatal("asinf(%.8g) = %.8g != %.8g," + " error=~%.1fulp", + x, asinf(x), y, fabsf(((asinf(x) - y)/y)/eps)); + } + if (fabs(x) == 0.5) + atf_tc_expect_pass(); } } diff --git a/contrib/netbsd-tests/lib/libm/t_bit.c b/contrib/netbsd-tests/lib/libm/t_bit.c new file mode 100644 index 000000000000..b6e0218f601c --- /dev/null +++ b/contrib/netbsd-tests/lib/libm/t_bit.c @@ -0,0 +1,102 @@ +/* $NetBSD: t_bit.c,v 1.1 2019/04/26 08:52:16 maya Exp $ */ + +/* + * Written by Maya Rashish + * Public domain. + * + * Testing signbit{,f,l} function correctly + */ + +#include +#include +#include +#include +#include +#include + +static const struct { + double input; + bool is_negative; +} values[] = { + { -1, true}, + { -123, true}, + { -123E6, true}, +#ifdef INFINITY + { -INFINITY, true}, + { INFINITY, false}, +#endif + { 123E6, false}, + { 0, false}, + { -FLT_MIN, true}, + { FLT_MIN, false}, + /* + * Cannot be accurately represented as float, + * but sign should be preserved + */ + { DBL_MAX, false}, + { -DBL_MAX, true}, +}; + +#ifdef __HAVE_LONG_DOUBLE +static const struct { + long double input; + bool is_negative; +} ldbl_values[] = { + { -LDBL_MIN, true}, + { LDBL_MIN, false}, + { LDBL_MAX, false}, + { -LDBL_MAX, true}, +}; +#endif + +ATF_TC(signbit); +ATF_TC_HEAD(signbit, tc) +{ + atf_tc_set_md_var(tc, "descr","Check that signbit functions correctly"); +} + +ATF_TC_BODY(signbit, tc) +{ + double iterator_d; + float iterator_f; + + for (unsigned int i = 0; i < __arraycount(values); i++) { + iterator_d = values[i].input; + iterator_f = (float) values[i].input; + if (signbit(iterator_f) != values[i].is_negative) + atf_tc_fail("%s:%d iteration %d signbitf is wrong" + " about the sign of %f", __func__, + __LINE__, i, iterator_f); + if (signbit(iterator_d) != values[i].is_negative) + atf_tc_fail("%s:%d iteration %d signbit is wrong" + "about the sign of %f", __func__, + __LINE__,i, iterator_d); + +#ifdef __HAVE_LONG_DOUBLE + long double iterator_l = values[i].input; + if (signbit(iterator_l) != values[i].is_negative) + atf_tc_fail("%s:%d iteration %d signbitl is wrong" + " about the sign of %Lf", __func__, + __LINE__, i, iterator_l); +#endif + } + +#ifdef __HAVE_LONG_DOUBLE + for (unsigned int i = 0; i < __arraycount(ldbl_values); i++) { + if (signbit(ldbl_values[i].input) != ldbl_values[i].is_negative) + atf_tc_fail("%s:%d iteration %d signbitl is" + "wrong about the sign of %Lf", + __func__, __LINE__, i, + ldbl_values[i].input); + } +#endif + +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, signbit); + + return atf_no_error(); +} diff --git a/contrib/netbsd-tests/lib/libm/t_cabsl.cxx b/contrib/netbsd-tests/lib/libm/t_cabsl.cxx new file mode 100644 index 000000000000..7dd119b1da3b --- /dev/null +++ b/contrib/netbsd-tests/lib/libm/t_cabsl.cxx @@ -0,0 +1,66 @@ +/*- + * Copyright (c) 2018 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Maya Rashish + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Test that C++ "cabsl" is usable. PR lib/50646 + */ + +#include +#include + +ATF_TEST_CASE(cabsl); +ATF_TEST_CASE_HEAD(cabsl) +{ + set_md_var("descr", "Check that cabsl is usable from C++"); +} +ATF_TEST_CASE_BODY(cabsl) +{ + int sum = 0; + +#ifdef __HAVE_LONG_DOUBLE + std::complex cld(3.0,4.0); + sum += std::abs(cld); +#endif + std::complex cd(3.0,4.0); + sum += std::abs(cd); + + std::complex cf(3.0,4.0); + sum += std::abs(cf); + +#ifdef __HAVE_LONG_DOUBLE + ATF_REQUIRE_EQ(sum, 3*5); +#else + ATF_REQUIRE_EQ(sum, 2*5); +#endif +} + +ATF_INIT_TEST_CASES(tcs) +{ + ATF_ADD_TEST_CASE(tcs, cabsl); +} diff --git a/contrib/netbsd-tests/lib/libm/t_cbrt.c b/contrib/netbsd-tests/lib/libm/t_cbrt.c index 08e9faeb145c..639bc7e06517 100644 --- a/contrib/netbsd-tests/lib/libm/t_cbrt.c +++ b/contrib/netbsd-tests/lib/libm/t_cbrt.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_cbrt.c,v 1.3 2014/03/03 10:39:08 martin Exp $ */ +/* $NetBSD: t_cbrt.c,v 1.5 2018/11/15 05:14:20 riastradh Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,9 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_cbrt.c,v 1.3 2014/03/03 10:39:08 martin Exp $"); +__RCSID("$NetBSD: t_cbrt.c,v 1.5 2018/11/15 05:14:20 riastradh Exp $"); #include +#include #include #include @@ -61,18 +62,26 @@ ATF_TC_HEAD(cbrt_pow, tc) ATF_TC_BODY(cbrt_pow, tc) { const double x[] = { 0.0, 0.005, 1.0, 99.0, 123.123, 9999.0 }; - const double eps = 1.0e-14; - double y, z; + /* Neither cbrt nor pow is required to be correctly rounded. */ + const double eps = 2*DBL_EPSILON; size_t i; for (i = 0; i < __arraycount(x); i++) { - - y = cbrt(x[i]); - z = pow(x[i], 1.0 / 3.0); - - if (fabs(y - z) > eps) - atf_tc_fail_nonfatal("cbrt(%0.03f) != " - "pow(%0.03f, 1/3)\n", x[i], x[i]); + double x_cbrt = cbrt(x[i]); + double x_pow13 = pow(x[i], 1.0 / 3.0); + bool ok; + + if (x[i] == 0) { + ok = (x_cbrt == x_pow13); + } else { + ok = (fabs((x_cbrt - x_pow13)/x_cbrt) <= eps); + } + + if (!ok) { + atf_tc_fail_nonfatal("cbrt(%.17g) = %.17g != " + "pow(%.17g, 1/3) = %.17g\n", + x[i], x_cbrt, x[i], x_pow13); + } } } @@ -162,18 +171,27 @@ ATF_TC_HEAD(cbrtf_powf, tc) ATF_TC_BODY(cbrtf_powf, tc) { const float x[] = { 0.0, 0.005, 1.0, 99.0, 123.123, 9999.0 }; - const float eps = 1.0e-5; - float y, z; + /* Neither cbrt nor pow is required to be correctly rounded. */ + const float eps = 2*FLT_EPSILON; size_t i; for (i = 0; i < __arraycount(x); i++) { - - y = cbrtf(x[i]); - z = powf(x[i], 1.0 / 3.0); - - if (fabsf(y - z) > eps) - atf_tc_fail_nonfatal("cbrtf(%0.03f) != " - "powf(%0.03f, 1/3)\n", x[i], x[i]); + float x_cbrt = cbrtf(x[i]); + float x_pow13 = powf(x[i], 1.0 / 3.0); + bool ok; + + if (x[i] == 0) { + ok = (x_cbrt == x_pow13); + } else { + ok = (fabsf((x_cbrt - x_pow13)/x_cbrt) <= eps); + } + + if (!ok) { + atf_tc_fail_nonfatal("cbrtf(%.9g) = %.9g. != " + "powf(%.9g, 1/3) = %.9g\n", + (double)x[i], (double)x_cbrt, + (double)x[i], (double)x_pow13); + } } } @@ -264,27 +282,42 @@ ATF_TC_HEAD(cbrtl_powl, tc) ATF_TC_BODY(cbrtl_powl, tc) { const long double x[] = { 0.0, 0.005, 1.0, 99.0, 123.123, 9999.0 }; - const long double eps = 1.0e-15; - long double y, z; + /* Neither cbrt nor pow is required to be correctly rounded. */ + const long double eps = 2*LDBL_EPSILON; size_t i; #if defined(__amd64__) && defined(__clang__) && __clang_major__ >= 7 && \ __clang_major__ < 10 && __FreeBSD_cc_version < 1300002 atf_tc_expect_fail("test fails with clang 7-9 - bug 234040"); #endif - for (i = 0; i < __arraycount(x); i++) { - - y = cbrtl(x[i]); + long double x_cbrt = cbrtl(x[i]); #ifdef __FreeBSD__ - z = powl(x[i], (long double)1.0 / 3.0); + /* + * NetBSD doesn't have a real powl/cbrtl implementation, they + * just call the double version. On FreeBSD we have a real + * powl implementation so we have to cast the second argument + * to long double before dividing to get a more precise + * approximation of 1/3. + * TODO: upstream this diff. + */ + long double x_pow13 = powl(x[i], (long double)1.0 / 3.0); #else - z = powl(x[i], 1.0 / 3.0); + long double x_pow13 = powl(x[i], 1.0 / 3.0); #endif - - if (fabsl(y - z) > eps * fabsl(1 + x[i])) - atf_tc_fail_nonfatal("cbrtl(%0.03Lf) != " - "powl(%0.03Lf, 1/3)\n", x[i], x[i]); + bool ok; + + if (x[i] == 0) { + ok = (x_cbrt == x_pow13); + } else { + ok = (fabsl((x_cbrt - x_pow13)/x_cbrt) <= eps); + } + + if (!ok) { + atf_tc_fail_nonfatal("cbrtl(%.35Lg) = %.35Lg != " + "powl(%.35Lg, 1/3) = %.35Lg\n", + x[i], x_cbrt, x[i], x_pow13); + } } } diff --git a/contrib/netbsd-tests/lib/libm/t_cos.c b/contrib/netbsd-tests/lib/libm/t_cos.c index d99d60810eeb..ca5f0aab7ffa 100644 --- a/contrib/netbsd-tests/lib/libm/t_cos.c +++ b/contrib/netbsd-tests/lib/libm/t_cos.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_cos.c,v 1.4 2014/03/03 10:39:08 martin Exp $ */ +/* $NetBSD: t_cos.c,v 1.9 2019/05/27 00:10:36 maya Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,31 +29,138 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include #include +#include #include static const struct { int angle; double x; double y; + float fy; } angles[] = { - { -180, -3.141592653589793, -1.0000000000000000 }, - { -135, -2.356194490192345, -0.7071067811865476 }, - { -90, -1.570796326794897, 0.0000000000000000 }, - { -45, -0.785398163397448, 0.7071067811865476 }, - { 0, 0.000000000000000, 1.0000000000000000 }, - { 30, 0.523598775598299, 0.8660254037844386 }, - { 45, 0.785398163397448, 0.7071067811865476 }, - { 60, 1.047197551196598, 0.5000000000000000 }, - { 90, 1.570796326794897, 0.0000000000000000 }, - { 120, 2.094395102393195, -0.5000000000000000 }, - { 135, 2.356194490192345, -0.7071067811865476 }, - { 150, 2.617993877991494, -0.8660254037844386 }, - { 180, 3.141592653589793, -1.0000000000000000 }, - { 270, 4.712388980384690, 0.0000000000000000 }, - { 360, 6.283185307179586, 1.0000000000000000 } + { -180, -3.141592653589793, -1.0000000000000000, 999 }, + { -135, -2.356194490192345, -0.7071067811865476, 999 }, + { -90, -1.5707963267948966, 6.123233995736766e-17, -4.3711388e-08 }, + { -90, -1.5707963267948968, -1.6081226496766366e-16, -4.3711388e-08 }, + { -45, -0.785398163397448, 0.7071067811865478, 999 }, + { 0, 0.000000000000000, 1.0000000000000000, 999 }, + { 30, 0.523598775598299, 0.8660254037844386, 999 }, + { 45, 0.785398163397448, 0.7071067811865478, 999 }, + { 60, 1.0471975511965976, 0.5000000000000001, 999 }, + { 60, 1.0471975511965979, 0.4999999999999999, 999 }, + { 90, 1.570796326794897, -3.8285686989269494e-16, -4.3711388e-08 }, + { 120, 2.0943951023931953, -0.4999999999999998, 999 }, + { 120, 2.0943951023931957, -0.5000000000000002, 999 }, + { 135, 2.356194490192345, -0.7071067811865476, 999 }, + { 150, 2.617993877991494, -0.8660254037844386, 999 }, + { 180, 3.141592653589793, -1.0000000000000000, 999 }, + { 270, 4.712388980384690, -1.8369701987210297e-16, 1.1924881e-08 }, + { 360, 6.283185307179586, 1.0000000000000000, 999 }, }; +#ifdef __HAVE_LONG_DOUBLE +/* + * cosl(3) + */ +ATF_TC(cosl_angles); +ATF_TC_HEAD(cosl_angles, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test some selected angles"); +} + +ATF_TC_BODY(cosl_angles, tc) +{ + /* + * XXX The given data is for double, so take that + * into account and expect less precise results.. + */ + const long double eps = DBL_EPSILON; + size_t i; + + for (i = 0; i < __arraycount(angles); i++) { + int deg = angles[i].angle; + long double theta = angles[i].x; + long double cos_theta = angles[i].y; + + assert(cos_theta != 0); + if (!(fabsl((cosl(theta) - cos_theta)/cos_theta) <= eps)) { + atf_tc_fail_nonfatal("cos(%d deg = %.17Lg) = %.17Lg" + " != %.17Lg", + deg, theta, cosl(theta), cos_theta); + } + } +} + +ATF_TC(cosl_nan); +ATF_TC_HEAD(cosl_nan, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test cosl(NaN) == NaN"); +} + +ATF_TC_BODY(cosl_nan, tc) +{ + const long double x = 0.0L / 0.0L; + + ATF_CHECK(isnan(x) != 0); + ATF_CHECK(isnan(cosl(x)) != 0); +} + +ATF_TC(cosl_inf_neg); +ATF_TC_HEAD(cosl_inf_neg, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test cosl(-Inf) == NaN"); +} + +ATF_TC_BODY(cosl_inf_neg, tc) +{ + const long double x = -1.0L / 0.0L; + + ATF_CHECK(isnan(cosl(x)) != 0); +} + +ATF_TC(cosl_inf_pos); +ATF_TC_HEAD(cosl_inf_pos, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test cosl(+Inf) == NaN"); +} + +ATF_TC_BODY(cosl_inf_pos, tc) +{ + const long double x = 1.0L / 0.0L; + + ATF_CHECK(isnan(cosl(x)) != 0); +} + + +ATF_TC(cosl_zero_neg); +ATF_TC_HEAD(cosl_zero_neg, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test cosl(-0.0) == 1.0"); +} + +ATF_TC_BODY(cosl_zero_neg, tc) +{ + const long double x = -0.0L; + + ATF_CHECK(cosl(x) == 1.0); +} + +ATF_TC(cosl_zero_pos); +ATF_TC_HEAD(cosl_zero_pos, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test cosl(+0.0) == 1.0"); +} + +ATF_TC_BODY(cosl_zero_pos, tc) +{ + const long double x = 0.0L; + + ATF_CHECK(cosl(x) == 1.0); +} +#endif + /* * cos(3) */ @@ -65,14 +172,20 @@ ATF_TC_HEAD(cos_angles, tc) ATF_TC_BODY(cos_angles, tc) { - const double eps = 1.0e-15; + const double eps = DBL_EPSILON; size_t i; for (i = 0; i < __arraycount(angles); i++) { - - if (fabs(cos(angles[i].x) - angles[i].y) > eps) - atf_tc_fail_nonfatal("cos(%d deg) != %0.01f", - angles[i].angle, angles[i].y); + int deg = angles[i].angle; + double theta = angles[i].x; + double cos_theta = angles[i].y; + + assert(cos_theta != 0); + if (!(fabs((cos(theta) - cos_theta)/cos_theta) <= eps)) { + atf_tc_fail_nonfatal("cos(%d deg = %.17g) = %.17g" + " != %.17g", + deg, theta, cos(theta), cos_theta); + } } } @@ -154,18 +267,33 @@ ATF_TC_HEAD(cosf_angles, tc) ATF_TC_BODY(cosf_angles, tc) { - const float eps = 1.0e-7; - float x, y; + const float eps = FLT_EPSILON; size_t i; for (i = 0; i < __arraycount(angles); i++) { - - x = angles[i].x; - y = angles[i].y; - - if (fabsf(cosf(x) - y) > eps) - atf_tc_fail_nonfatal("cosf(%d deg) != %0.01f", - angles[i].angle, angles[i].y); + int deg = angles[i].angle; + float theta = angles[i].x; + float cos_theta = angles[i].fy; + + /* + * Force rounding to float even if FLT_EVAL_METHOD=2, + * as is the case on i386. + * + * The volatile should not be necessary, by C99 Sec. + * 5.2.4.2.2. para. 8 on p. 24 which specifies that + * assignment and cast remove all extra range and precision, + * but seems to be needed to work around a compiler bug. + */ + volatile float result = cosf(theta); + + if (cos_theta == 999) + cos_theta = angles[i].y; + + assert(cos_theta != 0); + if (!(fabsf((result - cos_theta)/cos_theta) <= eps)) { + atf_tc_fail_nonfatal("cosf(%d deg = %.8g) = %.8g" + " != %.8g", deg, theta, result, cos_theta); + } } } @@ -244,6 +372,14 @@ ATF_TC_BODY(cosf_zero_pos, tc) ATF_TP_ADD_TCS(tp) { +#ifdef __HAVE_LONG_DOUBLE + ATF_TP_ADD_TC(tp, cosl_angles); + ATF_TP_ADD_TC(tp, cosl_nan); + ATF_TP_ADD_TC(tp, cosl_inf_neg); + ATF_TP_ADD_TC(tp, cosl_inf_pos); + ATF_TP_ADD_TC(tp, cosl_zero_neg); + ATF_TP_ADD_TC(tp, cosl_zero_pos); +#endif ATF_TP_ADD_TC(tp, cos_angles); ATF_TP_ADD_TC(tp, cos_nan); diff --git a/contrib/netbsd-tests/lib/libm/t_cosh.c b/contrib/netbsd-tests/lib/libm/t_cosh.c index 3f998de761bb..aac3a39b0236 100644 --- a/contrib/netbsd-tests/lib/libm/t_cosh.c +++ b/contrib/netbsd-tests/lib/libm/t_cosh.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_cosh.c,v 1.6 2014/03/03 10:39:08 martin Exp $ */ +/* $NetBSD: t_cosh.c,v 1.7 2018/11/07 03:59:36 riastradh Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,28 +29,28 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_cosh.c,v 1.6 2014/03/03 10:39:08 martin Exp $"); +__RCSID("$NetBSD: t_cosh.c,v 1.7 2018/11/07 03:59:36 riastradh Exp $"); #include +#include #include #include static const struct { double x; double y; - double e; } values[] = { - { -10, 11013.23292010332, 1e4, }, - { -2, 3.762195691083631, 1, }, - { -1, 1.543080634815244, 1, }, - { -0.05, 1.001250260438369, 1, }, - { -0.001, 1.000000500000042, 1, }, - { 0, 1, 1, }, - { 0.001, 1.000000500000042, 1, }, - { 0.05, 1.001250260438369, 1, }, - { 1, 1.543080634815244, 1, }, - { 2, 3.762195691083631, 1, }, - { 10, 11013.23292010332, 1e4, }, + { -10, 11013.232920103323, }, + { -2, 3.762195691083631, }, + { -1, 1.543080634815244, }, + { -0.05, 1.001250260438369, }, + { -0.001, 1.0000005000000418, }, + { 0, 1, }, + { 0.001, 1.0000005000000418, }, + { 0.05, 1.001250260438369, }, + { 1, 1.543080634815244, }, + { 2, 3.762195691083631, }, + { 10, 11013.232920103323, }, }; /* @@ -64,18 +64,17 @@ ATF_TC_HEAD(cosh_inrange, tc) ATF_TC_BODY(cosh_inrange, tc) { - double eps; - double x; - double y; + const double eps = DBL_EPSILON; size_t i; for (i = 0; i < __arraycount(values); i++) { - x = values[i].x; - y = values[i].y; - eps = 1e-15 * values[i].e; + double x = values[i].x; + double cosh_x = values[i].y; - if (fabs(cosh(x) - y) > eps) - atf_tc_fail_nonfatal("cosh(%g) != %g\n", x, y); + if (!(fabs((cosh(x) - cosh_x)/cosh_x) <= eps)) { + atf_tc_fail_nonfatal("cosh(%.17g) = %.17g != %.17g\n", + x, cosh(x), cosh_x); + } } } @@ -162,18 +161,17 @@ ATF_TC_HEAD(coshf_inrange, tc) ATF_TC_BODY(coshf_inrange, tc) { - float eps; - float x; - float y; + const float eps = FLT_EPSILON; size_t i; for (i = 0; i < __arraycount(values); i++) { - x = values[i].x; - y = values[i].y; - eps = 1e-6 * values[i].e; + float x = values[i].x; + float cosh_x = values[i].y; - if (fabsf(coshf(x) - y) > eps) - atf_tc_fail_nonfatal("coshf(%g) != %g\n", x, y); + if (!(fabsf((coshf(x) - cosh_x)/cosh_x) <= eps)) { + atf_tc_fail_nonfatal("coshf(%.17g) = %.17g != %.17g\n", + x, coshf(x), cosh_x); + } } } diff --git a/contrib/netbsd-tests/lib/libm/t_exp.c b/contrib/netbsd-tests/lib/libm/t_exp.c index 0eb6412b566e..acef4c0e91de 100644 --- a/contrib/netbsd-tests/lib/libm/t_exp.c +++ b/contrib/netbsd-tests/lib/libm/t_exp.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_exp.c,v 1.8 2014/10/07 16:53:44 gson Exp $ */ +/* $NetBSD: t_exp.c,v 1.9 2018/11/07 03:59:36 riastradh Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -30,6 +30,7 @@ */ #include +#include #include #include "t_libm.h" @@ -37,17 +38,16 @@ static const struct { double x; double y; - double e; } exp_values[] = { - { -10, 0.4539992976248485e-4, 1e-4, }, - { -5, 0.6737946999085467e-2, 1e-2, }, - { -1, 0.3678794411714423, 1e-1, }, - { -0.1, 0.9048374180359595, 1e-1, }, - { 0, 1.0000000000000000, 1, }, - { 0.1, 1.1051709180756477, 1, }, - { 1, 2.7182818284590452, 1, }, - { 5, 148.41315910257660, 1e2, }, - { 10, 22026.465794806718, 1e4, }, + { -10, 0.4539992976248485e-4, }, + { -5, 0.6737946999085467e-2, }, + { -1, 0.3678794411714423, }, + { -0.1, 0.9048374180359595, }, + { 0, 1.0000000000000000, }, + { 0.1, 1.1051709180756477, }, + { 1, 2.7182818284590452, }, + { 5, 148.41315910257660, }, + { 10, 22026.465794806718, }, }; /* @@ -238,18 +238,17 @@ ATF_TC_HEAD(exp_product, tc) ATF_TC_BODY(exp_product, tc) { - double eps; - double x; - double y; + const double eps = DBL_EPSILON; size_t i; for (i = 0; i < __arraycount(exp_values); i++) { - x = exp_values[i].x; - y = exp_values[i].y; - eps = 1e-15 * exp_values[i].e; + double x = exp_values[i].x; + double e_x = exp_values[i].y; - if (fabs(exp(x) - y) > eps) - atf_tc_fail_nonfatal("exp(%0.01f) != %18.18e", x, y); + if (!(fabs((exp(x) - e_x)/e_x) <= eps)) { + atf_tc_fail_nonfatal("exp(%.17g) = %.17g != %.17g", + x, exp(x), e_x); + } } } @@ -336,18 +335,17 @@ ATF_TC_HEAD(expf_product, tc) ATF_TC_BODY(expf_product, tc) { - float eps; - float x; - float y; + const float eps = FLT_EPSILON; size_t i; for (i = 0; i < __arraycount(exp_values); i++) { - x = exp_values[i].x; - y = exp_values[i].y; - eps = 1e-6 * exp_values[i].e; + float x = exp_values[i].x; + float e_x = exp_values[i].y; - if (fabsf(expf(x) - y) > eps) - atf_tc_fail_nonfatal("expf(%0.01f) != %18.18e", x, y); + if (!(fabsf((expf(x) - e_x)/e_x) <= eps)) { + atf_tc_fail_nonfatal("expf(%.8g) = %.8g != %.8g", + x, exp(x), e_x); + } } } diff --git a/contrib/netbsd-tests/lib/libm/t_fe_round.c b/contrib/netbsd-tests/lib/libm/t_fe_round.c index fe805b4f86b8..33da289eb156 100644 --- a/contrib/netbsd-tests/lib/libm/t_fe_round.c +++ b/contrib/netbsd-tests/lib/libm/t_fe_round.c @@ -89,7 +89,97 @@ ATF_TC_BODY(fe_round, tc) (fegetround() == values[i].round_mode), "Didn't get the same rounding mode out!\n" "(index %d) fed in %d rounding mode, got %d out\n", - i, fegetround(), values[i].round_mode); + i, values[i].round_mode, fegetround()); + } +} + +ATF_TC(fe_nearbyint); +ATF_TC_HEAD(fe_nearbyint, tc) +{ + atf_tc_set_md_var(tc, "descr","Checking IEEE 754 rounding modes using nearbyint"); +} + +ATF_TC_BODY(fe_nearbyint, tc) +{ + double received; + + for (unsigned int i = 0; i < __arraycount(values); i++) { + fesetround(values[i].round_mode); + + received = nearbyint(values[i].input); + ATF_CHECK_MSG( + (fabs(received - values[i].expected) < EPSILON), + "nearbyint rounding wrong, difference too large\n" + "input: %f (index %d): got %f, expected %ld\n", + values[i].input, i, received, values[i].expected); + + /* Do we get the same rounding mode out? */ + ATF_CHECK_MSG( + (fegetround() == values[i].round_mode), + "Didn't get the same rounding mode out!\n" + "(index %d) fed in %d rounding mode, got %d out\n", + i, values[i].round_mode, fegetround()); + } +} + +static const struct { + double input; + double toward; + double expected; +} values2[] = { + { 10.0, 11.0, 10.0 }, + { -5.0, -6.0, -5.0 }, +}; + +ATF_TC(fe_nextafter); +ATF_TC_HEAD(fe_nextafter, tc) +{ + atf_tc_set_md_var(tc, "descr", "Checking IEEE 754 rounding using nextafter()"); +} + +ATF_TC_BODY(fe_nextafter, tc) +{ + double received; + int res; + + for (unsigned int i = 0; i < __arraycount(values2); i++) { + received = nextafter(values2[i].input, values2[i].toward); + if (values2[i].input < values2[i].toward) { + res = (received > values2[i].input); + } else { + res = (received < values2[i].input); + } + ATF_CHECK_MSG( + res && (fabs(received - values2[i].expected) < EPSILON), + "nextafter() rounding wrong, difference too large\n" + "input: %f (index %d): got %f, expected %f, res %d\n", + values2[i].input, i, received, values2[i].expected, res); + } +} + *** 1053 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Mon Feb 22 17:41:33 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C96465465FE; Mon, 22 Feb 2021 17:41: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DkqHK53L7z4SY7; Mon, 22 Feb 2021 17:41: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 A0A381D08; Mon, 22 Feb 2021 17:41: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 11MHfXNF020206; Mon, 22 Feb 2021 17:41:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MHfX2s020205; Mon, 22 Feb 2021 17:41:33 GMT (envelope-from git) Date: Mon, 22 Feb 2021 17:41:33 GMT Message-Id: <202102221741.11MHfX2s020205@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: c1b554c86819 - main - if_vtnet: Fix pointer-sign and used parameter warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c1b554c868195ed10ac1eb25fa9ca4a5baae4638 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 17:41:33 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=c1b554c868195ed10ac1eb25fa9ca4a5baae4638 commit c1b554c868195ed10ac1eb25fa9ca4a5baae4638 Author: Alex Richardson AuthorDate: 2021-02-22 17:26:21 +0000 Commit: Alex Richardson CommitDate: 2021-02-22 17:41:04 +0000 if_vtnet: Fix pointer-sign and used parameter warnings Reviewed By: grehan Differential Revision: https://reviews.freebsd.org/D28726 --- sys/dev/virtio/network/if_vtnet.c | 42 ++++++++++++++++++------------------ sys/dev/virtio/network/if_vtnetvar.h | 6 +++--- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index e64b7de113c8..09110183c30f 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -113,7 +113,7 @@ static void vtnet_free_rx_filters(struct vtnet_softc *); static int vtnet_alloc_virtqueues(struct vtnet_softc *); static int vtnet_alloc_interface(struct vtnet_softc *); static int vtnet_setup_interface(struct vtnet_softc *); -static int vtnet_ioctl_mtu(struct vtnet_softc *, int); +static int vtnet_ioctl_mtu(struct vtnet_softc *, u_int); static int vtnet_ioctl_ifflags(struct vtnet_softc *); static int vtnet_ioctl_multi(struct vtnet_softc *); static int vtnet_ioctl_ifcap(struct vtnet_softc *, struct ifreq *); @@ -206,9 +206,9 @@ static void vtnet_exec_ctrl_cmd(struct vtnet_softc *, void *, static int vtnet_ctrl_mac_cmd(struct vtnet_softc *, uint8_t *); static int vtnet_ctrl_guest_offloads(struct vtnet_softc *, uint64_t); static int vtnet_ctrl_mq_cmd(struct vtnet_softc *, uint16_t); -static int vtnet_ctrl_rx_cmd(struct vtnet_softc *, uint8_t, int); -static int vtnet_set_promisc(struct vtnet_softc *, int); -static int vtnet_set_allmulti(struct vtnet_softc *, int); +static int vtnet_ctrl_rx_cmd(struct vtnet_softc *, uint8_t, bool); +static int vtnet_set_promisc(struct vtnet_softc *, bool); +static int vtnet_set_allmulti(struct vtnet_softc *, bool); static void vtnet_rx_filter(struct vtnet_softc *); static void vtnet_rx_filter_mac(struct vtnet_softc *); static int vtnet_exec_vlan_filter(struct vtnet_softc *, int, uint16_t); @@ -373,7 +373,7 @@ MODULE_DEPEND(vtnet, netmap, 1, 1, 1); VIRTIO_SIMPLE_PNPINFO(vtnet, VIRTIO_ID_NETWORK, "VirtIO Networking Adapter"); static int -vtnet_modevent(module_t mod, int type, void *unused) +vtnet_modevent(module_t mod __unused, int type, void *unused __unused) { int error = 0; static int loaded = 0; @@ -1247,7 +1247,7 @@ vtnet_rx_cluster_size(struct vtnet_softc *sc, int mtu) } static int -vtnet_ioctl_mtu(struct vtnet_softc *sc, int mtu) +vtnet_ioctl_mtu(struct vtnet_softc *sc, u_int mtu) { struct ifnet *ifp; int clustersz; @@ -1808,7 +1808,7 @@ vtnet_rxq_csum_needs_csum(struct vtnet_rxq *rxq, struct mbuf *m, uint16_t etype, static int vtnet_rxq_csum_data_valid(struct vtnet_rxq *rxq, struct mbuf *m, - uint16_t etype, int hoff, struct virtio_net_hdr *hdr) + uint16_t etype, int hoff, struct virtio_net_hdr *hdr __unused) { struct vtnet_softc *sc; int protocol; @@ -1928,7 +1928,7 @@ vtnet_rxq_merged_eof(struct vtnet_rxq *rxq, struct mbuf *m_head, int nbufs) while (--nbufs > 0) { struct mbuf *m; - int len; + uint32_t len; m = virtqueue_dequeue(vq, &len); if (m == NULL) { @@ -2058,7 +2058,7 @@ vtnet_rxq_eof(struct vtnet_rxq *rxq) while (count-- > 0) { struct mbuf *m; - int len, nbufs, adjsz; + uint32_t len, nbufs, adjsz; m = virtqueue_dequeue(vq, &len); if (m == NULL) @@ -2158,7 +2158,7 @@ vtnet_rx_vq_process(struct vtnet_rxq *rxq, int tries) { struct vtnet_softc *sc; struct ifnet *ifp; - int more; + u_int more; #ifdef DEV_NETMAP int nmirq; #endif /* DEV_NETMAP */ @@ -2232,7 +2232,7 @@ vtnet_rx_vq_intr(void *xrxq) } static void -vtnet_rxq_tq_intr(void *xrxq, int pending) +vtnet_rxq_tq_intr(void *xrxq, int pending __unused) { struct vtnet_rxq *rxq; @@ -2749,7 +2749,7 @@ vtnet_txq_mq_start(struct ifnet *ifp, struct mbuf *m) } static void -vtnet_txq_tq_deferred(void *xtxq, int pending) +vtnet_txq_tq_deferred(void *xtxq, int pending __unused) { struct vtnet_softc *sc; struct vtnet_txq *txq; @@ -2784,7 +2784,7 @@ vtnet_txq_start(struct vtnet_txq *txq) } static void -vtnet_txq_tq_intr(void *xtxq, int pending) +vtnet_txq_tq_intr(void *xtxq, int pending __unused) { struct vtnet_softc *sc; struct vtnet_txq *txq; @@ -3619,7 +3619,7 @@ vtnet_ctrl_mq_cmd(struct vtnet_softc *sc, uint16_t npairs) } static int -vtnet_ctrl_rx_cmd(struct vtnet_softc *sc, uint8_t cmd, int on) +vtnet_ctrl_rx_cmd(struct vtnet_softc *sc, uint8_t cmd, bool on) { struct sglist_seg segs[3]; struct sglist sg; @@ -3637,7 +3637,7 @@ vtnet_ctrl_rx_cmd(struct vtnet_softc *sc, uint8_t cmd, int on) s.hdr.class = VIRTIO_NET_CTRL_RX; s.hdr.cmd = cmd; - s.onoff = !!on; + s.onoff = on; s.ack = VIRTIO_NET_ERR; sglist_init(&sg, nitems(segs), segs); @@ -3653,13 +3653,13 @@ vtnet_ctrl_rx_cmd(struct vtnet_softc *sc, uint8_t cmd, int on) } static int -vtnet_set_promisc(struct vtnet_softc *sc, int on) +vtnet_set_promisc(struct vtnet_softc *sc, bool on) { return (vtnet_ctrl_rx_cmd(sc, VIRTIO_NET_CTRL_RX_PROMISC, on)); } static int -vtnet_set_allmulti(struct vtnet_softc *sc, int on) +vtnet_set_allmulti(struct vtnet_softc *sc, bool on) { return (vtnet_ctrl_rx_cmd(sc, VIRTIO_NET_CTRL_RX_ALLMULTI, on)); } @@ -3781,9 +3781,9 @@ vtnet_rx_filter_mac(struct vtnet_softc *sc) if_printf(ifp, "error setting host MAC filter table\n"); out: - if (promisc != 0 && vtnet_set_promisc(sc, 1) != 0) + if (promisc != 0 && vtnet_set_promisc(sc, true) != 0) if_printf(ifp, "cannot enable promiscuous mode\n"); - if (allmulti != 0 && vtnet_set_allmulti(sc, 1) != 0) + if (allmulti != 0 && vtnet_set_allmulti(sc, true) != 0) if_printf(ifp, "cannot enable all-multicast mode\n"); } @@ -3912,7 +3912,7 @@ vtnet_update_speed_duplex(struct vtnet_softc *sc) /* BMV: Ignore duplex. */ speed = virtio_read_dev_config_4(sc->vtnet_dev, offsetof(struct virtio_net_config, speed)); - if (speed != -1) + if (speed != UINT32_MAX) ifp->if_baudrate = IF_Mbps(speed); } @@ -3952,7 +3952,7 @@ vtnet_update_link_status(struct vtnet_softc *sc) } static int -vtnet_ifmedia_upd(struct ifnet *ifp) +vtnet_ifmedia_upd(struct ifnet *ifp __unused) { return (EOPNOTSUPP); } diff --git a/sys/dev/virtio/network/if_vtnetvar.h b/sys/dev/virtio/network/if_vtnetvar.h index d26f7240a67a..55e8a7267499 100644 --- a/sys/dev/virtio/network/if_vtnetvar.h +++ b/sys/dev/virtio/network/if_vtnetvar.h @@ -161,7 +161,7 @@ struct vtnet_softc { #define VTNET_FLAG_FIXUP_NEEDS_CSUM 0x2000 #define VTNET_FLAG_SW_LRO 0x4000 - int vtnet_hdr_size; + u_int vtnet_hdr_size; int vtnet_rx_nmbufs; int vtnet_rx_clustersz; int vtnet_rx_nsegs; @@ -172,7 +172,7 @@ struct vtnet_softc { int vtnet_max_vq_pairs; int vtnet_tx_nsegs; int vtnet_if_flags; - int vtnet_max_mtu; + u_int vtnet_max_mtu; int vtnet_lro_entry_count; int vtnet_lro_mbufq_depth; @@ -189,7 +189,7 @@ struct vtnet_softc { struct mtx vtnet_mtx; char vtnet_mtx_name[16]; - char vtnet_hwaddr[ETHER_ADDR_LEN]; + uint8_t vtnet_hwaddr[ETHER_ADDR_LEN]; }; static bool From owner-dev-commits-src-main@freebsd.org Mon Feb 22 17:52:04 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A4915471D5; Mon, 22 Feb 2021 17:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DkqWS0Gfsz4VFX; Mon, 22 Feb 2021 17:52: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 F0BC21E2E; Mon, 22 Feb 2021 17:52: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 11MHq31k033246; Mon, 22 Feb 2021 17:52:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MHq3Jx033245; Mon, 22 Feb 2021 17:52:03 GMT (envelope-from git) Date: Mon, 22 Feb 2021 17:52:03 GMT Message-Id: <202102221752.11MHq3Jx033245@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: 6895f89fe54e - main - Coalesce socket reads in software iSCSI. 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: 6895f89fe54e0858aea70d2bd2a9651f45d7998e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 17:52:04 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=6895f89fe54e0858aea70d2bd2a9651f45d7998e commit 6895f89fe54e0858aea70d2bd2a9651f45d7998e Author: Alexander Motin AuthorDate: 2021-02-22 17:23:35 +0000 Commit: Alexander Motin CommitDate: 2021-02-22 17:51:59 +0000 Coalesce socket reads in software iSCSI. Instead of 2-4 socket reads per PDU this can do as low as one read per megabyte, dramatically reducing TCP overhead and lock contention. With this on iSCSI target I can write more than 4GB/s through a single connection. MFC after: 1 month --- sys/dev/iscsi/icl_soft.c | 258 ++++++++++++++++------------------------------- 1 file changed, 89 insertions(+), 169 deletions(-) diff --git a/sys/dev/iscsi/icl_soft.c b/sys/dev/iscsi/icl_soft.c index a8986b3d4253..a5696647169a 100644 --- a/sys/dev/iscsi/icl_soft.c +++ b/sys/dev/iscsi/icl_soft.c @@ -165,68 +165,6 @@ icl_conn_fail(struct icl_conn *ic) (ic->ic_error)(ic); } -static struct mbuf * -icl_conn_receive(struct icl_conn *ic, size_t len) -{ - struct uio uio; - struct socket *so; - struct mbuf *m; - int error, flags; - - so = ic->ic_socket; - - memset(&uio, 0, sizeof(uio)); - uio.uio_resid = len; - - flags = MSG_DONTWAIT; - error = soreceive(so, NULL, &uio, &m, NULL, &flags); - if (error != 0) { - ICL_DEBUG("soreceive error %d", error); - return (NULL); - } - if (uio.uio_resid != 0) { - m_freem(m); - ICL_DEBUG("short read"); - return (NULL); - } - - return (m); -} - -static int -icl_conn_receive_buf(struct icl_conn *ic, void *buf, size_t len) -{ - struct iovec iov[1]; - struct uio uio; - struct socket *so; - int error, flags; - - so = ic->ic_socket; - - memset(&uio, 0, sizeof(uio)); - iov[0].iov_base = buf; - iov[0].iov_len = len; - uio.uio_iov = iov; - uio.uio_iovcnt = 1; - uio.uio_offset = 0; - uio.uio_resid = len; - uio.uio_segflg = UIO_SYSSPACE; - uio.uio_rw = UIO_READ; - - flags = MSG_DONTWAIT; - error = soreceive(so, NULL, &uio, NULL, NULL, &flags); - if (error != 0) { - ICL_DEBUG("soreceive error %d", error); - return (-1); - } - if (uio.uio_resid != 0) { - ICL_DEBUG("short read"); - return (-1); - } - - return (0); -} - static void icl_soft_conn_pdu_free(struct icl_conn *ic, struct icl_pdu *ip) { @@ -384,37 +322,28 @@ icl_pdu_size(const struct icl_pdu *response) return (len); } -static int -icl_pdu_receive_bhs(struct icl_pdu *request, size_t *availablep) +static void +icl_soft_receive_buf(struct mbuf **r, size_t *rs, void *buf, size_t s) { - if (icl_conn_receive_buf(request->ip_conn, - request->ip_bhs, sizeof(struct iscsi_bhs))) { - ICL_DEBUG("failed to receive BHS"); - return (-1); - } - - *availablep -= sizeof(struct iscsi_bhs); - return (0); + m_copydata(*r, 0, s, buf); + m_adj(*r, s); + while ((*r) != NULL && (*r)->m_len == 0) + *r = m_free(*r); + *rs -= s; } -static int -icl_pdu_receive_ahs(struct icl_pdu *request, size_t *availablep) +static void +icl_pdu_receive_ahs(struct icl_pdu *request, struct mbuf **r, size_t *rs) { request->ip_ahs_len = icl_pdu_ahs_length(request); if (request->ip_ahs_len == 0) - return (0); - - request->ip_ahs_mbuf = icl_conn_receive(request->ip_conn, - request->ip_ahs_len); - if (request->ip_ahs_mbuf == NULL) { - ICL_DEBUG("failed to receive AHS"); - return (-1); - } + return; - *availablep -= request->ip_ahs_len; - return (0); + request->ip_ahs_mbuf = *r; + *r = m_split(request->ip_ahs_mbuf, request->ip_ahs_len, M_WAITOK); + *rs -= request->ip_ahs_len; } static uint32_t @@ -433,7 +362,7 @@ icl_mbuf_to_crc32c(const struct mbuf *m0) } static int -icl_pdu_check_header_digest(struct icl_pdu *request, size_t *availablep) +icl_pdu_check_header_digest(struct icl_pdu *request, struct mbuf **r, size_t *rs) { uint32_t received_digest, valid_digest; @@ -441,12 +370,7 @@ icl_pdu_check_header_digest(struct icl_pdu *request, size_t *availablep) return (0); CTASSERT(sizeof(received_digest) == ISCSI_HEADER_DIGEST_SIZE); - if (icl_conn_receive_buf(request->ip_conn, - &received_digest, ISCSI_HEADER_DIGEST_SIZE)) { - ICL_DEBUG("failed to receive header digest"); - return (-1); - } - *availablep -= ISCSI_HEADER_DIGEST_SIZE; + icl_soft_receive_buf(r, rs, &received_digest, ISCSI_HEADER_DIGEST_SIZE); /* Temporary attach AHS to BHS to calculate header digest. */ request->ip_bhs_mbuf->m_next = request->ip_ahs_mbuf; @@ -514,8 +438,8 @@ icl_pdu_data_segment_receive_len(const struct icl_pdu *request) } static int -icl_pdu_receive_data_segment(struct icl_pdu *request, - size_t *availablep, bool *more_neededp) +icl_pdu_receive_data_segment(struct icl_pdu *request, struct mbuf **r, + size_t *rs, bool *more_neededp) { struct icl_conn *ic; size_t len, padding = 0; @@ -539,7 +463,7 @@ icl_pdu_receive_data_segment(struct icl_pdu *request, KASSERT(len > request->ip_data_len, ("len <= request->ip_data_len")); len -= request->ip_data_len; - if (len + padding > *availablep) { + if (len + padding > *rs) { /* * Not enough data in the socket buffer. Receive as much * as we can. Don't receive padding, since, obviously, it's @@ -547,9 +471,9 @@ icl_pdu_receive_data_segment(struct icl_pdu *request, */ #if 0 ICL_DEBUG("limited from %zd to %zd", - len + padding, *availablep - padding)); + len + padding, *rs - padding)); #endif - len = *availablep - padding; + len = *rs - padding; *more_neededp = true; padding = 0; } @@ -559,11 +483,9 @@ icl_pdu_receive_data_segment(struct icl_pdu *request, * of actual data segment. */ if (len > 0) { - m = icl_conn_receive(request->ip_conn, len + padding); - if (m == NULL) { - ICL_DEBUG("failed to receive data segment"); - return (-1); - } + m = *r; + *r = m_split(m, len + padding, M_WAITOK); + *rs -= len + padding; if (request->ip_data_mbuf == NULL) request->ip_data_mbuf = m; @@ -571,7 +493,6 @@ icl_pdu_receive_data_segment(struct icl_pdu *request, m_cat(request->ip_data_mbuf, m); request->ip_data_len += len; - *availablep -= len + padding; } else ICL_DEBUG("len 0"); @@ -583,7 +504,7 @@ icl_pdu_receive_data_segment(struct icl_pdu *request, } static int -icl_pdu_check_data_digest(struct icl_pdu *request, size_t *availablep) +icl_pdu_check_data_digest(struct icl_pdu *request, struct mbuf **r, size_t *rs) { uint32_t received_digest, valid_digest; @@ -594,12 +515,7 @@ icl_pdu_check_data_digest(struct icl_pdu *request, size_t *availablep) return (0); CTASSERT(sizeof(received_digest) == ISCSI_DATA_DIGEST_SIZE); - if (icl_conn_receive_buf(request->ip_conn, - &received_digest, ISCSI_DATA_DIGEST_SIZE)) { - ICL_DEBUG("failed to receive data digest"); - return (-1); - } - *availablep -= ISCSI_DATA_DIGEST_SIZE; + icl_soft_receive_buf(r, rs, &received_digest, ISCSI_DATA_DIGEST_SIZE); /* * Note that ip_data_mbuf also contains padding; since digest @@ -621,16 +537,13 @@ icl_pdu_check_data_digest(struct icl_pdu *request, size_t *availablep) * "part" of PDU at a time; call it repeatedly until it returns non-NULL. */ static struct icl_pdu * -icl_conn_receive_pdu(struct icl_conn *ic, size_t *availablep) +icl_conn_receive_pdu(struct icl_conn *ic, struct mbuf **r, size_t *rs) { struct icl_pdu *request; - struct socket *so; size_t len; - int error; + int error = 0; bool more_needed; - so = ic->ic_socket; - if (ic->ic_receive_state == ICL_CONN_STATE_BHS) { KASSERT(ic->ic_receive_pdu == NULL, ("ic->ic_receive_pdu != NULL")); @@ -648,23 +561,11 @@ icl_conn_receive_pdu(struct icl_conn *ic, size_t *availablep) request = ic->ic_receive_pdu; } - if (*availablep < ic->ic_receive_len) { -#if 0 - ICL_DEBUG("not enough data; need %zd, " - "have %zd", ic->ic_receive_len, *availablep); -#endif - return (NULL); - } - switch (ic->ic_receive_state) { case ICL_CONN_STATE_BHS: //ICL_DEBUG("receiving BHS"); - error = icl_pdu_receive_bhs(request, availablep); - if (error != 0) { - ICL_DEBUG("failed to receive BHS; " - "dropping connection"); - break; - } + icl_soft_receive_buf(r, rs, request->ip_bhs, + sizeof(struct iscsi_bhs)); /* * We don't enforce any limit for AHS length; @@ -686,12 +587,7 @@ icl_conn_receive_pdu(struct icl_conn *ic, size_t *availablep) case ICL_CONN_STATE_AHS: //ICL_DEBUG("receiving AHS"); - error = icl_pdu_receive_ahs(request, availablep); - if (error != 0) { - ICL_DEBUG("failed to receive AHS; " - "dropping connection"); - break; - } + icl_pdu_receive_ahs(request, r, rs); ic->ic_receive_state = ICL_CONN_STATE_HEADER_DIGEST; if (ic->ic_header_crc32c == false) ic->ic_receive_len = 0; @@ -701,7 +597,7 @@ icl_conn_receive_pdu(struct icl_conn *ic, size_t *availablep) case ICL_CONN_STATE_HEADER_DIGEST: //ICL_DEBUG("receiving header digest"); - error = icl_pdu_check_header_digest(request, availablep); + error = icl_pdu_check_header_digest(request, r, rs); if (error != 0) { ICL_DEBUG("header digest failed; " "dropping connection"); @@ -715,7 +611,7 @@ icl_conn_receive_pdu(struct icl_conn *ic, size_t *availablep) case ICL_CONN_STATE_DATA: //ICL_DEBUG("receiving data segment"); - error = icl_pdu_receive_data_segment(request, availablep, + error = icl_pdu_receive_data_segment(request, r, rs, &more_needed); if (error != 0) { ICL_DEBUG("failed to receive data segment;" @@ -735,7 +631,7 @@ icl_conn_receive_pdu(struct icl_conn *ic, size_t *availablep) case ICL_CONN_STATE_DATA_DIGEST: //ICL_DEBUG("receiving data digest"); - error = icl_pdu_check_data_digest(request, availablep); + error = icl_pdu_check_data_digest(request, r, rs); if (error != 0) { ICL_DEBUG("data digest failed; " "dropping connection"); @@ -767,44 +663,27 @@ icl_conn_receive_pdu(struct icl_conn *ic, size_t *availablep) } static void -icl_conn_receive_pdus(struct icl_conn *ic, size_t available) +icl_conn_receive_pdus(struct icl_conn *ic, struct mbuf **r, size_t *rs) { struct icl_pdu *response; - struct socket *so; - - so = ic->ic_socket; - - /* - * This can never happen; we're careful to only mess with ic->ic_socket - * pointer when the send/receive threads are not running. - */ - KASSERT(so != NULL, ("NULL socket")); for (;;) { if (ic->ic_disconnecting) return; - if (so->so_error != 0) { - ICL_DEBUG("connection error %d; " - "dropping connection", so->so_error); - icl_conn_fail(ic); - return; - } - /* * Loop until we have a complete PDU or there is not enough * data in the socket buffer. */ - if (available < ic->ic_receive_len) { + if (*rs < ic->ic_receive_len) { #if 0 - ICL_DEBUG("not enough data; have %zd, " - "need %zd", available, - ic->ic_receive_len); + ICL_DEBUG("not enough data; have %zd, need %zd", + *rs, ic->ic_receive_len); #endif return; } - response = icl_conn_receive_pdu(ic, &available); + response = icl_conn_receive_pdu(ic, r, rs); if (response == NULL) continue; @@ -825,15 +704,19 @@ static void icl_receive_thread(void *arg) { struct icl_conn *ic; - size_t available; + size_t available, read = 0; struct socket *so; + struct mbuf *m, *r = NULL; + struct uio uio; + int error, flags; ic = arg; so = ic->ic_socket; for (;;) { + SOCKBUF_LOCK(&so->so_rcv); if (ic->ic_disconnecting) { - //ICL_DEBUG("terminating"); + SOCKBUF_UNLOCK(&so->so_rcv); break; } @@ -843,18 +726,50 @@ icl_receive_thread(void *arg) * to avoid unnecessary wakeups until there * is enough data received to read the PDU. */ - SOCKBUF_LOCK(&so->so_rcv); available = sbavail(&so->so_rcv); - if (available < ic->ic_receive_len) { - so->so_rcv.sb_lowat = ic->ic_receive_len; + if (read + available < ic->ic_receive_len) { + so->so_rcv.sb_lowat = ic->ic_receive_len - read; cv_wait(&ic->ic_receive_cv, &so->so_rcv.sb_mtx); - } else so->so_rcv.sb_lowat = so->so_rcv.sb_hiwat + 1; + available = sbavail(&so->so_rcv); + } SOCKBUF_UNLOCK(&so->so_rcv); - icl_conn_receive_pdus(ic, available); + if (available == 0) { + if (so->so_error != 0) { + ICL_DEBUG("connection error %d; " + "dropping connection", so->so_error); + icl_conn_fail(ic); + break; + } + continue; + } + + memset(&uio, 0, sizeof(uio)); + uio.uio_resid = available; + flags = MSG_DONTWAIT; + error = soreceive(so, NULL, &uio, &m, NULL, &flags); + if (error != 0) { + ICL_DEBUG("soreceive error %d", error); + break; + } + if (uio.uio_resid != 0) { + m_freem(m); + ICL_DEBUG("short read"); + break; + } + if (r) + m_cat(r, m); + else + r = m; + read += available; + + icl_conn_receive_pdus(ic, &r, &read); } + if (r) + m_freem(r); + ICL_CONN_LOCK(ic); ic->ic_receive_running = false; cv_signal(&ic->ic_send_cv); @@ -1440,12 +1355,17 @@ icl_soft_conn_close(struct icl_conn *ic) struct icl_pdu *pdu; struct socket *so; - ICL_CONN_LOCK(ic); - /* * Wake up the threads, so they can properly terminate. + * Receive thread sleeps on so->so_rcv lock, send on ic->ic_lock. */ - ic->ic_disconnecting = true; + ICL_CONN_LOCK(ic); + if (!ic->ic_disconnecting) { + so = ic->ic_socket; + SOCKBUF_LOCK(&so->so_rcv); + ic->ic_disconnecting = true; + SOCKBUF_UNLOCK(&so->so_rcv); + } while (ic->ic_receive_running || ic->ic_send_running) { cv_signal(&ic->ic_receive_cv); cv_signal(&ic->ic_send_cv); From owner-dev-commits-src-main@freebsd.org Mon Feb 22 17:57:13 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 660ED54788B; Mon, 22 Feb 2021 17:57: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DkqdP2VqVz4VSj; Mon, 22 Feb 2021 17:57: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 48AA51A4D; Mon, 22 Feb 2021 17:57: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 11MHvDWS034136; Mon, 22 Feb 2021 17:57:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MHvDdL034135; Mon, 22 Feb 2021 17:57:13 GMT (envelope-from git) Date: Mon, 22 Feb 2021 17:57:13 GMT Message-Id: <202102221757.11MHvDdL034135@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: ba2cfa80e1f2 - main - Fix makefs bootstrap after d485c77f203fb0f4cdc08dea5ff81631b51d8809 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ba2cfa80e1f2a7e8ffd383e615aa304afa349ed7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 17:57:13 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=ba2cfa80e1f2a7e8ffd383e615aa304afa349ed7 commit ba2cfa80e1f2a7e8ffd383e615aa304afa349ed7 Author: Alex Richardson AuthorDate: 2021-02-22 17:49:05 +0000 Commit: Alex Richardson CommitDate: 2021-02-22 17:55:45 +0000 Fix makefs bootstrap after d485c77f203fb0f4cdc08dea5ff81631b51d8809 The makefs msdosfs code includes fs/msdosfs/denode.h which directly uses struct buf from rather than the makefs struct m_buf. To work around this problem provide a local denode.h that includes ffs/buf.h and defines buf as an alias for m_buf. Reviewed By: kib, emaste Differential Revision: https://reviews.freebsd.org/D28835 --- lib/libprocstat/msdosfs.c | 1 + sys/fs/msdosfs/denode.h | 2 -- usr.sbin/makefs/msdos.c | 2 +- usr.sbin/makefs/msdos.h | 1 - usr.sbin/makefs/msdos/denode.h | 39 ++++++++++++++++++++++++++++++++++ usr.sbin/makefs/msdos/msdosfs_denode.c | 5 +---- usr.sbin/makefs/msdos/msdosfs_fat.c | 5 +---- usr.sbin/makefs/msdos/msdosfs_lookup.c | 5 +---- usr.sbin/makefs/msdos/msdosfs_vfsops.c | 5 +---- usr.sbin/makefs/msdos/msdosfs_vnops.c | 5 +---- usr.sbin/makefs/sys/buf.h | 30 ++++++++++++++++++++++++++ 11 files changed, 76 insertions(+), 24 deletions(-) diff --git a/lib/libprocstat/msdosfs.c b/lib/libprocstat/msdosfs.c index 87906423f9b6..3541f252c713 100644 --- a/lib/libprocstat/msdosfs.c +++ b/lib/libprocstat/msdosfs.c @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include diff --git a/sys/fs/msdosfs/denode.h b/sys/fs/msdosfs/denode.h index f06c11772621..7c838b5cc81c 100644 --- a/sys/fs/msdosfs/denode.h +++ b/sys/fs/msdosfs/denode.h @@ -52,8 +52,6 @@ #ifndef _FS_MSDOSFS_DENODE_H_ #define _FS_MSDOSFS_DENODE_H_ -#include - /* * This is the pc filesystem specific portion of the vnode structure. * diff --git a/usr.sbin/makefs/msdos.c b/usr.sbin/makefs/msdos.c index 567122c1db7e..74d55a7f490f 100644 --- a/usr.sbin/makefs/msdos.c +++ b/usr.sbin/makefs/msdos.c @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include #include "msdos/direntry.h" -#include +#include "msdos/denode.h" #include #undef clrbuf diff --git a/usr.sbin/makefs/msdos.h b/usr.sbin/makefs/msdos.h index a51420de76e5..ea78e49648a3 100644 --- a/usr.sbin/makefs/msdos.h +++ b/usr.sbin/makefs/msdos.h @@ -41,7 +41,6 @@ } while (0); -struct vnode; struct denode; struct fsnode; struct msdosfsmount; diff --git a/usr.sbin/makefs/msdos/denode.h b/usr.sbin/makefs/msdos/denode.h new file mode 100644 index 000000000000..4590a76c3501 --- /dev/null +++ b/usr.sbin/makefs/msdos/denode.h @@ -0,0 +1,39 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This work was supported by Innovate UK project 105694, "Digital Security by + * Design (DSbD) Technology Platform Prototype". + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +#pragma once +/* Ensure that struct denode uses the local m_buf structure and not sys/buf.h */ +#define buf m_buf +struct vn_clusterw { + /* Not interesting for msdosfs makefs. */ +}; +#include "../ffs/buf.h" +/* struct direntry needs to be defined to included denode.h */ +#include "msdos/direntry.h" +#include diff --git a/usr.sbin/makefs/msdos/msdosfs_denode.c b/usr.sbin/makefs/msdos/msdosfs_denode.c index f2faed234228..48c305824793 100644 --- a/usr.sbin/makefs/msdos/msdosfs_denode.c +++ b/usr.sbin/makefs/msdos/msdosfs_denode.c @@ -62,13 +62,10 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include +#include "msdos/denode.h" #include #include -#undef clrbuf -#include "ffs/buf.h" #include "makefs.h" #include "msdos.h" diff --git a/usr.sbin/makefs/msdos/msdosfs_fat.c b/usr.sbin/makefs/msdos/msdosfs_fat.c index a70b5741aa78..b5700d8c7d1d 100644 --- a/usr.sbin/makefs/msdos/msdosfs_fat.c +++ b/usr.sbin/makefs/msdos/msdosfs_fat.c @@ -60,13 +60,10 @@ #include #include -#include "msdos/direntry.h" -#include +#include "msdos/denode.h" #include #include -#undef clrbuf -#include "ffs/buf.h" #include "makefs.h" #include "msdos.h" diff --git a/usr.sbin/makefs/msdos/msdosfs_lookup.c b/usr.sbin/makefs/msdos/msdosfs_lookup.c index 3fca0532468b..a4db6ae1a4a2 100644 --- a/usr.sbin/makefs/msdos/msdosfs_lookup.c +++ b/usr.sbin/makefs/msdos/msdosfs_lookup.c @@ -58,13 +58,10 @@ #include #include -#include "msdos/direntry.h" -#include +#include "msdos/denode.h" #include #include -#undef clrbuf -#include "ffs/buf.h" #include "makefs.h" #include "msdos.h" diff --git a/usr.sbin/makefs/msdos/msdosfs_vfsops.c b/usr.sbin/makefs/msdos/msdosfs_vfsops.c index b6788f6876f9..dd933bb2be61 100644 --- a/usr.sbin/makefs/msdos/msdosfs_vfsops.c +++ b/usr.sbin/makefs/msdos/msdosfs_vfsops.c @@ -63,15 +63,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include "msdos/direntry.h" -#include +#include "msdos/denode.h" #include #include #include -#undef clrbuf -#include "ffs/buf.h" #include "makefs.h" #include "msdos.h" diff --git a/usr.sbin/makefs/msdos/msdosfs_vnops.c b/usr.sbin/makefs/msdos/msdosfs_vnops.c index 2233c4b35eb2..7e927b4b99c7 100644 --- a/usr.sbin/makefs/msdos/msdosfs_vnops.c +++ b/usr.sbin/makefs/msdos/msdosfs_vnops.c @@ -65,13 +65,10 @@ __FBSDID("$FreeBSD$"); #include #include -#include "msdos/direntry.h" -#include +#include "msdos/denode.h" #include #include -#undef clrbuf -#include "ffs/buf.h" #include "makefs.h" #include "msdos.h" diff --git a/usr.sbin/makefs/sys/buf.h b/usr.sbin/makefs/sys/buf.h new file mode 100644 index 000000000000..4b640a98dd2c --- /dev/null +++ b/usr.sbin/makefs/sys/buf.h @@ -0,0 +1,30 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This work was supported by Innovate UK project 105694, "Digital Security by + * Design (DSbD) Technology Platform Prototype". + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +#error " should not be included by makefs" From owner-dev-commits-src-main@freebsd.org Mon Feb 22 18:44:42 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0C922549E3E; Mon, 22 Feb 2021 18:44:42 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dkrh93KF0z4YKs; Mon, 22 Feb 2021 18:44:41 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.10] (unknown [98.42.164.217]) (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 D1AB525DEA; Mon, 22 Feb 2021 18:44:40 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.45.21011103 Date: Mon, 22 Feb 2021 10:44:31 -0800 Subject: Re: ba27dd8be821 - main - zfs: merge OpenZFS master-9312e0fd1 From: Ravi Pokala To: Martin Matuska , , , Message-ID: <00E1AC08-C734-4EBD-9ABA-2404CA93B926@panasas.com> Thread-Topic: ba27dd8be821 - main - zfs: merge OpenZFS master-9312e0fd1 References: <202102221202.11MC24EB071531@gitrepo.freebsd.org> In-Reply-To: <202102221202.11MC24EB071531@gitrepo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 18:44:42 -0000 -----Original Message----- From: on behalf of Martin Matuska Date: 2021-02-22, Monday at 04:02 To: , , Subject: git: ba27dd8be821 - main - zfs: merge OpenZFS master-9312e0fd1 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=ba27dd8be821792e15bdabfac69fd6cab0cf9dd3 commit ba27dd8be821792e15bdabfac69fd6cab0cf9dd3 Merge: c02a28754bc2 0626917d0786 Author: Martin Matuska AuthorDate: 2021-02-22 11:35:56 +0000 Commit: Martin Matuska CommitDate: 2021-02-22 12:01:17 +0000 zfs: merge OpenZFS master-9312e0fd1 Notable upstream changes: 778869fa1 Fix reporting of mount progress e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD Hi Martin, Why are we disabling hardware crypto offload? What impact will that have on performance? Thanks, Ravi (rpokala@) 03e02e5b5 Fix checksum errors not being counted on repeated repair 64e0fe14f Restore FreeBSD resource usage accounting 11f2e9a49 Fix panic if scrubbing after removing a slog device MFC after: 2 weeks From owner-dev-commits-src-main@freebsd.org Mon Feb 22 19:01:05 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BE21854B16C; Mon, 22 Feb 2021 19:01:05 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dks3551zWz4Zy9; Mon, 22 Feb 2021 19:01:05 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.10] (unknown [98.42.164.217]) (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 1A7C525ECA; Mon, 22 Feb 2021 19:01:05 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.45.21011103 Date: Mon, 22 Feb 2021 11:01:01 -0800 Subject: Re: aa8ae5fe17eb - main - git hooks: add "Fixes" trailer to commit message template From: Ravi Pokala To: Ed Maste , , , Message-ID: Thread-Topic: aa8ae5fe17eb - main - git hooks: add "Fixes" trailer to commit message template Thread-Index: AQHXCUtojqFRyqO3C0iT7EBCZKiAiw== References: <202102221531.11MFVxQU048362@gitrepo.freebsd.org> In-Reply-To: <202102221531.11MFVxQU048362@gitrepo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 19:01:05 -0000 -----Original Message----- From: on behalf of Ed Maste Date: 2021-02-22, Monday at 07:31 To: , , Subject: git: aa8ae5fe17eb - main - git hooks: add "Fixes" trailer to commit message template The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=aa8ae5fe17eb380b0f30f1641f17a0b3d83a68c3 commit aa8ae5fe17eb380b0f30f1641f17a0b3d83a68c3 Author: Ed Maste AuthorDate: 2021-02-20 18:49:31 +0000 Commit: Ed Maste CommitDate: 2021-02-22 15:29:56 +0000 git hooks: add "Fixes" trailer to commit message template A number of projects use "Fixes: " to identify a commit that is fixed by a given change. Adopt that convention. Differential Revision: https://reviews.freebsd.org/D28693 --- tools/tools/git/hooks/prepare-commit-msg | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/tools/git/hooks/prepare-commit-msg b/tools/tools/git/hooks/prepare-commit-msg index 4d1072700af0..761b4443cfd8 100755 --- a/tools/tools/git/hooks/prepare-commit-msg +++ b/tools/tools/git/hooks/prepare-commit-msg @@ -48,6 +48,7 @@ $(awk '1;/^#$/{exit}' $1) # Tested by: # Approved by: # Obtained from: +# Fixes: Hi Ed, To be clear, that's "${HASH} ${TITLE}" ; space-separated, not colon- or tab-separated? If that's the case, it would be clearer to say that it's the output of `git log --oneline' for the commit in question. (Interestingly, I can't seem to figure out how to get `git log --oneline' to print *only* the commit in question; I have to pipe through `grep -m1 ${HASH}'.) Thanks, Ravi (rpokala@) # MFC after: # MFH: # Relnotes: From owner-dev-commits-src-main@freebsd.org Mon Feb 22 19:04:27 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 55C0354B46B; Mon, 22 Feb 2021 19:04:27 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) (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 4Dks6z1kgjz4bpn; Mon, 22 Feb 2021 19:04:26 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt1-x835.google.com with SMTP id s15so247425qtq.0; Mon, 22 Feb 2021 11:04:26 -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:references:mime-version :content-disposition:in-reply-to; bh=TA37faqmRJgnOvZM65+h32X8I4jVZElHED9BZm/yrsY=; b=KRTlZQOt7faN2LdTxTbUZTyaOwy6uOJ5SxSaN/5fbrs4aopqhiLox6cV3SgNku7C+c QASbFdwSbmPzy+SGTZcVjlkPxFMe4anK7reAQzVMNgPow+ys0ohDkqqZiSaRLIqls3RO xV6f1EBHENr0laA/i8ORcYxCqWXz/vs79QIo4KvTxK0TttIER+D1qww7BOs6fsQTS/9b V7DAjPKGA54Est3bNOwASPSa5+KArXWtPGgnHi0Khcd+fKId+ORDD5DhNpaQnj5VrKoo ZMnWihJAKRcygIC3C3C9WcAYVCNHSyunIMnA7Z4ziveRJS6nZWkk/28R6Jik2MqBnCsD j3IQ== 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 :references:mime-version:content-disposition:in-reply-to; bh=TA37faqmRJgnOvZM65+h32X8I4jVZElHED9BZm/yrsY=; b=EuLTkW+rtpM2BzlRCpdgZun5nvPuDraQxrEKRXv1gsQc74PDV0RJKUOYC+TbCrljHb tLIZtr1z2ivn1lPaQz/OJlVrlI/V1XUvJj/aRhtoAmHz3tIlUNt+8i/ICsvEoTeD1prf lWrt3/QgaZC2f9QdWvgR9u5k+jwE/xRcsa+oBorbwBbSR6YW61ctUAgdfTTD/wMH9+nX epU/Ys30ucluFlnp6LpHRT9d5GowF20LDTyFLrFUCMZ+qE3Iblh5HXNB/+2DZoadLGAw BXEpWCMgS1IgKU8QXP+NdWjwatYuTDGPnqO9YrNhN3Dvx442J0TtvjxkTYTnQJ7Mt+aN wHOw== X-Gm-Message-State: AOAM533FMjykvuRRFXVEW0VOEJmHuJfXBdelzXVrdi5OEqVGVJyim7+n CHfZq22WN+jMAyC5fzM+D3pIMe6Xmuk= X-Google-Smtp-Source: ABdhPJwwivWKynUKuPma7OZ4OKMkrWTzvQTNwIYQu6/hb1CkR3M/uehvcASg3HirJ4OmX37mY4bgWw== X-Received: by 2002:a05:622a:28d:: with SMTP id z13mr21490870qtw.87.1614020665946; Mon, 22 Feb 2021 11:04:25 -0800 (PST) Received: from nuc ([142.126.164.150]) by smtp.gmail.com with ESMTPSA id d1sm11057530qtq.94.2021.02.22.11.04.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Feb 2021 11:04:25 -0800 (PST) Sender: Mark Johnston Date: Mon, 22 Feb 2021 14:04:26 -0500 From: Mark Johnston To: Ravi Pokala Cc: Martin Matuska , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: ba27dd8be821 - main - zfs: merge OpenZFS master-9312e0fd1 Message-ID: References: <202102221202.11MC24EB071531@gitrepo.freebsd.org> <00E1AC08-C734-4EBD-9ABA-2404CA93B926@panasas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00E1AC08-C734-4EBD-9ABA-2404CA93B926@panasas.com> X-Rspamd-Queue-Id: 4Dks6z1kgjz4bpn 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 19:04:27 -0000 On Mon, Feb 22, 2021 at 10:44:31AM -0800, Ravi Pokala wrote: > -----Original Message----- > From: on behalf of Martin Matuska > Date: 2021-02-22, Monday at 04:02 > To: , , > Subject: git: ba27dd8be821 - main - zfs: merge OpenZFS master-9312e0fd1 > > The branch main has been updated by mm: > > URL: https://cgit.FreeBSD.org/src/commit/?id=ba27dd8be821792e15bdabfac69fd6cab0cf9dd3 > > commit ba27dd8be821792e15bdabfac69fd6cab0cf9dd3 > Merge: c02a28754bc2 0626917d0786 > Author: Martin Matuska > AuthorDate: 2021-02-22 11:35:56 +0000 > Commit: Martin Matuska > CommitDate: 2021-02-22 12:01:17 +0000 > > zfs: merge OpenZFS master-9312e0fd1 > > Notable upstream changes: > 778869fa1 Fix reporting of mount progress > e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD > > Hi Martin, > > Why are we disabling hardware crypto offload? What impact will that have on performance? See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252981 Basically, some hardware offload drivers don't work correctly with ZFS, and the opencrypto shims in ZFS don't work properly with hardware offload drivers. For 13.0 the best solution is to just disable that support. Note that this doesn't apply to software-accelerated crypto drivers like aesni(4). From owner-dev-commits-src-main@freebsd.org Mon Feb 22 19:04:39 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5DCD54B79F; Mon, 22 Feb 2021 19:04: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dks796pt7z4byV; Mon, 22 Feb 2021 19:04: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 14D463107; Mon, 22 Feb 2021 19:04: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 11MJ4Z7t026981; Mon, 22 Feb 2021 19:04:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MJ4ZFH026980; Mon, 22 Feb 2021 19:04:35 GMT (envelope-from git) Date: Mon, 22 Feb 2021 19:04:35 GMT Message-Id: <202102221904.11MJ4ZFH026980@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: 519496a59855 - main - openssh: document two changes that are now upstream 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: 519496a5985549d2935cf296a709b1e726b1b5e5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 19:04:40 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=519496a5985549d2935cf296a709b1e726b1b5e5 commit 519496a5985549d2935cf296a709b1e726b1b5e5 Author: Ed Maste AuthorDate: 2021-02-22 19:03:28 +0000 Commit: Ed Maste CommitDate: 2021-02-22 19:03:28 +0000 openssh: document two changes that are now upstream These patches can be removed once we update to 8.5p1 or later. --- crypto/openssh/FREEBSD-upgrade | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crypto/openssh/FREEBSD-upgrade b/crypto/openssh/FREEBSD-upgrade index 0a62d6fa1e2c..bde003a1d183 100644 --- a/crypto/openssh/FREEBSD-upgrade +++ b/crypto/openssh/FREEBSD-upgrade @@ -103,6 +103,14 @@ An overview of FreeBSD changes to OpenSSH-portable ================================================== +* don't free string returned by login_getcapstr(3) + + Committed upstream as f060c2bc85d59d111fa18a12eb3872ee4b9f7e97 + +* Use login_getpwclass() instead of login_getclass() + + Committed upstream as 3d05e5881ceb2e48e1948ba14292216b56ed792e + 0) VersionAddendum The SSH protocol allows for a human-readable version string of up From owner-dev-commits-src-main@freebsd.org Mon Feb 22 19:22:30 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 486D654BC40; Mon, 22 Feb 2021 19:22: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DksWn3Mrjz4d03; Mon, 22 Feb 2021 19:22: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 8AE2733A9; Mon, 22 Feb 2021 19:22: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 11MJMSY3052569; Mon, 22 Feb 2021 19:22:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MJMSaa052556; Mon, 22 Feb 2021 19:22:28 GMT (envelope-from git) Date: Mon, 22 Feb 2021 19:22:28 GMT Message-Id: <202102221922.11MJMSaa052556@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: e2ad10e84792 - main - Remove the redundant ipfilter IPv6 rc rules load. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e2ad10e84792e8dcfb0e03a9b5cb19cd3d93ddf8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 19:22:30 -0000 The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=e2ad10e84792e8dcfb0e03a9b5cb19cd3d93ddf8 commit e2ad10e84792e8dcfb0e03a9b5cb19cd3d93ddf8 Author: Cy Schubert AuthorDate: 2021-02-12 15:17:32 +0000 Commit: Cy Schubert CommitDate: 2021-02-22 19:20:18 +0000 Remove the redundant ipfilter IPv6 rc rules load. As of ipfilter 5.1.2 the IPv4 and IPv6 rules tables have been merged. The ipf(8) -6 option has been a NOP since then. Currently the additional ipf -6 load statement in rc.d/ipfilter simply added the second ipfilter rules file to the table already populated by the previous ipf command. Plenty of time has passed since ipfilter 5.1.2 was imported. It is time to remove the option from rc.conf and the rc script. Differential Revision: https://reviews.freebsd.org/D28615 --- libexec/rc/rc.conf | 3 --- libexec/rc/rc.d/ipfilter | 13 +------------ 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 55a7112b15ea..998cd3fd14d6 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -546,9 +546,6 @@ stf_interface_ipv6_ifid="0:0:0:1" # IPv6 interface id for stf0. stf_interface_ipv6_slaid="0000" # IPv6 Site Level Aggregator for stf0 ipv6_ipv4mapping="NO" # Set to "YES" to enable IPv4 mapped IPv6 addr # communication. (like ::ffff:a.b.c.d) -ipv6_ipfilter_rules="/etc/ipf6.rules" # rules definition file for ipfilter, - # see /usr/src/contrib/ipfilter/rules - # for examples ip6addrctl_enable="YES" # Set to YES to enable default address selection ip6addrctl_verbose="NO" # Set to YES to enable verbose configuration messages ip6addrctl_policy="AUTO" # A pre-defined address selection policy diff --git a/libexec/rc/rc.d/ipfilter b/libexec/rc/rc.d/ipfilter index fe328308e622..abe49c919656 100755 --- a/libexec/rc/rc.d/ipfilter +++ b/libexec/rc/rc.d/ipfilter @@ -14,7 +14,7 @@ name="ipfilter" desc="IP packet filter" rcvar="ipfilter_enable" load_rc_config $name -stop_precmd="test -f ${ipfilter_rules} -o -f ${ipv6_ipfilter_rules}" +stop_precmd="test -f ${ipfilter_rules}" start_precmd="$stop_precmd" start_cmd="ipfilter_start" @@ -39,10 +39,6 @@ ipfilter_start() ${ipfilter_program:-/sbin/ipf} \ -f "${ipfilter_rules}" ${ipfilter_flags} fi - if [ -r "${ipv6_ipfilter_rules}" ]; then - ${ipfilter_program:-/sbin/ipf} -6 \ - -f "${ipv6_ipfilter_rules}" ${ipfilter_flags} - fi } ipfilter_stop() @@ -67,13 +63,6 @@ ipfilter_reload() err 1 'Load of rules into alternate set failed; aborting reload' fi fi - if [ -r "${ipv6_ipfilter_rules}" ]; then - ${ipfilter_program:-/sbin/ipf} -I -6 \ - -f "${ipv6_ipfilter_rules}" ${ipfilter_flags} - if [ $? -ne 0 ]; then - err 1 'Load of IPv6 rules into alternate set failed; aborting reload' - fi - fi ${ipfilter_program:-/sbin/ipf} -s } From owner-dev-commits-src-main@freebsd.org Mon Feb 22 19:22:30 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 595DE54BC41; Mon, 22 Feb 2021 19:22: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DksWp17qzz4dJ8; Mon, 22 Feb 2021 19:22: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 DA49836DF; Mon, 22 Feb 2021 19:22: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 11MJMTkS053341; Mon, 22 Feb 2021 19:22:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MJMTux053340; Mon, 22 Feb 2021 19:22:29 GMT (envelope-from git) Date: Mon, 22 Feb 2021 19:22:29 GMT Message-Id: <202102221922.11MJMTux053340@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: a805ffbcbce8 - main - ipfilter: Make LARGE_NAT a tunable. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a805ffbcbce85872e71d825fd405a4a30e2ab4bc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 19:22:30 -0000 The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=a805ffbcbce85872e71d825fd405a4a30e2ab4bc commit a805ffbcbce85872e71d825fd405a4a30e2ab4bc Author: Cy Schubert AuthorDate: 2021-02-16 15:44:07 +0000 Commit: Cy Schubert CommitDate: 2021-02-22 19:20:18 +0000 ipfilter: Make LARGE_NAT a tunable. LARGE_NAT is a C macro that increases NAT_SIZE from 127 to 2047, RDR_SIZE from 127 to 2047, HOSTMAP_SIZE from 2047 to 8191, NAT_TABLE_MAX from 30000 to 180000, and NAT_TABLE_SZ from 2047 to 16383. These values can be altered at runtime using the ipf -T command however some adminstrators of large firewalls rebuild the kernel to enable LARGE_NAT at boot. This revision adds the tunable net.inet.ipf.large_nat which allows an administrator to set this option at boot instead of build time. Setting the LARGE_NAT macro to 1 is unaffected allowing build-time users to continue using the old way. --- sys/contrib/ipfilter/netinet/fil.c | 5 +++ sys/contrib/ipfilter/netinet/ip_fil.h | 2 + sys/contrib/ipfilter/netinet/ip_fil_freebsd.c | 7 ++++ sys/contrib/ipfilter/netinet/ip_nat.c | 28 +++++++------ sys/contrib/ipfilter/netinet/ip_nat.h | 60 +++++++++++++-------------- sys/contrib/ipfilter/netinet/mlfk_ipl.c | 7 +++- 6 files changed, 65 insertions(+), 44 deletions(-) diff --git a/sys/contrib/ipfilter/netinet/fil.c b/sys/contrib/ipfilter/netinet/fil.c index 09b4c27a1cb4..c04015c2b41e 100644 --- a/sys/contrib/ipfilter/netinet/fil.c +++ b/sys/contrib/ipfilter/netinet/fil.c @@ -9338,6 +9338,11 @@ ipf_main_soft_create(arg) softc->ipf_icmpminfragmtu = 68; softc->ipf_flags = IPF_LOGGING; +#ifdef LARGE_NAT + softc->ipf_large_nat = 1; +#endif + ipf_fbsd_kenv_get(softc); + return softc; } diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h index 8cb988e1fd17..7e976d88cc0f 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.h +++ b/sys/contrib/ipfilter/netinet/ip_fil.h @@ -1547,6 +1547,7 @@ typedef struct ipf_main_softc_s { u_int ipf_icmptimeout; u_int ipf_icmpacktimeout; u_int ipf_iptimeout; + u_int ipf_large_nat; u_long ipf_ticks; u_long ipf_userifqs; u_long ipf_rb_no_mem; @@ -1653,6 +1654,7 @@ extern int ipf_pfil_hook(void); extern int ipf_pfil_unhook(void); extern void ipf_event_reg(void); extern void ipf_event_dereg(void); +extern void ipf_fbsd_kenv_get(ipf_main_softc_t *); # endif # if defined(INSTANCES) diff --git a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c index bac73cee4e8b..072ab8bcd4e5 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c @@ -1487,3 +1487,10 @@ ipf_pcksum6(m, ip6, off, len) #endif } #endif + +void +ipf_fbsd_kenv_get(ipf_main_softc_t *softc) +{ + TUNABLE_INT_FETCH("net.inet.ipf.large_nat", + &softc->ipf_large_nat); +} diff --git a/sys/contrib/ipfilter/netinet/ip_nat.c b/sys/contrib/ipfilter/netinet/ip_nat.c index 33d190c61a0a..9ce6063eb7f3 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat.c +++ b/sys/contrib/ipfilter/netinet/ip_nat.c @@ -321,11 +321,19 @@ ipf_nat_soft_create(softc) softn->ipf_nat_list_tail = &softn->ipf_nat_list; - softn->ipf_nat_table_max = NAT_TABLE_MAX; - softn->ipf_nat_table_sz = NAT_TABLE_SZ; - softn->ipf_nat_maprules_sz = NAT_SIZE; - softn->ipf_nat_rdrrules_sz = RDR_SIZE; - softn->ipf_nat_hostmap_sz = HOSTMAP_SIZE; + if (softc->ipf_large_nat) { + softn->ipf_nat_table_max = NAT_TABLE_MAX_LARGE; + softn->ipf_nat_table_sz = NAT_TABLE_SZ_LARGE; + softn->ipf_nat_maprules_sz = NAT_SIZE_LARGE; + softn->ipf_nat_rdrrules_sz = RDR_SIZE_LARGE; + softn->ipf_nat_hostmap_sz = HOSTMAP_SIZE_LARGE; + } else { + softn->ipf_nat_table_max = NAT_TABLE_MAX_NORMAL; + softn->ipf_nat_table_sz = NAT_TABLE_SZ_NORMAL; + softn->ipf_nat_maprules_sz = NAT_SIZE_NORMAL; + softn->ipf_nat_rdrrules_sz = RDR_SIZE_NORMAL; + softn->ipf_nat_hostmap_sz = HOSTMAP_SIZE_NORMAL; + } softn->ipf_nat_doflush = 0; #ifdef IPFILTER_LOG softn->ipf_nat_logging = 1; @@ -492,10 +500,8 @@ ipf_nat_soft_init(softc, arg) for (i = 0, tq = softn->ipf_nat_tcptq; i < IPF_TCP_NSTATES; i++, tq++) { if (tq->ifq_ttl < softn->ipf_nat_deficmpage) tq->ifq_ttl = softn->ipf_nat_deficmpage; -#ifdef LARGE_NAT - else if (tq->ifq_ttl > softn->ipf_nat_defage) + else if (tq->ifq_ttl > softn->ipf_nat_defage && softc->ipf_large_nat) tq->ifq_ttl = softn->ipf_nat_defage; -#endif } /* @@ -6141,10 +6147,8 @@ ipf_nat_log(softc, softn, nat, action) u_int action; { #ifdef IPFILTER_LOG -# ifndef LARGE_NAT struct ipnat *np; int rulen; -# endif struct natlog natl; void *items[1]; size_t sizes[1]; @@ -6180,8 +6184,7 @@ ipf_nat_log(softc, softn, nat, action) bcopy(nat->nat_ifnames[1], natl.nl_ifnames[1], sizeof(nat->nat_ifnames[1])); -# ifndef LARGE_NAT - if (nat->nat_ptr != NULL) { + if (softc->ipf_large_nat && nat->nat_ptr != NULL) { for (rulen = 0, np = softn->ipf_nat_list; np != NULL; np = np->in_next, rulen++) if (np == nat->nat_ptr) { @@ -6189,7 +6192,6 @@ ipf_nat_log(softc, softn, nat, action) break; } } -# endif items[0] = &natl; sizes[0] = sizeof(natl); types[0] = 0; diff --git a/sys/contrib/ipfilter/netinet/ip_nat.h b/sys/contrib/ipfilter/netinet/ip_nat.h index bcec72f21f8b..aac8c326aa05 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat.h +++ b/sys/contrib/ipfilter/netinet/ip_nat.h @@ -34,44 +34,44 @@ * appropriate sizes. The figures below were used for * a setup with 1000-2000 networks to NAT. */ -#ifndef NAT_SIZE -# ifdef LARGE_NAT -# define NAT_SIZE 2047 -# else -# define NAT_SIZE 127 -# endif +#ifdef NAT_SIZE +# define NAT_SIZE_LARGE NAT_SIZE +# define NAT_SIZE_NORMAL NAT_SIZE +#else +# define NAT_SIZE_LARGE 2047 +# define NAT_SIZE_NORMAL 127 #endif -#ifndef RDR_SIZE -# ifdef LARGE_NAT -# define RDR_SIZE 2047 -# else -# define RDR_SIZE 127 -# endif +#ifdef RDR_SIZE +# define RDR_SIZE_LARGE RDR_SIZE +# define RDR_SIZE_NORMAL RDR_SIZE +#else +# define RDR_SIZE_LARGE 2047 +# define RDR_SIZE_NORMAL 127 #endif -#ifndef HOSTMAP_SIZE -# ifdef LARGE_NAT -# define HOSTMAP_SIZE 8191 -# else -# define HOSTMAP_SIZE 2047 -# endif +#ifdef HOSTMAP_SIZE +# define HOSTMAP_SIZE_LARGE HOSTMAP_SIZE +# define HOSTMAP_SIZE_NORMAL HOSTMAP_SIZE +#else +# define HOSTMAP_SIZE_LARGE 8191 +# define HOSTMAP_SIZE_NORMAL 2047 #endif -#ifndef NAT_TABLE_MAX /* * This is newly introduced and for the sake of "least surprise", the numbers * present aren't what we'd normally use for creating a proper hash table. */ -# ifdef LARGE_NAT -# define NAT_TABLE_MAX 180000 -# else -# define NAT_TABLE_MAX 30000 -# endif +#ifdef NAT_TABLE_MAX +# define NAT_TABLE_MAX_LARGE NAT_TABLE_MAX +# define NAT_TABLE_MAX_NORMAL NAT_TABLE_MAX +#else +# define NAT_TABLE_MAX_LARGE 180000 +# define NAT_TABLE_MAX_NORMAL 30000 #endif -#ifndef NAT_TABLE_SZ -# ifdef LARGE_NAT -# define NAT_TABLE_SZ 16383 -# else -# define NAT_TABLE_SZ 2047 -# endif +#ifdef NAT_TABLE_SZ +# define NAT_TABLE_SZ_LARGE NAT_TABLE_SZ +# define NAT_TABLE_SZ_NORMAL NAT_TABLE_SZ +#else +# define NAT_TABLE_SZ_LARGE 16383 +# define NAT_TABLE_SZ_NORMAL 2047 #endif #ifndef APR_LABELLEN #define APR_LABELLEN 16 diff --git a/sys/contrib/ipfilter/netinet/mlfk_ipl.c b/sys/contrib/ipfilter/netinet/mlfk_ipl.c index 6e49ef77b486..64beb1448858 100644 --- a/sys/contrib/ipfilter/netinet/mlfk_ipl.c +++ b/sys/contrib/ipfilter/netinet/mlfk_ipl.c @@ -80,6 +80,11 @@ static int ipfread(dev_t, struct uio *, int); static int ipfwrite(dev_t, struct uio *, int); #endif +#ifdef LARGE_NAT +#define IPF_LARGE_NAT 1 +#else +#define IPF_LARGE_NAT 0 +#endif SYSCTL_DECL(_net_inet); #define SYSCTL_IPF(parent, nbr, name, access, ptr, val, descr) \ @@ -132,6 +137,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_running, CTLFLAG_RD, &VNET_NAME(ipfmain.ipf_running), 0, "IPF is running"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_chksrc), 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_minttl), 0, ""); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RD, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); #define CDEV_MAJOR 79 #include @@ -646,4 +652,3 @@ ipf_fbsd_sysctl_destroy(void) } return 0; } - From owner-dev-commits-src-main@freebsd.org Mon Feb 22 19:57:25 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B79C954C995; Mon, 22 Feb 2021 19:57:25 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (vtr.rulingia.com [IPv6:2001:19f0:5801:ebe:5400:1ff:fe53:30fd]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "vtr.rulingia.com", Issuer "R3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DktJ51XZ3z4fpq; Mon, 22 Feb 2021 19:57:24 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) by vtr.rulingia.com (8.16.1/8.15.2) with ESMTPS id 11MJv9dh081968 (version=TLSv1.3 cipher=AEAD-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 23 Feb 2021 06:57:15 +1100 (AEDT) (envelope-from peter@rulingia.com) DKIM-Filter: OpenDKIM Filter v2.10.3 vtr.rulingia.com 11MJv9dh081968 X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.16.1/8.16.1) with ESMTPS id 11MJv3tt089629 (version=TLSv1.3 cipher=AEAD-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 23 Feb 2021 06:57:03 +1100 (AEDT) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.16.1/8.16.1/Submit) id 11MJv3Nh089628; Tue, 23 Feb 2021 06:57:03 +1100 (AEDT) (envelope-from peter) Date: Tue, 23 Feb 2021 06:57:03 +1100 From: Peter Jeremy To: Martin Matuska Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, "O. Hartmann" Subject: Re: git: ba27dd8be821 - main - zfs: merge OpenZFS master-9312e0fd1 Message-ID: References: <202102221202.11MC24EB071531@gitrepo.freebsd.org> <20210222150142.4b76b7c6@thor.intern.walstatt.dynvpn.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KY3kFhJ1LTUOry6o" Content-Disposition: inline In-Reply-To: <20210222150142.4b76b7c6@thor.intern.walstatt.dynvpn.de> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp X-Rspamd-Queue-Id: 4DktJ51XZ3z4fpq X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 19:57:25 -0000 --KY3kFhJ1LTUOry6o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2021-Feb-22 15:01:15 +0100, "O. Hartmann" wrote: >Am Mon, 22 Feb 2021 12:02:04 GMT >Martin Matuska schrieb: > >> The branch main has been updated by mm: >>=20 >> URL: https://cgit.FreeBSD.org/src/commit/?id=3Dba27dd8be821792e15bdabfac= 69fd6cab0cf9dd3 >>=20 >> commit ba27dd8be821792e15bdabfac69fd6cab0cf9dd3 >> Merge: c02a28754bc2 0626917d0786 >> Author: Martin Matuska >> AuthorDate: 2021-02-22 11:35:56 +0000 >> Commit: Martin Matuska >> CommitDate: 2021-02-22 12:01:17 +0000 >>=20 >> zfs: merge OpenZFS master-9312e0fd1 >> =20 >> Notable upstream changes: >> 778869fa1 Fix reporting of mount progress >> e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD >> 03e02e5b5 Fix checksum errors not being counted on repeated repair >> 64e0fe14f Restore FreeBSD resource usage accounting >> 11f2e9a49 Fix panic if scrubbing after removing a slog device =2E.. >On FreeBSD 14-CURRENT, with ZFS statically builtin the kernel, this commit= renders "make >buildkernel" to fail: > >[...] > >=3D=3D=3D> cam (all) >--- kernel --- >ld: error: undefined symbol: zfs_racct_read >>>> referenced by arc.c >>>> arc.o:(arc_read) >--- modules-all --- >--- all_subdir_cardbus --- >=3D=3D=3D> cardbus (all) >--- kernel --- > >ld: error: undefined symbol: zfs_racct_write >>>> referenced by dmu.c >>>> dmu.o:(dmu_buf_hold_array_by_dnode) >>>> referenced by dmu.c >>>> dmu.o:(dmu_assign_arcbuf_by_dnode) >*** [kernel] Error code 1 I can reproduce this as well. This commit has omitted the following line =66rom sys/conf/files and therefore broken building ZFS into the kernel: contrib/openzfs/module/os/freebsd/zfs/zfs_racct.c optional zfs compile-with= "${ZFS_C}" --=20 Peter Jeremy --KY3kFhJ1LTUOry6o Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmA0DIRfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzQ17A//anEHvLTFLe9/Japuop7tzxul7pGLHePUTbWcTKNO3dJEq3uAueFzkTCN c9c+Aq9eMd8Bas7JYY/gqVsmuwfDNyAK8H0s3r379IrNFCdt61rz9iMg1+byeLk1 GyfGp/CAJ0rd/SuCDp+cm4rIs5ZKm0YHnxVQSNUJIde3OjYda9hDeIiK1RZ0bHcm xkKrByP1Izm8Tv/nla8btQxaolnTCSrn/PtG15ULAqipawmxTPDdz9k4Jt/fAzVf 7t/7qaP+lPdcjXkdMkaJW7arYfLUgQEtZk10EuViqaUgfVx+3OFgunOonuJ97q8E jQGLPGvj3tHGktTAh4Mbt8iiKIA4NgSIr/NLWQgv2HSUFp6ZKO5CrWKS22/FDJGJ MM9bv5cLRt+PYtZBcRLusVGmklBwH2AHKrQ1WgELtS74jJBoT3zJBsY9M8LZTJSX KVsU8ay9BUB15gUvSr/f7ijA+gc8OUjNHW8m2IUYWwp6FyrRdMzAXsnXlUBhnOXd 6ZYiB/zn+lqlcHtkqYpxqwBVrYvQ6AoqEbUricri37XzO5WZ62J5Ol+SiX9TRlut i4dUgoewP7QTrIOvIf7I6D8Csu6uPoauQvFq/UmWfS9K9KBQfN40RKPrEDDRj5Ao wZueWxcmY7uZf2zK80gqZEoqgrAIJN8mxsFmty/Z/2oQ223oAF4= =Pe8y -----END PGP SIGNATURE----- --KY3kFhJ1LTUOry6o-- From owner-dev-commits-src-main@freebsd.org Mon Feb 22 20:07:51 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6511554CE6C; Mon, 22 Feb 2021 20:07: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DktX72F9Xz4gTp; Mon, 22 Feb 2021 20:07: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 3D5F73E1E; Mon, 22 Feb 2021 20:07: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 11MK7ppe007163; Mon, 22 Feb 2021 20:07:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MK7pj2007162; Mon, 22 Feb 2021 20:07:51 GMT (envelope-from git) Date: Mon, 22 Feb 2021 20:07:51 GMT Message-Id: <202102222007.11MK7pj2007162@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: d149877758f1 - main - Fix possibly unitialized variables in __cxa_demangle_gnu3() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d149877758f162f0c777e7760164bf2c1f7a1bc1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 20:07:51 -0000 The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=d149877758f162f0c777e7760164bf2c1f7a1bc1 commit d149877758f162f0c777e7760164bf2c1f7a1bc1 Author: Dimitry Andric AuthorDate: 2021-02-22 20:01:09 +0000 Commit: Dimitry Andric CommitDate: 2021-02-22 20:01:09 +0000 Fix possibly unitialized variables in __cxa_demangle_gnu3() After 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368 where I imported a more recent libcxxrt snapshot, the variables 'rtn' and 'has_ret' could in some cases be used while still uninitialized. Most obviously this would lead to a jemalloc complaint about a bad free(), aborting the program. Fix this by initializing a bunch variables in their declarations. This change has also been sent upstream, with some additional changes to be used in their testing framework. PR: 253226 MFC after: 3 days --- contrib/libcxxrt/libelftc_dem_gnu3.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/contrib/libcxxrt/libelftc_dem_gnu3.c b/contrib/libcxxrt/libelftc_dem_gnu3.c index 6e88f7b4bb4c..93e1c41fa034 100644 --- a/contrib/libcxxrt/libelftc_dem_gnu3.c +++ b/contrib/libcxxrt/libelftc_dem_gnu3.c @@ -538,8 +538,8 @@ __cxa_demangle_gnu3(const char *org) struct type_delimit td; ssize_t org_len; unsigned int limit; - char *rtn; - bool has_ret, more_type; + char *rtn = NULL; + bool has_ret = false, more_type = false; if (org == NULL) return (NULL); @@ -562,13 +562,9 @@ __cxa_demangle_gnu3(const char *org) return (rtn); } - if (!cpp_demangle_data_init(&ddata, org + 2)) return (NULL); - rtn = NULL; - has_ret = more_type = false; - if (!cpp_demangle_read_encoding(&ddata)) goto clean; From owner-dev-commits-src-main@freebsd.org Mon Feb 22 20:21:33 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6893E54D159; Mon, 22 Feb 2021 20:21: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dktqx0rQzz4hDQ; Mon, 22 Feb 2021 20:21: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 0FB6D43BB; Mon, 22 Feb 2021 20:21: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 11MKLW6l031842; Mon, 22 Feb 2021 20:21:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MKLWc4031841; Mon, 22 Feb 2021 20:21:32 GMT (envelope-from git) Date: Mon, 22 Feb 2021 20:21:32 GMT Message-Id: <202102222021.11MKLWc4031841@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ab77cc9e7bf6 - main - Remove incorrect statement about EFI environment variables being unsupported. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab77cc9e7bf6d0c2d862dfd514539b81ae248dfd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 20:21:33 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ab77cc9e7bf6d0c2d862dfd514539b81ae248dfd commit ab77cc9e7bf6d0c2d862dfd514539b81ae248dfd Author: Warner Losh AuthorDate: 2021-02-22 20:19:21 +0000 Commit: Warner Losh CommitDate: 2021-02-22 20:20:58 +0000 Remove incorrect statement about EFI environment variables being unsupported. Our uefi support has included environment variable support for several years now. Remove the bogus blanket statement saying we don't support them. MFC After: 3 days --- share/man/man8/uefi.8 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/share/man/man8/uefi.8 b/share/man/man8/uefi.8 index 4224af835738..05c74caa6c20 100644 --- a/share/man/man8/uefi.8 +++ b/share/man/man8/uefi.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 9, 2020 +.Dd February 22, 2021 .Dt UEFI 8 .Os .Sh NAME @@ -143,7 +143,3 @@ boot support for amd64 first appeared in .Fx 10.1 and for arm64 in .Fx 11.0 . -.Sh CAVEATS -EFI environment variables are not supported by -.Xr loader 8 -or the kernel. From owner-dev-commits-src-main@freebsd.org Mon Feb 22 20:27:57 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC38E54D479; Mon, 22 Feb 2021 20:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DktzJ2mz1z4jHk; Mon, 22 Feb 2021 20:27: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 A58C2412F; Mon, 22 Feb 2021 20:27: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 11MKRtXM033617; Mon, 22 Feb 2021 20:27:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MKRtcl033616; Mon, 22 Feb 2021 20:27:55 GMT (envelope-from git) Date: Mon, 22 Feb 2021 20:27:55 GMT Message-Id: <202102222027.11MKRtcl033616@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: 811e27fa3c44 - main - jail: Add PD_KILL to remove a prison in prison_deref(). 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: 811e27fa3c445664e36071a7d08228fc7fb85676 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 20:27:57 -0000 The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=811e27fa3c445664e36071a7d08228fc7fb85676 commit 811e27fa3c445664e36071a7d08228fc7fb85676 Author: Jamie Gritton AuthorDate: 2021-02-22 20:27:44 +0000 Commit: Jamie Gritton CommitDate: 2021-02-22 20:27:44 +0000 jail: Add PD_KILL to remove a prison in prison_deref(). Add the PD_KILL flag that instructs prison_deref() to take steps to actively kill a prison and its descendents, namely marking it PRISON_STATE_DYING, clearing its PR_PERSIST flag, and killing any attached processes. This replaces a similar loop in sys_jail_remove(), bringing the operation under the same single hold on allprison_lock that it already has. It is also used to clean up failed jail (re-)creations in kern_jail_set(), which didn't generally take all the proper steps. Differential Revision: https://reviews.freebsd.org/D28473 --- sys/kern/kern_jail.c | 258 ++++++++++++++++++++++++++++++++------------------- sys/sys/jail.h | 13 +++ 2 files changed, 178 insertions(+), 93 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 1ddfe3c3df5f..01724e41955c 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -141,12 +141,13 @@ static int get_next_prid(struct prison **insprp); static int do_jail_attach(struct thread *td, struct prison *pr, int drflags); static void prison_complete(void *context, int pending); static void prison_deref(struct prison *pr, int flags); +static void prison_deref_kill(struct prison *pr, struct prisonlist *freeprison); static int prison_lock_xlock(struct prison *pr, int flags); static void prison_free_not_last(struct prison *pr); +static void prison_proc_free_not_last(struct prison *pr); static void prison_set_allow_locked(struct prison *pr, unsigned flag, int enable); static char *prison_path(struct prison *pr1, struct prison *pr2); -static void prison_remove_one(struct prison *pr); #ifdef RACCT static void prison_racct_attach(struct prison *pr); static void prison_racct_modify(struct prison *pr); @@ -156,9 +157,10 @@ static void prison_racct_detach(struct prison *pr); /* Flags for prison_deref */ #define PD_DEREF 0x01 /* Decrement pr_ref */ #define PD_DEUREF 0x02 /* Decrement pr_uref */ -#define PD_LOCKED 0x04 /* pr_mtx is held */ -#define PD_LIST_SLOCKED 0x08 /* allprison_lock is held shared */ -#define PD_LIST_XLOCKED 0x10 /* allprison_lock is held exclusive */ +#define PD_KILL 0x04 /* Remove jail, kill processes, etc */ +#define PD_LOCKED 0x10 /* pr_mtx is held */ +#define PD_LIST_SLOCKED 0x20 /* allprison_lock is held shared */ +#define PD_LIST_XLOCKED 0x40 /* allprison_lock is held exclusive */ /* * Parameter names corresponding to PR_* flag values. Size values are for kvm @@ -1756,6 +1758,12 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) pr->pr_flags = (pr->pr_flags & ~ch_flags) | pr_flags; mtx_unlock(&pr->pr_mtx); drflags &= ~PD_LOCKED; + /* + * Any errors past this point will need to de-persist newly created + * prisons, as well as call remove methods. + */ + if (born) + drflags |= PD_KILL; #ifdef RACCT if (racct_enable && created) @@ -1815,17 +1823,12 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) /* Let the modules do their work. */ if (born) { error = osd_jail_call(pr, PR_METHOD_CREATE, opts); - if (error) { - (void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL); + if (error) goto done_deref; - } } error = osd_jail_call(pr, PR_METHOD_SET, opts); - if (error) { - if (born) - (void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL); + if (error) goto done_deref; - } /* * A new prison is now ready to be seen; either it has gained a user @@ -1856,6 +1859,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) } #endif + drflags &= ~PD_KILL; td->td_retval[0] = pr->pr_id; done_deref: @@ -2279,8 +2283,8 @@ kern_jail_get(struct thread *td, struct uio *optuio, int flags) int sys_jail_remove(struct thread *td, struct jail_remove_args *uap) { - struct prison *pr, *cpr, *lpr; - int descend, error; + struct prison *pr; + int error; error = priv_check(td, PRIV_JAIL_REMOVE); if (error) @@ -2292,90 +2296,16 @@ sys_jail_remove(struct thread *td, struct jail_remove_args *uap) sx_xunlock(&allprison_lock); return (EINVAL); } - - /* Remove all descendants of this prison, then remove this prison. */ - prison_hold(pr); - if (!LIST_EMPTY(&pr->pr_children)) { + if (!prison_isalive(pr)) { + /* Silently ignore already-dying prisons. */ mtx_unlock(&pr->pr_mtx); - lpr = NULL; - FOREACH_PRISON_DESCENDANT(pr, cpr, descend) { - prison_hold(cpr); - if (lpr != NULL) { - mtx_lock(&lpr->pr_mtx); - prison_remove_one(lpr); - sx_xlock(&allprison_lock); - } - lpr = cpr; - } - if (lpr != NULL) { - mtx_lock(&lpr->pr_mtx); - prison_remove_one(lpr); - sx_xlock(&allprison_lock); - } - mtx_lock(&pr->pr_mtx); + sx_xunlock(&allprison_lock); + return (0); } - prison_remove_one(pr); + prison_deref(pr, PD_KILL | PD_LOCKED | PD_LIST_XLOCKED); return (0); } -static void -prison_remove_one(struct prison *pr) -{ - struct proc *p; - int was_alive, drflags; - - drflags = PD_DEREF | PD_LOCKED | PD_LIST_XLOCKED; - - /* - * Mark the prison as doomed, so it doesn't accidentally come back - * to life. It may still be explicitly brought back by jail_set(2). - */ - was_alive = pr->pr_state == PRISON_STATE_ALIVE; - pr->pr_state = PRISON_STATE_DYING; - - /* If the prison was persistent, it is not anymore. */ - if (pr->pr_flags & PR_PERSIST) { - drflags |= PD_DEUREF; - prison_free_not_last(pr); - pr->pr_flags &= ~PR_PERSIST; - } - - /* - * jail_remove added a reference. If that's the only one, remove - * the prison now. refcount(9) doesn't guarantee the cache coherence - * of non-zero counters, so force it here. - */ - KASSERT(refcount_load(&pr->pr_ref) > 0, - ("prison_remove_one removing a dead prison (jid=%d)", pr->pr_id)); - if (atomic_load_acq_int(&pr->pr_ref) == 1) { - prison_deref(pr, drflags); - return; - } - - /* Tell modules this prison has died. */ - mtx_unlock(&pr->pr_mtx); - drflags &= ~PD_LOCKED; - if (was_alive) - (void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL); - - sx_xunlock(&allprison_lock); - drflags &= ~PD_LIST_XLOCKED; - /* - * Kill all processes unfortunate enough to be attached to this prison. - */ - sx_slock(&allproc_lock); - FOREACH_PROC_IN_SYSTEM(p) { - PROC_LOCK(p); - if (p->p_state != PRS_NEW && p->p_ucred && - p->p_ucred->cr_prison == pr) - kern_psignal(p, SIGKILL); - PROC_UNLOCK(p); - } - sx_sunlock(&allproc_lock); - /* Remove the temporary reference added by jail_remove. */ - prison_deref(pr, drflags); -} - /* * struct jail_attach_args { * int jid; @@ -2727,6 +2657,24 @@ prison_proc_free(struct prison *pr) } } +static void +prison_proc_free_not_last(struct prison *pr) +{ +#ifdef INVARIANTS + int lastref; + + KASSERT(refcount_load(&pr->pr_uref) > 0, + ("Trying to free dead prison %p (jid=%d).", + pr, pr->pr_id)); + lastref = refcount_release(&pr->pr_uref); + KASSERT(!lastref, + ("prison_proc_free_not_last freed last uref on prison %p (jid=%d).", + pr, pr->pr_id)); +#else + refcount_release(&pr->pr_uref); +#endif +} + /* * Complete a call to either prison_free or prison_proc_free. */ @@ -2760,14 +2708,25 @@ static void prison_deref(struct prison *pr, int flags) { struct prisonlist freeprison; - struct prison *rpr, *ppr, *tpr; + struct prison *killpr, *rpr, *ppr, *tpr; + struct proc *p; + killpr = NULL; TAILQ_INIT(&freeprison); /* * Release this prison as requested, which may cause its parent * to be released, and then maybe its grandparent, etc. */ for (;;) { + if (flags & PD_KILL) { + /* Kill the prison and its descendents. */ + if (!(flags & PD_DEREF)) { + prison_hold(pr); + flags |= PD_DEREF; + } + flags = prison_lock_xlock(pr, flags); + prison_deref_kill(pr, &freeprison); + } if (flags & PD_DEUREF) { /* Drop a user reference. */ KASSERT(refcount_load(&pr->pr_uref) > 0, @@ -2796,6 +2755,16 @@ prison_deref(struct prison *pr, int flags) } } } + if (flags & PD_KILL) { + flags &= ~PD_KILL; + /* + * Any remaining user references are probably processes + * that need to be killed, either in this prison or its + * descendants. + */ + if (refcount_load(&pr->pr_uref) > 0) + killpr = pr; + } if (flags & PD_DEREF) { /* Drop a reference. */ KASSERT(refcount_load(&pr->pr_ref) > 0, @@ -2848,6 +2817,25 @@ prison_deref(struct prison *pr, int flags) else if (flags & PD_LIST_XLOCKED) sx_xunlock(&allprison_lock); + /* Kill any processes attached to a killed prison. */ + if (killpr != NULL) { + sx_slock(&allproc_lock); + FOREACH_PROC_IN_SYSTEM(p) { + PROC_LOCK(p); + if (p->p_state != PRS_NEW && p->p_ucred != NULL) { + for (ppr = p->p_ucred->cr_prison; + ppr != &prison0; + ppr = ppr->pr_parent) + if (ppr == killpr) { + kern_psignal(p, SIGKILL); + break; + } + } + PROC_UNLOCK(p); + } + sx_sunlock(&allproc_lock); + } + /* * Finish removing any unreferenced prisons, which couldn't happen * while allprison_lock was held (to avoid a LOR on vrele). @@ -2878,6 +2866,90 @@ prison_deref(struct prison *pr, int flags) } } +/* + * Kill the prison and its descendants. Mark them as dying, clear the + * persist flag, and call module remove methods. + */ +static void +prison_deref_kill(struct prison *pr, struct prisonlist *freeprison) +{ + struct prison *cpr, *ppr, *rpr; + bool descend; + + /* + * Unlike the descendants, the target prison can be killed + * even if it is currently dying. This is useful for failed + * creation in jail_set(2). + */ + KASSERT(refcount_load(&pr->pr_ref) > 0, + ("Trying to kill dead prison %p (jid=%d).", + pr, pr->pr_id)); + refcount_acquire(&pr->pr_uref); + pr->pr_state = PRISON_STATE_DYING; + mtx_unlock(&pr->pr_mtx); + + rpr = NULL; + FOREACH_PRISON_DESCENDANT_PRE_POST(pr, cpr, descend) { + if (descend) { + if (!prison_isalive(cpr)) { + descend = false; + continue; + } + prison_hold(cpr); + prison_proc_hold(cpr); + mtx_lock(&cpr->pr_mtx); + cpr->pr_state = PRISON_STATE_DYING; + cpr->pr_flags |= PR_REMOVE; + mtx_unlock(&cpr->pr_mtx); + } + if (!(cpr->pr_flags & PR_REMOVE)) + continue; + (void)osd_jail_call(cpr, PR_METHOD_REMOVE, NULL); + mtx_lock(&cpr->pr_mtx); + cpr->pr_flags &= ~PR_REMOVE; + if (cpr->pr_flags & PR_PERSIST) { + cpr->pr_flags &= ~PR_PERSIST; + prison_proc_free_not_last(cpr); + prison_free_not_last(cpr); + } + (void)refcount_release(&cpr->pr_uref); + if (refcount_release(&cpr->pr_ref)) { + /* + * When the last reference goes, unlink the prison + * and set it aside for prison_deref() to handle. + * Delay unlinking the sibling list to keep the loop + * safe. + */ + if (rpr != NULL) + LIST_REMOVE(rpr, pr_sibling); + rpr = cpr; + rpr->pr_state = PRISON_STATE_INVALID; + TAILQ_REMOVE(&allprison, rpr, pr_list); + TAILQ_INSERT_TAIL(freeprison, rpr, pr_list); + /* + * Removing a prison frees references from its parent. + */ + ppr = rpr->pr_parent; + prison_proc_free_not_last(ppr); + prison_free_not_last(ppr); + for (; ppr != NULL; ppr = ppr->pr_parent) + ppr->pr_childcount--; + } + mtx_unlock(&cpr->pr_mtx); + } + if (rpr != NULL) + LIST_REMOVE(rpr, pr_sibling); + + (void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL); + mtx_lock(&pr->pr_mtx); + if (pr->pr_flags & PR_PERSIST) { + pr->pr_flags &= ~PR_PERSIST; + prison_proc_free_not_last(pr); + prison_free_not_last(pr); + } + (void)refcount_release(&pr->pr_uref); +} + /* * Given the current locking state in the flags, make sure allprison_lock * is held exclusive, and the prison is locked. Return flags indicating diff --git a/sys/sys/jail.h b/sys/sys/jail.h index 723a1fff0b82..c9d4c65e4d9e 100644 --- a/sys/sys/jail.h +++ b/sys/sys/jail.h @@ -341,6 +341,19 @@ prison_unlock(struct prison *pr) ; \ else +/* + * Traverse a prison's descendants, visiting both preorder and postorder. + */ +#define FOREACH_PRISON_DESCENDANT_PRE_POST(ppr, cpr, descend) \ + for ((cpr) = (ppr), (descend) = 1; \ + ((cpr) = (descend) \ + ? ((descend) = !LIST_EMPTY(&(cpr)->pr_children)) \ + ? LIST_FIRST(&(cpr)->pr_children) \ + : (cpr) \ + : ((descend) = LIST_NEXT(cpr, pr_sibling) != NULL) \ + ? LIST_NEXT(cpr, pr_sibling) \ + : cpr->pr_parent) != (ppr);) + /* * Attributes of the physical system, and the root of the jail tree. */ From owner-dev-commits-src-main@freebsd.org Mon Feb 22 20:34:02 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 39BC154D97E; Mon, 22 Feb 2021 20:34: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dkv6L180dz4kR6; Mon, 22 Feb 2021 20:34: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 1A0EA43FF; Mon, 22 Feb 2021 20:34: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 11MKY2ad046146; Mon, 22 Feb 2021 20:34:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MKY2af046145; Mon, 22 Feb 2021 20:34:02 GMT (envelope-from git) Date: Mon, 22 Feb 2021 20:34:02 GMT Message-Id: <202102222034.11MKY2af046145@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: 5ce2d4a1c292 - main - bhyve/snapshot: drop mkdir when creating the unix domain socket MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5ce2d4a1c2922821b9940473213c0d75469755fc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 20:34:02 -0000 The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=5ce2d4a1c2922821b9940473213c0d75469755fc commit 5ce2d4a1c2922821b9940473213c0d75469755fc Author: Robert Wing AuthorDate: 2021-02-19 02:48:40 +0000 Commit: Robert Wing CommitDate: 2021-02-22 20:31:07 +0000 bhyve/snapshot: drop mkdir when creating the unix domain socket Add /var/run/bhyve/ to BSD.var.dist so we don't have to call mkdir when creating the unix domain socket for a given bhyve vm. The path to the unix domain socket for a bhyve vm will now be /var/run/bhyve/vmname instead of /var/run/bhyve/checkpoint/vmname Move BHYVE_RUN_DIR from snapshot.c to snapshot.h so it can be shared to bhyvectl(8). Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D28783 --- etc/mtree/BSD.var.dist | 2 ++ share/man/man7/hier.7 | 4 +++- usr.sbin/bhyve/snapshot.c | 32 ++------------------------------ usr.sbin/bhyve/snapshot.h | 1 + usr.sbin/bhyvectl/bhyvectl.c | 3 +-- 5 files changed, 9 insertions(+), 33 deletions(-) diff --git a/etc/mtree/BSD.var.dist b/etc/mtree/BSD.var.dist index 6483df4a297d..f0d6f8694449 100644 --- a/etc/mtree/BSD.var.dist +++ b/etc/mtree/BSD.var.dist @@ -74,6 +74,8 @@ preserve .. run + bhyve + .. dhclient .. ppp gname=network mode=0770 diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index 845c4a8a8f7c..d134e84f4c48 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -28,7 +28,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd January 9, 2021 +.Dd February 22, 2021 .Dt HIER 7 .Os .Sh NAME @@ -832,6 +832,8 @@ system information files describing various info about system since it was booted .Pp .Bl -tag -width Fl -compact +.It Pa bhyve/ +bhyve vm unix domain sockets .It Pa ppp/ writable by the .Dq network diff --git a/usr.sbin/bhyve/snapshot.c b/usr.sbin/bhyve/snapshot.c index 4ffdb315883c..11ff963ae1fd 100644 --- a/usr.sbin/bhyve/snapshot.c +++ b/usr.sbin/bhyve/snapshot.c @@ -115,8 +115,6 @@ static sig_t old_winch_handler; #define SNAPSHOT_CHUNK (4 * MB) #define PROG_BUF_SZ (8192) -#define BHYVE_RUN_DIR "/var/run/bhyve" -#define CHECKPOINT_RUN_DIR BHYVE_RUN_DIR "/checkpoint" #define MAX_VMNAME 100 #define MAX_MSG_SIZE 1024 @@ -1505,26 +1503,6 @@ checkpoint_thread(void *param) return (NULL); } -/* - * Create directory tree to store runtime specific information: - * i.e. UNIX sockets for IPC with bhyvectl. - */ -static int -make_checkpoint_dir(void) -{ - int err; - - err = mkdir(BHYVE_RUN_DIR, 0755); - if (err < 0 && errno != EEXIST) - return (err); - - err = mkdir(CHECKPOINT_RUN_DIR, 0755); - if (err < 0 && errno != EEXIST) - return (err); - - return 0; -} - /* * Create the listening socket for IPC with bhyvectl */ @@ -1556,12 +1534,6 @@ init_checkpoint_thread(struct vmctx *ctx) goto fail; } - err = make_checkpoint_dir(); - if (err < 0) { - perror("Failed to create checkpoint runtime directory"); - goto fail; - } - addr.sun_family = AF_UNIX; err = vm_get_name(ctx, vmname_buf, MAX_VMNAME - 1); @@ -1570,8 +1542,8 @@ init_checkpoint_thread(struct vmctx *ctx) goto fail; } - snprintf(addr.sun_path, sizeof(addr.sun_path), "%s/%s", - CHECKPOINT_RUN_DIR, vmname_buf); + snprintf(addr.sun_path, sizeof(addr.sun_path), "%s%s", + BHYVE_RUN_DIR, vmname_buf); addr.sun_len = SUN_LEN(&addr); unlink(addr.sun_path); diff --git a/usr.sbin/bhyve/snapshot.h b/usr.sbin/bhyve/snapshot.h index eba46c497ab2..caa7256ffbfa 100644 --- a/usr.sbin/bhyve/snapshot.h +++ b/usr.sbin/bhyve/snapshot.h @@ -42,6 +42,7 @@ #include #include +#define BHYVE_RUN_DIR "/var/run/bhyve/" #define MAX_SNAPSHOT_VMNAME 100 struct vmctx; diff --git a/usr.sbin/bhyvectl/bhyvectl.c b/usr.sbin/bhyvectl/bhyvectl.c index b404f9f3c255..7b3a73cc3668 100644 --- a/usr.sbin/bhyvectl/bhyvectl.c +++ b/usr.sbin/bhyvectl/bhyvectl.c @@ -74,7 +74,6 @@ __FBSDID("$FreeBSD$"); #define NO_ARG no_argument #define OPT_ARG optional_argument -#define CHECKPOINT_RUN_DIR "/var/run/bhyve/checkpoint" #define MAX_VMNAME 100 static const char *progname; @@ -1708,7 +1707,7 @@ send_checkpoint_op_req(struct vmctx *ctx, struct checkpoint_op *op) goto done; } - snprintf(addr.sun_path, sizeof(addr.sun_path), "%s/%s", CHECKPOINT_RUN_DIR, vmname_buf); + snprintf(addr.sun_path, sizeof(addr.sun_path), "%s%s", BHYVE_RUN_DIR, vmname_buf); if (connect(socket_fd, (struct sockaddr *)&addr, sizeof(struct sockaddr_un)) != 0) { From owner-dev-commits-src-main@freebsd.org Mon Feb 22 21:11:03 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C90254E9A6; Mon, 22 Feb 2021 21:11: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dkvx32hSbz4mKC; Mon, 22 Feb 2021 21:11: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 4F1544E0A; Mon, 22 Feb 2021 21:11: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 11MLB3SQ096901; Mon, 22 Feb 2021 21:11:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MLB3g1096900; Mon, 22 Feb 2021 21:11:03 GMT (envelope-from git) Date: Mon, 22 Feb 2021 21:11:03 GMT Message-Id: <202102222111.11MLB3g1096900@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 23e875fd97fb - main - vm_kern: Avoid sign extension in the KVA_QUANTUM definition MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 23e875fd97fb9f17b3f5dc2b26082f25e1a86b6f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 21:11:03 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=23e875fd97fb9f17b3f5dc2b26082f25e1a86b6f commit 23e875fd97fb9f17b3f5dc2b26082f25e1a86b6f Author: Mark Johnston AuthorDate: 2021-02-22 20:50:09 +0000 Commit: Mark Johnston CommitDate: 2021-02-22 20:50:09 +0000 vm_kern: Avoid sign extension in the KVA_QUANTUM definition Otherwise, on a powerpc64 NUMA system with hashed page tables, the first-level superpage reservation size is large enough that the value of the kernel KVA arena import quantum, KVA_NUMA_IMPORT_QUANTUM, is negative and gets sign-extended when passed to vmem_set_import(). This results in a boot-time hang on such platforms. Reported by: bdragon MFC after: 3 days --- sys/vm/vm_kern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index e8e24c3ca8a3..637298eb2caa 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -127,7 +127,7 @@ SYSCTL_ULONG(_vm, OID_AUTO, max_kernel_address, CTLFLAG_RD, /* On non-superpage architectures we want large import sizes. */ #define KVA_QUANTUM_SHIFT (8 + PAGE_SHIFT) #endif -#define KVA_QUANTUM (1 << KVA_QUANTUM_SHIFT) +#define KVA_QUANTUM (1ul << KVA_QUANTUM_SHIFT) #define KVA_NUMA_IMPORT_QUANTUM (KVA_QUANTUM * 128) extern void uma_startup2(void); From owner-dev-commits-src-main@freebsd.org Mon Feb 22 21:16:47 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 12E2F54EB71; Mon, 22 Feb 2021 21:16:47 +0000 (UTC) (envelope-from rpokala@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dkw3f64Cwz4mvN; Mon, 22 Feb 2021 21:16:46 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.10] (unknown [98.42.164.217]) (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 45DD326773; Mon, 22 Feb 2021 21:16:46 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.45.21011103 Date: Mon, 22 Feb 2021 13:16:45 -0800 Subject: Re: aa8ae5fe17eb - main - git hooks: add "Fixes" trailer to commit message template From: Ravi Pokala To: Ed Maste , , , Message-ID: <4BE4FCF8-FA65-45B7-93A5-2E2D659CEAF8@panasas.com> Thread-Topic: aa8ae5fe17eb - main - git hooks: add "Fixes" trailer to commit message template References: <202102221531.11MFVxQU048362@gitrepo.freebsd.org> In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 21:16:47 -0000 -----Original Message----- From: Ravi Pokala Date: 2021-02-22, Monday at 10:48 To: Ed Maste , , , Subject: Re: aa8ae5fe17eb - main - git hooks: add "Fixes" trailer to commit message template -----Original Message----- From: on behalf of Ed Maste Date: 2021-02-22, Monday at 07:31 To: , , Subject: git: aa8ae5fe17eb - main - git hooks: add "Fixes" trailer to commit message template The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=aa8ae5fe17eb380b0f30f1641f17a0b3d83a68c3 commit aa8ae5fe17eb380b0f30f1641f17a0b3d83a68c3 Author: Ed Maste AuthorDate: 2021-02-20 18:49:31 +0000 Commit: Ed Maste CommitDate: 2021-02-22 15:29:56 +0000 git hooks: add "Fixes" trailer to commit message template A number of projects use "Fixes: " to identify a commit that is fixed by a given change. Adopt that convention. Differential Revision: https://reviews.freebsd.org/D28693 --- tools/tools/git/hooks/prepare-commit-msg | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/tools/git/hooks/prepare-commit-msg b/tools/tools/git/hooks/prepare-commit-msg index 4d1072700af0..761b4443cfd8 100755 --- a/tools/tools/git/hooks/prepare-commit-msg +++ b/tools/tools/git/hooks/prepare-commit-msg @@ -48,6 +48,7 @@ $(awk '1;/^#$/{exit}' $1) # Tested by: # Approved by: # Obtained from: +# Fixes: Hi Ed, To be clear, that's "${HASH} ${TITLE}" ; space-separated, not colon- or tab-separated? If that's the case, it would be clearer to say that it's the output of `git log --oneline' for the commit in question. (Interestingly, I can't seem to figure out how to get `git log --oneline' to print *only* the commit in question; I have to pipe through `grep -m1 ${HASH}'.) Thanks to avg@, I think we should explicitly say `git log --oneline -decorate=no -1 ${HASH}', to remove any ambiguity about the format. Thanks, Ravi (rpokala@) Thanks, Ravi (rpokala@) # MFC after: # MFH: # Relnotes: From owner-dev-commits-src-main@freebsd.org Mon Feb 22 21:21:32 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 279D954F452; Mon, 22 Feb 2021 21:21: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dkw980RKWz4np2; Mon, 22 Feb 2021 21:21: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 0045E50C1; Mon, 22 Feb 2021 21:21: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 11MLLVUV008794; Mon, 22 Feb 2021 21:21:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MLLVfE008793; Mon, 22 Feb 2021 21:21:31 GMT (envelope-from git) Date: Mon, 22 Feb 2021 21:21:31 GMT Message-Id: <202102222121.11MLLVfE008793@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 8c09ecb2e251 - main - uefi: add historical details MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c09ecb2e25155b4f1490a177826608d52b1bd1b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 21:21:32 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8c09ecb2e25155b4f1490a177826608d52b1bd1b commit 8c09ecb2e25155b4f1490a177826608d52b1bd1b Author: Warner Losh AuthorDate: 2021-02-22 21:20:00 +0000 Commit: Warner Losh CommitDate: 2021-02-22 21:20:44 +0000 uefi: add historical details Add details about when armv6 and armv7 support was added. --- share/man/man8/uefi.8 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/share/man/man8/uefi.8 b/share/man/man8/uefi.8 index 05c74caa6c20..dfc144718f7b 100644 --- a/share/man/man8/uefi.8 +++ b/share/man/man8/uefi.8 @@ -140,6 +140,8 @@ EFI boot support for the ia64 architecture first appeared in .Fx 5.0 . .Nm boot support for amd64 first appeared in -.Fx 10.1 -and for arm64 in -.Fx 11.0 . +.Fx 10.1 ; +for arm64 +.Fx 11.0 ; +and for armv6 and armv7 in +.Fx 12.0 . From owner-dev-commits-src-main@freebsd.org Mon Feb 22 21:40:36 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 521E55500E3; Mon, 22 Feb 2021 21:40: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dkwb81Ygxz4q4R; Mon, 22 Feb 2021 21:40: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 2886C548D; Mon, 22 Feb 2021 21:40: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 11MLeaWs034192; Mon, 22 Feb 2021 21:40:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MLeaD6034190; Mon, 22 Feb 2021 21:40:36 GMT (envelope-from git) Date: Mon, 22 Feb 2021 21:40:36 GMT Message-Id: <202102222140.11MLeaD6034190@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: f11e9f325aee - main - Restore missing word MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f11e9f325aee3459fee94f3a660a8e6c1a25c2ac Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 21:40:36 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f11e9f325aee3459fee94f3a660a8e6c1a25c2ac commit f11e9f325aee3459fee94f3a660a8e6c1a25c2ac Author: Warner Losh AuthorDate: 2021-02-22 21:39:04 +0000 Commit: Warner Losh CommitDate: 2021-02-22 21:39:04 +0000 Restore missing word "in" got dropped when I shuffled things around. Noticed by: rpokala@ MFC After: 3 days --- share/man/man8/uefi.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man8/uefi.8 b/share/man/man8/uefi.8 index dfc144718f7b..3ecfe05ac1c4 100644 --- a/share/man/man8/uefi.8 +++ b/share/man/man8/uefi.8 @@ -141,7 +141,7 @@ EFI boot support for the ia64 architecture first appeared in .Nm boot support for amd64 first appeared in .Fx 10.1 ; -for arm64 +for arm64 in .Fx 11.0 ; and for armv6 and armv7 in .Fx 12.0 . From owner-dev-commits-src-main@freebsd.org Mon Feb 22 21:41:40 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAE41550506; Mon, 22 Feb 2021 21:41:40 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DkwcN5Rfpz4qD6; Mon, 22 Feb 2021 21:41:40 +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 A3135515F; Mon, 22 Feb 2021 21:41: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 11MLfejj035391; Mon, 22 Feb 2021 21:41:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MLfeK7035390; Mon, 22 Feb 2021 21:41:40 GMT (envelope-from git) Date: Mon, 22 Feb 2021 21:41:40 GMT Message-Id: <202102222141.11MLfeK7035390@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: 61c50cbc096d - main - loader: autoload_font will hung loader when there is no local console 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: 61c50cbc096d28e44cb8b627e524ae58158c423a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 21:41:40 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=61c50cbc096d28e44cb8b627e524ae58158c423a commit 61c50cbc096d28e44cb8b627e524ae58158c423a Author: Toomas Soome AuthorDate: 2021-02-21 10:32:18 +0000 Commit: Toomas Soome CommitDate: 2021-02-21 10:45:36 +0000 loader: autoload_font will hung loader when there is no local console If we start with console set to comconsole, the local console (vidconsole, efi) is never initialized and attempt to use the data can render the loader hung. Reported by: Kamigishi Rei MFC after: 3 days --- stand/efi/libefi/efi_console.c | 3 +++ stand/i386/libi386/vidconsole.c | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/stand/efi/libefi/efi_console.c b/stand/efi/libefi/efi_console.c index 7024f9c8b2f2..3cbd121c41da 100644 --- a/stand/efi/libefi/efi_console.c +++ b/stand/efi/libefi/efi_console.c @@ -886,6 +886,9 @@ cons_update_mode(bool use_gfx_mode) EFI_STATUS status; char env[10], *ptr; + if (!efi_started) + return (false); + /* * Despite the use_gfx_mode, we want to make sure we call * efi_find_framebuffer(). This will populate the fb data, diff --git a/stand/i386/libi386/vidconsole.c b/stand/i386/libi386/vidconsole.c index f94ed2d26712..b933a7807687 100644 --- a/stand/i386/libi386/vidconsole.c +++ b/stand/i386/libi386/vidconsole.c @@ -53,7 +53,7 @@ static int vidc_getchar(void); static int vidc_ischar(void); static void cons_draw_frame(teken_attr_t *); -static int vidc_started; +static bool vidc_started; static uint16_t *vgatext; static tf_bell_t vidc_cons_bell; @@ -877,6 +877,10 @@ cons_update_mode(bool use_gfx_mode) char env[10], *ptr; int format, roff, goff, boff; + /* vidc_init() is not called yet. */ + if (!vidc_started) + return (false); + gfx_state.tg_tp.tp_row = TEXT_ROWS; gfx_state.tg_tp.tp_col = TEXT_COLS; @@ -996,7 +1000,7 @@ vidc_init(int arg) if (vidc_started && arg == 0) return (0); - vidc_started = 1; + vidc_started = true; vbe_init(); /* From owner-dev-commits-src-main@freebsd.org Mon Feb 22 22:27:27 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 507845515BB; Mon, 22 Feb 2021 22:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DkxdC1g8Lz4t10; Mon, 22 Feb 2021 22:27: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 2BE145C66; Mon, 22 Feb 2021 22:27: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 11MMRROQ092402; Mon, 22 Feb 2021 22:27:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MMRRk3092401; Mon, 22 Feb 2021 22:27:27 GMT (envelope-from git) Date: Mon, 22 Feb 2021 22:27:27 GMT Message-Id: <202102222227.11MMRRk3092401@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 963cf6cb0fd7 - main - uefi: Add riscv to historical details MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 963cf6cb0fd7e8708c455ecf567fbc34fe2a7156 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 22:27:27 -0000 The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=963cf6cb0fd7e8708c455ecf567fbc34fe2a7156 commit 963cf6cb0fd7e8708c455ecf567fbc34fe2a7156 Author: Jessica Clarke AuthorDate: 2021-02-22 22:27:00 +0000 Commit: Jessica Clarke CommitDate: 2021-02-22 22:27:00 +0000 uefi: Add riscv to historical details --- share/man/man8/uefi.8 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/share/man/man8/uefi.8 b/share/man/man8/uefi.8 index 3ecfe05ac1c4..64bc30139f97 100644 --- a/share/man/man8/uefi.8 +++ b/share/man/man8/uefi.8 @@ -143,5 +143,7 @@ boot support for amd64 first appeared in .Fx 10.1 ; for arm64 in .Fx 11.0 ; -and for armv6 and armv7 in -.Fx 12.0 . +for armv6 and armv7 in +.Fx 12.0 ; +and for riscv in +.Fx 13.0 . From owner-dev-commits-src-main@freebsd.org Mon Feb 22 22:33:46 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A54795517F9; Mon, 22 Feb 2021 22:33: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DkxmV4KTKz4tcy; Mon, 22 Feb 2021 22:33: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 875D55EBB; Mon, 22 Feb 2021 22:33: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 11MMXk7b004869; Mon, 22 Feb 2021 22:33:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MMXkdW004868; Mon, 22 Feb 2021 22:33:46 GMT (envelope-from git) Date: Mon, 22 Feb 2021 22:33:46 GMT Message-Id: <202102222233.11MMXkdW004868@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: d510bf133d04 - main - cxgb(4): Rework my commit 9dc7c250. 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: d510bf133d045d6c83742aeda6949bec150f6cbf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 22:33:46 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=d510bf133d045d6c83742aeda6949bec150f6cbf commit d510bf133d045d6c83742aeda6949bec150f6cbf Author: Alexander Motin AuthorDate: 2021-02-22 22:21:05 +0000 Commit: Alexander Motin CommitDate: 2021-02-22 22:33:43 +0000 cxgb(4): Rework my commit 9dc7c250. The previous implementation was reported to try to coalesce packets in situations when it should not, that resulted in assertion later. This implementation better checks the first packet of the chain for the coallescing elligibility. MFC after: 3 days --- sys/dev/cxgb/cxgb_sge.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c index 491d1a751f4a..f13d2f03180c 100644 --- a/sys/dev/cxgb/cxgb_sge.c +++ b/sys/dev/cxgb/cxgb_sge.c @@ -312,20 +312,22 @@ set_wr_hdr(struct work_request_hdr *wrp, uint32_t wr_hi, uint32_t wr_lo) struct coalesce_info { int count; int nbytes; + int noncoal; }; static int coalesce_check(struct mbuf *m, void *arg) { struct coalesce_info *ci = arg; - int *count = &ci->count; - int *nbytes = &ci->nbytes; - - if ((*nbytes == 0) || ((*nbytes + m->m_len <= 10500) && - (*count < 7) && (m->m_next == NULL) && - ((mtod(m, vm_offset_t) & PAGE_MASK) + m->m_len <= PAGE_SIZE))) { - *count += 1; - *nbytes += m->m_len; + + if ((m->m_next != NULL) || + ((mtod(m, vm_offset_t) & PAGE_MASK) + m->m_len > PAGE_SIZE)) + ci->noncoal = 1; + + if ((ci->count == 0) || (ci->noncoal == 0 && (ci->count < 7) && + (ci->nbytes + m->m_len <= 10500))) { + ci->count++; + ci->nbytes += m->m_len; return (1); } return (0); @@ -342,7 +344,7 @@ cxgb_dequeue(struct sge_qset *qs) return TXQ_RING_DEQUEUE(qs); m_head = m_tail = NULL; - ci.count = ci.nbytes = 0; + ci.count = ci.nbytes = ci.noncoal = 0; do { m = TXQ_RING_DEQUEUE_COND(qs, coalesce_check, &ci); if (m_head == NULL) { From owner-dev-commits-src-main@freebsd.org Mon Feb 22 23:22:55 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4CA77552C07; Mon, 22 Feb 2021 23:22: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DkysC1jGnz3Ccp; Mon, 22 Feb 2021 23:22: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 2C7A36A7A; Mon, 22 Feb 2021 23:22: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 11MNMtiQ070351; Mon, 22 Feb 2021 23:22:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MNMt78070350; Mon, 22 Feb 2021 23:22:55 GMT (envelope-from git) Date: Mon, 22 Feb 2021 23:22:55 GMT Message-Id: <202102222322.11MNMt78070350@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 537f92cd3510 - main - uma: Update the comment above startup_alloc() to reflect reality MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 537f92cd351090c09b178a1749cd1d0326f74dc7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 23:22:55 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=537f92cd351090c09b178a1749cd1d0326f74dc7 commit 537f92cd351090c09b178a1749cd1d0326f74dc7 Author: Mark Johnston AuthorDate: 2021-02-22 23:21:49 +0000 Commit: Mark Johnston CommitDate: 2021-02-22 23:22:51 +0000 uma: Update the comment above startup_alloc() to reflect reality The scheme used for early slab allocations changed in commit a81c400e75. Reported by: alc Reviewed by: alc MFC after: 1 week --- sys/vm/uma_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 0b6e02861785..8cbd1216678a 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -1642,9 +1642,9 @@ fail: } /* - * This function is intended to be used early on in place of page_alloc() so - * that we may use the boot time page cache to satisfy allocations before - * the VM is ready. + * This function is intended to be used early on in place of page_alloc(). It + * performs contiguous physical memory allocations and uses a bump allocator for + * KVA, so is usable before the kernel map is initialized. */ static void * startup_alloc(uma_zone_t zone, vm_size_t bytes, int domain, uint8_t *pflag, From owner-dev-commits-src-main@freebsd.org Mon Feb 22 23:38:11 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4C422552DFB; Mon, 22 Feb 2021 23:38: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DkzBq1gpmz3Dg4; Mon, 22 Feb 2021 23:38: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 21B116BAE; Mon, 22 Feb 2021 23:38: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 11MNcBRw084740; Mon, 22 Feb 2021 23:38:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MNcBem084739; Mon, 22 Feb 2021 23:38:11 GMT (envelope-from git) Date: Mon, 22 Feb 2021 23:38:11 GMT Message-Id: <202102222338.11MNcBem084739@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 7563019bc693 - main - Add if_try_ref() to simplify refcount handling inside epoch. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7563019bc69301a382abefbac3b0fea1d876410e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 23:38:11 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=7563019bc69301a382abefbac3b0fea1d876410e commit 7563019bc69301a382abefbac3b0fea1d876410e Author: Alexander V. Chernikov AuthorDate: 2021-02-22 21:37:55 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-02-22 23:37:59 +0000 Add if_try_ref() to simplify refcount handling inside epoch. When we have an ifp pointer and the code is running inside epoch, epoch guarantees the pointer will not be freed. However, the following case can still happen: * in thread 1 we drop to refcount=0 for ifp and schedule its deletion. * in thread 2 we use this ifp and reference it * destroy callout kicks in * unhappy user reports a bug This can happen with the current implementation of ifnet_byindex_ref(), as we're not holding any locks preventing ifnet deletion by a parallel thread. To address it, add if_try_ref(), allowing to return failure when referencing ifp with refcount=0. Additionally, enforce existing if_ref() is with KASSERT to provide a cleaner error in such scenarios. Finally, fix ifnet_byindex_ref() by using if_try_ref() and returning NULL if the latter fails. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28836 --- sys/net/if.c | 14 ++++++++++++-- sys/net/if_var.h | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 948be6876b65..9d5e9e26b4bb 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -359,7 +359,8 @@ ifnet_byindex_ref(u_short idx) ifp = ifnet_byindex(idx); if (ifp == NULL || (ifp->if_flags & IFF_DYING)) return (NULL); - if_ref(ifp); + if (!if_try_ref(ifp)) + return (NULL); return (ifp); } @@ -738,9 +739,18 @@ if_free(struct ifnet *ifp) void if_ref(struct ifnet *ifp) { + u_int old; /* We don't assert the ifnet list lock here, but arguably should. */ - refcount_acquire(&ifp->if_refcount); + old = refcount_acquire(&ifp->if_refcount); + KASSERT(old > 0, ("%s: ifp %p has 0 refs", __func__, ifp)); +} + +bool +if_try_ref(struct ifnet *ifp) +{ + NET_EPOCH_ASSERT(); + return (refcount_acquire_if_not_zero(&ifp->if_refcount)); } void diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 291a7781d73c..33a737880a8d 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -661,6 +661,7 @@ void if_link_state_change(struct ifnet *, int); int if_printf(struct ifnet *, const char *, ...) __printflike(2, 3); void if_ref(struct ifnet *); void if_rele(struct ifnet *); +bool if_try_ref(struct ifnet *); int if_setlladdr(struct ifnet *, const u_char *, int); int if_tunnel_check_nesting(struct ifnet *, struct mbuf *, uint32_t, int); void if_up(struct ifnet *); From owner-dev-commits-src-main@freebsd.org Mon Feb 22 23:38:12 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6AC36552F61; Mon, 22 Feb 2021 23:38: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DkzBr2fGFz3DZH; Mon, 22 Feb 2021 23:38: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 4DADE6943; Mon, 22 Feb 2021 23:38: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 11MNcCg2084762; Mon, 22 Feb 2021 23:38:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MNcCCn084761; Mon, 22 Feb 2021 23:38:12 GMT (envelope-from git) Date: Mon, 22 Feb 2021 23:38:12 GMT Message-Id: <202102222338.11MNcCCn084761@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 596417283722 - main - Simplify ifa/ifp refcounting in the routing stack. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 596417283722ee62ed17aed1c875ad90c01cbb0e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 23:38:12 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=596417283722ee62ed17aed1c875ad90c01cbb0e commit 596417283722ee62ed17aed1c875ad90c01cbb0e Author: Alexander V. Chernikov AuthorDate: 2021-02-22 21:42:27 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-02-22 23:37:59 +0000 Simplify ifa/ifp refcounting in the routing stack. The routing stack control depends on quite a tree of functions to determine the proper attributes of a route such as a source address (ifa) or transmit ifp of a route. When actually inserting a route, the stack needs to ensure that ifa and ifp points to the entities that are still valid. Validity means slightly more than just pointer validity - stack need guarantee that the provided objects are not scheduled for deletion. Currently, callers either ignore it (most ifp parts, historically) or try to use refcounting (ifa parts). Even in case of ifa refcounting it's not always implemented in fully-safe manner. For example, some codepaths inside rt_getifa_fib() are referencing ifa while not holding any locks, resulting in possibility of referencing scheduled-for-deletion ifa. Instead of trying to fix all of the callers by enforcing proper refcounting, switch to a different model. As the rib_action() already requires epoch, do not require any stability guarantees other than the epoch-provided one. Use newly-added conditional versions of the refcounting functions (ifa_try_ref(), if_try_ref()) and fail if any of these fails. Reviewed by: donner MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28837 --- sys/net/route.c | 14 +++-------- sys/net/route/nhop_ctl.c | 58 ++++++++++++++++++++++++++----------------- sys/net/route/route_ctl.c | 17 ++----------- sys/net/route/route_ifaddrs.c | 12 ++------- 4 files changed, 42 insertions(+), 59 deletions(-) diff --git a/sys/net/route.c b/sys/net/route.c index a68e46c37861..d2b405fafcbf 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -207,7 +207,6 @@ rib_add_redirect(u_int fibnum, struct sockaddr *dst, struct sockaddr *gateway, /* Get the best ifa for the given interface and gateway. */ if ((ifa = ifaof_ifpforaddr(gateway, ifp)) == NULL) return (ENETUNREACH); - ifa_ref(ifa); bzero(&info, sizeof(info)); info.rti_info[RTAX_DST] = dst; @@ -224,7 +223,6 @@ rib_add_redirect(u_int fibnum, struct sockaddr *dst, struct sockaddr *gateway, info.rti_rmx = &rti_rmx; error = rib_action(fibnum, RTM_ADD, &info, &rc); - ifa_free(ifa); if (error != 0) { /* TODO: add per-fib redirect stats. */ @@ -518,8 +516,7 @@ rt_flushifroutes(struct ifnet *ifp) } /* - * Look up rt_addrinfo for a specific fib. Note that if rti_ifa is defined, - * it will be referenced so the caller must free it. + * Look up rt_addrinfo for a specific fib. * * Assume basic consistency checks are executed by callers: * RTAX_DST exists, if RTF_GATEWAY is set, RTAX_GATEWAY exists as well. @@ -528,8 +525,7 @@ int rt_getifa_fib(struct rt_addrinfo *info, u_int fibnum) { const struct sockaddr *dst, *gateway, *ifpaddr, *ifaaddr; - struct epoch_tracker et; - int needref, error, flags; + int error, flags; dst = info->rti_info[RTAX_DST]; gateway = info->rti_info[RTAX_GATEWAY]; @@ -542,8 +538,6 @@ rt_getifa_fib(struct rt_addrinfo *info, u_int fibnum) * when protocol address is ambiguous. */ error = 0; - needref = (info->rti_ifa == NULL); - NET_EPOCH_ENTER(et); /* If we have interface specified by the ifindex in the address, use it */ if (info->rti_ifp == NULL && ifpaddr != NULL && @@ -598,13 +592,11 @@ rt_getifa_fib(struct rt_addrinfo *info, u_int fibnum) info->rti_ifa = ifa_ifwithroute(flags, sa, sa, fibnum); } - if (needref && info->rti_ifa != NULL) { + if (info->rti_ifa != NULL) { if (info->rti_ifp == NULL) info->rti_ifp = info->rti_ifa->ifa_ifp; - ifa_ref(info->rti_ifa); } else error = ENETUNREACH; - NET_EPOCH_EXIT(et); return (error); } diff --git a/sys/net/route/nhop_ctl.c b/sys/net/route/nhop_ctl.c index 7de553799fab..92b43871d604 100644 --- a/sys/net/route/nhop_ctl.c +++ b/sys/net/route/nhop_ctl.c @@ -84,7 +84,7 @@ static int get_nhop(struct rib_head *rnh, struct rt_addrinfo *info, struct nhop_priv **pnh_priv); static int finalize_nhop(struct nh_control *ctl, struct rt_addrinfo *info, struct nhop_priv *nh_priv); -static struct ifnet *get_aifp(const struct nhop_object *nh, int reference); +static struct ifnet *get_aifp(const struct nhop_object *nh); static void fill_sdl_from_ifp(struct sockaddr_dl_short *sdl, const struct ifnet *ifp); static void destroy_nhop_epoch(epoch_context_t ctx); @@ -120,12 +120,10 @@ nhops_init(void) * this interface ifp instead of loopback. This is needed to support * link-local IPv6 loopback communications. * - * If @reference is non-zero, found ifp is referenced. - * * Returns found ifp. */ static struct ifnet * -get_aifp(const struct nhop_object *nh, int reference) +get_aifp(const struct nhop_object *nh) { struct ifnet *aifp = NULL; @@ -138,21 +136,15 @@ get_aifp(const struct nhop_object *nh, int reference) */ if ((nh->nh_ifp->if_flags & IFF_LOOPBACK) && nh->gw_sa.sa_family == AF_LINK) { - if (reference) - aifp = ifnet_byindex_ref(nh->gwl_sa.sdl_index); - else - aifp = ifnet_byindex(nh->gwl_sa.sdl_index); + aifp = ifnet_byindex(nh->gwl_sa.sdl_index); if (aifp == NULL) { DPRINTF("unable to get aifp for %s index %d", if_name(nh->nh_ifp), nh->gwl_sa.sdl_index); } } - if (aifp == NULL) { + if (aifp == NULL) aifp = nh->nh_ifp; - if (reference) - if_ref(aifp); - } return (aifp); } @@ -297,7 +289,7 @@ fill_nhop_from_info(struct nhop_priv *nh_priv, struct rt_addrinfo *info) nh->nh_ifp = info->rti_ifa->ifa_ifp; nh->nh_ifa = info->rti_ifa; /* depends on the gateway */ - nh->nh_aifp = get_aifp(nh, 0); + nh->nh_aifp = get_aifp(nh); /* * Note some of the remaining data is set by the @@ -438,7 +430,7 @@ alter_nhop_from_info(struct nhop_object *nh, struct rt_addrinfo *info) nh->nh_ifa = info->rti_ifa; if (info->rti_ifp != NULL) nh->nh_ifp = info->rti_ifp; - nh->nh_aifp = get_aifp(nh, 0); + nh->nh_aifp = get_aifp(nh); return (0); } @@ -512,6 +504,26 @@ alloc_nhop_structure() return (nh_priv); } +static bool +reference_nhop_deps(struct nhop_object *nh) +{ + if (!ifa_try_ref(nh->nh_ifa)) + return (false); + nh->nh_aifp = get_aifp(nh); + if (!if_try_ref(nh->nh_aifp)) { + ifa_free(nh->nh_ifa); + return (false); + } + DPRINTF("AIFP: %p nh_ifp %p", nh->nh_aifp, nh->nh_ifp); + if (!if_try_ref(nh->nh_ifp)) { + ifa_free(nh->nh_ifa); + if_rele(nh->nh_aifp); + return (false); + } + + return (true); +} + /* * Alocates/references the remaining bits of nexthop data and links * it to the hash table. @@ -522,9 +534,7 @@ static int finalize_nhop(struct nh_control *ctl, struct rt_addrinfo *info, struct nhop_priv *nh_priv) { - struct nhop_object *nh; - - nh = nh_priv->nh; + struct nhop_object *nh = nh_priv->nh; /* Allocate per-cpu packet counter */ nh->nh_pksent = counter_u64_alloc(M_NOWAIT); @@ -535,15 +545,17 @@ finalize_nhop(struct nh_control *ctl, struct rt_addrinfo *info, return (ENOMEM); } + if (!reference_nhop_deps(nh)) { + counter_u64_free(nh->nh_pksent); + uma_zfree(nhops_zone, nh); + RTSTAT_INC(rts_nh_alloc_failure); + DPRINTF("nh_alloc_finalize failed - reference failure"); + return (EAGAIN); + } + /* Save vnet to ease destruction */ nh_priv->nh_vnet = curvnet; - /* Reference external objects and calculate (referenced) ifa */ - if_ref(nh->nh_ifp); - ifa_ref(nh->nh_ifa); - nh->nh_aifp = get_aifp(nh, 1); - DPRINTF("AIFP: %p nh_ifp %p", nh->nh_aifp, nh->nh_ifp); - refcount_init(&nh_priv->nh_refcnt, 1); /* Please see nhop_free() comments on the initial value */ diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c index 9aedfb9d5855..e07a94295b89 100644 --- a/sys/net/route/route_ctl.c +++ b/sys/net/route/route_ctl.c @@ -589,12 +589,9 @@ create_rtentry(struct rib_head *rnh, struct rt_addrinfo *info, error = rt_getifa_fib(info, rnh->rib_fibnum); if (error) return (error); - } else { - ifa_ref(info->rti_ifa); } error = nhop_create_from_info(rnh, info, &nh); - ifa_free(info->rti_ifa); if (error != 0) return (error); @@ -912,7 +909,6 @@ static int change_nhop(struct rib_head *rnh, struct rt_addrinfo *info, struct nhop_object *nh_orig, struct nhop_object **nh_new) { - int free_ifa = 0; int error; /* @@ -926,24 +922,15 @@ change_nhop(struct rib_head *rnh, struct rt_addrinfo *info, (info->rti_info[RTAX_IFA] != NULL && !sa_equal(info->rti_info[RTAX_IFA], nh_orig->nh_ifa->ifa_addr))) { error = rt_getifa_fib(info, rnh->rib_fibnum); - if (info->rti_ifa != NULL) - free_ifa = 1; if (error != 0) { - if (free_ifa) { - ifa_free(info->rti_ifa); - info->rti_ifa = NULL; - } - + info->rti_ifa = NULL; return (error); } } error = nhop_create_from_nhop(rnh, nh_orig, info, nh_new); - if (free_ifa) { - ifa_free(info->rti_ifa); - info->rti_ifa = NULL; - } + info->rti_ifa = NULL; return (error); } diff --git a/sys/net/route/route_ifaddrs.c b/sys/net/route/route_ifaddrs.c index 6e264327d66d..e6d97f3c74f0 100644 --- a/sys/net/route/route_ifaddrs.c +++ b/sys/net/route/route_ifaddrs.c @@ -143,7 +143,6 @@ ifa_maintain_loopback_route(int cmd, const char *otype, struct ifaddr *ifa, struct rt_addrinfo info; struct sockaddr_dl null_sdl; struct ifnet *ifp; - struct ifaddr *rti_ifa = NULL; ifp = ifa->ifa_ifp; @@ -153,12 +152,8 @@ ifa_maintain_loopback_route(int cmd, const char *otype, struct ifaddr *ifa, info.rti_ifp = V_loif; if (cmd == RTM_ADD) { /* explicitly specify (loopback) ifa */ - if (info.rti_ifp != NULL) { - rti_ifa = ifaof_ifpforaddr(ifa->ifa_addr, info.rti_ifp); - if (rti_ifa != NULL) - ifa_ref(rti_ifa); - info.rti_ifa = rti_ifa; - } + if (info.rti_ifp != NULL) + info.rti_ifa = ifaof_ifpforaddr(ifa->ifa_addr, info.rti_ifp); } info.rti_flags = ifa->ifa_flags | RTF_HOST | RTF_STATIC | RTF_PINNED; info.rti_info[RTAX_DST] = ia; @@ -168,9 +163,6 @@ ifa_maintain_loopback_route(int cmd, const char *otype, struct ifaddr *ifa, error = rib_action(ifp->if_fib, cmd, &info, &rc); NET_EPOCH_EXIT(et); - if (rti_ifa != NULL) - ifa_free(rti_ifa); - if (error == 0 || (cmd == RTM_ADD && error == EEXIST) || (cmd == RTM_DELETE && (error == ENOENT || error == ESRCH))) From owner-dev-commits-src-main@freebsd.org Mon Feb 22 23:54:19 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2ABE255344D; Mon, 22 Feb 2021 23:54: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DkzYR0CPWz3GD0; Mon, 22 Feb 2021 23:54: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 EB8797020; Mon, 22 Feb 2021 23:54: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 11MNsIAI010112; Mon, 22 Feb 2021 23:54:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11MNsIvA010111; Mon, 22 Feb 2021 23:54:18 GMT (envelope-from git) Date: Mon, 22 Feb 2021 23:54:18 GMT Message-Id: <202102222354.11MNsIvA010111@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: 701d6b50ae7b - main - jail: Fix a LOR introduced in 1158508a8086 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: 701d6b50ae7b0b2b50fbd191c2dbd646ef3b4a67 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 23:54:19 -0000 The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=701d6b50ae7b0b2b50fbd191c2dbd646ef3b4a67 commit 701d6b50ae7b0b2b50fbd191c2dbd646ef3b4a67 Author: Jamie Gritton AuthorDate: 2021-02-22 23:51:10 +0000 Commit: Jamie Gritton CommitDate: 2021-02-22 23:51:10 +0000 jail: Fix a LOR introduced in 1158508a8086 --- sys/kern/kern_jail.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 01724e41955c..89dd039685a8 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -1851,6 +1851,10 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) #ifdef RACCT if (racct_enable && !created) { + if (drflags & PD_LOCKED) { + mtx_unlock(&pr->pr_mtx); + drflags &= ~PD_LOCKED; + } if (drflags & PD_LIST_XLOCKED) { sx_xunlock(&allprison_lock); drflags &= ~PD_LIST_XLOCKED; From owner-dev-commits-src-main@freebsd.org Tue Feb 23 00:10:50 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E23FB5548F8; Tue, 23 Feb 2021 00:10: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DkzwV61Ggz3HZy; Tue, 23 Feb 2021 00:10: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 C16ED73F0; Tue, 23 Feb 2021 00:10: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 11N0Ao98032783; Tue, 23 Feb 2021 00:10:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11N0Aoac032782; Tue, 23 Feb 2021 00:10:50 GMT (envelope-from git) Date: Tue, 23 Feb 2021 00:10:50 GMT Message-Id: <202102230010.11N0Aoac032782@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: 7f06b217c53c - main - amd64: import asm strlen into libc 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: 7f06b217c53c3f5e4ac81eb11125adfb71359ac6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 00:10:50 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=7f06b217c53c3f5e4ac81eb11125adfb71359ac6 commit 7f06b217c53c3f5e4ac81eb11125adfb71359ac6 Author: Mateusz Guzik AuthorDate: 2021-02-21 21:20:04 +0000 Commit: Mateusz Guzik CommitDate: 2021-02-23 00:09:55 +0000 amd64: import asm strlen into libc Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D28845 --- lib/libc/amd64/string/Makefile.inc | 1 + lib/libc/amd64/string/strlen.S | 81 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/lib/libc/amd64/string/Makefile.inc b/lib/libc/amd64/string/Makefile.inc index db88ac723539..cb370bc6be1c 100644 --- a/lib/libc/amd64/string/Makefile.inc +++ b/lib/libc/amd64/string/Makefile.inc @@ -8,4 +8,5 @@ MDSRCS+= \ memset.S \ strcat.S \ strcmp.S \ + strlen.S \ stpcpy.S diff --git a/lib/libc/amd64/string/strlen.S b/lib/libc/amd64/string/strlen.S new file mode 100644 index 000000000000..1d2428e3420e --- /dev/null +++ b/lib/libc/amd64/string/strlen.S @@ -0,0 +1,81 @@ +/* + * Written by Mateusz Guzik + * Public domain. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Note: this routine was written with kernel use in mind (read: no simd), + * it is only present in userspace as a temporary measure until something + * better gets imported. + */ + +#define ALIGN_TEXT .p2align 4,0x90 /* 16-byte alignment, nop filled */ + +/* + * strlen(string) + * %rdi + * + * Uses the ((x - 0x01....01) & ~x & 0x80....80) trick. + * + * 0x01....01 is replaced with 0x0 - 0x01....01 so that it can be added + * with leaq. + * + * For a description see either: + * - "Hacker's Delight" by Henry S. Warren, Jr. + * - "Optimizing subroutines in assembly language: An optimization guide for x86 platforms" + * by Agner Fog + * + * The latter contains a 32-bit variant of the same algorithm coded in assembly for i386. + */ +ENTRY(strlen) + movabsq $0xfefefefefefefeff,%r8 + movabsq $0x8080808080808080,%r9 + + movq %rdi,%r10 + movq %rdi,%rcx + testb $7,%dil + jz 2f + + /* + * Handle misaligned reads: align to 8 and fill + * the spurious bytes. + */ + andq $~7,%rdi + movq (%rdi),%r11 + shlq $3,%rcx + movq $-1,%rdx + shlq %cl,%rdx + notq %rdx + orq %rdx,%r11 + + leaq (%r11,%r8),%rcx + notq %r11 + andq %r11,%rcx + andq %r9,%rcx + jnz 3f + + /* + * Main loop. + */ + ALIGN_TEXT +1: + leaq 8(%rdi),%rdi +2: + movq (%rdi),%r11 + leaq (%r11,%r8),%rcx + notq %r11 + andq %r11,%rcx + andq %r9,%rcx + jz 1b +3: + bsfq %rcx,%rcx + shrq $3,%rcx + leaq (%rcx,%rdi),%rax + subq %r10,%rax + ret +END(strlen) + + .section .note.GNU-stack,"",%progbits From owner-dev-commits-src-main@freebsd.org Tue Feb 23 01:04:38 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3FDC2555CE1; Tue, 23 Feb 2021 01:04: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dl16Z1PzDz3N0c; Tue, 23 Feb 2021 01:04: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 236637A6F; Tue, 23 Feb 2021 01:04: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 11N14cRX003616; Tue, 23 Feb 2021 01:04:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11N14caN003615; Tue, 23 Feb 2021 01:04:38 GMT (envelope-from git) Date: Tue, 23 Feb 2021 01:04:38 GMT Message-Id: <202102230104.11N14caN003615@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: 0a2a96f35a4c - main - jail: Don't allow jails under dying parents 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: 0a2a96f35a4c2dab3486438680fa289e12971e4b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 01:04:38 -0000 The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=0a2a96f35a4c2dab3486438680fa289e12971e4b commit 0a2a96f35a4c2dab3486438680fa289e12971e4b Author: Jamie Gritton AuthorDate: 2021-02-23 01:04:06 +0000 Commit: Jamie Gritton CommitDate: 2021-02-23 01:04:06 +0000 jail: Don't allow jails under dying parents If a jail is created with jail_set(...JAIL_DYING), and it has a parent currently in a dying state, that will bring the parent jail back to life. Restrict that to require that the parent itself be explicitly brought back first, and not implicitly created along with the new child jail. Differential Revision: https://reviews.freebsd.org/D28515 --- sys/kern/kern_jail.c | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 89dd039685a8..4f434637ccfa 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -990,7 +990,6 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) * This abuses the file error codes ENOENT and EEXIST. */ pr = NULL; - ppr = mypr; inspr = NULL; if (cuflags == JAIL_CREATE && jid == 0 && name != NULL) { namelc = strrchr(name, '.'); @@ -999,6 +998,12 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) jid = 0; } sx_xlock(&allprison_lock); + ppr = mypr; + if (!prison_isalive(ppr)) { + /* This jail is dying. This process will surely follow. */ + error = EAGAIN; + goto done_deref; + } drflags = PD_LIST_XLOCKED; if (jid != 0) { if (jid < 0) { @@ -1022,7 +1027,6 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) break; } if (pr != NULL) { - ppr = pr->pr_parent; /* Create: jid must not exist. */ if (cuflags == JAIL_CREATE) { /* @@ -1044,6 +1048,13 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) vfs_opterror(opts, "jail %d not found", jid); goto done_deref; } + ppr = pr->pr_parent; + if (!prison_isalive(ppr)) { + error = ENOENT; + vfs_opterror(opts, "jail %d is dying", + ppr->pr_id); + goto done_deref; + } if (!prison_isalive(pr)) { if (!(flags & JAIL_DYING)) { error = ENOENT; @@ -1109,15 +1120,13 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) "jail \"%s\" not found", name); goto done_deref; } - if (!(flags & JAIL_DYING) && - !prison_isalive(ppr)) { - mtx_unlock(&ppr->pr_mtx); + mtx_unlock(&ppr->pr_mtx); + if (!prison_isalive(ppr)) { error = ENOENT; vfs_opterror(opts, "jail \"%s\" is dying", name); goto done_deref; } - mtx_unlock(&ppr->pr_mtx); *namelc = '.'; } namelc++; @@ -1196,26 +1205,9 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) vfs_opterror(opts, "prison limit exceeded"); goto done_deref; } - prison_hold(ppr); - if (!refcount_acquire_if_not_zero(&ppr->pr_uref)) { - /* This brings the parent back to life. */ - mtx_lock(&ppr->pr_mtx); - refcount_acquire(&ppr->pr_uref); - ppr->pr_state = PRISON_STATE_ALIVE; - mtx_unlock(&ppr->pr_mtx); - error = osd_jail_call(ppr, PR_METHOD_CREATE, opts); - if (error) { - pr = ppr; - drflags |= PD_DEREF | PD_DEUREF; - goto done_deref; - } - } - if (jid == 0 && (jid = get_next_prid(&inspr)) == 0) { error = EAGAIN; vfs_opterror(opts, "no available jail IDs"); - pr = ppr; - drflags |= PD_DEREF | PD_DEUREF; goto done_deref; } @@ -1235,6 +1227,8 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) TAILQ_INSERT_TAIL(&allprison, pr, pr_list); pr->pr_parent = ppr; + prison_hold(ppr); + prison_proc_hold(ppr); LIST_INSERT_HEAD(&ppr->pr_children, pr, pr_sibling); for (tpr = ppr; tpr != NULL; tpr = tpr->pr_parent) tpr->pr_childcount++; From owner-dev-commits-src-main@freebsd.org Tue Feb 23 02:03:58 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E37AA559665; Tue, 23 Feb 2021 02:03: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dl2R268kQz3kX6; Tue, 23 Feb 2021 02:03: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 C61DE10F29; Tue, 23 Feb 2021 02:03: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 11N23wvQ082117; Tue, 23 Feb 2021 02:03:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11N23wVU082116; Tue, 23 Feb 2021 02:03:58 GMT (envelope-from git) Date: Tue, 23 Feb 2021 02:03:58 GMT Message-Id: <202102230203.11N23wVU082116@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric Joyner Subject: git: a7ac518bff64 - main - ice_ddp: Update package file to 1.3.19.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7ac518bff64d48cf262c60c4dc57eef34e74a07 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 02:03:59 -0000 The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=a7ac518bff64d48cf262c60c4dc57eef34e74a07 commit a7ac518bff64d48cf262c60c4dc57eef34e74a07 Author: Eric Joyner AuthorDate: 2021-02-23 01:43:54 +0000 Commit: Eric Joyner CommitDate: 2021-02-23 02:02:19 +0000 ice_ddp: Update package file to 1.3.19.0 This package is intended to be used with ice(4) version 0.28.1-k. That update will happen in a forthcoming commit. Signed-off-by: Eric Joyner Sponsored by: Intel Corporation --- sys/conf/files.amd64 | 6 +++--- sys/conf/files.arm64 | 6 +++--- sys/contrib/dev/ice/LICENSE | 2 +- .../dev/ice/{ice-1.3.16.0.pkg => ice-1.3.19.0.pkg} | Bin 659716 -> 614660 bytes sys/modules/ice_ddp/Makefile | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 395f501198f8..f0c863e0bd2f 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -190,7 +190,7 @@ dev/ice/ice_sriov.c optional ice pci \ dev/ice/ice_switch.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031000 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031300 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp \ @@ -199,8 +199,8 @@ ice_ddp.fwo optional ice_ddp \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp \ - dependency "$S/contrib/dev/ice/ice-1.3.16.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.16.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.19.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.19.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" dev/ioat/ioat.c optional ioat pci diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index c1e5b40db3f9..3ca830f64f05 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -202,7 +202,7 @@ dev/ice/ice_sriov.c optional ice pci \ dev/ice/ice_switch.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031000 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031300 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp \ @@ -211,8 +211,8 @@ ice_ddp.fwo optional ice_ddp \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp \ - dependency "$S/contrib/dev/ice/ice-1.3.16.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.16.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.19.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.19.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" diff --git a/sys/contrib/dev/ice/LICENSE b/sys/contrib/dev/ice/LICENSE index 7daf627fc7a0..7faadfc55aac 100644 --- a/sys/contrib/dev/ice/LICENSE +++ b/sys/contrib/dev/ice/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2006-2018, Intel Corporation. +Copyright (c) 2006-2021, Intel Corporation. All rights reserved. Redistribution. Redistribution and use in binary form, without diff --git a/sys/contrib/dev/ice/ice-1.3.16.0.pkg b/sys/contrib/dev/ice/ice-1.3.19.0.pkg similarity index 79% rename from sys/contrib/dev/ice/ice-1.3.16.0.pkg rename to sys/contrib/dev/ice/ice-1.3.19.0.pkg index ec5caecb3a72..32e2603bc131 100644 Binary files a/sys/contrib/dev/ice/ice-1.3.16.0.pkg and b/sys/contrib/dev/ice/ice-1.3.19.0.pkg differ diff --git a/sys/modules/ice_ddp/Makefile b/sys/modules/ice_ddp/Makefile index e6f45ae3820b..38337a106368 100644 --- a/sys/modules/ice_ddp/Makefile +++ b/sys/modules/ice_ddp/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ KMOD= ice_ddp -FIRMWS= ${SRCTOP}/sys/contrib/dev/ice/ice-1.3.16.0.pkg:ice_ddp:0x01031000 +FIRMWS= ${SRCTOP}/sys/contrib/dev/ice/ice-1.3.19.0.pkg:ice_ddp:0x01031300 .include From owner-dev-commits-src-main@freebsd.org Tue Feb 23 09:46:27 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 777AF564C05; Tue, 23 Feb 2021 09:46: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlDhg2xMtz4jWK; Tue, 23 Feb 2021 09:46: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 57C6C17168; Tue, 23 Feb 2021 09:46: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 11N9kRPG088152; Tue, 23 Feb 2021 09:46:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11N9kRKX088151; Tue, 23 Feb 2021 09:46:27 GMT (envelope-from git) Date: Tue, 23 Feb 2021 09:46:27 GMT Message-Id: <202102230946.11N9kRKX088151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: f3f7b0dc065c - main - lib/msun/ctrig_test: Print the mismatched values on failure MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f3f7b0dc065ce30f29b221788c58079d78931a77 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 09:46:27 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=f3f7b0dc065ce30f29b221788c58079d78931a77 commit f3f7b0dc065ce30f29b221788c58079d78931a77 Author: Alex Richardson AuthorDate: 2021-02-23 09:38:57 +0000 Commit: Alex Richardson CommitDate: 2021-02-23 09:39:40 +0000 lib/msun/ctrig_test: Print the mismatched values on failure This test fails on aarch64 but debugging it is difficult without the results being printed. Now the failing AArch64 test prints: root@freebsd-aarch64:/nfsroot/usr/tests/lib/msun # kyua debug ctrig_test:test_nan_inputs *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: (ctan)(_d) (0 + -1 I) != expected (-0 + -1 I) *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: ctan fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) (0x10) != 0 *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: (ctan)(_d) (0 + 1 I) != expected (-0 + 1 I) *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: ctan fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) (0x10) != 0 *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: (ctanf)(_d) (0 + -1 I) != expected (-0 + -1 I) *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: ctanf fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) (0x10) != 0 *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: (ctanf)(_d) (0 + 1 I) != expected (-0 + 1 I) *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: ctanf fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) (0x10) != 0 *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: (ctanh)(_d) (1 + 0 I) != expected (1 + -0 I) *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: ctanh fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) (0x10) != 0 *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: (ctanhf)(_d) (1 + 0 I) != expected (1 + -0 I) *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: ctanhf fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) (0x10) != 0 *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: (ctanh)(_d) (-1 + 0 I) != expected (-1 + -0 I) *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: ctanh fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) (0x10) != 0 *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: (ctanhf)(_d) (-1 + 0 I) != expected (-1 + -0 I) *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: ctanhf fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) (0x10) != 0 ctrig_test:test_nan_inputs -> failed: 16 checks failed; see output for more details Reviewed By: ngie Differential Revision: https://reviews.freebsd.org/D28788 --- lib/msun/tests/ctrig_test.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/lib/msun/tests/ctrig_test.c b/lib/msun/tests/ctrig_test.c index b40373fed29b..2499e53ab4d5 100644 --- a/lib/msun/tests/ctrig_test.c +++ b/lib/msun/tests/ctrig_test.c @@ -58,14 +58,22 @@ __FBSDID("$FreeBSD$"); * XXX The volatile here is to avoid gcc's bogus constant folding and work * around the lack of support for the FENV_ACCESS pragma. */ -#define test_p(func, z, result, exceptmask, excepts, checksign) do { \ - volatile long double complex _d = z; \ - debug(" testing %s(%Lg + %Lg I) == %Lg + %Lg I\n", #func, \ - creall(_d), cimagl(_d), creall(result), cimagl(result)); \ - ATF_CHECK(feclearexcept(FE_ALL_EXCEPT) == 0); \ - ATF_CHECK(cfpequal_cs((func)(_d), (result), (checksign))); \ - ATF_CHECK(((void)(func), fetestexcept(exceptmask) == (excepts))); \ -} while (0) +#define test_p(func, z, result, exceptmask, excepts, checksign) \ + do { \ + volatile long double complex _d = z; \ + debug(" testing %s(%Lg + %Lg I) == %Lg + %Lg I\n", #func, \ + creall(_d), cimagl(_d), creall(result), cimagl(result)); \ + ATF_CHECK(feclearexcept(FE_ALL_EXCEPT) == 0); \ + volatile long double complex _r = (func)(_d); \ + ATF_CHECK_MSG(cfpequal_cs(_r, (result), (checksign)), \ + "%s (%Lg + %Lg I) != expected (%Lg + %Lg I)", \ + __XSTRING((func)(_d)), creall(_r), cimagl(_r), \ + creall(result), cimagl(result)); \ + volatile int _e = fetestexcept(exceptmask); \ + ATF_CHECK_MSG(_e == (excepts), \ + "%s fetestexcept(%s) (%#x) != %#x", __XSTRING(func), \ + __XSTRING(exceptmask), _e, (excepts)); \ + } while (0) /* * Test within a given tolerance. The tolerance indicates relative error From owner-dev-commits-src-main@freebsd.org Tue Feb 23 10:27:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7477F5660B9; Tue, 23 Feb 2021 10:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlFc62wc7z4lrL; Tue, 23 Feb 2021 10:27: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 4CA9317A29; Tue, 23 Feb 2021 10:27: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 11NARYIr041281; Tue, 23 Feb 2021 10:27:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NARYYE041280; Tue, 23 Feb 2021 10:27:34 GMT (envelope-from git) Date: Tue, 23 Feb 2021 10:27:34 GMT Message-Id: <202102231027.11NARYYE041280@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 77e1ccbee3ed - main - rc: implement parallel boot MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 10:27:34 -0000 The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=77e1ccbee3ed6c837929e4e232fd07f95bfc8294 commit 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 Author: Rick Parrish AuthorDate: 2021-02-07 06:15:21 +0000 Commit: Baptiste Daroussin CommitDate: 2021-02-23 10:16:53 +0000 rc: implement parallel boot take advantage of the rcorder -p argument to implement parallel booting in rc. According to the author non scientific tests: on a Core 2 Duo with spinning disk: | Services enabled | before | after | saving | | 0 | 8s | 8s | 0 | | 1 | 13s | 13s | 0 | | 2 | 17s | 13s | 5 | | 3 | 23s | 13s | 10 | | 4 | 28s | 13s | 15 | | 5 | 33s | 13s | 20 | PR: 249192 MFC after: 3 weeks --- libexec/rc/rc | 49 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/libexec/rc/rc b/libexec/rc/rc index 35db4a850516..722d7fe35884 100644 --- a/libexec/rc/rc +++ b/libexec/rc/rc @@ -91,19 +91,31 @@ if ! [ -e ${firstboot_sentinel} ]; then skip_firstboot="-s firstboot" fi +# rc_parallel_start default is "NO" +rc_parallel_start=${rc_parallel_start:-NO} +_rc_parallel='' +# enable rcorder -p if /etc/rc.conf rc_parallel_start is "YES" +checkyesno rc_parallel_start && _rc_parallel='-p' + # Do a first pass to get everything up to $early_late_divider so that # we can do a second pass that includes $local_startup directories # -files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* 2>/dev/null` +files=`rcorder ${skip} ${skip_firstboot} ${_rc_parallel} /etc/rc.d/* 2>/dev/null` _rc_elem_done=' ' -for _rc_elem in ${files}; do - run_rc_script ${_rc_elem} ${_boot} - _rc_elem_done="${_rc_elem_done}${_rc_elem} " - - case "$_rc_elem" in - */${early_late_divider}) break ;; - esac +IFS=$'\n' +for _rc_group in ${files}; do + IFS=$' ' + for _rc_elem in ${_rc_group}; do + run_rc_script ${_rc_elem} ${_boot} & + _rc_elem_done="${_rc_elem_done}${_rc_elem} " + + case "$_rc_elem" in + */${early_late_divider}) break ;; + esac + done + wait + IFS=$'\n' done unset files local_rc @@ -122,14 +134,21 @@ if [ -e ${firstboot_sentinel} ]; then skip_firstboot="" fi -files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} 2>/dev/null` -for _rc_elem in ${files}; do - case "$_rc_elem_done" in - *" $_rc_elem "*) continue ;; - esac - - run_rc_script ${_rc_elem} ${_boot} +files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} ${_rc_parallel} 2>/dev/null` +IFS=$'\n' +for _rc_group in ${files}; do + IFS=$' ' + for _rc_elem in ${_rc_group}; do + case "$_rc_elem_done" in + *" $_rc_elem "*) continue ;; + esac + + run_rc_script ${_rc_elem} ${_boot} & + done + wait + IFS=$'\n' done +unset IFS # Remove the firstboot sentinel, and reboot if it was requested. # Be a bit paranoid about removing it to handle the common failure From owner-dev-commits-src-main@freebsd.org Tue Feb 23 13:16:05 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 910A95436BC; Tue, 23 Feb 2021 13:16:05 +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 4DlKLY3L9yz3Dwx; Tue, 23 Feb 2021 13:16:05 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: by mail-ej1-f51.google.com with SMTP id do6so34518088ejc.3; Tue, 23 Feb 2021 05:16:05 -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=yLKmLe9U51rA5x3Dbp56Fu2iC4m6hj8bW3+ZKX9xSZ0=; b=XyJnuOEujj4WUbBVG2kbNaN9ODZOegpcAweeJDQZv2a3idRc209l/qS+BvAjizF0Hp ApeDrpS/4q4LDx1jBLlt7u7N7DVSKXkVRsiZgTVbjRZaF3czYYG33H0MPKns0aoxlPMS UHPm3P0wzz4Hf3ANeS8a4lbhQ/Skinmzj+lR/2hXzf6rnDVjmrTinsEjForZ9wHkw8V9 JVNUL9OYJYgyDArum0lgC7Qnegq9m9V4zrxeZxmrOaK+2gLNBFyeWnMBYLRDWpKSiTAm hbrlUNaalZsw9Hbr2m3j73PPl7yAzm14fd/wGpwC+o2kyohX4jJh5m4kcLvAAdd23pmy IKQg== X-Gm-Message-State: AOAM532YPyPRVLSufePT9Mx5szydzLcvj/rUEdZscyRDHvf+JITrHnBW xIjXiP4kwQOf1wdW90EUaS1vDGBjV7DVqA== X-Google-Smtp-Source: ABdhPJx0gz9DuiHXY4ZuZSA2wBrgz0HAuqLDMjfrChveZ1h0X+serxGmHpVGi4eF9gGWV5DW+Q6spA== X-Received: by 2002:a17:906:d0c3:: with SMTP id bq3mr25465743ejb.424.1614086162979; Tue, 23 Feb 2021 05:16:02 -0800 (PST) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com. [209.85.221.49]) by smtp.gmail.com with ESMTPSA id lf18sm7813987ejb.42.2021.02.23.05.16.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Feb 2021 05:16:02 -0800 (PST) Received: by mail-wr1-f49.google.com with SMTP id c7so5796129wru.8; Tue, 23 Feb 2021 05:16:02 -0800 (PST) X-Received: by 2002:adf:f484:: with SMTP id l4mr15624687wro.409.1614086162346; Tue, 23 Feb 2021 05:16:02 -0800 (PST) MIME-Version: 1.0 References: <202102222027.11MKRtcl033616@gitrepo.freebsd.org> In-Reply-To: <202102222027.11MKRtcl033616@gitrepo.freebsd.org> From: Alexander Richardson Date: Tue, 23 Feb 2021 13:15:51 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 811e27fa3c44 - main - jail: Add PD_KILL to remove a prison in prison_deref(). To: Jamie Gritton 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: 4DlKLY3L9yz3Dwx 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 13:16:05 -0000 On Mon, 22 Feb 2021 at 20:28, Jamie Gritton wrote: > > The branch main has been updated by jamie: > > URL: https://cgit.FreeBSD.org/src/commit/?id=811e27fa3c445664e36071a7d08228fc7fb85676 > > commit 811e27fa3c445664e36071a7d08228fc7fb85676 > Author: Jamie Gritton > AuthorDate: 2021-02-22 20:27:44 +0000 > Commit: Jamie Gritton > CommitDate: 2021-02-22 20:27:44 +0000 > > jail: Add PD_KILL to remove a prison in prison_deref(). > > Add the PD_KILL flag that instructs prison_deref() to take steps > to actively kill a prison and its descendents, namely marking it > PRISON_STATE_DYING, clearing its PR_PERSIST flag, and killing any > attached processes. > > This replaces a similar loop in sys_jail_remove(), bringing the > operation under the same single hold on allprison_lock that it already > has. It is also used to clean up failed jail (re-)creations in > kern_jail_set(), which didn't generally take all the proper steps. > > Differential Revision: https://reviews.freebsd.org/D28473 > --- > sys/kern/kern_jail.c | 258 ++++++++++++++++++++++++++++++++------------------- > sys/sys/jail.h | 13 +++ > 2 files changed, 178 insertions(+), 93 deletions(-) > > diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c > index 1ddfe3c3df5f..01724e41955c 100644 > --- a/sys/kern/kern_jail.c > +++ b/sys/kern/kern_jail.c > @@ -141,12 +141,13 @@ static int get_next_prid(struct prison **insprp); > static int do_jail_attach(struct thread *td, struct prison *pr, int drflags); > static void prison_complete(void *context, int pending); > static void prison_deref(struct prison *pr, int flags); > +static void prison_deref_kill(struct prison *pr, struct prisonlist *freeprison); > static int prison_lock_xlock(struct prison *pr, int flags); > static void prison_free_not_last(struct prison *pr); > +static void prison_proc_free_not_last(struct prison *pr); > static void prison_set_allow_locked(struct prison *pr, unsigned flag, > int enable); > static char *prison_path(struct prison *pr1, struct prison *pr2); > -static void prison_remove_one(struct prison *pr); > #ifdef RACCT > static void prison_racct_attach(struct prison *pr); > static void prison_racct_modify(struct prison *pr); > @@ -156,9 +157,10 @@ static void prison_racct_detach(struct prison *pr); > /* Flags for prison_deref */ > #define PD_DEREF 0x01 /* Decrement pr_ref */ > #define PD_DEUREF 0x02 /* Decrement pr_uref */ > -#define PD_LOCKED 0x04 /* pr_mtx is held */ > -#define PD_LIST_SLOCKED 0x08 /* allprison_lock is held shared */ > -#define PD_LIST_XLOCKED 0x10 /* allprison_lock is held exclusive */ > +#define PD_KILL 0x04 /* Remove jail, kill processes, etc */ > +#define PD_LOCKED 0x10 /* pr_mtx is held */ > +#define PD_LIST_SLOCKED 0x20 /* allprison_lock is held shared */ > +#define PD_LIST_XLOCKED 0x40 /* allprison_lock is held exclusive */ > > /* > * Parameter names corresponding to PR_* flag values. Size values are for kvm > @@ -1756,6 +1758,12 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) > pr->pr_flags = (pr->pr_flags & ~ch_flags) | pr_flags; > mtx_unlock(&pr->pr_mtx); > drflags &= ~PD_LOCKED; > + /* > + * Any errors past this point will need to de-persist newly created > + * prisons, as well as call remove methods. > + */ > + if (born) > + drflags |= PD_KILL; > > #ifdef RACCT > if (racct_enable && created) > @@ -1815,17 +1823,12 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) > /* Let the modules do their work. */ > if (born) { > error = osd_jail_call(pr, PR_METHOD_CREATE, opts); > - if (error) { > - (void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL); > + if (error) > goto done_deref; > - } > } > error = osd_jail_call(pr, PR_METHOD_SET, opts); > - if (error) { > - if (born) > - (void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL); > + if (error) > goto done_deref; > - } > > /* > * A new prison is now ready to be seen; either it has gained a user > @@ -1856,6 +1859,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) > } > #endif > > + drflags &= ~PD_KILL; > td->td_retval[0] = pr->pr_id; > > done_deref: > @@ -2279,8 +2283,8 @@ kern_jail_get(struct thread *td, struct uio *optuio, int flags) > int > sys_jail_remove(struct thread *td, struct jail_remove_args *uap) > { > - struct prison *pr, *cpr, *lpr; > - int descend, error; > + struct prison *pr; > + int error; > > error = priv_check(td, PRIV_JAIL_REMOVE); > if (error) > @@ -2292,90 +2296,16 @@ sys_jail_remove(struct thread *td, struct jail_remove_args *uap) > sx_xunlock(&allprison_lock); > return (EINVAL); > } > - > - /* Remove all descendants of this prison, then remove this prison. */ > - prison_hold(pr); > - if (!LIST_EMPTY(&pr->pr_children)) { > + if (!prison_isalive(pr)) { > + /* Silently ignore already-dying prisons. */ > mtx_unlock(&pr->pr_mtx); > - lpr = NULL; > - FOREACH_PRISON_DESCENDANT(pr, cpr, descend) { > - prison_hold(cpr); > - if (lpr != NULL) { > - mtx_lock(&lpr->pr_mtx); > - prison_remove_one(lpr); > - sx_xlock(&allprison_lock); > - } > - lpr = cpr; > - } > - if (lpr != NULL) { > - mtx_lock(&lpr->pr_mtx); > - prison_remove_one(lpr); > - sx_xlock(&allprison_lock); > - } > - mtx_lock(&pr->pr_mtx); > + sx_xunlock(&allprison_lock); > + return (0); > } > - prison_remove_one(pr); > + prison_deref(pr, PD_KILL | PD_LOCKED | PD_LIST_XLOCKED); > return (0); > } > > -static void > -prison_remove_one(struct prison *pr) > -{ > - struct proc *p; > - int was_alive, drflags; > - > - drflags = PD_DEREF | PD_LOCKED | PD_LIST_XLOCKED; > - > - /* > - * Mark the prison as doomed, so it doesn't accidentally come back > - * to life. It may still be explicitly brought back by jail_set(2). > - */ > - was_alive = pr->pr_state == PRISON_STATE_ALIVE; > - pr->pr_state = PRISON_STATE_DYING; > - > - /* If the prison was persistent, it is not anymore. */ > - if (pr->pr_flags & PR_PERSIST) { > - drflags |= PD_DEUREF; > - prison_free_not_last(pr); > - pr->pr_flags &= ~PR_PERSIST; > - } > - > - /* > - * jail_remove added a reference. If that's the only one, remove > - * the prison now. refcount(9) doesn't guarantee the cache coherence > - * of non-zero counters, so force it here. > - */ > - KASSERT(refcount_load(&pr->pr_ref) > 0, > - ("prison_remove_one removing a dead prison (jid=%d)", pr->pr_id)); > - if (atomic_load_acq_int(&pr->pr_ref) == 1) { > - prison_deref(pr, drflags); > - return; > - } > - > - /* Tell modules this prison has died. */ > - mtx_unlock(&pr->pr_mtx); > - drflags &= ~PD_LOCKED; > - if (was_alive) > - (void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL); > - > - sx_xunlock(&allprison_lock); > - drflags &= ~PD_LIST_XLOCKED; > - /* > - * Kill all processes unfortunate enough to be attached to this prison. > - */ > - sx_slock(&allproc_lock); > - FOREACH_PROC_IN_SYSTEM(p) { > - PROC_LOCK(p); > - if (p->p_state != PRS_NEW && p->p_ucred && > - p->p_ucred->cr_prison == pr) > - kern_psignal(p, SIGKILL); > - PROC_UNLOCK(p); > - } > - sx_sunlock(&allproc_lock); > - /* Remove the temporary reference added by jail_remove. */ > - prison_deref(pr, drflags); > -} > - > /* > * struct jail_attach_args { > * int jid; > @@ -2727,6 +2657,24 @@ prison_proc_free(struct prison *pr) > } > } > > +static void > +prison_proc_free_not_last(struct prison *pr) > +{ > +#ifdef INVARIANTS > + int lastref; > + > + KASSERT(refcount_load(&pr->pr_uref) > 0, > + ("Trying to free dead prison %p (jid=%d).", > + pr, pr->pr_id)); > + lastref = refcount_release(&pr->pr_uref); > + KASSERT(!lastref, > + ("prison_proc_free_not_last freed last uref on prison %p (jid=%d).", > + pr, pr->pr_id)); > +#else > + refcount_release(&pr->pr_uref); > +#endif > +} > + > /* > * Complete a call to either prison_free or prison_proc_free. > */ > @@ -2760,14 +2708,25 @@ static void > prison_deref(struct prison *pr, int flags) > { > struct prisonlist freeprison; > - struct prison *rpr, *ppr, *tpr; > + struct prison *killpr, *rpr, *ppr, *tpr; > + struct proc *p; > > + killpr = NULL; > TAILQ_INIT(&freeprison); > /* > * Release this prison as requested, which may cause its parent > * to be released, and then maybe its grandparent, etc. > */ > for (;;) { > + if (flags & PD_KILL) { > + /* Kill the prison and its descendents. */ > + if (!(flags & PD_DEREF)) { > + prison_hold(pr); > + flags |= PD_DEREF; > + } > + flags = prison_lock_xlock(pr, flags); > + prison_deref_kill(pr, &freeprison); > + } > if (flags & PD_DEUREF) { > /* Drop a user reference. */ > KASSERT(refcount_load(&pr->pr_uref) > 0, > @@ -2796,6 +2755,16 @@ prison_deref(struct prison *pr, int flags) > } > } > } > + if (flags & PD_KILL) { > + flags &= ~PD_KILL; > + /* > + * Any remaining user references are probably processes > + * that need to be killed, either in this prison or its > + * descendants. > + */ > + if (refcount_load(&pr->pr_uref) > 0) > + killpr = pr; > + } > if (flags & PD_DEREF) { > /* Drop a reference. */ > KASSERT(refcount_load(&pr->pr_ref) > 0, > @@ -2848,6 +2817,25 @@ prison_deref(struct prison *pr, int flags) > else if (flags & PD_LIST_XLOCKED) > sx_xunlock(&allprison_lock); > > + /* Kill any processes attached to a killed prison. */ > + if (killpr != NULL) { > + sx_slock(&allproc_lock); > + FOREACH_PROC_IN_SYSTEM(p) { > + PROC_LOCK(p); > + if (p->p_state != PRS_NEW && p->p_ucred != NULL) { > + for (ppr = p->p_ucred->cr_prison; > + ppr != &prison0; > + ppr = ppr->pr_parent) > + if (ppr == killpr) { > + kern_psignal(p, SIGKILL); > + break; > + } > + } > + PROC_UNLOCK(p); > + } > + sx_sunlock(&allproc_lock); > + } > + > /* > * Finish removing any unreferenced prisons, which couldn't happen > * while allprison_lock was held (to avoid a LOR on vrele). > @@ -2878,6 +2866,90 @@ prison_deref(struct prison *pr, int flags) > } > } > > +/* > + * Kill the prison and its descendants. Mark them as dying, clear the > + * persist flag, and call module remove methods. > + */ > +static void > +prison_deref_kill(struct prison *pr, struct prisonlist *freeprison) > +{ > + struct prison *cpr, *ppr, *rpr; > + bool descend; > + > + /* > + * Unlike the descendants, the target prison can be killed > + * even if it is currently dying. This is useful for failed > + * creation in jail_set(2). > + */ > + KASSERT(refcount_load(&pr->pr_ref) > 0, > + ("Trying to kill dead prison %p (jid=%d).", > + pr, pr->pr_id)); > + refcount_acquire(&pr->pr_uref); > + pr->pr_state = PRISON_STATE_DYING; > + mtx_unlock(&pr->pr_mtx); > + > + rpr = NULL; > + FOREACH_PRISON_DESCENDANT_PRE_POST(pr, cpr, descend) { > + if (descend) { > + if (!prison_isalive(cpr)) { > + descend = false; > + continue; > + } > + prison_hold(cpr); > + prison_proc_hold(cpr); > + mtx_lock(&cpr->pr_mtx); > + cpr->pr_state = PRISON_STATE_DYING; > + cpr->pr_flags |= PR_REMOVE; > + mtx_unlock(&cpr->pr_mtx); > + } > + if (!(cpr->pr_flags & PR_REMOVE)) > + continue; > + (void)osd_jail_call(cpr, PR_METHOD_REMOVE, NULL); > + mtx_lock(&cpr->pr_mtx); > + cpr->pr_flags &= ~PR_REMOVE; > + if (cpr->pr_flags & PR_PERSIST) { > + cpr->pr_flags &= ~PR_PERSIST; > + prison_proc_free_not_last(cpr); > + prison_free_not_last(cpr); > + } > + (void)refcount_release(&cpr->pr_uref); > + if (refcount_release(&cpr->pr_ref)) { > + /* > + * When the last reference goes, unlink the prison > + * and set it aside for prison_deref() to handle. > + * Delay unlinking the sibling list to keep the loop > + * safe. > + */ > + if (rpr != NULL) > + LIST_REMOVE(rpr, pr_sibling); > + rpr = cpr; > + rpr->pr_state = PRISON_STATE_INVALID; > + TAILQ_REMOVE(&allprison, rpr, pr_list); > + TAILQ_INSERT_TAIL(freeprison, rpr, pr_list); > + /* > + * Removing a prison frees references from its parent. > + */ > + ppr = rpr->pr_parent; > + prison_proc_free_not_last(ppr); > + prison_free_not_last(ppr); > + for (; ppr != NULL; ppr = ppr->pr_parent) > + ppr->pr_childcount--; > + } > + mtx_unlock(&cpr->pr_mtx); > + } > + if (rpr != NULL) > + LIST_REMOVE(rpr, pr_sibling); > + > + (void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL); > + mtx_lock(&pr->pr_mtx); > + if (pr->pr_flags & PR_PERSIST) { > + pr->pr_flags &= ~PR_PERSIST; > + prison_proc_free_not_last(pr); > + prison_free_not_last(pr); > + } > + (void)refcount_release(&pr->pr_uref); > +} > + > /* > * Given the current locking state in the flags, make sure allprison_lock > * is held exclusive, and the prison is locked. Return flags indicating > diff --git a/sys/sys/jail.h b/sys/sys/jail.h > index 723a1fff0b82..c9d4c65e4d9e 100644 > --- a/sys/sys/jail.h > +++ b/sys/sys/jail.h > @@ -341,6 +341,19 @@ prison_unlock(struct prison *pr) > ; \ > else > > +/* > + * Traverse a prison's descendants, visiting both preorder and postorder. > + */ > +#define FOREACH_PRISON_DESCENDANT_PRE_POST(ppr, cpr, descend) \ > + for ((cpr) = (ppr), (descend) = 1; \ > + ((cpr) = (descend) \ > + ? ((descend) = !LIST_EMPTY(&(cpr)->pr_children)) \ > + ? LIST_FIRST(&(cpr)->pr_children) \ > + : (cpr) \ > + : ((descend) = LIST_NEXT(cpr, pr_sibling) != NULL) \ > + ? LIST_NEXT(cpr, pr_sibling) \ > + : cpr->pr_parent) != (ppr);) > + > /* > * Attributes of the physical system, and the root of the jail tree. > */ Hi Jamie, After this commit running cd /usr/tests/lib/libc/sys && kyua test cpuset_test renders the entire system unusable: all exec calls afterwards seem to fail. In Jenkins it's triggering a kernel panic: https://ci.freebsd.org/job/FreeBSD-main-amd64-test/17630/consoleFull Reverting this commit fixes the issue. Thanks, Alex From owner-dev-commits-src-main@freebsd.org Tue Feb 23 13:20:09 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 79F52543B35; Tue, 23 Feb 2021 13:20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlKRF30VCz3F1f; Tue, 23 Feb 2021 13:20: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 556DB19D44; Tue, 23 Feb 2021 13:20: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 11NDK93k068041; Tue, 23 Feb 2021 13:20:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NDK9ft068038; Tue, 23 Feb 2021 13:20:09 GMT (envelope-from git) Date: Tue, 23 Feb 2021 13:20:09 GMT Message-Id: <202102231320.11NDK9ft068038@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Chris Rees Subject: git: d27999e51396 - main - Create dhclient pid directory if it doesn't exist MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: crees X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d27999e51396b301d83bb7d6cdd51f6d6f4fff2d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 13:20:09 -0000 The branch main has been updated by crees (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=d27999e51396b301d83bb7d6cdd51f6d6f4fff2d commit d27999e51396b301d83bb7d6cdd51f6d6f4fff2d Author: Chris Rees AuthorDate: 2021-02-21 18:56:56 +0000 Commit: Chris Rees CommitDate: 2021-02-23 13:19:44 +0000 Create dhclient pid directory if it doesn't exist - Upgrading from older FreeBSD versions can result in errors - /var/run can be a tmpfs, and this should be handled correctly Approved by: markj Differential Revision: https://reviews.freebsd.org/D28843 MFC after: 2 weeks --- libexec/rc/rc.d/dhclient | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libexec/rc/rc.d/dhclient b/libexec/rc/rc.d/dhclient index 520a0850ccbc..765e38266408 100755 --- a/libexec/rc/rc.d/dhclient +++ b/libexec/rc/rc.d/dhclient @@ -49,6 +49,11 @@ dhclient_prestart() rc_flags="${rc_flags} -b" fi + + # /var/run/dhclient is not guaranteed to exist, + # e.g. if /var/run is a tmpfs + install -d -o root -g wheel -m 755 ${pidfile%/*} + rc_flags="${rc_flags} ${ifn}" } From owner-dev-commits-src-main@freebsd.org Tue Feb 23 13:55:05 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E8205440A1; Tue, 23 Feb 2021 13:55: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlLCY3cg9z3HBC; Tue, 23 Feb 2021 13:55: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 6EE701A43A; Tue, 23 Feb 2021 13:55: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 11NDt5AI017720; Tue, 23 Feb 2021 13:55:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NDt5sE017719; Tue, 23 Feb 2021 13:55:05 GMT (envelope-from git) Date: Tue, 23 Feb 2021 13:55:05 GMT Message-Id: <202102231355.11NDt5sE017719@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 89fa9c34d76b - main - bridge/stp: Ensure we enter NET_EPOCH whenever we can send traffic MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89fa9c34d76bbf85cd7cda60c1868f5e3dba4ec7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 13:55:05 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=89fa9c34d76bbf85cd7cda60c1868f5e3dba4ec7 commit 89fa9c34d76bbf85cd7cda60c1868f5e3dba4ec7 Author: Kristof Provost AuthorDate: 2021-02-21 20:18:46 +0000 Commit: Kristof Provost CommitDate: 2021-02-23 12:54:07 +0000 bridge/stp: Ensure we enter NET_EPOCH whenever we can send traffic Reviewed by: donner@ MFC after: 1 week Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D28858 --- sys/net/bridgestp.c | 9 +++++++++ sys/net/if_bridge.c | 9 ++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c index c36dc61d1397..82524440c241 100644 --- a/sys/net/bridgestp.c +++ b/sys/net/bridgestp.c @@ -154,6 +154,8 @@ static void bstp_reinit(struct bstp_state *); static void bstp_transmit(struct bstp_state *bs, struct bstp_port *bp) { + NET_EPOCH_ASSERT(); + if (bs->bs_running == 0) return; @@ -346,6 +348,7 @@ bstp_send_bpdu(struct bstp_state *bs, struct bstp_port *bp, struct ether_header *eh; BSTP_LOCK_ASSERT(bs); + NET_EPOCH_ASSERT(); ifp = bp->bp_ifp; @@ -923,6 +926,8 @@ bstp_update_state(struct bstp_state *bs, struct bstp_port *bp) static void bstp_update_roles(struct bstp_state *bs, struct bstp_port *bp) { + NET_EPOCH_ASSERT(); + switch (bp->bp_role) { case BSTP_ROLE_DISABLED: /* Clear any flags if set */ @@ -1862,6 +1867,7 @@ bstp_disable_port(struct bstp_state *bs, struct bstp_port *bp) static void bstp_tick(void *arg) { + struct epoch_tracker et; struct bstp_state *bs = arg; struct bstp_port *bp; @@ -1870,6 +1876,7 @@ bstp_tick(void *arg) if (bs->bs_running == 0) return; + NET_EPOCH_ENTER(et); CURVNET_SET(bs->bs_vnet); /* poll link events on interfaces that do not support linkstate */ @@ -1908,6 +1915,7 @@ bstp_tick(void *arg) } CURVNET_RESTORE(); + NET_EPOCH_EXIT(et); callout_reset(&bs->bs_bstpcallout, hz, bstp_tick, bs); } @@ -2229,6 +2237,7 @@ bstp_enable(struct bstp_port *bp) struct ifnet *ifp = bp->bp_ifp; KASSERT(bp->bp_active == 0, ("already a bstp member")); + NET_EPOCH_ASSERT(); /* Because bstp_update_roles() causes traffic. */ switch (ifp->if_type) { case IFT_ETHER: /* These can do spanning tree. */ diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 7c4e48ff04c6..3dba672aa0fe 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -1326,6 +1326,7 @@ bridge_ioctl_gifflags(struct bridge_softc *sc, void *arg) static int bridge_ioctl_sifflags(struct bridge_softc *sc, void *arg) { + struct epoch_tracker et; struct ifbreq *req = arg; struct bridge_iflist *bif; struct bstp_port *bp; @@ -1340,11 +1341,15 @@ bridge_ioctl_sifflags(struct bridge_softc *sc, void *arg) /* SPAN is readonly */ return (EINVAL); + NET_EPOCH_ENTER(et); + if (req->ifbr_ifsflags & IFBIF_STP) { if ((bif->bif_flags & IFBIF_STP) == 0) { error = bstp_enable(&bif->bif_stp); - if (error) + if (error) { + NET_EPOCH_EXIT(et); return (error); + } } } else { if ((bif->bif_flags & IFBIF_STP) != 0) @@ -1360,6 +1365,8 @@ bridge_ioctl_sifflags(struct bridge_softc *sc, void *arg) /* Save the bits relating to the bridge */ bif->bif_flags = req->ifbr_ifsflags & IFBIFMASK; + NET_EPOCH_EXIT(et); + return (0); } From owner-dev-commits-src-main@freebsd.org Tue Feb 23 13:55:04 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78C6F544B07; Tue, 23 Feb 2021 13:55: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlLCX2dynz3HCk; Tue, 23 Feb 2021 13:55: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 4D7CD1A439; Tue, 23 Feb 2021 13:55: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 11NDt4mK017702; Tue, 23 Feb 2021 13:55:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NDt4aR017701; Tue, 23 Feb 2021 13:55:04 GMT (envelope-from git) Date: Tue, 23 Feb 2021 13:55:04 GMT Message-Id: <202102231355.11NDt4aR017701@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 711ed156b945 - main - bridge: Support STP on VLAN devices MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 711ed156b94562c3dcb2ee9c1b3f240f960a75d2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 13:55:04 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=711ed156b94562c3dcb2ee9c1b3f240f960a75d2 commit 711ed156b94562c3dcb2ee9c1b3f240f960a75d2 Author: Kristof Provost AuthorDate: 2021-02-20 09:11:30 +0000 Commit: Kristof Provost CommitDate: 2021-02-23 12:54:06 +0000 bridge: Support STP on VLAN devices VLAN devices have type IFT_L2VLAN, so the STP code mistakenly believed they couldn't be used for STP. That's not the case, so add the ITF_L2VLAN to the check. Reviewed by: donner@ MFC after: 1 week Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D28857 --- sys/net/bridgestp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c index a8bb51c11f51..c36dc61d1397 100644 --- a/sys/net/bridgestp.c +++ b/sys/net/bridgestp.c @@ -2232,6 +2232,7 @@ bstp_enable(struct bstp_port *bp) switch (ifp->if_type) { case IFT_ETHER: /* These can do spanning tree. */ + case IFT_L2VLAN: break; default: /* Nothing else can. */ From owner-dev-commits-src-main@freebsd.org Tue Feb 23 13:55:06 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E985B544836; Tue, 23 Feb 2021 13:55: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlLCZ4rl5z3HP5; Tue, 23 Feb 2021 13:55: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 968B81A15E; Tue, 23 Feb 2021 13:55: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 11NDt6CB017743; Tue, 23 Feb 2021 13:55:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NDt6m7017742; Tue, 23 Feb 2021 13:55:06 GMT (envelope-from git) Date: Tue, 23 Feb 2021 13:55:06 GMT Message-Id: <202102231355.11NDt6m7017742@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 38c0951386d8 - main - bridge: Remove members when assigned to a new vnet MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 38c0951386d82f4c51cf4e245253cdef18d2254a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 13:55:07 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=38c0951386d82f4c51cf4e245253cdef18d2254a commit 38c0951386d82f4c51cf4e245253cdef18d2254a Author: Kristof Provost AuthorDate: 2021-02-21 20:20:32 +0000 Commit: Kristof Provost CommitDate: 2021-02-23 12:54:07 +0000 bridge: Remove members when assigned to a new vnet When the bridge is moved to a different vnet we must remove all of its member interfaces (and span interfaces), because we don't know if those will be moved along with it. We don't want to hold references to interfaces not in our vnet. Reviewed by: donner@ MFC after: 1 week Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D28859 --- sys/net/ethernet.h | 4 ++++ sys/net/if_bridge.c | 25 +++++++++++++++++++++++++ sys/net/if_ethersubr.c | 3 --- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/sys/net/ethernet.h b/sys/net/ethernet.h index 38c0aa249272..f174ca9eb143 100644 --- a/sys/net/ethernet.h +++ b/sys/net/ethernet.h @@ -437,6 +437,10 @@ extern uint32_t ether_crc32_be(const uint8_t *, size_t); extern void ether_demux(struct ifnet *, struct mbuf *); extern void ether_ifattach(struct ifnet *, const u_int8_t *); extern void ether_ifdetach(struct ifnet *); +#ifdef VIMAGE +struct vnet; +extern void ether_reassign(struct ifnet *, struct vnet *, char *); +#endif extern int ether_ioctl(struct ifnet *, u_long, caddr_t); extern int ether_output(struct ifnet *, struct mbuf *, const struct sockaddr *, struct route *); diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 3dba672aa0fe..3e6b5ba8e0c2 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -670,6 +670,28 @@ SYSCTL_PROC(_net_link_bridge, OID_AUTO, ipfw, &VNET_NAME(pfil_ipfw), 0, &sysctl_pfil_ipfw, "I", "Layer2 filter with IPFW"); +#ifdef VIMAGE +static void +bridge_reassign(struct ifnet *ifp, struct vnet *newvnet, char *arg) +{ + struct bridge_softc *sc = ifp->if_softc; + struct bridge_iflist *bif; + + BRIDGE_LOCK(sc); + + while ((bif = CK_LIST_FIRST(&sc->sc_iflist)) != NULL) + bridge_delete_member(sc, bif, 0); + + while ((bif = CK_LIST_FIRST(&sc->sc_spanlist)) != NULL) { + bridge_delete_span(sc, bif); + } + + BRIDGE_UNLOCK(sc); + + ether_reassign(ifp, newvnet, arg); +} +#endif + /* * bridge_clone_create: * @@ -716,6 +738,9 @@ bridge_clone_create(struct if_clone *ifc, int unit, caddr_t params) /* Now undo some of the damage... */ ifp->if_baudrate = 0; ifp->if_type = IFT_BRIDGE; +#ifdef VIMAGE + ifp->if_reassign = bridge_reassign; +#endif BRIDGE_LIST_LOCK(); LIST_INSERT_HEAD(&V_bridge_list, sc, sc_list); diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 77c138d7a092..01c2d2f7b3e8 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -117,9 +117,6 @@ static const u_char etherbroadcastaddr[ETHER_ADDR_LEN] = static int ether_resolvemulti(struct ifnet *, struct sockaddr **, struct sockaddr *); -#ifdef VIMAGE -static void ether_reassign(struct ifnet *, struct vnet *, char *); -#endif static int ether_requestencap(struct ifnet *, struct if_encap_req *); #define senderr(e) do { error = (e); goto bad;} while (0) From owner-dev-commits-src-main@freebsd.org Tue Feb 23 13:55:08 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 885CB544AB8; Tue, 23 Feb 2021 13:55: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlLCc0DhCz3HCt; Tue, 23 Feb 2021 13:55:07 +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 C00791A15F; Tue, 23 Feb 2021 13:55: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 11NDt7sc017765; Tue, 23 Feb 2021 13:55:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NDt7RP017764; Tue, 23 Feb 2021 13:55:07 GMT (envelope-from git) Date: Tue, 23 Feb 2021 13:55:07 GMT Message-Id: <202102231355.11NDt7RP017764@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: c139b3c19b52 - main - arp/nd: Cope with late calls to iflladdr_event MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c139b3c19b52abe3b5ba23a8175e58e70c7a528d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 13:55:09 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c139b3c19b52abe3b5ba23a8175e58e70c7a528d commit c139b3c19b52abe3b5ba23a8175e58e70c7a528d Author: Kristof Provost AuthorDate: 2021-02-22 07:19:43 +0000 Commit: Kristof Provost CommitDate: 2021-02-23 12:54:07 +0000 arp/nd: Cope with late calls to iflladdr_event When tearing down vnet jails we can move an if_bridge out (as part of the normal vnet_if_return()). This can, when it's clearing out its list of member interfaces, change its link layer address. That sends an iflladdr_event, but at that point we've already freed the AF_INET/AF_INET6 if_afdata pointers. In other words: when the iflladdr_event callbacks fire we can't assume that ifp->if_afdata[AF_INET] will be set. Reviewed by: donner@, melifaro@ MFC after: 1 week Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D28860 --- sys/netinet/if_ether.c | 4 ++++ sys/netinet6/nd6.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index e09ad3d47382..ef50ec9ca964 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -1479,6 +1479,10 @@ arp_handle_ifllchange(struct ifnet *ifp) static void arp_iflladdr(void *arg __unused, struct ifnet *ifp) { + /* if_bridge can update its lladdr during if_vmove(), after we've done + * if_detach_internal()/dom_ifdetach(). */ + if (ifp->if_afdata[AF_INET] == NULL) + return; lltable_update_ifaddr(LLTABLE(ifp)); diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 497c0bfc10e8..62f0ac733a23 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -208,6 +208,8 @@ nd6_lle_event(void *arg __unused, struct llentry *lle, int evt) static void nd6_iflladdr(void *arg __unused, struct ifnet *ifp) { + if (ifp->if_afdata[AF_INET6] == NULL) + return; lltable_update_ifaddr(LLTABLE6(ifp)); } From owner-dev-commits-src-main@freebsd.org Tue Feb 23 13:55:12 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A6A79544B32; Tue, 23 Feb 2021 13:55: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlLCd75H4z3HD3; Tue, 23 Feb 2021 13:55: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 DE8E41A3B3; Tue, 23 Feb 2021 13:55: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 11NDt8hT017783; Tue, 23 Feb 2021 13:55:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NDt8cq017782; Tue, 23 Feb 2021 13:55:08 GMT (envelope-from git) Date: Tue, 23 Feb 2021 13:55:08 GMT Message-Id: <202102231355.11NDt8cq017782@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 26492ba2716f - main - bridge tests: Test STP on top of VLAN devices MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 26492ba2716f8b839f743bb663ce47405990fdf0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 13:55:13 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=26492ba2716f8b839f743bb663ce47405990fdf0 commit 26492ba2716f8b839f743bb663ce47405990fdf0 Author: Kristof Provost AuthorDate: 2021-02-20 09:13:33 +0000 Commit: Kristof Provost CommitDate: 2021-02-23 12:54:07 +0000 bridge tests: Test STP on top of VLAN devices This is basically the same test as the existing STP test, but now on top of VLAN interfaces instead of directly using the epair devices. MFC after: 1 week Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D28861 --- tests/sys/net/if_bridge_test.sh | 66 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/tests/sys/net/if_bridge_test.sh b/tests/sys/net/if_bridge_test.sh index b848a03b273d..bc9add68ce25 100755 --- a/tests/sys/net/if_bridge_test.sh +++ b/tests/sys/net/if_bridge_test.sh @@ -124,6 +124,71 @@ stp_cleanup() vnet_cleanup } +atf_test_case "stp_vlan" "cleanup" +stp_vlan_head() +{ + atf_set descr 'Spanning tree on VLAN test' + atf_set require.user root +} + +stp_vlan_body() +{ + vnet_init + + epair_one=$(vnet_mkepair) + epair_two=$(vnet_mkepair) + bridge_a=$(vnet_mkbridge) + bridge_b=$(vnet_mkbridge) + + vnet_mkjail a ${bridge_a} ${epair_one}a ${epair_two}a + vnet_mkjail b ${bridge_b} ${epair_one}b ${epair_two}b + + jexec a ifconfig ${epair_one}a up + jexec a ifconfig ${epair_two}a up + vlan_a_one=$(jexec a ifconfig vlan create vlandev ${epair_one}a vlan 42) + vlan_a_two=$(jexec a ifconfig vlan create vlandev ${epair_two}a vlan 42) + jexec a ifconfig ${vlan_a_one} up + jexec a ifconfig ${vlan_a_two} up + jexec a ifconfig ${bridge_a} addm ${vlan_a_one} + jexec a ifconfig ${bridge_a} addm ${vlan_a_two} + + jexec b ifconfig ${epair_one}b up + jexec b ifconfig ${epair_two}b up + vlan_b_one=$(jexec b ifconfig vlan create vlandev ${epair_one}b vlan 42) + vlan_b_two=$(jexec b ifconfig vlan create vlandev ${epair_two}b vlan 42) + jexec b ifconfig ${vlan_b_one} up + jexec b ifconfig ${vlan_b_two} up + jexec b ifconfig ${bridge_b} addm ${vlan_b_one} + jexec b ifconfig ${bridge_b} addm ${vlan_b_two} + + jexec a ifconfig ${bridge_a} 192.0.2.1/24 + + # Enable spanning tree + jexec a ifconfig ${bridge_a} stp ${vlan_a_one} + jexec a ifconfig ${bridge_a} stp ${vlan_a_two} + jexec b ifconfig ${bridge_b} stp ${vlan_b_one} + jexec b ifconfig ${bridge_b} stp ${vlan_b_two} + + jexec b ifconfig ${bridge_b} up + jexec a ifconfig ${bridge_a} up + + # Give STP time to do its thing + sleep 5 + + a_discard=$(jexec a ifconfig ${bridge_a} | grep discarding) + b_discard=$(jexec b ifconfig ${bridge_b} | grep discarding) + + if [ -z "${a_discard}" ] && [ -z "${b_discard}" ] + then + atf_fail "STP failed to detect bridging loop" + fi +} + +stp_vlan_cleanup() +{ + vnet_cleanup +} + atf_test_case "static" "cleanup" static_head() { @@ -329,6 +394,7 @@ atf_init_test_cases() { atf_add_test_case "bridge_transmit_ipv4_unicast" atf_add_test_case "stp" + atf_add_test_case "stp_vlan" atf_add_test_case "static" atf_add_test_case "span" atf_add_test_case "inherit_mac" From owner-dev-commits-src-main@freebsd.org Tue Feb 23 15:08:00 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B702546FB1; Tue, 23 Feb 2021 15:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlMqg6HkJz3NVC; Tue, 23 Feb 2021 15:07: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 8966B1B561; Tue, 23 Feb 2021 15:07: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 11NF7xbV011355; Tue, 23 Feb 2021 15:07:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NF7x7a011354; Tue, 23 Feb 2021 15:07:59 GMT (envelope-from git) Date: Tue, 23 Feb 2021 15:07:59 GMT Message-Id: <202102231507.11NF7x7a011354@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: ab379c15af6f - main - stand/multiboot2: fix error message format 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: ab379c15af6fd7c2b94f0e91769fe7e1a4102e25 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 15:08:00 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=ab379c15af6fd7c2b94f0e91769fe7e1a4102e25 commit ab379c15af6fd7c2b94f0e91769fe7e1a4102e25 Author: Roger Pau Monné AuthorDate: 2021-02-23 14:51:58 +0000 Commit: Roger Pau Monné CommitDate: 2021-02-23 15:04:58 +0000 stand/multiboot2: fix error message format Add a missing space in one error message. Sponsored by: Citrix Systems R&D MFC after: 3 days Fixes: adda2797eb2a ('stand/multiboot2: add support for booting a Xen dom0 in UEFI mode') --- stand/efi/loader/arch/amd64/multiboot2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/efi/loader/arch/amd64/multiboot2.c b/stand/efi/loader/arch/amd64/multiboot2.c index e4589bc8b0bb..6ee36afcb881 100644 --- a/stand/efi/loader/arch/amd64/multiboot2.c +++ b/stand/efi/loader/arch/amd64/multiboot2.c @@ -115,8 +115,8 @@ loadfile(char *filename, uint64_t dest, struct preloaded_file **result) /* Valid multiboot header has been found, validate checksum */ if (header->magic + header->architecture + header->header_length + header->checksum != 0) { - printf("Multiboot checksum failed, magic: %#x architecture: %#x" - "header_length %#x checksum: %#x\n", + printf("Multiboot checksum failed, magic: %#x " + "architecture: %#x header_length %#x checksum: %#x\n", header->magic, header->architecture, header->header_length, header->checksum); error = EFTYPE; From owner-dev-commits-src-main@freebsd.org Tue Feb 23 15:08:00 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD17F547221; Tue, 23 Feb 2021 15:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlMqh4YWBz3NvF; Tue, 23 Feb 2021 15:08: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 8F9001B794; Tue, 23 Feb 2021 15:08: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 11NF80qk011378; Tue, 23 Feb 2021 15:08:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NF80BZ011377; Tue, 23 Feb 2021 15:08:00 GMT (envelope-from git) Date: Tue, 23 Feb 2021 15:08:00 GMT Message-Id: <202102231508.11NF80BZ011377@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: 0eaa97f0e862 - main - stand/multiboot2: fix header length check 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: 0eaa97f0e8629bcf678ff4de2678e4cba00f1c91 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 15:08:00 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=0eaa97f0e8629bcf678ff4de2678e4cba00f1c91 commit 0eaa97f0e8629bcf678ff4de2678e4cba00f1c91 Author: Roger Pau Monné AuthorDate: 2021-02-23 14:56:27 +0000 Commit: Roger Pau Monné CommitDate: 2021-02-23 15:05:03 +0000 stand/multiboot2: fix header length check Check whether we have reached the end of the buffer using search_size instead of MULTIBOOT_SEARCH, which is the maximum defined by the specification, but the file can be shorter than that. This prevents printing a harmless error message when loading a file that is smaller than MULTIBOOT_SEARCH. Sponsored by: Citrix Systems R&D MFC after: 3 days Fixes: adda2797eb2a ('stand/multiboot2: add support for booting a Xen dom0 in UEFI mode') --- stand/efi/loader/arch/amd64/multiboot2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/efi/loader/arch/amd64/multiboot2.c b/stand/efi/loader/arch/amd64/multiboot2.c index 6ee36afcb881..4d7b2713685d 100644 --- a/stand/efi/loader/arch/amd64/multiboot2.c +++ b/stand/efi/loader/arch/amd64/multiboot2.c @@ -107,7 +107,7 @@ loadfile(char *filename, uint64_t dest, struct preloaded_file **result) break; } - if (i >= MULTIBOOT_SEARCH) { + if (i >= search_size) { error = EFTYPE; goto out; } From owner-dev-commits-src-main@freebsd.org Tue Feb 23 16:03:37 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0892F548E05; Tue, 23 Feb 2021 16:03: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlP3r6sKWz3kmn; Tue, 23 Feb 2021 16:03: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 DE45A1C399; Tue, 23 Feb 2021 16:03: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 11NG3aeg089039; Tue, 23 Feb 2021 16:03:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NG3auF089038; Tue, 23 Feb 2021 16:03:36 GMT (envelope-from git) Date: Tue, 23 Feb 2021 16:03:36 GMT Message-Id: <202102231603.11NG3auF089038@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: 7d4c444374d5 - main - Bump CTL block backend threads from 14 to 32 per LUN. 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: 7d4c444374d53e54ce197138df64bf40c1fb05a3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 16:03:37 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=7d4c444374d53e54ce197138df64bf40c1fb05a3 commit 7d4c444374d53e54ce197138df64bf40c1fb05a3 Author: Alexander Motin AuthorDate: 2021-02-23 15:58:56 +0000 Commit: Alexander Motin CommitDate: 2021-02-23 16:03:32 +0000 Bump CTL block backend threads from 14 to 32 per LUN. This makes random read benchmarks look better on a wide ZFS pools. I am not sure where the original value goes from, but it is there for too long now. MFC after: 1 week --- sys/cam/ctl/ctl_backend_block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c index 7ec8e32f7338..f50e47a2a6c1 100644 --- a/sys/cam/ctl/ctl_backend_block.c +++ b/sys/cam/ctl/ctl_backend_block.c @@ -226,7 +226,7 @@ struct ctl_be_block_io { extern struct ctl_softc *control_softc; -static int cbb_num_threads = 14; +static int cbb_num_threads = 32; SYSCTL_NODE(_kern_cam_ctl, OID_AUTO, block, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "CAM Target Layer Block Backend"); SYSCTL_INT(_kern_cam_ctl_block, OID_AUTO, num_threads, CTLFLAG_RWTUN, From owner-dev-commits-src-main@freebsd.org Tue Feb 23 16:16:38 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 49172549535; Tue, 23 Feb 2021 16:16: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlPLt0SL9z3lj8; Tue, 23 Feb 2021 16:16: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 EC4FF1C373; Tue, 23 Feb 2021 16:16: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 11NGGb5j003307; Tue, 23 Feb 2021 16:16:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NGGb1E003306; Tue, 23 Feb 2021 16:16:37 GMT (envelope-from git) Date: Tue, 23 Feb 2021 16:16:37 GMT Message-Id: <202102231616.11NGGb1E003306@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Daniel Ebdrup Jensen Subject: git: 75e6f664c469 - main - find(1): Mark -not as an extensions to POSIX MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: debdrup X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 75e6f664c469927ca73ecd7b16a8058bc292a451 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 16:16:38 -0000 The branch main has been updated by debdrup (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=75e6f664c469927ca73ecd7b16a8058bc292a451 commit 75e6f664c469927ca73ecd7b16a8058bc292a451 Author: Daniel Ebdrup Jensen AuthorDate: 2021-02-23 15:23:09 +0000 Commit: Daniel Ebdrup Jensen CommitDate: 2021-02-23 16:15:35 +0000 find(1): Mark -not as an extensions to POSIX While here, change mdoc macro from Ic to Fl. PR: 253499 Reported by: Michael Siegel --- usr.bin/find/find.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/find/find.1 b/usr.bin/find/find.1 index ce7a231c3c7d..43b1262352a6 100644 --- a/usr.bin/find/find.1 +++ b/usr.bin/find/find.1 @@ -31,7 +31,7 @@ .\" @(#)find.1 8.7 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd April 18, 2020 +.Dd February 23, 2021 .Dt FIND 1 .Os .Sh NAME @@ -1016,9 +1016,9 @@ and as well as .Ic -amin , -anewer , -cmin , -cnewer , -delete , -empty , -fstype , .Ic -iname , -inum , -iregex , -ls , -maxdepth , -mindepth , -mmin , -.Ic -path , -print0 , -regex , -sparse +.Ic -not , -path , -print0 , -regex , -sparse and all of the -.Ic -B* +.Fl B* birthtime related primaries are extensions to .St -p1003.1-2001 . .Pp From owner-dev-commits-src-main@freebsd.org Tue Feb 23 16:40:31 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46F76549BFE; Tue, 23 Feb 2021 16:40:31 +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 4DlPtR01PDz3nBf; Tue, 23 Feb 2021 16:40:30 +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 11NGeMsV017774; Tue, 23 Feb 2021 08:40:22 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 11NGeMsl017773; Tue, 23 Feb 2021 08:40:22 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202102231640.11NGeMsl017773@gndrsh.dnsmgr.net> Subject: Re: git: 7d4c444374d5 - main - Bump CTL block backend threads from 14 to 32 per LUN. In-Reply-To: <202102231603.11NG3auF089038@gitrepo.freebsd.org> To: Alexander Motin Date: Tue, 23 Feb 2021 08:40:22 -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: 4DlPtR01PDz3nBf 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 16:40:31 -0000 > The branch main has been updated by mav: > > URL: https://cgit.FreeBSD.org/src/commit/?id=7d4c444374d53e54ce197138df64bf40c1fb05a3 > > commit 7d4c444374d53e54ce197138df64bf40c1fb05a3 > Author: Alexander Motin > AuthorDate: 2021-02-23 15:58:56 +0000 > Commit: Alexander Motin > CommitDate: 2021-02-23 16:03:32 +0000 > > Bump CTL block backend threads from 14 to 32 per LUN. > > This makes random read benchmarks look better on a wide ZFS pools. > I am not sure where the original value goes from, but it is there > for too long now. I would think this should be bounded by the number of cores/threads in the system. What happens on a 4 thread system with this value? > > MFC after: 1 week > --- > sys/cam/ctl/ctl_backend_block.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c > index 7ec8e32f7338..f50e47a2a6c1 100644 > --- a/sys/cam/ctl/ctl_backend_block.c > +++ b/sys/cam/ctl/ctl_backend_block.c > @@ -226,7 +226,7 @@ struct ctl_be_block_io { > > extern struct ctl_softc *control_softc; > > -static int cbb_num_threads = 14; > +static int cbb_num_threads = 32; > SYSCTL_NODE(_kern_cam_ctl, OID_AUTO, block, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, > "CAM Target Layer Block Backend"); > SYSCTL_INT(_kern_cam_ctl_block, OID_AUTO, num_threads, CTLFLAG_RWTUN, > -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-main@freebsd.org Tue Feb 23 17:01:04 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E391E54A3CE; Tue, 23 Feb 2021 17:01:04 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) (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 4DlQL85V20z3pGQ; Tue, 23 Feb 2021 17:01:04 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-qt1-x82b.google.com with SMTP id c1so12390966qtc.1; Tue, 23 Feb 2021 09:01:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/yBvXi/5pEfzGf02BPka5E3vydo5poXt8IV1c5q5u4Q=; b=rh+ffamo/zN8jJ+n5JoZ0dxHaCRt9YHNhzaLpUTGomngwq6JOLGaac4UzjFARk4nEn O9G9QVVV/zTM3bqw5k0TOVbYvUk+PYwnsWBQW4QaQtsak6ea/XI7UNaH9ZhxroY10PsY 4403FrMR+6l7SbOsS1brWDnsc/cX7pN9Tq97t18cQZLvzeqFWmxttuMXkrZJCn7cBNei LWQ7dRB0V9JrKZjZrluo8evmgK5evWNmZaVhua75IUS460Uc9n1nqKNbArIdg4YG+xdk m2dAehtlMp8Y1ITSgV8OPkVYOMWeirp56XIT/iZ44jRmvRiZBihiH3yUdAx4+XdyHEIy 6dFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=/yBvXi/5pEfzGf02BPka5E3vydo5poXt8IV1c5q5u4Q=; b=DaedA2yLRlZ7cl9mRUZb1GckkhYIdpucldUq9ibu+IgAf7Z1H91dMA9fGopRzmoZYU 90vLweqec6FQK1WjRD9W5T7lIaa/jOpn1AcPEewC8SVTz4Y6C6fd8Zg0+zNnskiB/lmA eV49HwlJ3v8OG2tTMFEXcusMBnZkzw1FGStypI9UgyFEhMVqUpTgHkJFTocnDvAbAMAX XDYjFKOiv2HK7u+3seCPW3WwQhgSz68mRUfNrHbdB5PaQro4aaK3ocTK0eTwiM3E3kF3 wKrC46N3CrzogE3uUmcZCLehpEP7kVSguuXIRLvEVkfufz9+NRKD/Z6Be4SYv5roue2/ b9JA== X-Gm-Message-State: AOAM532r9Ou7Tjx7XulquYpuZTVvJMthvo8cmBS7Oil4c3N4b5wHDdnh caMhBvCfQ4d1WViKiRguCEeC8XMMAjid8w== X-Google-Smtp-Source: ABdhPJymYYfgeL5OzVTEF4v7w6I4usMwLOK+5+J0UjQkEAd2KboLAiUMr7z2n9+of+KFBnvl5AdWuA== X-Received: by 2002:ac8:5d45:: with SMTP id g5mr25467553qtx.247.1614099662978; Tue, 23 Feb 2021 09:01:02 -0800 (PST) Received: from mavoffice.ixsystems.com ([38.32.73.2]) by smtp.gmail.com with ESMTPSA id p6sm15015947qkg.36.2021.02.23.09.01.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Feb 2021 09:01:01 -0800 (PST) Sender: Alexander Motin Subject: Re: git: 7d4c444374d5 - main - Bump CTL block backend threads from 14 to 32 per LUN. To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202102231640.11NGeMsl017773@gndrsh.dnsmgr.net> From: Alexander Motin Autocrypt: addr=mav@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFOzxAwBCADkPrax0pI2W/ig0CK9nRJJwsHitAGEZ2HZiFEuti+6/4UVxj81yr4ak/4g 9bKUyC7rMEAp/ZHNhd+MFCPAAcHPvtovnfykqE/vuosCS3wlSLloix2iKVLks0CwbLHGAyne 46lTQW74Xl/33c3W1Z6d8jD9gVFT/xaVzZ0U9xdzOmsYAZaAj4ki0tuxO9F7L+ct9grRe7iP g8t9hai7BL4ee3VRwk2JXnKb7UvBiVITKYWKz1jRvZIrjPokgEcCLOSlv7x/1kjuFnj3xWZU 7HSFFT8J93epBbrSSCsYsppIk2fZH41kaaFXsMQfTPH8wkeM6qwrvOh4HiQM08R+9tThABEB AAG0IUFsZXhhbmRlciBNb3RpbiA8bWF2QEZyZWVCU0Qub3JnPokBVwQTAQoAQQIbAwULCQgH AwUVCgkICwUWAwIBAAIeAQIXgAIZARYhBOmM88TmnMPNDledVYMYw5VbqyJ/BQJZYMKuBQkN McyiAAoJEIMYw5VbqyJ/tuUIAOG3ONOSNYqjK4eTZ1TVh9jdUBAhWk5nhDFnODN49Wj0AbYm 7aIqy8O1hnCDSZG5LttjSAo3UfXJZDKQM0BLb0gpRMBnAYqO6tdolLNqAbPGJBnGoPjsh24y 6KcbDaNnis+lD4GwPXwQM+92wZGhCUFElPV9NciZGVS65TNIgk7X+yEjjhD1MSWKKijZ1r9Z zIt4OzUTxxNOvzdlABZS88nNRdJkatOQJPmFdd1mpP6UzTNCiLUo1pIqOEtJgvVVDYq5WHY6 tciWWYdmZG/tIBexJmv2mV2OLVjXR6ZeKmntVH14H72/wRHJuYHQC+r5SVRcWWayrThsY6jZ Yr4+raS5AQ0EU7PEDAEIAOZgWf2cJIu+58IzP2dkXE/urj3tr4OqrB/yHGWUf71Lz6D0Fi6Z AXgDtmcFLGPfMyWuLAvSM+xmoguk7zC4hRBYvQycmIhuqBq1jO1Wp/Z+lpoPM/1cDYLn8Flv mI/c40MhUZh345DA4jYWWaZNjQHUWVQ1fPf595vdVVMPT/abE8E5DaF6fSkRmqFTmfYRkfbt 3ytU8NdUapDcJVY7cEP2nJBVNZPnOIObR/ZIgSxjjrG5o34yXoqeup8JvwEv+/NylzzuyXEZ R1EdEIzQ/a1nh/0j4NXtzZEqKW4aTWlmSqb6wN8jh1OSOOqkYsfnE3nfxcZbxi4IRoNQYlm5 9R8AEQEAAYkBPAQYAQoAJgIbDBYhBOmM88TmnMPNDledVYMYw5VbqyJ/BQJZYMLYBQkNMczM AAoJEIMYw5VbqyJ/TqgH/RQHClkvecE0262lwKoP/m0Mh4I5TLRgoJJn8S7G1BnqohYJkiLq A6xe6urGD7OqdNAl12UbrjWbdJV+zvea3vJoM4MZuYiYrGaXWxzFXqWJcPwMU9sAh8MRghHu uC5vgPb45Tnftw9/+n0i8GfVhQhOqepUGdQg4NPcXviSkoAvig6pp9Lcxisn0groUQKt15Gc sS9YcQWg3j9Hnipc6Mu416HX98Fb113NHJqc2geTHLkRyuBFOoyIqB6N9GKjzOAIzxxsVdl9 TevwGsrp4M4/RFzWbSgsbOnbE7454lmuVZGfReEjnUm8RHp9Q2UWKXlp3exlZjvOp/uVEpCg lz65AQ0EU7PEDAEIAOZgWf2cJIu+58IzP2dkXE/urj3tr4OqrB/yHGWUf71Lz6D0Fi6ZAXgD tmcFLGPfMyWuLAvSM+xmoguk7zC4hRBYvQycmIhuqBq1jO1Wp/Z+lpoPM/1cDYLn8FlvmI/c 40MhUZh345DA4jYWWaZNjQHUWVQ1fPf595vdVVMPT/abE8E5DaF6fSkRmqFTmfYRkfbt3ytU 8NdUapDcJVY7cEP2nJBVNZPnOIObR/ZIgSxjjrG5o34yXoqeup8JvwEv+/NylzzuyXEZR1Ed EIzQ/a1nh/0j4NXtzZEqKW4aTWlmSqb6wN8jh1OSOOqkYsfnE3nfxcZbxi4IRoNQYlm59R8A EQEAAYkBPAQYAQoAJgIbDBYhBOmM88TmnMPNDledVYMYw5VbqyJ/BQJZYMLYBQkNMczMAAoJ EIMYw5VbqyJ/TqgH/RQHClkvecE0262lwKoP/m0Mh4I5TLRgoJJn8S7G1BnqohYJkiLqA6xe 6urGD7OqdNAl12UbrjWbdJV+zvea3vJoM4MZuYiYrGaXWxzFXqWJcPwMU9sAh8MRghHuuC5v gPb45Tnftw9/+n0i8GfVhQhOqepUGdQg4NPcXviSkoAvig6pp9Lcxisn0groUQKt15GcsS9Y cQWg3j9Hnipc6Mu416HX98Fb113NHJqc2geTHLkRyuBFOoyIqB6N9GKjzOAIzxxsVdl9Tevw Gsrp4M4/RFzWbSgsbOnbE7454lmuVZGfReEjnUm8RHp9Q2UWKXlp3exlZjvOp/uVEpCglz4= Message-ID: <9a722455-7bc0-c10c-9a42-1650952475eb@FreeBSD.org> Date: Tue, 23 Feb 2021 12:01:00 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: <202102231640.11NGeMsl017773@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4DlQL85V20z3pGQ 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 17:01:05 -0000 On 23.02.2021 11:40, Rodney W. Grimes wrote: >> The branch main has been updated by mav: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=7d4c444374d53e54ce197138df64bf40c1fb05a3 >> >> commit 7d4c444374d53e54ce197138df64bf40c1fb05a3 >> Author: Alexander Motin >> AuthorDate: 2021-02-23 15:58:56 +0000 >> Commit: Alexander Motin >> CommitDate: 2021-02-23 16:03:32 +0000 >> >> Bump CTL block backend threads from 14 to 32 per LUN. >> >> This makes random read benchmarks look better on a wide ZFS pools. >> I am not sure where the original value goes from, but it is there >> for too long now. > > I would think this should be bounded by the number of cores/threads > in the system. What happens on a 4 thread system with this value? Since our VFS layer is still synchronous, the primary goal of these threads is to wait for disk I/O. And 4 thread system with HDDs should still benefit from higher value. For SSD system CPUs may become a bottleneck, but it would just speak about under-powered system. My biggest worry is a random locks contention from double number of threads. Not many algorithms scale to 32 threads on small I/Os and very high IOP. But that is theoretical, while on wide pool of slower HDDs I do see double performance from this right now. -- Alexander Motin From owner-dev-commits-src-main@freebsd.org Tue Feb 23 17:44:01 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2D71754BD1B; Tue, 23 Feb 2021 17:44: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlRHj0mH1z3sQ7; Tue, 23 Feb 2021 17:44: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 0CDF11D4E0; Tue, 23 Feb 2021 17:44: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 11NHi0ec021199; Tue, 23 Feb 2021 17:44:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NHi08p021198; Tue, 23 Feb 2021 17:44:00 GMT (envelope-from git) Date: Tue, 23 Feb 2021 17:44:00 GMT Message-Id: <202102231744.11NHi08p021198@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 3775ddcf5a12 - main - tests/sys/netgraph: Tell kyua that perl is required MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3775ddcf5a12c8e23970e94b7b165bf23c92aeba Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 17:44:01 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=3775ddcf5a12c8e23970e94b7b165bf23c92aeba commit 3775ddcf5a12c8e23970e94b7b165bf23c92aeba Author: Alex Richardson AuthorDate: 2021-02-23 17:02:31 +0000 Commit: Alex Richardson CommitDate: 2021-02-23 17:43:31 +0000 tests/sys/netgraph: Tell kyua that perl is required Otherwise these tests fail with incomprehensible error messages. Reviewed By: kp Differential Revision: https://reviews.freebsd.org/D28894 --- tests/sys/netgraph/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/sys/netgraph/Makefile b/tests/sys/netgraph/Makefile index e370fad97df4..aef190bbe178 100644 --- a/tests/sys/netgraph/Makefile +++ b/tests/sys/netgraph/Makefile @@ -7,7 +7,8 @@ BINDIR= ${TESTSDIR} TAP_TESTS_SH+= ng_macfilter_test -TEST_METADATA.runtests+= required_user="root" +TEST_METADATA.ng_macfilter_test+= required_user="root" +TEST_METADATA.ng_macfilter_test+= required_programs="perl" MAN= From owner-dev-commits-src-main@freebsd.org Tue Feb 23 17:59:23 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4D5CC54C3A6; Tue, 23 Feb 2021 17:59: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlRdR1n68z3tK1; Tue, 23 Feb 2021 17:59: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 2FFBC1DC55; Tue, 23 Feb 2021 17:59: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 11NHxN77035549; Tue, 23 Feb 2021 17:59:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NHxN7b035548; Tue, 23 Feb 2021 17:59:23 GMT (envelope-from git) Date: Tue, 23 Feb 2021 17:59:23 GMT Message-Id: <202102231759.11NHxN7b035548@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: fa32350347b4 - main - close_range: add audit support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa32350347b4e351a144b5423f0fb2ca9d67f4ca Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 17:59:23 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=fa32350347b4e351a144b5423f0fb2ca9d67f4ca commit fa32350347b4e351a144b5423f0fb2ca9d67f4ca Author: Alex Richardson AuthorDate: 2021-02-23 17:47:07 +0000 Commit: Alex Richardson CommitDate: 2021-02-23 17:47:07 +0000 close_range: add audit support This fixes the closefrom test in sys/audit. Includes cherry-picks of the following commits from openbsm: https://github.com/openbsm/openbsm/commit/4dfc628aafe589d68848f7033f3d3488c4d979e0 https://github.com/openbsm/openbsm/commit/99ff6fe32aebc5a4b8d40d60062b8574697df557 https://github.com/openbsm/openbsm/commit/da48a0399e95448693d3fa2be48454ca564c1be8 Reviewed By: kevans Differential Revision: https://reviews.freebsd.org/D28388 --- contrib/openbsm/etc/audit_event | 2 ++ contrib/openbsm/sys/bsm/audit_kevents.h | 2 ++ sys/kern/kern_descrip.c | 4 ++++ sys/security/audit/audit_bsm.c | 15 +++++++++++++++ tests/sys/audit/file-close.c | 4 ++-- 5 files changed, 25 insertions(+), 2 deletions(-) diff --git a/contrib/openbsm/etc/audit_event b/contrib/openbsm/etc/audit_event index b397674564c6..be3557597eee 100644 --- a/contrib/openbsm/etc/audit_event +++ b/contrib/openbsm/etc/audit_event @@ -614,6 +614,8 @@ 43261:AUE_LGETUUID:lgetuuid(2):ip 43262:AUE_EXECVEAT:execveat(2):pc,ex 43263:AUE_SHMRENAME:shm_rename(2):ip +43264:AUE_REALPATHAT:realpathat(2):fa +43265:AUE_CLOSERANGE:close_range(2):cl # # Solaris userspace events. # diff --git a/contrib/openbsm/sys/bsm/audit_kevents.h b/contrib/openbsm/sys/bsm/audit_kevents.h index afa8c0f37a31..ec51f501e3a7 100644 --- a/contrib/openbsm/sys/bsm/audit_kevents.h +++ b/contrib/openbsm/sys/bsm/audit_kevents.h @@ -653,6 +653,8 @@ #define AUE_LGETUUID 43261 /* CADETS. */ #define AUE_EXECVEAT 43262 /* FreeBSD/Linux. */ #define AUE_SHMRENAME 43263 /* FreeBSD-specific. */ +#define AUE_REALPATHAT 43264 /* FreeBSD-specific. */ +#define AUE_CLOSERANGE 43265 /* FreeBSD-specific. */ /* * Darwin BSM uses a number of AUE_O_* definitions, which are aliased to the diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 0813b6c8f3b8..67350f4ad71e 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1422,6 +1422,10 @@ int sys_close_range(struct thread *td, struct close_range_args *uap) { + AUDIT_ARG_FD(uap->lowfd); + AUDIT_ARG_CMD(uap->highfd); + AUDIT_ARG_FFLAGS(uap->flags); + /* No flags currently defined */ if (uap->flags != 0) return (EINVAL); diff --git a/sys/security/audit/audit_bsm.c b/sys/security/audit/audit_bsm.c index 6742470c9578..d350ef3cf3c2 100644 --- a/sys/security/audit/audit_bsm.c +++ b/sys/security/audit/audit_bsm.c @@ -941,6 +941,21 @@ kaudit_to_bsm(struct kaudit_record *kar, struct au_record **pau) } break; + case AUE_CLOSERANGE: + if (ARG_IS_VALID(kar, ARG_FD)) { + tok = au_to_arg32(1, "lowfd", ar->ar_arg_fd); + kau_write(rec, tok); + } + if (ARG_IS_VALID(kar, ARG_CMD)) { + tok = au_to_arg32(2, "highfd", ar->ar_arg_cmd); + kau_write(rec, tok); + } + if (ARG_IS_VALID(kar, ARG_FFLAGS)) { + tok = au_to_arg32(3, "flags", ar->ar_arg_fflags); + kau_write(rec, tok); + } + break; + case AUE_CORE: if (ARG_IS_VALID(kar, ARG_SIGNUM)) { tok = au_to_arg32(1, "signal", ar->ar_arg_signum); diff --git a/tests/sys/audit/file-close.c b/tests/sys/audit/file-close.c index 54d0e60977e3..f85a8e39b67d 100644 --- a/tests/sys/audit/file-close.c +++ b/tests/sys/audit/file-close.c @@ -154,10 +154,10 @@ ATF_TC_HEAD(closefrom_success, tc) ATF_TC_BODY(closefrom_success, tc) { - const char *regex = "closefrom.*return,success"; + const char *regex = "close_range\\(2\\),.*,0x7fffffff,lowfd,.*" + "0xffffffff,highfd,.*return,success"; FILE *pipefd = setup(fds, auclass); - atf_tc_expect_fail("closefrom was converted to close_range"); /* closefrom(2) returns 'void' */ closefrom(INT_MAX); check_audit(fds, regex, pipefd); From owner-dev-commits-src-main@freebsd.org Tue Feb 23 18:07:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DE81A54C4D8; Tue, 23 Feb 2021 18:07: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlRpt5yYLz3tWF; Tue, 23 Feb 2021 18:07: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 BF34B1E08B; Tue, 23 Feb 2021 18:07: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 11NI7Yw5049071; Tue, 23 Feb 2021 18:07:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NI7YgM049070; Tue, 23 Feb 2021 18:07:34 GMT (envelope-from git) Date: Tue, 23 Feb 2021 18:07:34 GMT Message-Id: <202102231807.11NI7YgM049070@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Daniel Ebdrup Jensen Subject: git: f695e960672d - main - release(7): Remove stray references to DOC* variables MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: debdrup X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f695e960672ddc45744aca085c1e22c80928f447 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 18:07:34 -0000 The branch main has been updated by debdrup (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=f695e960672ddc45744aca085c1e22c80928f447 commit f695e960672ddc45744aca085c1e22c80928f447 Author: Daniel Ebdrup Jensen AuthorDate: 2021-02-23 18:06:36 +0000 Commit: Daniel Ebdrup Jensen CommitDate: 2021-02-23 18:06:36 +0000 release(7): Remove stray references to DOC* variables We now live in the world of git, and release(7) should reflect that. As of the commit referenced below, release images also no longer include (stale) documentation, as the documentation has moved to AsciiDoctor. This means that a few environment variables no longer make sense, so remove them from their sections and mention them in the compatibility section instead. While here, also pet mandoc. PR: 253615 MFC after: 3 days MFC with: f61e92ca5a23 release: permanently remove the 'reldoc' target and associates Reviewed by: gjb, lwhsu, yuripv Differential Revision: https://reviews.freebsd.org/D28881 --- share/man/man7/release.7 | 72 ++++++++++++------------------------------------ 1 file changed, 18 insertions(+), 54 deletions(-) diff --git a/share/man/man7/release.7 b/share/man/man7/release.7 index 02ee2dfc0e5e..493c90cc1f44 100644 --- a/share/man/man7/release.7 +++ b/share/man/man7/release.7 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 1, 2020 +.Dd February 23, 2021 .Dt RELEASE 7 .Os .Sh NAME @@ -143,24 +143,18 @@ Additional .Xr make 1 arguments to pass through, which directly affect the tuning of the build chroot. -.It Va SVNROOT +.It Va GITROOT The -.Xr svn 1 +.Xr git 1 host used to check out the various trees. Defaults to -.Pa svn://svn.FreeeBSD.org . +.Pa https://git.FreeeBSD.org . .It Va SRCBRANCH The .Li src/ branch to use. Defaults to -.Va head/@rHEAD . -.It Va DOCBRANCH -The -.Li doc/ -branch to use. -Defaults to -.Va head/@rHEAD . +.Fl b Va main . .It Va PORTBRANCH The .Li ports/ @@ -226,15 +220,6 @@ Defaults to setting the number of jobs .Pq Ar -j to half the number of CPUs available on a SMP-capable system. -.It Va NODOC -Set to a non-empty value to skip the -.Li doc/ -tree checkout. -When set, -.Va NODOC -will prevent the -.Fa doc.txz -distribution package from being created. .It Va NOPORTS Set to a non-empty value to skip the .Li ports/ @@ -244,8 +229,6 @@ When set, will prevent the .Fa ports.txz distribution package from being created. -Setting this also sets -.Va NODOC . .It Va WITH_DVD Set to a non-empty value to include the .Cm dvdrom @@ -268,7 +251,7 @@ which uses all available cores on the system. .It Va VCSCMD The command run to obtain the source trees. Defaults to -.Qq Cm svn checkout . +.Qq Cm git clone Fl q . .It Va CHROOTBUILD_SKIP If defined, the .Li buildworld , @@ -289,14 +272,6 @@ within the This is intended for use only when .Fa /usr/src is expected to exist by alternative means. -.It Va DOC_UPDATE_SKIP -Set to a non-empty value to prevent checkout or update of -.Fa /usr/doc -within the -.Xr chroot 8 . -This is intended for use only when -.Fa /usr/doc -is expected to exist by alternative means. .It Va PORTS_UPDATE_SKIP Set to a non-empty value to prevent checkout or update of .Fa /usr/ports @@ -317,9 +292,7 @@ release builds. .Pp When set, .Va WITH_DVD -is unset, and -.Va NODOC -is defined. +is unset. Additionally, .Va EMBEDDED_TARGET and @@ -587,27 +560,10 @@ Location of a directory containing the ports tree. By default, .Pa /usr/ports . If it is unset or cannot be found, ports will not be included in the release. -.It Ev DOCDIR -Location of a directory containing the doc tree. -By default, -.Pa /usr/doc . -If it is unset or cannot be found, most documentation will not be included in -the release; see -.Ev NODOC -below. .It Ev NOPORTS If defined, the Ports Collection will be omitted from the release. .It Ev NOSRC If set, do not include system source code in the release. -.It Ev NODOC -If defined, the XML-based documentation from the -.Fx -Documentation Project will not be built. -However, the -.Dq doc -distribution will still be created with the minimal documentation set -provided in -.Pa src/share/doc . .It Ev TARGET The target hardware platform. This is analogous to the @@ -657,7 +613,7 @@ The following sequence of commands can be used to build a .Dq "-CURRENT snapshot": .Bd -literal -offset indent cd /usr -svn co svn://svn.freebsd.org/base/head src +git clone https://git.freebsd.org/src.git src cd src make buildworld buildkernel cd release @@ -714,11 +670,19 @@ The target directory can be changed by specifying the .Va CHROOTDIR variable in .Li release.conf . +.Sh COMPATIBILITY +The reldoc target was removed in commit f61e92ca5a23, and +.Ev DOCDIR , +.Ev DOCBRANCH , +.Ev DOC_UPDATE_SKIP , +and +.Ev NODOC +are therefore no longer supported. .Sh SEE ALSO .Xr cc 1 , +.Xr git 1 Pq Pa ports/devel/git , .Xr install 1 , .Xr make 1 , -.Xr svn 1 Pq Pa ports/devel/subversion , .Xr uname 1 , .Xr md 4 , .Xr make.conf 5 , @@ -771,7 +735,7 @@ is heavily based on the script. .Pp At near 1000 revisions spread over multiple branches, the -.Xr svn 1 +.Xr git 1 log of .Pa src/release/Makefile contains a vivid historical record of some From owner-dev-commits-src-main@freebsd.org Tue Feb 23 18:08:21 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 580DE54C8AB; Tue, 23 Feb 2021 18:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlRqm5JBXz3v31; Tue, 23 Feb 2021 18:08: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 922C41DFE6; Tue, 23 Feb 2021 18:08: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 11NI8KfA049315; Tue, 23 Feb 2021 18:08:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NI8KRS049314; Tue, 23 Feb 2021 18:08:20 GMT (envelope-from git) Date: Tue, 23 Feb 2021 18:08:20 GMT Message-Id: <202102231808.11NI8KRS049314@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: 3ae8d83d04a7 - main - Remove __NO_TLS. 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: 3ae8d83d04a7a6ec11b64c89ee60c180b0bde30e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 18:08:21 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3ae8d83d04a7a6ec11b64c89ee60c180b0bde30e commit 3ae8d83d04a7a6ec11b64c89ee60c180b0bde30e Author: Konstantin Belousov AuthorDate: 2021-02-19 15:20:29 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-23 18:08:10 +0000 Remove __NO_TLS. All supported platforms support thread-local vars and __thread. Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28796 --- include/runetype.h | 4 ++-- lib/libc/gen/getutxent.c | 5 ----- lib/libc/gen/utxdb.c | 4 ---- lib/libc/locale/setrunelocale.c | 4 ---- lib/libc/locale/xlocale.c | 15 +-------------- lib/libc/locale/xlocale_private.h | 5 +---- lib/libc/string/strerror.c | 5 ----- lib/libgssapi/gss_display_status.c | 10 ---------- sys/sys/cdefs.h | 4 ---- tests/sys/opencrypto/cryptodevh.py | 1 - 10 files changed, 4 insertions(+), 53 deletions(-) diff --git a/include/runetype.h b/include/runetype.h index 4aca128f8c8a..93007809dbf8 100644 --- a/include/runetype.h +++ b/include/runetype.h @@ -88,7 +88,7 @@ typedef struct { __BEGIN_DECLS extern const _RuneLocale _DefaultRuneLocale; extern const _RuneLocale *_CurrentRuneLocale; -#if defined(__NO_TLS) || defined(__RUNETYPE_INTERNAL) +#ifdef __RUNETYPE_INTERNAL extern const _RuneLocale *__getCurrentRuneLocale(void); #else extern _Thread_local const _RuneLocale *_ThreadRuneLocale; @@ -99,7 +99,7 @@ static __inline const _RuneLocale *__getCurrentRuneLocale(void) return _ThreadRuneLocale; return _CurrentRuneLocale; } -#endif /* __NO_TLS || __RUNETYPE_INTERNAL */ +#endif /*__RUNETYPE_INTERNAL */ #define _CurrentRuneLocale (__getCurrentRuneLocale()) __END_DECLS diff --git a/lib/libc/gen/getutxent.c b/lib/libc/gen/getutxent.c index e0d993221e7e..664498126f13 100644 --- a/lib/libc/gen/getutxent.c +++ b/lib/libc/gen/getutxent.c @@ -40,13 +40,8 @@ __FBSDID("$FreeBSD$"); #include "utxdb.h" #include "un-namespace.h" -#ifdef __NO_TLS -static FILE *uf = NULL; -static int udb; -#else static _Thread_local FILE *uf = NULL; static _Thread_local int udb; -#endif int setutxdb(int db, const char *file) diff --git a/lib/libc/gen/utxdb.c b/lib/libc/gen/utxdb.c index f8dea105702c..3edccdbd2c2f 100644 --- a/lib/libc/gen/utxdb.c +++ b/lib/libc/gen/utxdb.c @@ -128,11 +128,7 @@ utx_to_futx(const struct utmpx *ut, struct futx *fu) struct utmpx * futx_to_utx(const struct futx *fu) { -#ifdef __NO_TLS - static struct utmpx *ut; -#else static _Thread_local struct utmpx *ut; -#endif if (ut == NULL) { ut = calloc(1, sizeof *ut); diff --git a/lib/libc/locale/setrunelocale.c b/lib/libc/locale/setrunelocale.c index 2e6fed9466e4..551d32b7ab6a 100644 --- a/lib/libc/locale/setrunelocale.c +++ b/lib/libc/locale/setrunelocale.c @@ -56,12 +56,10 @@ __FBSDID("$FreeBSD$"); #undef _CurrentRuneLocale extern _RuneLocale const *_CurrentRuneLocale; -#ifndef __NO_TLS /* * A cached version of the runes for this thread. Used by ctype.h */ _Thread_local const _RuneLocale *_ThreadRuneLocale; -#endif extern int __mb_sb_limit; @@ -199,7 +197,6 @@ __wrap_setrunelocale(const char *locale) return (_LDP_LOADED); } -#ifndef __NO_TLS void __set_thread_rune_locale(locale_t loc) { @@ -212,7 +209,6 @@ __set_thread_rune_locale(locale_t loc) _ThreadRuneLocale = XLOCALE_CTYPE(loc)->runes; } } -#endif void * __ctype_load(const char *locale, locale_t unused __unused) diff --git a/lib/libc/locale/xlocale.c b/lib/libc/locale/xlocale.c index fb674f86bbff..d64262da809e 100644 --- a/lib/libc/locale/xlocale.c +++ b/lib/libc/locale/xlocale.c @@ -55,12 +55,11 @@ extern struct xlocale_component __xlocale_global_messages; extern struct xlocale_component __xlocale_C_collate; extern struct xlocale_component __xlocale_C_ctype; -#ifndef __NO_TLS /* * The locale for this thread. */ _Thread_local locale_t __thread_locale; -#endif + /* * Flag indicating that one or more per-thread locales exist. */ @@ -143,16 +142,6 @@ get_thread_locale(void) pthread_getspecific(locale_info_key)); } -#ifdef __NO_TLS -locale_t -__get_locale(void) -{ - locale_t l = get_thread_locale(); - return (l ? l : &__xlocale_global_locale); - -} -#endif - static void set_thread_locale(locale_t loc) { @@ -172,10 +161,8 @@ set_thread_locale(locale_t loc) } else { pthread_setspecific(locale_info_key, l); } -#ifndef __NO_TLS __thread_locale = l; __set_thread_rune_locale(loc); -#endif } /** diff --git a/lib/libc/locale/xlocale_private.h b/lib/libc/locale/xlocale_private.h index 391e375bc03d..bc40f28fc9eb 100644 --- a/lib/libc/locale/xlocale_private.h +++ b/lib/libc/locale/xlocale_private.h @@ -185,7 +185,7 @@ void __set_thread_rune_locale(locale_t loc); * locale has ever been set, then we always use the global locale. */ extern int __has_thread_locale; -#ifndef __NO_TLS + /** * The per-thread locale. Avoids the need to use pthread lookup functions when * getting the per-thread locale. @@ -206,9 +206,6 @@ static inline locale_t __get_locale(void) } return (__thread_locale ? __thread_locale : &__xlocale_global_locale); } -#else -locale_t __get_locale(void); -#endif /** * Two magic values are allowed for locale_t objects. NULL and -1. This diff --git a/lib/libc/string/strerror.c b/lib/libc/string/strerror.c index 11b9701d968f..bb685e4f7dc9 100644 --- a/lib/libc/string/strerror.c +++ b/lib/libc/string/strerror.c @@ -128,16 +128,11 @@ strerror_r(int errnum, char *strerrbuf, size_t buflen) 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 * diff --git a/lib/libgssapi/gss_display_status.c b/lib/libgssapi/gss_display_status.c index 55ca83ce9aa8..d0c3453a0d6b 100644 --- a/lib/libgssapi/gss_display_status.c +++ b/lib/libgssapi/gss_display_status.c @@ -174,16 +174,6 @@ supplementary_error(OM_uint32 v) return msgs[v]; } -#if defined(__NO_TLS) - -/* - * These platforms don't support TLS on FreeBSD - threads will just - * have to step on each other's error values for now. - */ -#define __thread - -#endif - struct mg_thread_ctx { gss_OID mech; OM_uint32 maj_stat; diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index ff18911f6acf..1d1fe2965c69 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -768,10 +768,6 @@ #endif #endif /* __STDC_WANT_LIB_EXT1__ */ -#if defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1) -#define __NO_TLS 1 -#endif - /* * Old versions of GCC use non-standard ARM arch symbols; acle-compat.h * translates them to __ARM_ARCH and the modern feature symbols defined by ARM. diff --git a/tests/sys/opencrypto/cryptodevh.py b/tests/sys/opencrypto/cryptodevh.py index be853f496930..c5719e47c8c1 100644 --- a/tests/sys/opencrypto/cryptodevh.py +++ b/tests/sys/opencrypto/cryptodevh.py @@ -133,7 +133,6 @@ __POSIX_VISIBLE = 200809 __XSI_VISIBLE = 700 __BSD_VISIBLE = 1 __ISO_C_VISIBLE = 2011 -__NO_TLS = 1 CRYPTO_DRIVERS_INITIAL = 4 CRYPTO_SW_SESSIONS = 32 NULL_HASH_LEN = 16 From owner-dev-commits-src-main@freebsd.org Tue Feb 23 18:12:15 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2669654D041; Tue, 23 Feb 2021 18:12: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlRwH0Zynz3vpj; Tue, 23 Feb 2021 18:12: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 065E71E1CB; Tue, 23 Feb 2021 18:12: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 11NICEj6061289; Tue, 23 Feb 2021 18:12:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NICEWu061288; Tue, 23 Feb 2021 18:12:14 GMT (envelope-from git) Date: Tue, 23 Feb 2021 18:12:14 GMT Message-Id: <202102231812.11NICEWu061288@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Daniel Ebdrup Jensen Subject: git: ef1a1fc7e828 - main - release(7) Fix mistake noted in review MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: debdrup X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef1a1fc7e828d640790fe849487221ef370a410a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 18:12:15 -0000 The branch main has been updated by debdrup (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ef1a1fc7e828d640790fe849487221ef370a410a commit ef1a1fc7e828d640790fe849487221ef370a410a Author: Daniel Ebdrup Jensen AuthorDate: 2021-02-23 18:10:21 +0000 Commit: Daniel Ebdrup Jensen CommitDate: 2021-02-23 18:11:54 +0000 release(7) Fix mistake noted in review I missed this when doing the final pass. Fixes: f695e960 release(7): Remove stray references to DOC* variables --- share/man/man7/release.7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man7/release.7 b/share/man/man7/release.7 index 493c90cc1f44..f176251d89cc 100644 --- a/share/man/man7/release.7 +++ b/share/man/man7/release.7 @@ -613,7 +613,7 @@ The following sequence of commands can be used to build a .Dq "-CURRENT snapshot": .Bd -literal -offset indent cd /usr -git clone https://git.freebsd.org/src.git src +git clone -b main https://git.freebsd.org/src.git src cd src make buildworld buildkernel cd release From owner-dev-commits-src-main@freebsd.org Tue Feb 23 19:56:46 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9112655072A; Tue, 23 Feb 2021 19:56:46 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlVDt3V1bz4Wyc; Tue, 23 Feb 2021 19:56:46 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (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 6500D17BD; Tue, 23 Feb 2021 19:56:46 +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 0A5FB27C0054; Tue, 23 Feb 2021 14:56:46 -0500 (EST) Received: from imap38 ([10.202.2.88]) by compute3.internal (MEProxy); Tue, 23 Feb 2021 14:56:46 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrkeehgddufedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdluddtmdenucfjughrpefofg ggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfuehrrghnughonhcuuegv rhhgrhgvnhdfuceosggurhgrghhonheshfhrvggvuefuffdrohhrgheqnecuggftrfgrth htvghrnhephfdvgfettdeuvedujeeugffhkeekjeefgfelkeelvedvfeeuhfelveefleel uddtnecuffhomhgrihhnpehfrhgvvggsshgurdhorhhgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepsggurhgrghhonhdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidquddtgedvfeehkeeigedqudekuddtkeehuddqsggurh grghhonheppefhrhgvvgeuufffrdhorhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id AD0FFCA005D; Tue, 23 Feb 2021 14:56:45 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-141-gf094924a34-fm-20210210.001-gf094924a Mime-Version: 1.0 Message-Id: <8fde15b6-1cfc-4fa8-88a8-90d5cbe28f6d@www.fastmail.com> In-Reply-To: <202102231808.11NI8KRS049314@gitrepo.freebsd.org> References: <202102231808.11NI8KRS049314@gitrepo.freebsd.org> Date: Tue, 23 Feb 2021 13:55:26 -0600 From: "Brandon Bergren" To: "Konstantin Belousov" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 3ae8d83d04a7 - main - Remove __NO_TLS. Content-Type: text/plain X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 19:56:46 -0000 MFC to stable/13 only, as MFCing to 12 or below would be an ABI break. On Tue, Feb 23, 2021, at 12:08 PM, Konstantin Belousov wrote: > The branch main has been updated by kib: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3ae8d83d04a7a6ec11b64c89ee60c180b0bde30e > > commit 3ae8d83d04a7a6ec11b64c89ee60c180b0bde30e > Author: Konstantin Belousov > AuthorDate: 2021-02-19 15:20:29 +0000 > Commit: Konstantin Belousov > CommitDate: 2021-02-23 18:08:10 +0000 > > Remove __NO_TLS. > > All supported platforms support thread-local vars and __thread. > > Reviewed by: emaste > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D28796 > --- -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-main@freebsd.org Tue Feb 23 19:57:52 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9A7A355098C; Tue, 23 Feb 2021 19:57: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlVG8401zz4X9v; Tue, 23 Feb 2021 19:57: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 7BCE11F78B; Tue, 23 Feb 2021 19:57: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 11NJvqVp093203; Tue, 23 Feb 2021 19:57:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NJvqws093202; Tue, 23 Feb 2021 19:57:52 GMT (envelope-from git) Date: Tue, 23 Feb 2021 19:57:52 GMT Message-Id: <202102231957.11NJvqws093202@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 6b7580f7b1b6 - main - camcontrol: change hueristic for I/O-less devtype MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b7580f7b1b66134286813b971ab575862b95426 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 19:57:52 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6b7580f7b1b66134286813b971ab575862b95426 commit 6b7580f7b1b66134286813b971ab575862b95426 Author: Warner Losh AuthorDate: 2021-02-23 19:33:26 +0000 Commit: Warner Losh CommitDate: 2021-02-23 19:56:15 +0000 camcontrol: change hueristic for I/O-less devtype Some SATA drives have 'config' set to 0 in the identify block. Rather than rely on it, use the strings windows uses to display the drive since they are supposed to be space padded and will always be non-zero. --- sbin/camcontrol/camcontrol.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index cc21a109343c..27d545d924b3 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -5520,9 +5520,14 @@ get_device_type(struct cam_device *dev, int retry_count, int timeout, * For a retry count of -1, used only the cached data to avoid * I/O to the drive. Sending the identify command to the drive * can cause issues for SATL attachaed drives since identify is - * not an NCQ command. + * not an NCQ command. We check for the strings that windows + * displays since those will not be NULs (they are supposed + * to be space padded). We could check other bits, but anything + * non-zero implies SATL. */ - if (cgd.ident_data.config != 0) + if (cgd.ident_data.serial[0] != 0 || + cgd.ident_data.revision[0] != 0 || + cgd.ident_data.model[0] != 0) *devtype = CC_DT_SATL; else *devtype = CC_DT_SCSI; From owner-dev-commits-src-main@freebsd.org Tue Feb 23 20:07:55 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 222C7550A3C; Tue, 23 Feb 2021 20:07: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlVTl0J1jz4Xd1; Tue, 23 Feb 2021 20:07: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 F11A51F764; Tue, 23 Feb 2021 20:07: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 11NK7sbx007083; Tue, 23 Feb 2021 20:07:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NK7sYE007082; Tue, 23 Feb 2021 20:07:54 GMT (envelope-from git) Date: Tue, 23 Feb 2021 20:07:54 GMT Message-Id: <202102232007.11NK7sYE007082@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Allan Jude Subject: git: 11ba8488b863 - main - iicsmb: Request the bus recursively in bread() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 11ba8488b8636a91668c0ee13d35d9e126dfba53 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 20:07:55 -0000 The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=11ba8488b8636a91668c0ee13d35d9e126dfba53 commit 11ba8488b8636a91668c0ee13d35d9e126dfba53 Author: Allan Jude AuthorDate: 2021-02-23 20:06:16 +0000 Commit: Allan Jude CommitDate: 2021-02-23 20:06:16 +0000 iicsmb: Request the bus recursively in bread() ipmi_ssif will `smbus_request_bus()` to do multiple smbus requests (which requests the iicbus), and then here in `bread()` we also need to request the bus because `bread()` takes multiple transactions. This causes deadlock as it's waiting for the bus it already has without `IIC_RECURSIVE`. Sponsored by: Ampere Computing LLC Submitted by: Klara Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D28742 --- sys/dev/iicbus/iicsmb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iicbus/iicsmb.c b/sys/dev/iicbus/iicsmb.c index 8e79452cf2a8..38e67c40d488 100644 --- a/sys/dev/iicbus/iicsmb.c +++ b/sys/dev/iicbus/iicsmb.c @@ -455,7 +455,7 @@ iicsmb_bread(device_t dev, u_char slave, char cmd, u_char *count, char *buf) int error; /* Have to do this because the command is split in two transfers. */ - error = iicbus_request_bus(parent, dev, IIC_WAIT); + error = iicbus_request_bus(parent, dev, IIC_WAIT | IIC_RECURSIVE); if (error == 0) error = TRANSFER_MSGS(dev, msgs); if (error == 0) { From owner-dev-commits-src-main@freebsd.org Tue Feb 23 20:10:22 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E0C98550E9F; Tue, 23 Feb 2021 20:10: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlVXZ65Kjz4Xqr; Tue, 23 Feb 2021 20:10: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 C432E1F9A4; Tue, 23 Feb 2021 20:10: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 11NKAM23014919; Tue, 23 Feb 2021 20:10:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NKAMFt014918; Tue, 23 Feb 2021 20:10:22 GMT (envelope-from git) Date: Tue, 23 Feb 2021 20:10:22 GMT Message-Id: <202102232010.11NKAMFt014918@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: cf97d2a1dab8 - main - Build lib/msun tests with compiler builtins disabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf97d2a1dab8f2cddc4466fe64d37818339c73be Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 20:10:22 -0000 The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=cf97d2a1dab8f2cddc4466fe64d37818339c73be commit cf97d2a1dab8f2cddc4466fe64d37818339c73be Author: Dimitry Andric AuthorDate: 2021-02-23 20:03:32 +0000 Commit: Dimitry Andric CommitDate: 2021-02-23 20:10:01 +0000 Build lib/msun tests with compiler builtins disabled This forces the compiler to emit calls to libm functions, instead of possibly substituting pre-calculated results at compile time, which should help to actually test those functions. Reviewed by: emaste, arichardson, ngie Differential Revision: https://reviews.freebsd.org/D28577 MFC after: 3 days --- lib/msun/tests/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/msun/tests/Makefile b/lib/msun/tests/Makefile index d58333271e9b..85a558bb0733 100644 --- a/lib/msun/tests/Makefile +++ b/lib/msun/tests/Makefile @@ -19,6 +19,10 @@ CFLAGS+= -I${TESTSRC:H}/libc/gen CFLAGS+= -D__HAVE_LONG_DOUBLE .endif +# Avoid builtins, to force the compiler to emit calls to the libm +# functions, and not calculate any results in advance. +CFLAGS+= -fno-builtin + NETBSD_ATF_TESTS_C= acos_test NETBSD_ATF_TESTS_C+= asin_test NETBSD_ATF_TESTS_C+= atan_test From owner-dev-commits-src-main@freebsd.org Tue Feb 23 21:19:57 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D80A0553406; Tue, 23 Feb 2021 21:19: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlX4s5pVMz4dsg; Tue, 23 Feb 2021 21:19: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 B0200205E4; Tue, 23 Feb 2021 21:19: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 11NLJvmA099501; Tue, 23 Feb 2021 21:19:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NLJvvL099500; Tue, 23 Feb 2021 21:19:57 GMT (envelope-from git) Date: Tue, 23 Feb 2021 21:19:57 GMT Message-Id: <202102232119.11NLJvvL099500@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Allan Jude Subject: git: d0673fe160b0 - main - smbios: Move smbios driver out from x86 machdep code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d0673fe160b04f8162f380926d455dfb966f08fb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 21:19:57 -0000 The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=d0673fe160b04f8162f380926d455dfb966f08fb commit d0673fe160b04f8162f380926d455dfb966f08fb Author: Allan Jude AuthorDate: 2021-02-23 21:14:18 +0000 Commit: Allan Jude CommitDate: 2021-02-23 21:17:09 +0000 smbios: Move smbios driver out from x86 machdep code Add it to the x86 GENERIC and MINIMAL kernels Sponsored by: Ampere Computing LLC Submitted by: Klara Inc. Reviewed by: rpokala Differential Revision: https://reviews.freebsd.org/D28738 --- sys/amd64/conf/GENERIC | 1 + sys/amd64/conf/MINIMAL | 1 + sys/amd64/include/pc/bios.h | 32 ----------------- sys/conf/files | 1 + sys/conf/files.x86 | 1 - sys/dev/ipmi/ipmi_smbios.c | 3 ++ sys/{x86/bios => dev/smbios}/smbios.c | 22 ++++++++---- sys/dev/smbios/smbios.h | 67 +++++++++++++++++++++++++++++++++++ sys/i386/conf/GENERIC | 1 + sys/i386/conf/MINIMAL | 1 + sys/i386/include/pc/bios.h | 32 ----------------- sys/modules/bios/smbios/Makefile | 2 +- 12 files changed, 92 insertions(+), 72 deletions(-) diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index cdee2a91554b..f5f4bdf49c5f 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -129,6 +129,7 @@ device cpufreq # Bus support. device acpi +device smbios options IOMMU device pci options PCI_HP # PCI-Express native HotPlug diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index 603fce8320bb..b4c58993748a 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -103,6 +103,7 @@ device cpufreq # Bus support. device acpi +device smbios options IOMMU device pci diff --git a/sys/amd64/include/pc/bios.h b/sys/amd64/include/pc/bios.h index 99e346a4a344..4b2d9af02558 100644 --- a/sys/amd64/include/pc/bios.h +++ b/sys/amd64/include/pc/bios.h @@ -64,38 +64,6 @@ struct bios_smap_xattr { u_int32_t xattr; } __packed; -/* - * System Management BIOS - */ -#define SMBIOS_START 0xf0000 -#define SMBIOS_STEP 0x10 -#define SMBIOS_OFF 0 -#define SMBIOS_LEN 4 -#define SMBIOS_SIG "_SM_" - -struct smbios_eps { - uint8_t anchor_string[4]; /* '_SM_' */ - uint8_t checksum; - uint8_t length; - uint8_t major_version; - uint8_t minor_version; - uint16_t maximum_structure_size; - uint8_t entry_point_revision; - uint8_t formatted_area[5]; - uint8_t intermediate_anchor_string[5]; /* '_DMI_' */ - uint8_t intermediate_checksum; - uint16_t structure_table_length; - uint32_t structure_table_address; - uint16_t number_structures; - uint8_t BCD_revision; -}; - -struct smbios_structure_header { - uint8_t type; - uint8_t length; - uint16_t handle; -}; - #ifdef _KERNEL #define BIOS_PADDRTOVADDR(x) ((x) + KERNBASE) #define BIOS_VADDRTOPADDR(x) ((x) - KERNBASE) diff --git a/sys/conf/files b/sys/conf/files index 58ec6f3caf2a..21990a4a762c 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3096,6 +3096,7 @@ dev/sge/if_sge.c optional sge pci dev/siis/siis.c optional siis pci dev/sis/if_sis.c optional sis pci dev/sk/if_sk.c optional sk pci +dev/smbios/smbios.c optional smbios dev/smbus/smb.c optional smb dev/smbus/smbconf.c optional smbus dev/smbus/smbus.c optional smbus diff --git a/sys/conf/files.x86 b/sys/conf/files.x86 index cb7fabf44cfb..59ff39ca053d 100644 --- a/sys/conf/files.x86 +++ b/sys/conf/files.x86 @@ -293,7 +293,6 @@ x86/acpica/OsdEnvironment.c optional acpi x86/acpica/acpi_apm.c optional acpi x86/acpica/acpi_wakeup.c optional acpi x86/acpica/srat.c optional acpi -x86/bios/smbios.c optional smbios x86/bios/vpd.c optional vpd x86/cpufreq/est.c optional cpufreq x86/cpufreq/hwpstate_amd.c optional cpufreq diff --git a/sys/dev/ipmi/ipmi_smbios.c b/sys/dev/ipmi/ipmi_smbios.c index df0a7f70e9cd..308a3b076ef7 100644 --- a/sys/dev/ipmi/ipmi_smbios.c +++ b/sys/dev/ipmi/ipmi_smbios.c @@ -39,7 +39,10 @@ __FBSDID("$FreeBSD$"); #include #include +#if defined(__amd64__) || defined(__i386__) #include +#endif +#include #ifdef LOCAL_MODULE #include diff --git a/sys/x86/bios/smbios.c b/sys/dev/smbios/smbios.c similarity index 93% rename from sys/x86/bios/smbios.c rename to sys/dev/smbios/smbios.c index 2e3a80c9c7e4..10589ed8d49d 100644 --- a/sys/x86/bios/smbios.c +++ b/sys/dev/smbios/smbios.c @@ -46,7 +46,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if defined(__amd64__) || defined(__i386__) #include +#endif +#include /* * System Management BIOS Reference Specification, v2.4 Final @@ -62,7 +65,6 @@ struct smbios_softc { }; #define RES2EPS(res) ((struct smbios_eps *)rman_get_virtual(res)) -#define ADDR2EPS(addr) ((struct smbios_eps *)BIOS_PADDRTOVADDR(addr)) static devclass_t smbios_devclass; @@ -77,25 +79,32 @@ static int smbios_cksum (struct smbios_eps *); static void smbios_identify (driver_t *driver, device_t parent) { + struct smbios_eps *eps; device_t child; - u_int32_t addr; + vm_paddr_t addr; int length; int rid; if (!device_is_alive(parent)) return; +#if defined(__amd64__) || defined(__i386__) addr = bios_sigsearch(SMBIOS_START, SMBIOS_SIG, SMBIOS_LEN, - SMBIOS_STEP, SMBIOS_OFF); + SMBIOS_STEP, SMBIOS_OFF); +#else + addr = 0; +#endif + if (addr != 0) { + eps = pmap_mapbios(addr, 0x1f); rid = 0; - length = ADDR2EPS(addr)->length; + length = eps->length; if (length != 0x1f) { u_int8_t major, minor; - major = ADDR2EPS(addr)->major_version; - minor = ADDR2EPS(addr)->minor_version; + major = eps->major_version; + minor = eps->minor_version; /* SMBIOS v2.1 implementation might use 0x1e. */ if (length == 0x1e && major == 2 && minor == 1) @@ -108,6 +117,7 @@ smbios_identify (driver_t *driver, device_t parent) device_set_driver(child, driver); bus_set_resource(child, SYS_RES_MEMORY, rid, addr, length); device_set_desc(child, "System Management BIOS"); + pmap_unmapbios((vm_offset_t)eps, 0x1f); } return; diff --git a/sys/dev/smbios/smbios.h b/sys/dev/smbios/smbios.h new file mode 100644 index 000000000000..6503cdb73c4c --- /dev/null +++ b/sys/dev/smbios/smbios.h @@ -0,0 +1,67 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 1997 Michael Smith + * Copyright (c) 1998 Jonathan Lemon + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SMBIOS_H_ +#define _SMBIOS_H_ + +/* + * System Management BIOS + */ +#define SMBIOS_START 0xf0000 +#define SMBIOS_STEP 0x10 +#define SMBIOS_OFF 0 +#define SMBIOS_LEN 4 +#define SMBIOS_SIG "_SM_" + +struct smbios_eps { + uint8_t anchor_string[4]; /* '_SM_' */ + uint8_t checksum; + uint8_t length; + uint8_t major_version; + uint8_t minor_version; + uint16_t maximum_structure_size; + uint8_t entry_point_revision; + uint8_t formatted_area[5]; + uint8_t intermediate_anchor_string[5]; /* '_DMI_' */ + uint8_t intermediate_checksum; + uint16_t structure_table_length; + uint32_t structure_table_address; + uint16_t number_structures; + uint8_t BCD_revision; +}; + +struct smbios_structure_header { + uint8_t type; + uint8_t length; + uint16_t handle; +}; + +#endif /* _SMBIOS_H_ */ diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index 7d4f195ba28a..874c3237ec77 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -115,6 +115,7 @@ device cpufreq # Bus support. device acpi +device smbios device pci options PCI_HP # PCI-Express native HotPlug options PCI_IOV # PCI SR-IOV support diff --git a/sys/i386/conf/MINIMAL b/sys/i386/conf/MINIMAL index faebfeaf99a8..8eed963b8f0a 100644 --- a/sys/i386/conf/MINIMAL +++ b/sys/i386/conf/MINIMAL @@ -104,6 +104,7 @@ device cpufreq # Bus support. device acpi +device smbios device pci # atkbdc0 controls both the keyboard and the PS/2 mouse diff --git a/sys/i386/include/pc/bios.h b/sys/i386/include/pc/bios.h index aced9712e846..eec5983bee46 100644 --- a/sys/i386/include/pc/bios.h +++ b/sys/i386/include/pc/bios.h @@ -234,38 +234,6 @@ struct bios_smap_xattr { u_int32_t xattr; } __packed; -/* - * System Management BIOS - */ -#define SMBIOS_START 0xf0000 -#define SMBIOS_STEP 0x10 -#define SMBIOS_OFF 0 -#define SMBIOS_LEN 4 -#define SMBIOS_SIG "_SM_" - -struct smbios_eps { - uint8_t anchor_string[4]; /* '_SM_' */ - uint8_t checksum; - uint8_t length; - uint8_t major_version; - uint8_t minor_version; - uint16_t maximum_structure_size; - uint8_t entry_point_revision; - uint8_t formatted_area[5]; - uint8_t intermediate_anchor_string[5]; /* '_DMI_' */ - uint8_t intermediate_checksum; - uint16_t structure_table_length; - uint32_t structure_table_address; - uint16_t number_structures; - uint8_t BCD_revision; -}; - -struct smbios_structure_header { - uint8_t type; - uint8_t length; - uint16_t handle; -}; - #ifdef _KERNEL #define BIOS_PADDRTOVADDR(x) ((x) + PMAP_MAP_LOW) #define BIOS_VADDRTOPADDR(x) ((x) - PMAP_MAP_LOW) diff --git a/sys/modules/bios/smbios/Makefile b/sys/modules/bios/smbios/Makefile index ff8d22b764aa..58301eca17d6 100644 --- a/sys/modules/bios/smbios/Makefile +++ b/sys/modules/bios/smbios/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ # -.PATH: ${SRCTOP}/sys/x86/bios +.PATH: ${SRCTOP}/sys/dev/smbios KMOD= smbios SRCS= smbios.c \ From owner-dev-commits-src-main@freebsd.org Tue Feb 23 21:19:59 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0242055333F; Tue, 23 Feb 2021 21:19: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlX4t6gjPz4dfX; Tue, 23 Feb 2021 21:19: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 D802C205E5; Tue, 23 Feb 2021 21:19: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 11NLJwKR099524; Tue, 23 Feb 2021 21:19:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NLJw17099523; Tue, 23 Feb 2021 21:19:58 GMT (envelope-from git) Date: Tue, 23 Feb 2021 21:19:58 GMT Message-Id: <202102232119.11NLJw17099523@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Allan Jude Subject: git: ba6e37e47f41 - main - ipmi_smbios: Deduplicate smbios entry point discovery logic MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ba6e37e47f41484fc61cc034619267b82ddd056c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 21:19:59 -0000 The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=ba6e37e47f41484fc61cc034619267b82ddd056c commit ba6e37e47f41484fc61cc034619267b82ddd056c Author: Allan Jude AuthorDate: 2021-02-23 21:17:37 +0000 Commit: Allan Jude CommitDate: 2021-02-23 21:17:37 +0000 ipmi_smbios: Deduplicate smbios entry point discovery logic Sponsored by: Ampere Computing LLC Submitted by: Klara Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D28743 --- sys/dev/ipmi/ipmi_isa.c | 1 + sys/dev/ipmi/ipmi_pci.c | 1 + sys/dev/ipmi/ipmi_smbios.c | 46 ++++++++++++++++------------------------------ sys/dev/ipmi/ipmi_smbus.c | 1 + sys/dev/smbios/smbios.c | 21 +++++++++++++++++++++ sys/dev/smbios/smbios.h | 2 ++ 6 files changed, 42 insertions(+), 30 deletions(-) diff --git a/sys/dev/ipmi/ipmi_isa.c b/sys/dev/ipmi/ipmi_isa.c index cdff305b07ec..2831b53e4586 100644 --- a/sys/dev/ipmi/ipmi_isa.c +++ b/sys/dev/ipmi/ipmi_isa.c @@ -286,3 +286,4 @@ static driver_t ipmi_isa_driver = { }; DRIVER_MODULE(ipmi_isa, isa, ipmi_isa_driver, ipmi_devclass, 0, 0); +MODULE_DEPEND(ipmi_isa, smbios, 1, 1, 1); diff --git a/sys/dev/ipmi/ipmi_pci.c b/sys/dev/ipmi/ipmi_pci.c index d4598f9db873..1697a4c31c2a 100644 --- a/sys/dev/ipmi/ipmi_pci.c +++ b/sys/dev/ipmi/ipmi_pci.c @@ -179,6 +179,7 @@ static driver_t ipmi_pci_driver = { }; DRIVER_MODULE(ipmi_pci, pci, ipmi_pci_driver, ipmi_devclass, 0, 0); +MODULE_DEPEND(ipmi_pci, smbios, 1, 1, 1); /* Native IPMI on PCI driver. */ diff --git a/sys/dev/ipmi/ipmi_smbios.c b/sys/dev/ipmi/ipmi_smbios.c index 308a3b076ef7..735f404eec5f 100644 --- a/sys/dev/ipmi/ipmi_smbios.c +++ b/sys/dev/ipmi/ipmi_smbios.c @@ -88,7 +88,7 @@ MTX_SYSINIT(ipmi_info, &ipmi_info_mtx, "ipmi info", MTX_DEF); static void ipmi_smbios_probe(struct ipmi_get_info *); static int smbios_cksum(struct smbios_eps *); -static void smbios_walk_table(uint8_t *, int, smbios_callback_t, +static void smbios_walk_table(uint8_t *, vm_size_t, smbios_callback_t, void *); static void smbios_ipmi_info(struct smbios_structure_header *, void *); @@ -147,11 +147,12 @@ smbios_ipmi_info(struct smbios_structure_header *h, void *arg) } static void -smbios_walk_table(uint8_t *p, int entries, smbios_callback_t cb, void *arg) +smbios_walk_table(uint8_t *table, vm_size_t size, smbios_callback_t cb, void *arg) { struct smbios_structure_header *s; + uint8_t *p; - while (entries--) { + for (p = table; p < table + size;) { s = (struct smbios_structure_header *)p; cb(s, arg); @@ -160,8 +161,11 @@ smbios_walk_table(uint8_t *p, int entries, smbios_callback_t cb, void *arg) * formatted area of this structure. */ p += s->length; - while (!(p[0] == 0 && p[1] == 0)) + while (!(p[0] == 0 && p[1] == 0)) { p++; + if (p >= table + size) + return; + } /* * Skip over the double-nul to the start of the next @@ -179,41 +183,23 @@ smbios_walk_table(uint8_t *p, int entries, smbios_callback_t cb, void *arg) static void ipmi_smbios_probe(struct ipmi_get_info *info) { - struct smbios_eps *header; void *table; - u_int32_t addr; + vm_paddr_t table_paddr; + vm_size_t table_size; + int err; bzero(info, sizeof(struct ipmi_get_info)); - /* Find the SMBIOS table header. */ - addr = bios_sigsearch(SMBIOS_START, SMBIOS_SIG, SMBIOS_LEN, - SMBIOS_STEP, SMBIOS_OFF); - if (addr == 0) + err = smbios_get_structure_table(&table_paddr, &table_size); + if (err != 0) return; - /* - * Map the header. We first map a fixed size to get the actual - * length and then map it a second time with the actual length so - * we can verify the checksum. - */ - header = pmap_mapbios(addr, sizeof(struct smbios_eps)); - table = pmap_mapbios(addr, header->length); - pmap_unmapbios((vm_offset_t)header, sizeof(struct smbios_eps)); - header = table; - if (smbios_cksum(header) != 0) { - pmap_unmapbios((vm_offset_t)header, header->length); - return; - } + table = pmap_mapbios(table_paddr, table_size); - /* Now map the actual table and walk it looking for an IPMI entry. */ - table = pmap_mapbios(header->structure_table_address, - header->structure_table_length); - smbios_walk_table(table, header->number_structures, smbios_ipmi_info, - info); + smbios_walk_table(table, table_size, smbios_ipmi_info, info); /* Unmap everything. */ - pmap_unmapbios((vm_offset_t)table, header->structure_table_length); - pmap_unmapbios((vm_offset_t)header, header->length); + pmap_unmapbios((vm_offset_t)table, table_size); } /* diff --git a/sys/dev/ipmi/ipmi_smbus.c b/sys/dev/ipmi/ipmi_smbus.c index 212248f0217e..bc7377e5aee8 100644 --- a/sys/dev/ipmi/ipmi_smbus.c +++ b/sys/dev/ipmi/ipmi_smbus.c @@ -131,3 +131,4 @@ static driver_t ipmi_smbus_driver = { DRIVER_MODULE(ipmi_smbus, smbus, ipmi_smbus_driver, ipmi_devclass, 0, 0); MODULE_DEPEND(ipmi_smbus, smbus, SMBUS_MINVER, SMBUS_PREFVER, SMBUS_MAXVER); +MODULE_DEPEND(ipmi_smbus, smbios, 1, 1, 1); diff --git a/sys/dev/smbios/smbios.c b/sys/dev/smbios/smbios.c index 10589ed8d49d..00c7e2c98d2a 100644 --- a/sys/dev/smbios/smbios.c +++ b/sys/dev/smbios/smbios.c @@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$"); #endif #include +static struct smbios_softc *smbios; + /* * System Management BIOS Reference Specification, v2.4 Final * http://www.dmtf.org/standards/published_documents/DSP0134.pdf @@ -179,6 +181,7 @@ smbios_attach (device_t dev) bcd2bin(sc->eps->BCD_revision & 0x0f)); printf("\n"); + smbios = sc; return (0); bad: if (sc->res) @@ -191,6 +194,7 @@ smbios_detach (device_t dev) { struct smbios_softc *sc; + smbios = NULL; sc = device_get_softc(dev); if (sc->res) @@ -199,6 +203,23 @@ smbios_detach (device_t dev) return (0); } +int +smbios_get_structure_table(vm_paddr_t *table, vm_size_t *size) +{ + + if (smbios == NULL) + return (ENXIO); + if (smbios->eps_64bit) { + *table = smbios->eps3->structure_table_address; + *size = smbios->eps3->structure_table_max_size; + } else { + *table = smbios->eps->structure_table_address; + *size = smbios->eps->structure_table_length; + } + return (0); +} + + static int smbios_modevent (mod, what, arg) module_t mod; diff --git a/sys/dev/smbios/smbios.h b/sys/dev/smbios/smbios.h index 6503cdb73c4c..554b882f1da4 100644 --- a/sys/dev/smbios/smbios.h +++ b/sys/dev/smbios/smbios.h @@ -32,6 +32,8 @@ #ifndef _SMBIOS_H_ #define _SMBIOS_H_ +int smbios_get_structure_table(vm_paddr_t *table, vm_size_t *size); + /* * System Management BIOS */ From owner-dev-commits-src-main@freebsd.org Tue Feb 23 21:24:30 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 51C3F5536A6; Tue, 23 Feb 2021 21:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlXB60bN1z4fb8; Tue, 23 Feb 2021 21:24: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 01E18209CA; Tue, 23 Feb 2021 21: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 11NLOT76012355; Tue, 23 Feb 2021 21:24:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NLOT27012354; Tue, 23 Feb 2021 21:24:29 GMT (envelope-from git) Date: Tue, 23 Feb 2021 21:24:29 GMT Message-Id: <202102232124.11NLOT27012354@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Nathan Whitehorn Subject: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nwhitehorn X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b7472b3d8d2f1e90fade5236b44fd98d8e396c2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 21:24:30 -0000 The branch main has been updated by nwhitehorn: URL: https://cgit.FreeBSD.org/src/commit/?id=0b7472b3d8d2f1e90fade5236b44fd98d8e396c2 commit 0b7472b3d8d2f1e90fade5236b44fd98d8e396c2 Author: Nathan Whitehorn AuthorDate: 2021-02-23 21:16:52 +0000 Commit: Nathan Whitehorn CommitDate: 2021-02-23 21:24:21 +0000 Mount the EFI system partition (ESP) on newly-installed systems. Per hier(7), the ESP will be mounted at /boot/efi. On UFS systems, any existing ESP will be reused and mounted there; otherwise, a new one will be made. On ZFS systems, space for an ESP is allocated on all disks in the root pool, but only the partition actually used to boot is set up and mounted. This makes future upgrades of the EFI loader easier (upgrade scripts can just change /boot/efi) and also greatly simplifies the parts of the installer involved in initialization of the ESP. It also makes the installer's behavior correspond to the documentation in hier(7). Reviewed by: imp, tsoome MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D28897 --- usr.sbin/bsdinstall/partedit/gpart_ops.c | 12 +-- usr.sbin/bsdinstall/partedit/partedit_efi.c | 1 + usr.sbin/bsdinstall/partedit/partedit_x86.c | 4 +- usr.sbin/bsdinstall/scripts/bootconfig | 150 +++++----------------------- usr.sbin/bsdinstall/scripts/zfsboot | 19 +++- 5 files changed, 48 insertions(+), 138 deletions(-) diff --git a/usr.sbin/bsdinstall/partedit/gpart_ops.c b/usr.sbin/bsdinstall/partedit/gpart_ops.c index e68a02b4264c..b49ff1c9fd42 100644 --- a/usr.sbin/bsdinstall/partedit/gpart_ops.c +++ b/usr.sbin/bsdinstall/partedit/gpart_ops.c @@ -707,18 +707,8 @@ set_default_part_metadata(const char *name, const char *scheme, if (strcmp(type, "freebsd-swap") == 0) mountpoint = "none"; if (strcmp(type, bootpart_type(scheme, &default_bootmount)) == 0) { - if (default_bootmount == NULL) { - - int fd = openat(tmpdfd, "bsdinstall-esps", - O_CREAT | O_WRONLY | O_APPEND, 0600); - if (fd > 0) { - write(fd, md->name, strlen(md->name)); - write(fd, "\n", 1); - close(fd); - } - + if (default_bootmount == NULL) md->bootcode = 1; - } else if (mountpoint == NULL || strlen(mountpoint) == 0) mountpoint = default_bootmount; } diff --git a/usr.sbin/bsdinstall/partedit/partedit_efi.c b/usr.sbin/bsdinstall/partedit/partedit_efi.c index 85b3b15d1853..074475e07152 100644 --- a/usr.sbin/bsdinstall/partedit/partedit_efi.c +++ b/usr.sbin/bsdinstall/partedit/partedit_efi.c @@ -85,6 +85,7 @@ bootpart_type(const char *scheme, const char **mountpoint) { /* Only EFI is supported as boot partition */ + *mountpoint = "/boot/efi"; return ("efi"); } diff --git a/usr.sbin/bsdinstall/partedit/partedit_x86.c b/usr.sbin/bsdinstall/partedit/partedit_x86.c index e81adcad5f6b..6983188ba34f 100644 --- a/usr.sbin/bsdinstall/partedit/partedit_x86.c +++ b/usr.sbin/bsdinstall/partedit/partedit_x86.c @@ -113,8 +113,10 @@ const char * bootpart_type(const char *scheme, const char **mountpoint) { - if (strcmp(x86_bootmethod(), "UEFI") == 0) + if (strcmp(x86_bootmethod(), "UEFI") == 0) { + *mountpoint = "/boot/efi"; return ("efi"); + } return ("freebsd-boot"); } diff --git a/usr.sbin/bsdinstall/scripts/bootconfig b/usr.sbin/bsdinstall/scripts/bootconfig index f07fb3065c23..088d88ca9b2f 100755 --- a/usr.sbin/bsdinstall/scripts/bootconfig +++ b/usr.sbin/bsdinstall/scripts/bootconfig @@ -46,84 +46,8 @@ if [ `uname -m` == powerpc ]; then fi fi -# Update the ESP (EFI System Partition) with the new bootloader -if [ "$(uname -m)" = "amd64" ] || [ "$(uname -m)" = "i386" ]; then - X86_BOOTMETHOD=$(sysctl -n machdep.bootmethod) -fi - -if [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "riscv" ] || [ "$X86_BOOTMETHOD" = "UEFI" ]; then - UFSBOOT_ESPS=$(cat $TMPDIR/bsdinstall-esps 2>/dev/null) - ZFSBOOT_DISKS=$(cat $TMPDIR/bsdinstall-zfsboot 2>/dev/null) - num_esps=0 - - if [ -n "$ZFSBOOT_DISKS" ]; then - # We're in a ZFS install environment - for disk in $ZFSBOOT_DISKS; do - index=$(gpart show "$disk" | cut -w -f 4,5 | grep "efi" | cut -w -f 1) - # Check that $index is an integer - [ -n "$index" ] && [ "$index" -eq "$index" ] && [ "$index" -ge 0 ] 2> /dev/null - if [ $? -ne 0 ]; then - continue - fi - - if [ -e "/dev/${disk}p${index}" ]; then - ESPS="$ESPS ${disk}p${index}" - elif [ -e "/dev/${disk}s${index}" ]; then - ESPS="$ESPS ${disk}s${index}" - else - continue - fi - - num_esps=$((num_esps + 1)) - done - fi - - if [ -n "$UFSBOOT_ESPS" ]; then - # We're in a UFS install environment - for partition in $UFSBOOT_ESPS; do - ESPS="$ESPS $partition" - num_esps=$((num_esps + 1)) - done - fi - - if [ -z "$ESPS" ]; then - # The installer hasn't given us any ESPs to use. - # Try and figure out which to use by looking for an - # unformatted efi partition - - for geom in $(gpart status -sg | awk '{print $1}'); do - hasfreebsd=$(gpart show "${geom}" | cut -w -f 4,5 | grep "freebsd") - if [ -n "$hasfreebsd" ]; then - index=$(gpart show "${geom}" | cut -w -f 4,5 | grep "efi" | cut -w -f 1) - # Check that $index is a valid integer - [ -n "$index" ] && [ "$index" -eq "$index" ] && [ "$index" -ge 0 ] 2> /dev/null - if [ $? -ne 0 ]; then - continue - fi - - mntpt=$(mktemp -d $TMPDIR/stand-test.XXXXXX) - if [ -e "/dev/${geom}p${index}" ]; then - dev=${geom}p${index} - elif [ -e "/dev/${geom}s${index}" ]; then - dev=/${geom}s${index} - else - continue - fi - - # Try and mount it. If it fails, assume it's - # unformatted and should be used. - mount -t msdosfs -o ro "/dev/${dev}" "${mntpt}" - if [ $? -ne 0 ]; then - ESPS="$ESPS ${dev}" - num_esps=$((num_esps + 1)) - else - umount "${mntpt}" - fi - rmdir "${mntpt}" - fi - done - fi - +# Update the ESP (EFI System Partition) with the new bootloader if we have an ESP +if [ -d "$BSDINSTALL_CHROOT/boot/efi" ]; then case $(uname -m) in arm64) ARCHBOOTNAME=aa64 ;; amd64) ARCHBOOTNAME=x64 ;; @@ -136,55 +60,33 @@ if [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "riscv" ] || [ "$X86_BOOTMET BOOTNAME="${BOOTDIR}/boot${ARCHBOOTNAME}.efi" FREEBSD_BOOTDIR="/efi/freebsd" FREEBSD_BOOTNAME="${FREEBSD_BOOTDIR}/loader.efi" + mntpt="$BSDINSTALL_CHROOT/boot/efi" + + f_dprintf "Installing loader.efi onto ESP" + mkdir -p "${mntpt}/${FREEBSD_BOOTDIR}" "${mntpt}/${BOOTDIR}" + cp "$BSDINSTALL_CHROOT/boot/loader.efi" "${mntpt}/${FREEBSD_BOOTNAME}" + + # + # The following shouldn't be necessary. UEFI defines a way to + # specifically select what to boot (which we do via + # efibootmgr). However, virtual environments often times lack + # support for the NV variables efibootmgr sets. In addition, + # some UEFI implementations have features that interfere with + # the setting of these variables. To combat that, we install the + # default removable media boot file as a fallback if it doesn't + # exist. We don't install it all the time since that can + # interfere with other installations on the drive (like rEFInd). + # + if [ ! -f "${mntpt}/${BOOTNAME}" ]; then + cp "$BSDINSTALL_CHROOT/boot/loader.efi" "${mntpt}/${BOOTNAME}" + fi - for esp in $ESPS; do - f_dprintf "Formatting /dev/${esp} as FAT32" - newfs_msdos -F 32 -c 1 -L EFISYS "/dev/$esp" > /dev/null 2>&1 - if [ $? -ne 0 ]; then - die "Failed to format ESP $esp as FAT32" - fi - - mntpt=$(mktemp -d $TMPDIR/stand-test.XXXXXX) - f_dprintf "Mounting ESP /dev/${esp}" - mount -t msdosfs "/dev/${esp}" "${mntpt}" - if [ $? -ne 0 ]; then - die "Failed to mount ESP ${dev} on ${mntpt}" - fi - - f_dprintf "Installing loader.efi onto ESP" - mkdir -p "${mntpt}/${FREEBSD_BOOTDIR}" "${mntpt}/${BOOTDIR}" - cp "$BSDINSTALL_CHROOT/boot/loader.efi" "${mntpt}/${FREEBSD_BOOTNAME}" - - # - # The following shouldn't be necessary. UEFI defines a way to - # specifically select what to boot (which we do via - # efibootmgr). However, virtual environments often times lack - # support for the NV variables efibootmgr sets. In addition, - # some UEFI implementations have features that interfere with - # the setting of these variables. To combat that, we install the - # default removable media boot file as a fallback if it doesn't - # exist. We don't install it all the time since that can - # interfere with other installations on the drive (like rEFInd). - # - if [ ! -f "${mntpt}/${BOOTNAME}" ]; then - cp "$BSDINSTALL_CHROOT/boot/loader.efi" "${mntpt}/${BOOTNAME}" - fi - - if [ "$num_esps" -gt 1 ]; then - bootlabel="FreeBSD (${esp})" - else - bootlabel="FreeBSD" - fi - - f_dprintf "Creating UEFI boot entry" - efibootmgr --create --activate --label "$bootlabel" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null + bootlabel="FreeBSD" - f_dprintf "Unmounting ESP" - umount "${mntpt}" - rmdir "${mntpt}" + f_dprintf "Creating UEFI boot entry" + efibootmgr --create --activate --label "$bootlabel" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null - f_dprintf "Finished configuring /dev/${esp} as ESP" - done + f_dprintf "Finished configuring ESP" fi # Add boot0cfg for MBR BIOS booting? diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index 33cec0ef9ae9..3b673addb10a 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -213,6 +213,7 @@ KLDLOAD='kldload %s' LN_SF='ln -sf "%s" "%s"' MKDIR_P='mkdir -p "%s"' MOUNT_TYPE='mount -t %s "%s" "%s"' +NEWFS_ESP='newfs_msdos "%s"' PRINTF_CONF="printf '%s=\"%%s\"\\\n' %s >> \"%s\"" PRINTF_FSTAB='printf "$FSTAB_FMT" "%s" "%s" "%s" "%s" "%s" "%s" >> "%s"' SHELL_TRUNCATE=':> "%s"' @@ -845,12 +846,25 @@ zfs_create_diskpart() if [ "$ZFSBOOT_BOOT_TYPE" = "UEFI" -o \ "$ZFSBOOT_BOOT_TYPE" = "BIOS+UEFI" ] then - f_eval_catch $funcname gpart \ + f_eval_catch -k justaddedpart $funcname gpart \ "$GPART_ADD_ALIGN_LABEL_WITH_SIZE" \ - "$align_small" efiboot$index efi 200M \ + "$align_small" efiboot$index efi 260M \ $disk || return $FAILURE # We'll configure the ESP in bootconfig + if [ -z "$efibootpart" ]; then + efibootpart="/dev/$(echo $justaddedpart | cut -f 1 -d ' ')" + f_dprintf "$funcname: configuring ESP at [%s]" \ + "${efibootpart}" + + f_eval_catch $funcname newfs_msdos "$NEWFS_ESP"\ + "$efibootpart" \ + || return $FAILURE + f_eval_catch $funcname printf "$PRINTF_FSTAB" \ + $efibootpart /boot/efi msdosfs \ + rw 2 2 "$BSDINSTALL_TMPETC/fstab" \ + || return $FAILURE + fi fi if [ "$ZFSBOOT_BOOT_TYPE" = "BIOS" -o \ @@ -1066,6 +1080,7 @@ zfs_create_boot() local isswapmirror local bootpart targetpart swappart # Set by zfs_create_diskpart() below local create_options + local efibootpart # # Pedantic checks; should never be seen From owner-dev-commits-src-main@freebsd.org Tue Feb 23 21:24:58 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 35CC355384D; Tue, 23 Feb 2021 21:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlXBf15n7z4fYJ; Tue, 23 Feb 2021 21:24: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 18AD620B8E; Tue, 23 Feb 2021 21:24: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 11NLOvIW012552; Tue, 23 Feb 2021 21:24:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NLOvtr012551; Tue, 23 Feb 2021 21:24:57 GMT (envelope-from git) Date: Tue, 23 Feb 2021 21:24:57 GMT Message-Id: <202102232124.11NLOvtr012551@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Allan Jude Subject: git: d2589dc3d56c - main - ipmi_smbios: remove unused smbios_cksum function MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d2589dc3d56ce063b28b54df11c950c3758d9578 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 21:24:58 -0000 The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=d2589dc3d56ce063b28b54df11c950c3758d9578 commit d2589dc3d56ce063b28b54df11c950c3758d9578 Author: Allan Jude AuthorDate: 2021-02-23 21:24:12 +0000 Commit: Allan Jude CommitDate: 2021-02-23 21:24:47 +0000 ipmi_smbios: remove unused smbios_cksum function Sponsored By: Ampere Computing LLC Submitted By: Klara Inc. Differential Revision: https://reviews.freebsd.org/D28751 --- sys/dev/ipmi/ipmi_smbios.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/sys/dev/ipmi/ipmi_smbios.c b/sys/dev/ipmi/ipmi_smbios.c index 735f404eec5f..f7bc50d5173e 100644 --- a/sys/dev/ipmi/ipmi_smbios.c +++ b/sys/dev/ipmi/ipmi_smbios.c @@ -87,7 +87,6 @@ static struct mtx ipmi_info_mtx; MTX_SYSINIT(ipmi_info, &ipmi_info_mtx, "ipmi info", MTX_DEF); static void ipmi_smbios_probe(struct ipmi_get_info *); -static int smbios_cksum(struct smbios_eps *); static void smbios_walk_table(uint8_t *, vm_size_t, smbios_callback_t, void *); static void smbios_ipmi_info(struct smbios_structure_header *, void *); @@ -237,19 +236,3 @@ ipmi_smbios_identify(struct ipmi_get_info *info) return (info->iface_type != 0); } - -static int -smbios_cksum(struct smbios_eps *e) -{ - u_int8_t *ptr; - u_int8_t cksum; - int i; - - ptr = (u_int8_t *)e; - cksum = 0; - for (i = 0; i < e->length; i++) { - cksum += ptr[i]; - } - - return (cksum); -} From owner-dev-commits-src-main@freebsd.org Tue Feb 23 21:26:43 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2F79A553957; Tue, 23 Feb 2021 21:26: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlXDg0sVLz4fyf; Tue, 23 Feb 2021 21:26: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 0FFCA20833; Tue, 23 Feb 2021 21:26: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 11NLQg4C012933; Tue, 23 Feb 2021 21:26:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NLQgnO012932; Tue, 23 Feb 2021 21:26:42 GMT (envelope-from git) Date: Tue, 23 Feb 2021 21:26:42 GMT Message-Id: <202102232126.11NLQgnO012932@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Daniel Ebdrup Jensen Subject: git: 408edcca0746 - main - rc.conf(5): Add note about parallel startup variable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: debdrup X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 408edcca0746d15303e0b47bbf31a6d4aa721363 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 21:26:43 -0000 The branch main has been updated by debdrup (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=408edcca0746d15303e0b47bbf31a6d4aa721363 commit 408edcca0746d15303e0b47bbf31a6d4aa721363 Author: Daniel Ebdrup Jensen AuthorDate: 2021-02-23 21:25:44 +0000 Commit: Daniel Ebdrup Jensen CommitDate: 2021-02-23 21:26:31 +0000 rc.conf(5): Add note about parallel startup variable The commit below added parallel service startup, and it needs to be documented, so people know about it. PR: 249192 MFC with: 77e1ccbee3ed Reviewed by: yuripv Differential Revision: https://reviews.freebsd.org/D28898 --- share/man/man5/rc.conf.5 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 473406660b8b..fef0f167d1a5 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 10, 2021 +.Dd February 23, 2021 .Dt RC.CONF 5 .Os .Sh NAME @@ -140,6 +140,14 @@ If set to show .Dq Starting foo: when faststart is used (e.g., at boot time). +.It Va rc_parallel_start +.Pq Vt bool +If set to +.Dq Li YES , +enable parallel startup of services. +Care should be taken to ensure that no loops occur, by using +.Nm rcorder +.Fl p . .It Va early_late_divider .Pq Vt str The name of the script that should be used as the @@ -4670,6 +4678,7 @@ it will be made permanently active. .Xr quotaon 8 , .Xr rc 8 , .Xr rc.sendmail 8 , +.Xr rcorder 8 , .Xr rfcomm_pppd 8 , .Xr route 8 , .Xr routed 8 , From owner-dev-commits-src-main@freebsd.org Tue Feb 23 21:59:58 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 31621554B9B for ; Tue, 23 Feb 2021 21:59:58 +0000 (UTC) (envelope-from 01000177d0e7f038-fd1faee6-0ad1-4d3a-9f37-96d3da242ceb-000000@amazonses.com) Received: from a8-56.smtp-out.amazonses.com (a8-56.smtp-out.amazonses.com [54.240.8.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlXz20pkTz4jDM for ; Tue, 23 Feb 2021 21:59:57 +0000 (UTC) (envelope-from 01000177d0e7f038-fd1faee6-0ad1-4d3a-9f37-96d3da242ceb-000000@amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=dqtolf56kk3wpt62c3jnwboqvr7iedax; d=tarsnap.com; t=1614117597; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=HFSeP4OTjDLH8jFuswbLsbPbmTgEpGEFIqwwA3T6iDo=; b=JXj++Os0qQJ/NqJ2oDNj+MqvI6brdYJAtDiZa2L/obS8Bh9L0eoFR+TD5ZWk/97x B5MRb+g1O8vcIgLjwiyHsYSf9uNcV3W+VnGRgMfeRK5aR8SiZU0447T/yn0/Fvek8y7 dPzkj8QJwPkZ/bgBlxEkSC/rYSIIKmNKZrukAjw0= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1614117597; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=HFSeP4OTjDLH8jFuswbLsbPbmTgEpGEFIqwwA3T6iDo=; b=Rt/P4BYecAkJ1RLYc3KDbItw0BX77B7ntcfO/cdK4UU2igcwfQQyg2+hr+ufLU3f VE43temSMirDrmXNJLq1sxgoz4mci6G1dgcrVA9ITqTTE1Esk1h4+ZIWyBZ6s5ujM/g YMp7TbagT1bz1XKwkQ+krvVKw8PnHLp7/2Z/xF9c= Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. To: Nathan Whitehorn , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> From: Colin Percival Message-ID: <01000177d0e7f038-fd1faee6-0ad1-4d3a-9f37-96d3da242ceb-000000@email.amazonses.com> Date: Tue, 23 Feb 2021 21:59:57 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <202102232124.11NLOT27012354@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SES-Outgoing: 2021.02.23-54.240.8.56 Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-Rspamd-Queue-Id: 4DlXz20pkTz4jDM 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 21:59:58 -0000 On 2/23/21 1:24 PM, Nathan Whitehorn wrote: > Mount the EFI system partition (ESP) on newly-installed systems. Should we do this in VM/cloudware images too? -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-dev-commits-src-main@freebsd.org Tue Feb 23 22:02:24 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3925A5549DC; Tue, 23 Feb 2021 22:02:24 +0000 (UTC) (envelope-from nwhitehorn@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlY1r1DJyz4jLq; Tue, 23 Feb 2021 22:02:24 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:e908:86d2:b976:1c3e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id E6B781FDE; Tue, 23 Feb 2021 22:02:23 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. To: Colin Percival , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <01000177d0e7f033-389acb59-2004-4040-ba7c-762878ef86b4-000000@email.amazonses.com> From: Nathan Whitehorn Message-ID: Date: Tue, 23 Feb 2021 17:02:22 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <01000177d0e7f033-389acb59-2004-4040-ba7c-762878ef86b4-000000@email.amazonses.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 22:02:24 -0000 On 2/23/21 4:59 PM, Colin Percival wrote: > On 2/23/21 1:24 PM, Nathan Whitehorn wrote: >> Mount the EFI system partition (ESP) on newly-installed systems. > Should we do this in VM/cloudware images too? > That's a good point. I think so, though I don't have the time or test setup to make that change. -Nathan From owner-dev-commits-src-main@freebsd.org Tue Feb 23 22:03:43 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E0258554E6A; Tue, 23 Feb 2021 22:03:43 +0000 (UTC) (envelope-from crees@bayofrum.net) Received: from mail263c50.megamailservers.eu (mail1421c50.megamailservers.eu [91.136.14.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlY3M2xWfz4jpJ; Tue, 23 Feb 2021 22:03:43 +0000 (UTC) (envelope-from crees@bayofrum.net) X-Authenticated-User: crees@uwclub.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1614117820; bh=jK8ISz6uZowfcCq8ooktI6ZPH0YAS6pZXxHp9CfnfkA=; h=Date:In-Reply-To:References:Subject:To:From:From; b=aICUXcczsz4+YIMfhmjTnE1mJVTtjHW1+/KiYr4KyNPNL4KFScdpHPVImQ59zhmf0 XNUBXm0YObC64hS0Tmuwpd+85cml/1x/Twk4zN4InfG7cY7a/7PR1xpYyNiS//8F0m KRG4rSPWOHu1nzuW3AoK8NHKxJSQgxzsSPfQwQ3I= Feedback-ID: crees@bayofrum. Received: from pegasus.bayofrum.net (81-178-238-223.dsl.pipex.com [81.178.238.223]) (authenticated bits=0) by mail263c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 11NM3cG7008769; Tue, 23 Feb 2021 22:03:40 +0000 X-Spam-Status: No X-bayofrum-MailScanner-From: crees@bayofrum.net X-bayofrum-MailScanner: Found to be clean X-bayofrum-MailScanner-ID: 64748915C.A4293 X-bayofrum-MailScanner-Information: Please contact the ISP for more information Received: from [192.168.1.120] (unknown [192.168.1.120]) by pegasus.bayofrum.net (Postfix) with ESMTPSA id 64748915C; Tue, 23 Feb 2021 22:03:35 +0000 (GMT) Date: Tue, 23 Feb 2021 22:03:35 +0000 User-Agent: K-9 Mail for Android In-Reply-To: <202102231027.11NARYYE041280@gitrepo.freebsd.org> References: <202102231027.11NARYYE041280@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: git: 77e1ccbee3ed - main - rc: implement parallel boot To: dev-commits-src-all@freebsd.org, Baptiste Daroussin , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Chris Rees Message-ID: <6D4FCE07-B996-430C-8EA8-6CB37A6DEEE8@bayofrum.net> X-CTCH-RefID: str=0001.0A742F23.60357BBC.0062, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=fdHTNHYF c=1 sm=1 tr=0 a=VPjlEbx5XC2baNimRf67MQ==:117 a=VPjlEbx5XC2baNimRf67MQ==:17 a=IkcTkHD0fZMA:10 a=qa6Q16uM49sA:10 a=6I5d2MoRAAAA:8 a=pGLkceISAAAA:8 a=IfVgSExIhUPS_bJByyIA:9 a=QEXdDO2ut3YA:10 a=IjZwj45LgO3ly-622nXo:22 X-Origin-Country: GB X-Rspamd-Queue-Id: 4DlY3M2xWfz4jpJ 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 22:03:43 -0000 Hi, On 23 February 2021 10:27:34 GMT, Baptiste Daroussin = wrote: >The branch main has been updated by bapt: > >URL: >https://cgit=2EFreeBSD=2Eorg/src/commit/?id=3D77e1ccbee3ed6c837929e4e232f= d07f95bfc8294 > >commit 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 >Author: Rick Parrish >AuthorDate: 2021-02-07 06:15:21 +0000 >Commit: Baptiste Daroussin >CommitDate: 2021-02-23 10:16:53 +0000 > > rc: implement parallel boot > =20 > take advantage of the rcorder -p argument to implement parallel > booting in rc=2E > =20 > According to the author non scientific tests: > on a Core 2 Duo with spinning disk: > =20 > | Services enabled | before | after | saving | > | 0 | 8s | 8s | 0 | > | 1 | 13s | 13s | 0 | > | 2 | 17s | 13s | 5 | > | 3 | 23s | 13s | 10 | > | 4 | 28s | 13s | 15 | > | 5 | 33s | 13s | 20 | > =20 > PR: 249192 > MFC after: 3 weeks >--- > libexec/rc/rc | 49 ++++++++++++++++++++++++++++++++++--------------- > 1 file changed, 34 insertions(+), 15 deletions(-) > >diff --git a/libexec/rc/rc b/libexec/rc/rc >index 35db4a850516=2E=2E722d7fe35884 100644 >--- a/libexec/rc/rc >+++ b/libexec/rc/rc >@@ -91,19 +91,31 @@ if ! [ -e ${firstboot_sentinel} ]; then > skip_firstboot=3D"-s firstboot" > fi >=20 >+# rc_parallel_start default is "NO" >+rc_parallel_start=3D${rc_parallel_start:-NO} Should this go in defaults/rc=2Econf? Chris From owner-dev-commits-src-main@freebsd.org Tue Feb 23 22:24:51 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 953C95555EE; Tue, 23 Feb 2021 22:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlYWl3r0zz4kk5; Tue, 23 Feb 2021 22:24: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 76A76217E1; Tue, 23 Feb 2021 22:24: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 11NMOp6D091224; Tue, 23 Feb 2021 22:24:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NMOpFu091223; Tue, 23 Feb 2021 22:24:51 GMT (envelope-from git) Date: Tue, 23 Feb 2021 22:24:51 GMT Message-Id: <202102232224.11NMOpFu091223@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: bbacb7ce7295 - main - ig4: Add PCI IDs for Intel Gemini Lake I2C controller. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bbacb7ce72956a41c0daeefe875e5209d87c11ba Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 22:24:51 -0000 The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=bbacb7ce72956a41c0daeefe875e5209d87c11ba commit bbacb7ce72956a41c0daeefe875e5209d87c11ba Author: Vladimir Kondratyev AuthorDate: 2021-02-23 22:20:36 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-02-23 22:23:43 +0000 ig4: Add PCI IDs for Intel Gemini Lake I2C controller. Submitted by: Dmitry Luhtionov MFC after: 2 weeks --- sys/dev/ichiic/ig4_iic.c | 6 ++++++ sys/dev/ichiic/ig4_pci.c | 16 ++++++++++++++++ sys/dev/ichiic/ig4_var.h | 3 ++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/sys/dev/ichiic/ig4_iic.c b/sys/dev/ichiic/ig4_iic.c index 4781154f03c8..12a103fc20d5 100644 --- a/sys/dev/ichiic/ig4_iic.c +++ b/sys/dev/ichiic/ig4_iic.c @@ -125,6 +125,12 @@ static const struct ig4_hw ig4iic_hw[] = { .scl_fall_time = 208, .sda_hold_time = 42, }, + [IG4_GEMINILAKE] = { + .ic_clock_rate = 133, + .sda_fall_time = 171, + .scl_fall_time = 290, + .sda_hold_time = 313, + }, }; static int ig4iic_set_config(ig4iic_softc_t *sc, bool reset); diff --git a/sys/dev/ichiic/ig4_pci.c b/sys/dev/ichiic/ig4_pci.c index 4667709e2fa2..2d80a8b1800a 100644 --- a/sys/dev/ichiic/ig4_pci.c +++ b/sys/dev/ichiic/ig4_pci.c @@ -136,6 +136,14 @@ static int ig4iic_pci_detach(device_t dev); #define PCI_CHIP_TIGERLAKE_LP_I2C_5 0xa0e98086 #define PCI_CHIP_TIGERLAKE_LP_I2C_6 0xa0ea8086 #define PCI_CHIP_TIGERLAKE_LP_I2C_7 0xa0eb8086 +#define PCI_CHIP_GEMINILAKE_I2C_0 0x31ac8086 +#define PCI_CHIP_GEMINILAKE_I2C_1 0x31ae8086 +#define PCI_CHIP_GEMINILAKE_I2C_2 0x31b08086 +#define PCI_CHIP_GEMINILAKE_I2C_3 0x31b28086 +#define PCI_CHIP_GEMINILAKE_I2C_4 0x31b48086 +#define PCI_CHIP_GEMINILAKE_I2C_5 0x31b68086 +#define PCI_CHIP_GEMINILAKE_I2C_6 0x31b88086 +#define PCI_CHIP_GEMINILAKE_I2C_7 0x31ba8086 struct ig4iic_pci_device { uint32_t devid; @@ -214,6 +222,14 @@ static struct ig4iic_pci_device ig4iic_pci_devices[] = { { PCI_CHIP_TIGERLAKE_LP_I2C_5, "Intel Tiger Lake-LP I2C Controller-5", IG4_SKYLAKE}, { PCI_CHIP_TIGERLAKE_LP_I2C_6, "Intel Tiger Lake-LP I2C Controller-6", IG4_SKYLAKE}, { PCI_CHIP_TIGERLAKE_LP_I2C_7, "Intel Tiger Lake-LP I2C Controller-7", IG4_SKYLAKE}, + { PCI_CHIP_GEMINILAKE_I2C_0, "Intel Gemini Lake I2C Controller-0", IG4_GEMINILAKE}, + { PCI_CHIP_GEMINILAKE_I2C_1, "Intel Gemini Lake I2C Controller-1", IG4_GEMINILAKE}, + { PCI_CHIP_GEMINILAKE_I2C_2, "Intel Gemini Lake I2C Controller-2", IG4_GEMINILAKE}, + { PCI_CHIP_GEMINILAKE_I2C_3, "Intel Gemini Lake I2C Controller-3", IG4_GEMINILAKE}, + { PCI_CHIP_GEMINILAKE_I2C_4, "Intel Gemini Lake I2C Controller-4", IG4_GEMINILAKE}, + { PCI_CHIP_GEMINILAKE_I2C_5, "Intel Gemini Lake I2C Controller-5", IG4_GEMINILAKE}, + { PCI_CHIP_GEMINILAKE_I2C_6, "Intel Gemini Lake I2C Controller-6", IG4_GEMINILAKE}, + { PCI_CHIP_GEMINILAKE_I2C_7, "Intel Gemini Lake I2C Controller-7", IG4_GEMINILAKE}, }; static int diff --git a/sys/dev/ichiic/ig4_var.h b/sys/dev/ichiic/ig4_var.h index 7a94e4f5cffd..da81980039f1 100644 --- a/sys/dev/ichiic/ig4_var.h +++ b/sys/dev/ichiic/ig4_var.h @@ -49,7 +49,8 @@ enum ig4_vers { IG4_SKYLAKE, IG4_APL, IG4_CANNONLAKE, - IG4_TIGERLAKE + IG4_TIGERLAKE, + IG4_GEMINILAKE }; /* Controller has additional registers */ From owner-dev-commits-src-main@freebsd.org Tue Feb 23 22:39:21 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1EF6C555A85 for ; Tue, 23 Feb 2021 22:39:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) (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 4DlYrT0BW1z4lhD for ; Tue, 23 Feb 2021 22:39:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82b.google.com with SMTP id f17so79361qth.7 for ; Tue, 23 Feb 2021 14:39:20 -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=PS9c5VNnt3RCV+qZp3iku5LVDdgoep5VosthyidhE9o=; b=dB5pgyWNiXQ9QOp1ygKpz8vHjsdqKUugV/SN7QfPigUAuG1xUzAwTpeu6p5Ajk18Ru b9ES+Pmv3wBQtD4wIW0dRKv/d8fvznAbUx26oHoy924dQQMilphZhcAgd+2yp5ItdBhl O9FIZ9Dfd0Hir2NwXUHkMbS1VYK4czppqqKZ0YTxxpQOzAI6ncqv+1DSePzJ2Zv70vxv kKxCwppAoyJHPXF44n8cWjtC+61jDl8Cv7beaTyeCQU6d4TBtDiYQszF0r+u1ZLor5AM RFQYiTGij0+p+zCv+9ou2Xiv/PtOdwK86K7W66Wq0vxLIfMyLTTjjjno/59plKBsp32k 0IPQ== 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=PS9c5VNnt3RCV+qZp3iku5LVDdgoep5VosthyidhE9o=; b=lSz5VhjkfSsmTkB/oEdNIvWw8xP0gCCPq+K/UEXEVrNt+bszxLBNjt0BtXU68OPv8j hvvRJc2cy2Knvwzte2U9ZSMYUZUfMqsO8Z6CHzuxURWR4TyTXGMDc1eCaWJ6Lq+otfaj bYiqhwu5IwM1et5Sq0D2WxvmsUm1IfioJxKmgiGXhDXbIA0bK2pXoRqlsudO7DFnXyLh BBEgTO7alp7w1srYHlcKvMsnt1G+fzM2RjtUx8XHVgbUwGJbIWhcSey33HxZrVYmygdy lYFHfABUmjbhMBhhvr/YmiiAkaD00HmSPF+uMOFD2OpVVeZpPKTh5lLU4kj68Sw9b1g7 UPYQ== X-Gm-Message-State: AOAM530SD9JpNVGq4MaD/4sxm69thvbMU4LZmgCImd32kRqr8716XlXu meLlMxHEWqRHkd0oaHbBHYKNU2/7MTYBB0dssZ7YWQ== X-Google-Smtp-Source: ABdhPJzWvawL1aeEOav4+EwYcRieBAtoT7SYq82MwpD7ZSGKMNXVCdGoF70Jq/4p87mHF2yeu4qKlA8nXl+eXVXITW4= X-Received: by 2002:ac8:5154:: with SMTP id h20mr3818257qtn.73.1614119959668; Tue, 23 Feb 2021 14:39:19 -0800 (PST) MIME-Version: 1.0 References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <01000177d0e7f033-389acb59-2004-4040-ba7c-762878ef86b4-000000@email.amazonses.com> In-Reply-To: From: Warner Losh Date: Tue, 23 Feb 2021 15:39:08 -0700 Message-ID: Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. To: Nathan Whitehorn Cc: Colin Percival , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4DlYrT0BW1z4lhD 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 22:39:21 -0000 On Tue, Feb 23, 2021 at 3:02 PM Nathan Whitehorn wrote: > > > On 2/23/21 4:59 PM, Colin Percival wrote: > > On 2/23/21 1:24 PM, Nathan Whitehorn wrote: > >> Mount the EFI system partition (ESP) on newly-installed systems. > > Should we do this in VM/cloudware images too? > > > > That's a good point. I think so, though I don't have the time or test > setup to make that change. > It would be best if we could do it. Warner From owner-dev-commits-src-main@freebsd.org Tue Feb 23 22:40:41 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E37E555B8D; Tue, 23 Feb 2021 22:40: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlYt10p0Rz4lZG; Tue, 23 Feb 2021 22:40: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 0DA81216E3; Tue, 23 Feb 2021 22:40: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 11NMeenZ013098; Tue, 23 Feb 2021 22:40:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NMee1T013097; Tue, 23 Feb 2021 22:40:40 GMT (envelope-from git) Date: Tue, 23 Feb 2021 22:40:40 GMT Message-Id: <202102232240.11NMee1T013097@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 9c4a8d24f0ff - main - Fix nd6 rib_action() handling. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c4a8d24f0ffd5243fa5c6fe27178f669f16d1f5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 22:40:41 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=9c4a8d24f0ffd5243fa5c6fe27178f669f16d1f5 commit 9c4a8d24f0ffd5243fa5c6fe27178f669f16d1f5 Author: Alexander V. Chernikov AuthorDate: 2021-02-23 22:31:07 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-02-23 22:40:01 +0000 Fix nd6 rib_action() handling. rib_action() guarantees valid rc filling IFF it returns without error. Check rib_action() return code instead of checking rc fields. PR: 253800 Reported by: Frederic Denis MFC after: immediately --- sys/netinet6/nd6_rtr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index eca704dc2843..51b831a956bc 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -698,12 +698,11 @@ defrouter_addreq(struct nd_defrouter *new) NET_EPOCH_ASSERT(); error = rib_action(fibnum, RTM_ADD, &info, &rc); - if (rc.rc_rt != NULL) { + if (error == 0) { struct nhop_object *nh = nhop_select(rc.rc_nh_new, 0); rt_routemsg(RTM_ADD, rc.rc_rt, nh, fibnum); - } - if (error == 0) new->installed = 1; + } } /* @@ -719,6 +718,7 @@ defrouter_delreq(struct nd_defrouter *dr) struct rib_cmd_info rc; struct epoch_tracker et; unsigned int fibnum; + int error; bzero(&def, sizeof(def)); bzero(&mask, sizeof(mask)); @@ -737,8 +737,8 @@ defrouter_delreq(struct nd_defrouter *dr) info.rti_info[RTAX_NETMASK] = (struct sockaddr *)&mask; NET_EPOCH_ENTER(et); - rib_action(fibnum, RTM_DELETE, &info, &rc); - if (rc.rc_rt != NULL) { + error = rib_action(fibnum, RTM_DELETE, &info, &rc); + if (error == 0) { struct nhop_object *nh = nhop_select(rc.rc_nh_old, 0); rt_routemsg(RTM_DELETE, rc.rc_rt, nh, fibnum); } From owner-dev-commits-src-main@freebsd.org Tue Feb 23 22:49:29 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E0C1C556C66; Tue, 23 Feb 2021 22: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlZ4961N7z4mbh; Tue, 23 Feb 2021 22: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 BD42021B1B; Tue, 23 Feb 2021 22: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 11NMnTKD018711; Tue, 23 Feb 2021 22: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 11NMnTal018710; Tue, 23 Feb 2021 22:49:29 GMT (envelope-from git) Date: Tue, 23 Feb 2021 22:49:29 GMT Message-Id: <202102232249.11NMnTal018710@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Allan Jude Subject: git: 4a5dfded17ef - main - Revert "ipmi_smbios: remove unused smbios_cksum function" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4a5dfded17efb48fd04bcc8d69b70597b8cea808 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 22:49:29 -0000 The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=4a5dfded17efb48fd04bcc8d69b70597b8cea808 commit 4a5dfded17efb48fd04bcc8d69b70597b8cea808 Author: Allan Jude AuthorDate: 2021-02-23 22:48:37 +0000 Commit: Allan Jude CommitDate: 2021-02-23 22:48:59 +0000 Revert "ipmi_smbios: remove unused smbios_cksum function" This reverts commit d2589dc3d56ce063b28b54df11c950c3758d9578. --- sys/dev/ipmi/ipmi_smbios.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sys/dev/ipmi/ipmi_smbios.c b/sys/dev/ipmi/ipmi_smbios.c index f7bc50d5173e..735f404eec5f 100644 --- a/sys/dev/ipmi/ipmi_smbios.c +++ b/sys/dev/ipmi/ipmi_smbios.c @@ -87,6 +87,7 @@ static struct mtx ipmi_info_mtx; MTX_SYSINIT(ipmi_info, &ipmi_info_mtx, "ipmi info", MTX_DEF); static void ipmi_smbios_probe(struct ipmi_get_info *); +static int smbios_cksum(struct smbios_eps *); static void smbios_walk_table(uint8_t *, vm_size_t, smbios_callback_t, void *); static void smbios_ipmi_info(struct smbios_structure_header *, void *); @@ -236,3 +237,19 @@ ipmi_smbios_identify(struct ipmi_get_info *info) return (info->iface_type != 0); } + +static int +smbios_cksum(struct smbios_eps *e) +{ + u_int8_t *ptr; + u_int8_t cksum; + int i; + + ptr = (u_int8_t *)e; + cksum = 0; + for (i = 0; i < e->length; i++) { + cksum += ptr[i]; + } + + return (cksum); +} From owner-dev-commits-src-main@freebsd.org Tue Feb 23 22:49:30 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E7CF955718F; Tue, 23 Feb 2021 22:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlZ4B6GwWz4mvc; Tue, 23 Feb 2021 22:49: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 CA61A21C93; Tue, 23 Feb 2021 22:49: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 11NMnUvm018734; Tue, 23 Feb 2021 22:49:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11NMnUSw018733; Tue, 23 Feb 2021 22:49:30 GMT (envelope-from git) Date: Tue, 23 Feb 2021 22:49:30 GMT Message-Id: <202102232249.11NMnUSw018733@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Allan Jude Subject: git: 6d67af5f8e66 - main - Revert "ipmi_smbios: Deduplicate smbios entry point discovery logic" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d67af5f8e66218ab0b3d927837fe00903c2feac Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 22:49:31 -0000 The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=6d67af5f8e66218ab0b3d927837fe00903c2feac commit 6d67af5f8e66218ab0b3d927837fe00903c2feac Author: Allan Jude AuthorDate: 2021-02-23 22:48:42 +0000 Commit: Allan Jude CommitDate: 2021-02-23 22:49:13 +0000 Revert "ipmi_smbios: Deduplicate smbios entry point discovery logic" This depends on another commit that has not landed yet, and broke the build This reverts commit ba6e37e47f41484fc61cc034619267b82ddd056c. --- sys/dev/ipmi/ipmi_isa.c | 1 - sys/dev/ipmi/ipmi_pci.c | 1 - sys/dev/ipmi/ipmi_smbios.c | 46 ++++++++++++++++++++++++++++++---------------- sys/dev/ipmi/ipmi_smbus.c | 1 - sys/dev/smbios/smbios.c | 21 --------------------- sys/dev/smbios/smbios.h | 2 -- 6 files changed, 30 insertions(+), 42 deletions(-) diff --git a/sys/dev/ipmi/ipmi_isa.c b/sys/dev/ipmi/ipmi_isa.c index 2831b53e4586..cdff305b07ec 100644 --- a/sys/dev/ipmi/ipmi_isa.c +++ b/sys/dev/ipmi/ipmi_isa.c @@ -286,4 +286,3 @@ static driver_t ipmi_isa_driver = { }; DRIVER_MODULE(ipmi_isa, isa, ipmi_isa_driver, ipmi_devclass, 0, 0); -MODULE_DEPEND(ipmi_isa, smbios, 1, 1, 1); diff --git a/sys/dev/ipmi/ipmi_pci.c b/sys/dev/ipmi/ipmi_pci.c index 1697a4c31c2a..d4598f9db873 100644 --- a/sys/dev/ipmi/ipmi_pci.c +++ b/sys/dev/ipmi/ipmi_pci.c @@ -179,7 +179,6 @@ static driver_t ipmi_pci_driver = { }; DRIVER_MODULE(ipmi_pci, pci, ipmi_pci_driver, ipmi_devclass, 0, 0); -MODULE_DEPEND(ipmi_pci, smbios, 1, 1, 1); /* Native IPMI on PCI driver. */ diff --git a/sys/dev/ipmi/ipmi_smbios.c b/sys/dev/ipmi/ipmi_smbios.c index 735f404eec5f..308a3b076ef7 100644 --- a/sys/dev/ipmi/ipmi_smbios.c +++ b/sys/dev/ipmi/ipmi_smbios.c @@ -88,7 +88,7 @@ MTX_SYSINIT(ipmi_info, &ipmi_info_mtx, "ipmi info", MTX_DEF); static void ipmi_smbios_probe(struct ipmi_get_info *); static int smbios_cksum(struct smbios_eps *); -static void smbios_walk_table(uint8_t *, vm_size_t, smbios_callback_t, +static void smbios_walk_table(uint8_t *, int, smbios_callback_t, void *); static void smbios_ipmi_info(struct smbios_structure_header *, void *); @@ -147,12 +147,11 @@ smbios_ipmi_info(struct smbios_structure_header *h, void *arg) } static void -smbios_walk_table(uint8_t *table, vm_size_t size, smbios_callback_t cb, void *arg) +smbios_walk_table(uint8_t *p, int entries, smbios_callback_t cb, void *arg) { struct smbios_structure_header *s; - uint8_t *p; - for (p = table; p < table + size;) { + while (entries--) { s = (struct smbios_structure_header *)p; cb(s, arg); @@ -161,11 +160,8 @@ smbios_walk_table(uint8_t *table, vm_size_t size, smbios_callback_t cb, void *ar * formatted area of this structure. */ p += s->length; - while (!(p[0] == 0 && p[1] == 0)) { + while (!(p[0] == 0 && p[1] == 0)) p++; - if (p >= table + size) - return; - } /* * Skip over the double-nul to the start of the next @@ -183,23 +179,41 @@ smbios_walk_table(uint8_t *table, vm_size_t size, smbios_callback_t cb, void *ar static void ipmi_smbios_probe(struct ipmi_get_info *info) { + struct smbios_eps *header; void *table; - vm_paddr_t table_paddr; - vm_size_t table_size; - int err; + u_int32_t addr; bzero(info, sizeof(struct ipmi_get_info)); - err = smbios_get_structure_table(&table_paddr, &table_size); - if (err != 0) + /* Find the SMBIOS table header. */ + addr = bios_sigsearch(SMBIOS_START, SMBIOS_SIG, SMBIOS_LEN, + SMBIOS_STEP, SMBIOS_OFF); + if (addr == 0) return; - table = pmap_mapbios(table_paddr, table_size); + /* + * Map the header. We first map a fixed size to get the actual + * length and then map it a second time with the actual length so + * we can verify the checksum. + */ + header = pmap_mapbios(addr, sizeof(struct smbios_eps)); + table = pmap_mapbios(addr, header->length); + pmap_unmapbios((vm_offset_t)header, sizeof(struct smbios_eps)); + header = table; + if (smbios_cksum(header) != 0) { + pmap_unmapbios((vm_offset_t)header, header->length); + return; + } - smbios_walk_table(table, table_size, smbios_ipmi_info, info); + /* Now map the actual table and walk it looking for an IPMI entry. */ + table = pmap_mapbios(header->structure_table_address, + header->structure_table_length); + smbios_walk_table(table, header->number_structures, smbios_ipmi_info, + info); /* Unmap everything. */ - pmap_unmapbios((vm_offset_t)table, table_size); + pmap_unmapbios((vm_offset_t)table, header->structure_table_length); + pmap_unmapbios((vm_offset_t)header, header->length); } /* diff --git a/sys/dev/ipmi/ipmi_smbus.c b/sys/dev/ipmi/ipmi_smbus.c index bc7377e5aee8..212248f0217e 100644 --- a/sys/dev/ipmi/ipmi_smbus.c +++ b/sys/dev/ipmi/ipmi_smbus.c @@ -131,4 +131,3 @@ static driver_t ipmi_smbus_driver = { DRIVER_MODULE(ipmi_smbus, smbus, ipmi_smbus_driver, ipmi_devclass, 0, 0); MODULE_DEPEND(ipmi_smbus, smbus, SMBUS_MINVER, SMBUS_PREFVER, SMBUS_MAXVER); -MODULE_DEPEND(ipmi_smbus, smbios, 1, 1, 1); diff --git a/sys/dev/smbios/smbios.c b/sys/dev/smbios/smbios.c index 00c7e2c98d2a..10589ed8d49d 100644 --- a/sys/dev/smbios/smbios.c +++ b/sys/dev/smbios/smbios.c @@ -51,8 +51,6 @@ __FBSDID("$FreeBSD$"); #endif #include -static struct smbios_softc *smbios; - /* * System Management BIOS Reference Specification, v2.4 Final * http://www.dmtf.org/standards/published_documents/DSP0134.pdf @@ -181,7 +179,6 @@ smbios_attach (device_t dev) bcd2bin(sc->eps->BCD_revision & 0x0f)); printf("\n"); - smbios = sc; return (0); bad: if (sc->res) @@ -194,7 +191,6 @@ smbios_detach (device_t dev) { struct smbios_softc *sc; - smbios = NULL; sc = device_get_softc(dev); if (sc->res) @@ -203,23 +199,6 @@ smbios_detach (device_t dev) return (0); } -int -smbios_get_structure_table(vm_paddr_t *table, vm_size_t *size) -{ - - if (smbios == NULL) - return (ENXIO); - if (smbios->eps_64bit) { - *table = smbios->eps3->structure_table_address; - *size = smbios->eps3->structure_table_max_size; - } else { - *table = smbios->eps->structure_table_address; - *size = smbios->eps->structure_table_length; - } - return (0); -} - - static int smbios_modevent (mod, what, arg) module_t mod; diff --git a/sys/dev/smbios/smbios.h b/sys/dev/smbios/smbios.h index 554b882f1da4..6503cdb73c4c 100644 --- a/sys/dev/smbios/smbios.h +++ b/sys/dev/smbios/smbios.h @@ -32,8 +32,6 @@ #ifndef _SMBIOS_H_ #define _SMBIOS_H_ -int smbios_get_structure_table(vm_paddr_t *table, vm_size_t *size); - /* * System Management BIOS */ From owner-dev-commits-src-main@freebsd.org Tue Feb 23 22:51:21 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 407025570CF; Tue, 23 Feb 2021 22:51:21 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlZ6J5ktSz4nS0; Tue, 23 Feb 2021 22:51:20 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id EgWTlIZPCHmS3EgWUlo6Iz; Tue, 23 Feb 2021 15:51:19 -0700 X-Authority-Analysis: v=2.4 cv=MaypB7zf c=1 sm=1 tr=0 ts=603586e7 a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=qa6Q16uM49sA:10 a=6I5d2MoRAAAA:8 a=iGbCS3zQAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=DvCTxDGqdahi0-rcVXsA:9 a=m1hu7YsS2IuEFSGk:21 a=da-7ecNw1VAO5s_I:21 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=oRZS8w7TM5j8Y1SnqK-S:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 3ACCCD23; Tue, 23 Feb 2021 14:51:07 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 11NMp7Dl013494; Tue, 23 Feb 2021 14:51:07 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202102232251.11NMp7Dl013494@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Allan Jude cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: ba6e37e47f41 - main - ipmi_smbios: Deduplicate smbios entry point discovery logic In-reply-to: <202102232119.11NLJw17099523@gitrepo.freebsd.org> References: <202102232119.11NLJw17099523@gitrepo.freebsd.org> Comments: In-reply-to Allan Jude message dated "Tue, 23 Feb 2021 21:19:58 +0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 23 Feb 2021 14:51:07 -0800 X-CMAE-Envelope: MS4xfNoa64ZQnJ5pAQdhtP0wViBvtDMwQiqCMEYf1wgBdUZIGWjp/th+fNqSC781vgR9qwphEVXOUZYD/tH80t0q/9qVrXmvnU65hvRwC/7O5TkFXJeSod1L cPQRpUmGj7EvV2PTlAEf3RPP2WnbRONughdAFSzonXgfyQlDj/68QGMFSeVDMup62YKzX0GaB5WRSl8fHm247ia5S2uodHGYh7qtKyWMUU9sGl7MMFjy085b FsOFllQ7B/TvKnXzSNDDRmPB+O3wHtkycSqFSaJrhJ/gAt5h5EaHIdv8S7terdiS9ES1APm3cPvFDHbfKGInboMX+wvFHLdjLttppFafQ6I= X-Rspamd-Queue-Id: 4DlZ6J5ktSz4nS0 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 22:51:21 -0000 In message <202102232119.11NLJw17099523@gitrepo.freebsd.org>, Allan Jude writes : > The branch main has been updated by allanjude: > > URL: https://cgit.FreeBSD.org/src/commit/?id=ba6e37e47f41484fc61cc034619267b8 > 2ddd056c > > commit ba6e37e47f41484fc61cc034619267b82ddd056c > Author: Allan Jude > AuthorDate: 2021-02-23 21:17:37 +0000 > Commit: Allan Jude > CommitDate: 2021-02-23 21:17:37 +0000 > > ipmi_smbios: Deduplicate smbios entry point discovery logic > > Sponsored by: Ampere Computing LLC > Submitted by: Klara Inc. > Reviewed by: imp > Differential Revision: https://reviews.freebsd.org/D28743 > --- > sys/dev/ipmi/ipmi_isa.c | 1 + > sys/dev/ipmi/ipmi_pci.c | 1 + > sys/dev/ipmi/ipmi_smbios.c | 46 ++++++++++++++++---------------------------- > -- > sys/dev/ipmi/ipmi_smbus.c | 1 + > sys/dev/smbios/smbios.c | 21 +++++++++++++++++++++ > sys/dev/smbios/smbios.h | 2 ++ > 6 files changed, 42 insertions(+), 30 deletions(-) > > diff --git a/sys/dev/ipmi/ipmi_isa.c b/sys/dev/ipmi/ipmi_isa.c > index cdff305b07ec..2831b53e4586 100644 > --- a/sys/dev/ipmi/ipmi_isa.c > +++ b/sys/dev/ipmi/ipmi_isa.c > @@ -286,3 +286,4 @@ static driver_t ipmi_isa_driver = { > }; > > DRIVER_MODULE(ipmi_isa, isa, ipmi_isa_driver, ipmi_devclass, 0, 0); > +MODULE_DEPEND(ipmi_isa, smbios, 1, 1, 1); > diff --git a/sys/dev/ipmi/ipmi_pci.c b/sys/dev/ipmi/ipmi_pci.c > index d4598f9db873..1697a4c31c2a 100644 > --- a/sys/dev/ipmi/ipmi_pci.c > +++ b/sys/dev/ipmi/ipmi_pci.c > @@ -179,6 +179,7 @@ static driver_t ipmi_pci_driver = { > }; > > DRIVER_MODULE(ipmi_pci, pci, ipmi_pci_driver, ipmi_devclass, 0, 0); > +MODULE_DEPEND(ipmi_pci, smbios, 1, 1, 1); > > /* Native IPMI on PCI driver. */ > > diff --git a/sys/dev/ipmi/ipmi_smbios.c b/sys/dev/ipmi/ipmi_smbios.c > index 308a3b076ef7..735f404eec5f 100644 > --- a/sys/dev/ipmi/ipmi_smbios.c > +++ b/sys/dev/ipmi/ipmi_smbios.c > @@ -88,7 +88,7 @@ MTX_SYSINIT(ipmi_info, &ipmi_info_mtx, "ipmi info", MTX_DEF > ); > > static void ipmi_smbios_probe(struct ipmi_get_info *); > static int smbios_cksum(struct smbios_eps *); > -static void smbios_walk_table(uint8_t *, int, smbios_callback_t, > +static void smbios_walk_table(uint8_t *, vm_size_t, smbios_callback_t, > void *); > static void smbios_ipmi_info(struct smbios_structure_header *, void *); > > @@ -147,11 +147,12 @@ smbios_ipmi_info(struct smbios_structure_header *h, voi > d *arg) > } > > static void > -smbios_walk_table(uint8_t *p, int entries, smbios_callback_t cb, void *arg) > +smbios_walk_table(uint8_t *table, vm_size_t size, smbios_callback_t cb, void > *arg) > { > struct smbios_structure_header *s; > + uint8_t *p; > > - while (entries--) { > + for (p = table; p < table + size;) { > s = (struct smbios_structure_header *)p; > cb(s, arg); > > @@ -160,8 +161,11 @@ smbios_walk_table(uint8_t *p, int entries, smbios_callba > ck_t cb, void *arg) > * formatted area of this structure. > */ > p += s->length; > - while (!(p[0] == 0 && p[1] == 0)) > + while (!(p[0] == 0 && p[1] == 0)) { > p++; > + if (p >= table + size) > + return; > + } > > /* > * Skip over the double-nul to the start of the next > @@ -179,41 +183,23 @@ smbios_walk_table(uint8_t *p, int entries, smbios_callb > ack_t cb, void *arg) > static void > ipmi_smbios_probe(struct ipmi_get_info *info) > { > - struct smbios_eps *header; > void *table; > - u_int32_t addr; > + vm_paddr_t table_paddr; > + vm_size_t table_size; > + int err; > > bzero(info, sizeof(struct ipmi_get_info)); > > - /* Find the SMBIOS table header. */ > - addr = bios_sigsearch(SMBIOS_START, SMBIOS_SIG, SMBIOS_LEN, > - SMBIOS_STEP, SMBIOS_OFF); > - if (addr == 0) > + err = smbios_get_structure_table(&table_paddr, &table_size); > + if (err != 0) > return; > > - /* > - * Map the header. We first map a fixed size to get the actual > - * length and then map it a second time with the actual length so > - * we can verify the checksum. > - */ > - header = pmap_mapbios(addr, sizeof(struct smbios_eps)); > - table = pmap_mapbios(addr, header->length); > - pmap_unmapbios((vm_offset_t)header, sizeof(struct smbios_eps)); > - header = table; > - if (smbios_cksum(header) != 0) { > - pmap_unmapbios((vm_offset_t)header, header->length); > - return; > - } > + table = pmap_mapbios(table_paddr, table_size); > > - /* Now map the actual table and walk it looking for an IPMI entry. */ > - table = pmap_mapbios(header->structure_table_address, > - header->structure_table_length); > - smbios_walk_table(table, header->number_structures, smbios_ipmi_info, > - info); > + smbios_walk_table(table, table_size, smbios_ipmi_info, info); > > /* Unmap everything. */ > - pmap_unmapbios((vm_offset_t)table, header->structure_table_length); > - pmap_unmapbios((vm_offset_t)header, header->length); > + pmap_unmapbios((vm_offset_t)table, table_size); > } > > /* > diff --git a/sys/dev/ipmi/ipmi_smbus.c b/sys/dev/ipmi/ipmi_smbus.c > index 212248f0217e..bc7377e5aee8 100644 > --- a/sys/dev/ipmi/ipmi_smbus.c > +++ b/sys/dev/ipmi/ipmi_smbus.c > @@ -131,3 +131,4 @@ static driver_t ipmi_smbus_driver = { > > DRIVER_MODULE(ipmi_smbus, smbus, ipmi_smbus_driver, ipmi_devclass, 0, 0); > MODULE_DEPEND(ipmi_smbus, smbus, SMBUS_MINVER, SMBUS_PREFVER, SMBUS_MAXVER); > +MODULE_DEPEND(ipmi_smbus, smbios, 1, 1, 1); > diff --git a/sys/dev/smbios/smbios.c b/sys/dev/smbios/smbios.c > index 10589ed8d49d..00c7e2c98d2a 100644 > --- a/sys/dev/smbios/smbios.c > +++ b/sys/dev/smbios/smbios.c > @@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$"); > #endif > #include > > +static struct smbios_softc *smbios; > + > /* > * System Management BIOS Reference Specification, v2.4 Final > * http://www.dmtf.org/standards/published_documents/DSP0134.pdf > @@ -179,6 +181,7 @@ smbios_attach (device_t dev) > bcd2bin(sc->eps->BCD_revision & 0x0f)); > printf("\n"); > > + smbios = sc; > return (0); > bad: > if (sc->res) > @@ -191,6 +194,7 @@ smbios_detach (device_t dev) > { > struct smbios_softc *sc; > > + smbios = NULL; > sc = device_get_softc(dev); > > if (sc->res) > @@ -199,6 +203,23 @@ smbios_detach (device_t dev) > return (0); > } > > +int > +smbios_get_structure_table(vm_paddr_t *table, vm_size_t *size) > +{ > + > + if (smbios == NULL) > + return (ENXIO); > + if (smbios->eps_64bit) { > + *table = smbios->eps3->structure_table_address; > + *size = smbios->eps3->structure_table_max_size; This had some undesired results. --- all_subdir_bios/smbios --- /opt/src/git-src/sys/dev/smbios/smbios.c:212:14: error: no member named 'eps_64bit' in 'struct smbios_softc' if (smbios->eps_64bit) { ~~~~~~ ^ /opt/src/git-src/sys/dev/smbios/smbios.c:213:20: error: no member named 'eps3' in 'struct smbios_softc'; did you mean 'eps'? *table = smbios->eps3->structure_table_address; ^~~~ eps /opt/src/git-src/sys/dev/smbios/smbios.c:66:22: note: 'eps' declared here struct smbios_eps * eps; ^ /opt/src/git-src/sys/dev/smbios/smbios.c:214:19: error: no member named 'eps3' in 'struct smbios_softc'; did you mean 'eps'? *size = smbios->eps3->structure_table_max_size; ^~~~ eps /opt/src/git-src/sys/dev/smbios/smbios.c:66:22: note: 'eps' declared here struct smbios_eps * eps; ^ /opt/src/git-src/sys/dev/smbios/smbios.c:214:25: error: no member named 'structure_table_max_size' in 'struct smbios_eps'; did you mean 'structure_table_address'? *size = smbios->eps3->structure_table_max_size; ^~~~~~~~~~~~~~~~~~~~~~~~ structure_table_address /opt/src/git-src/sys/dev/smbios/smbios.h:58:11: note: 'structure_table_address' declared here uint32_t structure_table_address; ^ > + } else { > + *table = smbios->eps->structure_table_address; > + *size = smbios->eps->structure_table_length; > + } > + return (0); > +} > + > + > static int > smbios_modevent (mod, what, arg) > module_t mod; > diff --git a/sys/dev/smbios/smbios.h b/sys/dev/smbios/smbios.h > index 6503cdb73c4c..554b882f1da4 100644 > --- a/sys/dev/smbios/smbios.h > +++ b/sys/dev/smbios/smbios.h > @@ -32,6 +32,8 @@ > #ifndef _SMBIOS_H_ > #define _SMBIOS_H_ > > +int smbios_get_structure_table(vm_paddr_t *table, vm_size_t *size); > + > /* > * System Management BIOS > */ > -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-dev-commits-src-main@freebsd.org Tue Feb 23 22:56:03 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9A678557889; Tue, 23 Feb 2021 22:56:03 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlZCk4R2jz4nnm; Tue, 23 Feb 2021 22:56:02 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id Egb0lVloy2SWTEgb2lPcq9; Tue, 23 Feb 2021 15:56:00 -0700 X-Authority-Analysis: v=2.4 cv=fdJod2cF c=1 sm=1 tr=0 ts=60358800 a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=qa6Q16uM49sA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=VxmjJ2MpAAAA:8 a=iGbCS3zQAAAA:8 a=1SrTYSZmx2jzKtmugbUA:9 a=umdqf8azl6mVhff5:21 a=aaFSTmKjo1xzFNRr:21 a=CjuIK1q_8ugA:10 a=3RcraWcUxpgA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 a=7gXAzLPJhVmCkEl4_tsf:22 a=oRZS8w7TM5j8Y1SnqK-S:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 85A46D2F; Tue, 23 Feb 2021 14:55:58 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 11NMtwxL013572; Tue, 23 Feb 2021 14:55:58 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202102232255.11NMtwxL013572@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Allan Jude cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: ba6e37e47f41 - main - ipmi_smbios: Deduplicate smbios entry point discovery logic In-reply-to: <202102232251.11NMp7Dl013494@slippy.cwsent.com> References: <202102232119.11NLJw17099523@gitrepo.freebsd.org> <202102232251.11NMp7Dl013494@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Tue, 23 Feb 2021 14:51:07 -0800." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 23 Feb 2021 14:55:58 -0800 X-CMAE-Envelope: MS4xfL3NJOhwCziznn2mUpMoNclUYK0PUe2869z96Tzmezp2r3GVYfHoV4Ruclg96V30oh3NKeBmvzpAmaHHfKJZsFX2yWNBg6QWFmkz56cOrc+2TkC7oQaL MnjA0z33u6yfrjF19KZME5/K2HAOEHZi9ZlwjUpi0jZxjQdZ9DZY9YiKVy5OlKgsGPWckvhNtIU2CyZ+OVIdE4XIgI7wVySFA1LuKaOsxXaew7ISm0PhvWxz RBK8sRQYyZ4Ms9EYzqOkICQeh6EuM3t8qMIHEniqIgjrE1IGn0mux+0UuXYtc4dYVZ0Npc8i/V1V373QwzZ4+08fGzP8lxf44bk/o+5vids= X-Rspamd-Queue-Id: 4DlZCk4R2jz4nnm X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.134.9) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [0.30 / 15.00]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; RWL_MAILSPIKE_GOOD(0.00)[64.59.134.9:from]; RCVD_COUNT_THREE(0.00)[4]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[64.59.134.9:from]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; R_DKIM_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[64.59.134.9:from]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; REPLYTO_EQ_FROM(0.00)[]; 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)[cschubert.com: no valid DMARC record]; AUTH_NA(1.00)[]; NEURAL_SPAM_SHORT(1.00)[1.000]; SPAMHAUS_ZRD(0.00)[64.59.134.9:from:127.0.2.255]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 22:56:03 -0000 Nevermind. I see you found it. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. In message <202102232251.11NMp7Dl013494@slippy.cwsent.com>, Cy Schubert writes: > In message <202102232119.11NLJw17099523@gitrepo.freebsd.org>, Allan Jude > writes > : > > The branch main has been updated by allanjude: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=ba6e37e47f41484fc61cc034619267 > b8 > > 2ddd056c > > > > commit ba6e37e47f41484fc61cc034619267b82ddd056c > > Author: Allan Jude > > AuthorDate: 2021-02-23 21:17:37 +0000 > > Commit: Allan Jude > > CommitDate: 2021-02-23 21:17:37 +0000 > > > > ipmi_smbios: Deduplicate smbios entry point discovery logic > > > > Sponsored by: Ampere Computing LLC > > Submitted by: Klara Inc. > > Reviewed by: imp > > Differential Revision: https://reviews.freebsd.org/D28743 > > --- > > sys/dev/ipmi/ipmi_isa.c | 1 + > > sys/dev/ipmi/ipmi_pci.c | 1 + > > sys/dev/ipmi/ipmi_smbios.c | 46 ++++++++++++++++-------------------------- > -- > > -- > > sys/dev/ipmi/ipmi_smbus.c | 1 + > > sys/dev/smbios/smbios.c | 21 +++++++++++++++++++++ > > sys/dev/smbios/smbios.h | 2 ++ > > 6 files changed, 42 insertions(+), 30 deletions(-) > > > > diff --git a/sys/dev/ipmi/ipmi_isa.c b/sys/dev/ipmi/ipmi_isa.c > > index cdff305b07ec..2831b53e4586 100644 > > --- a/sys/dev/ipmi/ipmi_isa.c > > +++ b/sys/dev/ipmi/ipmi_isa.c > > @@ -286,3 +286,4 @@ static driver_t ipmi_isa_driver = { > > }; > > > > DRIVER_MODULE(ipmi_isa, isa, ipmi_isa_driver, ipmi_devclass, 0, 0); > > +MODULE_DEPEND(ipmi_isa, smbios, 1, 1, 1); > > diff --git a/sys/dev/ipmi/ipmi_pci.c b/sys/dev/ipmi/ipmi_pci.c > > index d4598f9db873..1697a4c31c2a 100644 > > --- a/sys/dev/ipmi/ipmi_pci.c > > +++ b/sys/dev/ipmi/ipmi_pci.c > > @@ -179,6 +179,7 @@ static driver_t ipmi_pci_driver = { > > }; > > > > DRIVER_MODULE(ipmi_pci, pci, ipmi_pci_driver, ipmi_devclass, 0, 0); > > +MODULE_DEPEND(ipmi_pci, smbios, 1, 1, 1); > > > > /* Native IPMI on PCI driver. */ > > > > diff --git a/sys/dev/ipmi/ipmi_smbios.c b/sys/dev/ipmi/ipmi_smbios.c > > index 308a3b076ef7..735f404eec5f 100644 > > --- a/sys/dev/ipmi/ipmi_smbios.c > > +++ b/sys/dev/ipmi/ipmi_smbios.c > > @@ -88,7 +88,7 @@ MTX_SYSINIT(ipmi_info, &ipmi_info_mtx, "ipmi info", MTX_D > EF > > ); > > > > static void ipmi_smbios_probe(struct ipmi_get_info *); > > static int smbios_cksum(struct smbios_eps *); > > -static void smbios_walk_table(uint8_t *, int, smbios_callback_t, > > +static void smbios_walk_table(uint8_t *, vm_size_t, smbios_callback > _t, > > void *); > > static void smbios_ipmi_info(struct smbios_structure_header *, void > *); > > > > @@ -147,11 +147,12 @@ smbios_ipmi_info(struct smbios_structure_header *h, v > oi > > d *arg) > > } > > > > static void > > -smbios_walk_table(uint8_t *p, int entries, smbios_callback_t cb, void *arg > ) > > +smbios_walk_table(uint8_t *table, vm_size_t size, smbios_callback_t cb, vo > id > > *arg) > > { > > struct smbios_structure_header *s; > > + uint8_t *p; > > > > - while (entries--) { > > + for (p = table; p < table + size;) { > > s = (struct smbios_structure_header *)p; > > cb(s, arg); > > > > @@ -160,8 +161,11 @@ smbios_walk_table(uint8_t *p, int entries, smbios_call > ba > > ck_t cb, void *arg) > > * formatted area of this structure. > > */ > > p += s->length; > > - while (!(p[0] == 0 && p[1] == 0)) > > + while (!(p[0] == 0 && p[1] == 0)) { > > p++; > > + if (p >= table + size) > > + return; > > + } > > > > /* > > * Skip over the double-nul to the start of the next > > @@ -179,41 +183,23 @@ smbios_walk_table(uint8_t *p, int entries, smbios_cal > lb > > ack_t cb, void *arg) > > static void > > ipmi_smbios_probe(struct ipmi_get_info *info) > > { > > - struct smbios_eps *header; > > void *table; > > - u_int32_t addr; > > + vm_paddr_t table_paddr; > > + vm_size_t table_size; > > + int err; > > > > bzero(info, sizeof(struct ipmi_get_info)); > > > > - /* Find the SMBIOS table header. */ > > - addr = bios_sigsearch(SMBIOS_START, SMBIOS_SIG, SMBIOS_LEN, > > - SMBIOS_STEP, SMBIOS_OFF); > > - if (addr == 0) > > + err = smbios_get_structure_table(&table_paddr, &table_size); > > + if (err != 0) > > return; > > > > - /* > > - * Map the header. We first map a fixed size to get the actual > > - * length and then map it a second time with the actual length so > > - * we can verify the checksum. > > - */ > > - header = pmap_mapbios(addr, sizeof(struct smbios_eps)); > > - table = pmap_mapbios(addr, header->length); > > - pmap_unmapbios((vm_offset_t)header, sizeof(struct smbios_eps)); > > - header = table; > > - if (smbios_cksum(header) != 0) { > > - pmap_unmapbios((vm_offset_t)header, header->length); > > - return; > > - } > > + table = pmap_mapbios(table_paddr, table_size); > > > > - /* Now map the actual table and walk it looking for an IPMI entry. */ > > - table = pmap_mapbios(header->structure_table_address, > > - header->structure_table_length); > > - smbios_walk_table(table, header->number_structures, smbios_ipmi_info, > > - info); > > + smbios_walk_table(table, table_size, smbios_ipmi_info, info); > > > > /* Unmap everything. */ > > - pmap_unmapbios((vm_offset_t)table, header->structure_table_length); > > - pmap_unmapbios((vm_offset_t)header, header->length); > > + pmap_unmapbios((vm_offset_t)table, table_size); > > } > > > > /* > > diff --git a/sys/dev/ipmi/ipmi_smbus.c b/sys/dev/ipmi/ipmi_smbus.c > > index 212248f0217e..bc7377e5aee8 100644 > > --- a/sys/dev/ipmi/ipmi_smbus.c > > +++ b/sys/dev/ipmi/ipmi_smbus.c > > @@ -131,3 +131,4 @@ static driver_t ipmi_smbus_driver = { > > > > DRIVER_MODULE(ipmi_smbus, smbus, ipmi_smbus_driver, ipmi_devclass, 0, 0); > > MODULE_DEPEND(ipmi_smbus, smbus, SMBUS_MINVER, SMBUS_PREFVER, SMBUS_MAXVER > ); > > +MODULE_DEPEND(ipmi_smbus, smbios, 1, 1, 1); > > diff --git a/sys/dev/smbios/smbios.c b/sys/dev/smbios/smbios.c > > index 10589ed8d49d..00c7e2c98d2a 100644 > > --- a/sys/dev/smbios/smbios.c > > +++ b/sys/dev/smbios/smbios.c > > @@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$"); > > #endif > > #include > > > > +static struct smbios_softc *smbios; > > + > > /* > > * System Management BIOS Reference Specification, v2.4 Final > > * http://www.dmtf.org/standards/published_documents/DSP0134.pdf > > @@ -179,6 +181,7 @@ smbios_attach (device_t dev) > > bcd2bin(sc->eps->BCD_revision & 0x0f)); > > printf("\n"); > > > > + smbios = sc; > > return (0); > > bad: > > if (sc->res) > > @@ -191,6 +194,7 @@ smbios_detach (device_t dev) > > { > > struct smbios_softc *sc; > > > > + smbios = NULL; > > sc = device_get_softc(dev); > > > > if (sc->res) > > @@ -199,6 +203,23 @@ smbios_detach (device_t dev) > > return (0); > > } > > > > +int > > +smbios_get_structure_table(vm_paddr_t *table, vm_size_t *size) > > +{ > > + > > + if (smbios == NULL) > > + return (ENXIO); > > + if (smbios->eps_64bit) { > > + *table = smbios->eps3->structure_table_address; > > + *size = smbios->eps3->structure_table_max_size; > > This had some undesired results. > > --- all_subdir_bios/smbios --- > /opt/src/git-src/sys/dev/smbios/smbios.c:212:14: error: no member named > 'eps_64bit' in 'struct smbios_softc' > if (smbios->eps_64bit) { > ~~~~~~ ^ > /opt/src/git-src/sys/dev/smbios/smbios.c:213:20: error: no member named > 'eps3' in 'struct smbios_softc'; did you mean 'eps'? > *table = smbios->eps3->structure_table_address; > ^~~~ > eps > /opt/src/git-src/sys/dev/smbios/smbios.c:66:22: note: 'eps' declared here > struct smbios_eps * eps; > ^ > /opt/src/git-src/sys/dev/smbios/smbios.c:214:19: error: no member named > 'eps3' in 'struct smbios_softc'; did you mean 'eps'? > *size = smbios->eps3->structure_table_max_size; > ^~~~ > eps > /opt/src/git-src/sys/dev/smbios/smbios.c:66:22: note: 'eps' declared here > struct smbios_eps * eps; > ^ > /opt/src/git-src/sys/dev/smbios/smbios.c:214:25: error: no member named > 'structure_table_max_size' in 'struct smbios_eps'; did you mean > 'structure_table_address'? > *size = smbios->eps3->structure_table_max_size; > ^~~~~~~~~~~~~~~~~~~~~~~~ > structure_table_address > /opt/src/git-src/sys/dev/smbios/smbios.h:58:11: note: > 'structure_table_address' declared here > uint32_t structure_table_address; > ^ > > > > + } else { > > + *table = smbios->eps->structure_table_address; > > + *size = smbios->eps->structure_table_length; > > + } > > + return (0); > > +} > > + > > + > > static int > > smbios_modevent (mod, what, arg) > > module_t mod; > > diff --git a/sys/dev/smbios/smbios.h b/sys/dev/smbios/smbios.h > > index 6503cdb73c4c..554b882f1da4 100644 > > --- a/sys/dev/smbios/smbios.h > > +++ b/sys/dev/smbios/smbios.h > > @@ -32,6 +32,8 @@ > > #ifndef _SMBIOS_H_ > > #define _SMBIOS_H_ > > > > +int smbios_get_structure_table(vm_paddr_t *table, vm_size_t *size); > > + > > /* > > * System Management BIOS > > */ > > > > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > The need of the many outweighs the greed of the few. > > > From owner-dev-commits-src-main@freebsd.org Tue Feb 23 23:48:02 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46F13558A3D for ; Tue, 23 Feb 2021 23:48:02 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic315-55.consmr.mail.gq1.yahoo.com (sonic315-55.consmr.mail.gq1.yahoo.com [98.137.65.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlbMh6ypSz4rlm for ; Tue, 23 Feb 2021 23:48:00 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1614124079; bh=dvTlvw/IS7jVGnY0nyjiYlg6rEdf4036baHY6Ad7AAC=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=hn2ctfRvL2MY76LxuY9Z2xql7mxEaC+LdjQEBGeyD9t1AoZ4zcGQfP0B+3MDEl5hwta9j6rsha8Iv7mdrlsTs2C/0TiMFGzDMgy2kXeirqtNSpAbf9Nf/cBnL/jZASSpOpYfMdtJ9CWTJoeL2gXHPHE41Rn/y0t1bOc94kQH1Klo4B0dtFi0iL7dWxrkVyoF0ldLgbS8/HGBuQtoOtjY8NF3iFniDL/AqZwXW6M9cxwxkMqGhYAR0dguFqC2gDXHMq2gBkh1yYx3oL85nFAAIwh32aUZ3ZkNSndgjLNHBIU/6u99bwUKnexe66GVkGxPD7kQjo6fspK5wPnFBzcbdw== X-YMail-OSG: yOz0_pAVM1k0FxzIaW57h7hccNdohzIf7ulbGNRUHGGkSrCQbeYsAn9UG4eUUUP hnnYfSF4HDG0cbj1P2Cg3qSWswYX4BluMQ_prySYgyGF89nYTu1LJLvBRYRzLSUO7H5vN9vm6pEW jf07r3hg26liUvqei1_dtDOib3_IDL.pTfNy6sKWqATkG6W1AEHVDK0pMkswflKAAV4tpnQM_6Sx 2YICwunn5Mya_h_ZL7AFJigli8zIASuhFL_MirOAM5NBmsEKq5hOFu1WCG8xKvaDKAG9NF42zaMR 1rbeXQzXCXRUPPBZQnkEnG9VMWz1t3NSqJP8oVXFcHZPlEgP7flmtniwMJc2FLEeYm.X_9_gwezS YHc8ErhK9S6ogAVyB8EA7rmsZJvqxrQPMvbYMp6h.4epkqliGc2xlcze2puUq0VFTM0CTjplvziy _pdVc9Lt4TKbj3GvweOokedSx3aiHgAYhh9z.nCyp.Rk44rvciow9V39hVUfxLqDgux6gFwNEd4m 3OVU4VEZ13FQIR_wjFGJby0tCeOYFCDajRfPmaHcmYg1I5oDpJ.Y6OkdywItvCe6AUziKj8KRhxA WARIHamGEp91xtgF.aN3f_qS7CqzpTmcggGwO.qGJBNl26j4EUUNVb2dcJCSrfBUfMAFk2qPLAJw aMq05saoHIpUfzf.DuGbF95Z1Rq5EacctlSFmfJjGAdY__ihYt5RI.HwhE2sxI1PgfpXPVUbVelt dbBoIChgAA8Lrys2oGQpHKgOO2MzRLUqcbG3Jzy0xHynJMm_JfRmri0U0eOWTM39ju523MfgUVXo fN.slDGg99Le2OOKbn8kildF6193Z0PeQ62S64nGWZmy9DSPbwJkxXkFk3K5wg6iidjWHPW3Pizh pcRIem4gk6heSqbYresis39XCKMY.FR00AySqtJX.H7ATdVCHYiGB1Kzm80PYOYZY1DLFUzIEvpF ahhHr0JjDWtVlUfUox3x7zYSfOu3P.mtMXerZ8Xu4SkGuaWRXts39uGrHvSkN1iPhmnuU09wV1E_ GZnFzv8pySd4t8S712WsjtFZSRkUipYMVUItiwbm7A8nlYBup1sYcoJzWN0fVGkAop8DXHMFT8lE gilofUBtUBZ2BeGn4tMFUAsPUhglncuqFuFfZNtL9VBAPd6xUMPZoT1lqVZkIM3FqUfvwY3W9fUf S2b7Dx2WM7i02My22sDzzEih2mW6HCsQEoe065qoAbtH7kLHTldn9rdIdugL8BA772S6BFwWwDwH 62qYSTtmwcDLsVZ2l3Fyas6u0y575XjD1mvW33goQRTzlBpFQ2tteu0gDNcARp_ziUdFmyMSLWmw YgcMkBAlVk7Ovm1itQh6U4i5T3GfYRNyvC0y.KOgLMRK2qKQ5axEGPr65puO7biyek0WKMDR1RV. N5NmvRUO5q0NMQl1cx.aAlW2YiejKiLAVBVl.H43ZcEZiP2hOYxj3Z6Hgm713g8os_xLyuPGcV02 ozYuQDSj9h.VzDb8dpD68oTsi86iq0EL8Kqv6T7ZiTDEwgS6cjxp7wia.yne66P39dn2p_JUw9DT fWcOxiyxDsKmsjB4mz2iBuUQYQK6gnOwDCO.QE26E7Z4kF3lU2Db1Aj7YakUFg.sDC0yxdx152UY rJpthxU.y14F6rJJ0xt1P_dggv8zucClBEQVPQeR03xjo.yy8znuCJFvy_pZ2twczyX7YwQSFVv3 BFfZ7Sa0vAnzSbQFz.Hjti3oWbuX07Xh.e3P6GzxLjC77N5DAL686q8KkC_ybp07UnNgtoGHm8bj rAopL9X1YBBBRx32O1KvXJ.AQEQ3g13_JMcwAxMjoeK6xz63KSKHhyiJbpx0mV.06x56Q29vQkqu iqBHwfJGuC4Qh4nRN3Twox2Z5wjOcsJi5pHEZxQfqskIeKjPmgy06pn0PXLIeghwGZ9h.HUhlrQo wPdGo.PgdFw.XADNtnNvm0hbgGFhAYHOYCG0ABGa7IoMXRKxZawR7IU_hLxhsNhQdEiMq2vy3hFR XbyGATjLhvMb38tHXhrR2UE.q0v358UJECvHXjZSNymm2.C6cn8xQ8h2vzMBN.wG6qKGpYivSBiV zuLTK.sHC3lAlQNOcj0EPCLuvdwwxvlbgYosWFMfqJfsPgvvAIab6qUhkRS_14SIsVRqFlQowM3o uFmWSgoPKNecy1WCBmJGwy4js1MROBdkbtPq1VyaUjb7oL2LRBMBCMYqI4.i0WtnJ7P7wA2QHFmj 0WclXlMjSmaJ8BnZX1m1_wMrwXdY99xpotvaSoMD65TLhtnF1ozH4_n13zVAILLJFtjOas5cKgmk ubYooDR3tDxZFjOy4kEFgwn82eRD.lsZ1wmMYU.nSq_jbDgWTee7sJXjYfwsT9_w0HyI77D.82f0 FnGI.N0YGuzG3m6BEwAqAM8eKffNR1viwabmBmZZoQLe.u7ZgRcxJzDCSdtjAmMuTNdsI0jW6YVM EX7T0kgSd4hIdgi8rLATLKmMmnKVnFmUD_rh3hGkMghdQpq5f.qWdgY3Knc0kAxBtST1Tz2lWtWS 916Ye3fo0hGU8uMbMKjp1ytG13PQcuw36kzSXr.XIbQjAiRKVPw3Kzdr3DVk- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.gq1.yahoo.com with HTTP; Tue, 23 Feb 2021 23:47:59 +0000 Received: by smtp405.mail.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID ba51988f3ebfc97536924e9017d3be7f; Tue, 23 Feb 2021 23:47:58 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. Message-Id: <13D3FC2E-F391-4C49-9C1B-BFF32823C6EA@yahoo.com> Date: Tue, 23 Feb 2021 15:47:56 -0800 To: "nwhitehorn@freebsd.org " , dev-commits-src-main@freebsd.org X-Mailer: Apple Mail (2.3654.60.0.2.21) References: <13D3FC2E-F391-4C49-9C1B-BFF32823C6EA.ref@yahoo.com> X-Rspamd-Queue-Id: 4DlbMh6ypSz4rlm X-Spamd-Bar: - X-Spamd-Result: default: False [-1.50 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[98.137.65.31:from]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(1.00)[1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[98.137.65.31:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.31:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.65.31:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 23:48:02 -0000 Nathan Whitehorn nwhitehorn at FreeBSD.org wrote on Tue Feb 23 21:24:30 UTC 2021 : > +# Update the ESP (EFI System Partition) with the new bootloader if we = have an ESP > +if [ -d "$BSDINSTALL_CHROOT/boot/efi" ]; then > case $(uname -m) in > arm64) ARCHBOOTNAME=3Daa64 ;; > amd64) ARCHBOOTNAME=3Dx64 ;; > @@ -136,55 +60,33 @@ if [ "$(uname -m)" =3D "arm64" ] || [ "$(uname = -m)" =3D "riscv" ] || [ "$X86_BOOTMET > BOOTNAME=3D"${BOOTDIR}/boot${ARCHBOOTNAME}.efi" > FREEBSD_BOOTDIR=3D"/efi/freebsd" > FREEBSD_BOOTNAME=3D"${FREEBSD_BOOTDIR}/loader.efi" > + mntpt=3D"$BSDINSTALL_CHROOT/boot/efi" where older history has: BOOTDIR=3D"/efi/boot" The below is mostly an FYI in case it has implications or users need instrutions. While I've not checked recently, my environment has the following sorts of paths/filenames involved because of past examples of failure to work with alternate capitalizations, such as the u-boot or uefi/ACPI involved being picky for some reason. Some also have a startup.nsh that contains the name (not path) and I have those tracking the capitalization shown. Rock64: EFI/BOOT/bootaa64.efi (MBR fat32lba, u-boot placement requirements block GPT use if I remember right.) RPi4B: EFI/BOOT/BOOTAA64.EFI (GPT efi) EFI/BOOT/bootaa64.efi (As I remember it was the directories that mattered here. I sometimes use the RPi4B with https://github.com/pftf/RPi4 edk2 UEFI/ACPI materials.) OverDrive 1000: efi/boot/BOOTaa64.efi (GPT efi) MACCHIATObin Double Shot: efi/boot/BOOTaa64.efi (GPT efi, the UEFI/ACPI is one I was given/pointed-to) RPi3B: not currently accessible to look up the details. (Probable match to RPi4B? Again edk2 materials, but from https://github.com/pftf/RPi3 .) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-dev-commits-src-main@freebsd.org Wed Feb 24 01:37:45 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C7DD55B445; Wed, 24 Feb 2021 01: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DldpK2Rsvz3Fcc; Wed, 24 Feb 2021 01:37: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 4298F23D43; Wed, 24 Feb 2021 01:37: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 11O1bjcS042475; Wed, 24 Feb 2021 01:37:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11O1bjCc042474; Wed, 24 Feb 2021 01:37:45 GMT (envelope-from git) Date: Wed, 24 Feb 2021 01:37:45 GMT Message-Id: <202102240137.11O1bjCc042474@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 6ab923cbca87 - main - pam_login_access: Fix negative entry matching logic MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ab923cbca8759503a08683a5978b9ebf5efd607 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 01:37:45 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6ab923cbca8759503a08683a5978b9ebf5efd607 commit 6ab923cbca8759503a08683a5978b9ebf5efd607 Author: Mark Johnston AuthorDate: 2021-02-23 22:01:29 +0000 Commit: Mark Johnston CommitDate: 2021-02-24 00:14:05 +0000 pam_login_access: Fix negative entry matching logic PR: 252194 Approved by: so Security: CVE-2020-25580 Security: FreeBSD-SA-21:03.pam_login_access --- lib/libpam/modules/pam_login_access/login_access.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libpam/modules/pam_login_access/login_access.c b/lib/libpam/modules/pam_login_access/login_access.c index 9496081d362e..719808858dac 100644 --- a/lib/libpam/modules/pam_login_access/login_access.c +++ b/lib/libpam/modules/pam_login_access/login_access.c @@ -137,10 +137,10 @@ list_match(char *list, const char *item, if (match != NO) { while ((tok = strtok((char *) 0, listsep)) && strcmp(tok, "EXCEPT")) { /* VOID */ ; - if (tok == NULL || list_match((char *) 0, item, match_fn, - login_access_opts) == NO) { + } + if (tok == NULL || + list_match((char *) 0, item, match_fn, login_access_opts) == NO) { return (match); - } } } return (NO); From owner-dev-commits-src-main@freebsd.org Wed Feb 24 02:18:09 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BD18E55D22F; Wed, 24 Feb 2021 02:18: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dlfhx4y18z3LtB; Wed, 24 Feb 2021 02:18: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 9CED6240E7; Wed, 24 Feb 2021 02:18: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 11O2I9N1096586; Wed, 24 Feb 2021 02:18:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11O2I9tY096585; Wed, 24 Feb 2021 02:18:09 GMT (envelope-from git) Date: Wed, 24 Feb 2021 02:18:09 GMT Message-Id: <202102240218.11O2I9tY096585@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 1d44514fcd68 - main - rmlock: Add a required compiler membar to the rlock slow path MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d44514fcd68809cfd493a7352ace29ddad443d6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 02:18:09 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1d44514fcd68809cfd493a7352ace29ddad443d6 commit 1d44514fcd68809cfd493a7352ace29ddad443d6 Author: Mark Johnston AuthorDate: 2021-02-24 02:15:50 +0000 Commit: Mark Johnston CommitDate: 2021-02-24 02:17:12 +0000 rmlock: Add a required compiler membar to the rlock slow path The tracker flags need to be loaded only after the tracker is removed from its per-CPU queue. Otherwise, readers may fail to synchronize with pending writers attempting to propagate priority to active readers, and readers and writers deadlock on each other. This was observed in a stable/12-based armv7 kernel where the compiler had reordered the load of rmp_flags to before the stores updating the queue. Reviewed by: rlibby, scottl Discussed with: kib Sponsored by: Rubicon Communications, LLC ("Netgate") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28821 --- sys/kern/kern_rmlock.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_rmlock.c b/sys/kern/kern_rmlock.c index 401445d3d03f..9135709d88cf 100644 --- a/sys/kern/kern_rmlock.c +++ b/sys/kern/kern_rmlock.c @@ -362,7 +362,11 @@ _rm_rlock_hard(struct rmlock *rm, struct rm_priotracker *tracker, int trylock) /* Remove our tracker from the per-cpu list. */ rm_tracker_remove(pc, tracker); - /* Check to see if the IPI granted us the lock after all. */ + /* + * Check to see if the IPI granted us the lock after all. The load of + * rmp_flags must happen after the tracker is removed from the list. + */ + __compiler_membar(); if (tracker->rmp_flags) { /* Just add back tracker - we hold the lock. */ rm_tracker_add(pc, tracker); From owner-dev-commits-src-main@freebsd.org Wed Feb 24 02:21:29 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7A21D55D24F; Wed, 24 Feb 2021 02:21:29 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dlfmn0bP6z3LvG; Wed, 24 Feb 2021 02:21:28 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id EjnqljthxnRGtEjnrlQ0Zs; Tue, 23 Feb 2021 19:21:28 -0700 X-Authority-Analysis: v=2.4 cv=cagXElPM c=1 sm=1 tr=0 ts=6035b828 a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=qa6Q16uM49sA:10 a=6I5d2MoRAAAA:8 a=pGLkceISAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=HENm2Bnh0uIwcDd5ynwA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 224A1204; Tue, 23 Feb 2021 18:21:26 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 11O15bKn096987; Tue, 23 Feb 2021 17:05:37 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202102240105.11O15bKn096987@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Baptiste Daroussin cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 77e1ccbee3ed - main - rc: implement parallel boot In-reply-to: <202102231027.11NARYYE041280@gitrepo.freebsd.org> References: <202102231027.11NARYYE041280@gitrepo.freebsd.org> Comments: In-reply-to Baptiste Daroussin message dated "Tue, 23 Feb 2021 10:27:34 +0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 23 Feb 2021 17:05:37 -0800 X-CMAE-Envelope: MS4xfG8e3bLSBzqRqYI5RUfaKLh+EmSV2dwOZsalKP/EVXCIoxS2QsGJbZTjsjJQCO8llvHZGlZxdngOHb2ZqtJVqjSwOkjPeaml6zaWG/Af0qcQKwx091ok +PliKenzEZY9giQhRqsWJFpgjk6W+9BLdlZ0WeqhEaWv9XKuod/xUBwycYnWT0/20jNd+w1Ax6PpknQFc9lA2lgaijFsRIe2ni0mOX38PJaVcpCFRVDLmrsV PGAo1eQnh3tzblYV+wcj36FvOfjB8yLNPfsgyS3OkEWNbJOWpUwWfo2em8+3spVQz0pl0vo1bCfWbaxQXGizdUiNct8NOzdnTLZ6tCipQW4= X-Rspamd-Queue-Id: 4Dlfmn0bP6z3LvG 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 02:21:29 -0000 In message <202102231027.11NARYYE041280@gitrepo.freebsd.org>, Baptiste Daroussi n writes: > The branch main has been updated by bapt: > > URL: https://cgit.FreeBSD.org/src/commit/?id=77e1ccbee3ed6c837929e4e232fd07f9 > 5bfc8294 > > commit 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 > Author: Rick Parrish > AuthorDate: 2021-02-07 06:15:21 +0000 > Commit: Baptiste Daroussin > CommitDate: 2021-02-23 10:16:53 +0000 > > rc: implement parallel boot > > take advantage of the rcorder -p argument to implement parallel > booting in rc. > > According to the author non scientific tests: > on a Core 2 Duo with spinning disk: > > | Services enabled | before | after | saving | > | 0 | 8s | 8s | 0 | > | 1 | 13s | 13s | 0 | > | 2 | 17s | 13s | 5 | > | 3 | 23s | 13s | 10 | > | 4 | 28s | 13s | 15 | > | 5 | 33s | 13s | 20 | > > PR: 249192 > MFC after: 3 weeks > --- > libexec/rc/rc | 49 ++++++++++++++++++++++++++++++++++--------------- > 1 file changed, 34 insertions(+), 15 deletions(-) > > diff --git a/libexec/rc/rc b/libexec/rc/rc > index 35db4a850516..722d7fe35884 100644 > --- a/libexec/rc/rc > +++ b/libexec/rc/rc > @@ -91,19 +91,31 @@ if ! [ -e ${firstboot_sentinel} ]; then > skip_firstboot="-s firstboot" > fi > > +# rc_parallel_start default is "NO" > +rc_parallel_start=${rc_parallel_start:-NO} > +_rc_parallel='' > +# enable rcorder -p if /etc/rc.conf rc_parallel_start is "YES" > +checkyesno rc_parallel_start && _rc_parallel='-p' > + > # Do a first pass to get everything up to $early_late_divider so that > # we can do a second pass that includes $local_startup directories > # > -files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* 2>/dev/null` > +files=`rcorder ${skip} ${skip_firstboot} ${_rc_parallel} /etc/rc.d/* 2>/dev/ > null` > > _rc_elem_done=' ' > -for _rc_elem in ${files}; do > - run_rc_script ${_rc_elem} ${_boot} > - _rc_elem_done="${_rc_elem_done}${_rc_elem} " > - > - case "$_rc_elem" in > - */${early_late_divider}) break ;; > - esac > +IFS=$'\n' > +for _rc_group in ${files}; do > + IFS=$' ' > + for _rc_elem in ${_rc_group}; do > + run_rc_script ${_rc_elem} ${_boot} & > + _rc_elem_done="${_rc_elem_done}${_rc_elem} " > + > + case "$_rc_elem" in > + */${early_late_divider}) break ;; > + esac > + done > + wait > + IFS=$'\n' > done > > unset files local_rc > @@ -122,14 +134,21 @@ if [ -e ${firstboot_sentinel} ]; then > skip_firstboot="" > fi > > -files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} 2>/dev/null > ` > -for _rc_elem in ${files}; do > - case "$_rc_elem_done" in > - *" $_rc_elem "*) continue ;; > - esac > - > - run_rc_script ${_rc_elem} ${_boot} > +files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} ${_rc_paral > lel} 2>/dev/null` > +IFS=$'\n' > +for _rc_group in ${files}; do > + IFS=$' ' > + for _rc_elem in ${_rc_group}; do > + case "$_rc_elem_done" in > + *" $_rc_elem "*) continue ;; > + esac > + > + run_rc_script ${_rc_elem} ${_boot} & > + done > + wait > + IFS=$'\n' > done > +unset IFS > > # Remove the firstboot sentinel, and reboot if it was requested. > # Be a bit paranoid about removing it to handle the common failure > Since this commit my postfix, dovecot and nut fail to start at boot, and must be started by hand. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-dev-commits-src-main@freebsd.org Wed Feb 24 03:15:56 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC59A55EBC9; Wed, 24 Feb 2021 03:15:56 +0000 (UTC) (envelope-from nwhitehorn@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dlgzc21ycz3Qtv; Wed, 24 Feb 2021 03:15:56 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:e908:86d2:b976:1c3e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id F05B05074; Wed, 24 Feb 2021 03:15:55 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. To: Warner Losh Cc: Colin Percival , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <01000177d0e7f033-389acb59-2004-4040-ba7c-762878ef86b4-000000@email.amazonses.com> From: Nathan Whitehorn Message-ID: Date: Tue, 23 Feb 2021 22:15:54 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 03:15:56 -0000 On 2/23/21 5:39 PM, Warner Losh wrote: > > > On Tue, Feb 23, 2021 at 3:02 PM Nathan Whitehorn > > wrote: > > > > On 2/23/21 4:59 PM, Colin Percival wrote: > > On 2/23/21 1:24 PM, Nathan Whitehorn wrote: > >>      Mount the EFI system partition (ESP) on newly-installed > systems. > > Should we do this in VM/cloudware images too? > > > > That's a good point. I think so, though I don't have the time or test > setup to make that change. > > > It would be best if we could do it. > > Warner I'm giving it a shot and will try to get a patch in tomorrow. -Nathan From owner-dev-commits-src-main@freebsd.org Wed Feb 24 03:20:28 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0D7DE55EDF1; Wed, 24 Feb 2021 03:20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dlh4q6yfHz3RGB; Wed, 24 Feb 2021 03:20: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 DF23B24CF9; Wed, 24 Feb 2021 03:20: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 11O3KR1Q083807; Wed, 24 Feb 2021 03:20:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11O3KRBL083806; Wed, 24 Feb 2021 03:20:27 GMT (envelope-from git) Date: Wed, 24 Feb 2021 03:20:27 GMT Message-Id: <202102240320.11O3KRBL083806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Nathan Whitehorn Subject: git: 1af48800c20f - main - Delete memstick images for PowerPC. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nwhitehorn X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1af48800c20fadb07acca2ab930bb3bccd363edb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 03:20:28 -0000 The branch main has been updated by nwhitehorn: URL: https://cgit.FreeBSD.org/src/commit/?id=1af48800c20fadb07acca2ab930bb3bccd363edb commit 1af48800c20fadb07acca2ab930bb3bccd363edb Author: Nathan Whitehorn AuthorDate: 2021-02-24 03:17:20 +0000 Commit: Nathan Whitehorn CommitDate: 2021-02-24 03:17:20 +0000 Delete memstick images for PowerPC. These images only ever worked on Apple Powermacs, which are now a very old platform, and did so only for a very loose definition of "worked" (they booted on a small subset of supported machines). Moreover, all the machines they *did* boot on also would boot from a memstick made by dd'ing an CD image to a flash drive. Since a flash drive prepared in this way would also boot all the newer systems we support, the memstick images were strictly less functional than the CD images, even for booting from memory sticks. Reviewed by: jhibbits MFC after: 1 week --- release/powerpc/make-memstick.sh | 50 ---------------------------------------- 1 file changed, 50 deletions(-) diff --git a/release/powerpc/make-memstick.sh b/release/powerpc/make-memstick.sh deleted file mode 100755 index 75a86a73e206..000000000000 --- a/release/powerpc/make-memstick.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -# -# This script generates a "memstick image" (image that can be copied to a -# USB memory stick) from a directory tree. Note that the script does not -# clean up after itself very well for error conditions on purpose so the -# problem can be diagnosed (full filesystem most likely but ...). -# -# Usage: make-memstick.sh -# -# $FreeBSD$ -# - -set -e - -PATH=/bin:/usr/bin:/sbin:/usr/sbin -export PATH - -BLOCKSIZE=10240 - -if [ $# -ne 2 ]; then - echo "make-memstick.sh /path/to/directory /path/to/image/file" - exit 1 -fi - -tempfile="${2}.$$" - -if [ ! -d ${1} ]; then - echo "${1} must be a directory" - exit 1 -fi - -if [ -e ${2} ]; then - echo "won't overwrite ${2}" - exit 1 -fi - -echo '/dev/da0s3 / ufs ro,noatime 1 1' > ${1}/etc/fstab -echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local -rm -f ${tempfile} -makefs -B big -o version=2 ${tempfile} ${1} -rm ${1}/etc/fstab -rm ${1}/etc/rc.conf.local - -mkimg -s apm \ - -p freebsd-boot:=${1}/boot/boot1.hfs \ - -p freebsd-ufs/FreeBSD_Install:=${tempfile} \ - -o ${2} - -rm -f ${tempfile} - From owner-dev-commits-src-main@freebsd.org Wed Feb 24 05:04:36 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9CEB5548A9E; Wed, 24 Feb 2021 05:04: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlkP03sDCz3mDX; Wed, 24 Feb 2021 05:04: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 7327F265CC; Wed, 24 Feb 2021 05:04: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 11O54aDS022206; Wed, 24 Feb 2021 05:04:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11O54aSk022204; Wed, 24 Feb 2021 05:04:36 GMT (envelope-from git) Date: Wed, 24 Feb 2021 05:04:36 GMT Message-Id: <202102240504.11O54aSk022204@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rajesh Kumar M A Subject: git: ec786886661a - main - Update manpage for AMD 10GbE driver MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rajeshasp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ec786886661ac8d6c41420c4460eba8461308e0b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 05:04:36 -0000 The branch main has been updated by rajeshasp: URL: https://cgit.FreeBSD.org/src/commit/?id=ec786886661ac8d6c41420c4460eba8461308e0b commit ec786886661ac8d6c41420c4460eba8461308e0b Author: Rajesh Kumar M A AuthorDate: 2021-02-24 05:01:10 +0000 Commit: Rajesh Kumar M A CommitDate: 2021-02-24 05:01:10 +0000 Update manpage for AMD 10GbE driver Approved by: vmaffione, gallatin Differential Revision: https://reviews.freebsd.org/D28724 MFC after: 1 week --- share/man/man4/axp.4 | 69 +++++++++++++++------------------------------------- 1 file changed, 20 insertions(+), 49 deletions(-) diff --git a/share/man/man4/axp.4 b/share/man/man4/axp.4 index 598e6a968e7a..41c2737bc7f1 100644 --- a/share/man/man4/axp.4 +++ b/share/man/man4/axp.4 @@ -29,7 +29,7 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.Dd January 24, 2021 +.Dd February 19, 2021 .Dt AXP 4 .Os .Sh NAME @@ -133,41 +133,23 @@ of the register by reading the second variable. Configure the log-level for the driver. Default is 0. Supports 0-3. -.It Va dev.ax.X.single_fl -This variable must be set before loading the driver, either via -.Xr loader.conf 5 -or through the use of -.Xr kenv 1 . -This cannot be modified when driver is loaded. -.Pp -Setting this variable in +.It Va dev.ax.X.link_workaround +This variable enables the workaround for an intermittent link issue. +When link does not come up for long time, this variable can be set to 1 to +reset the phy and bring up the link. +.El +.Sh LOADER TUNABLES +The following variable is available as .Xr loader.conf 5 -needs the system to be restarted to take effect. -When using -.Xr kenv 1 , -use the wrapper variable -.Va dev.ax.single_fl\&, -which will configure all AMD interfaces with single freelist per receive queue. -Default is 2 freelist per receive queue. -.Pp -This variable is to configure the interface when single freelist is needed. -(For Eg. netmap). -Basically, this will control the software behavior of how the receive -descriptors are used. -.Pp -Setting this variable to 1, will use 1 Freelist per receive queue. -.Pp -Setting this variable to 0, will use 2 Freelist per receive queue. -.Pp -Based on the setting, the receive buffers are programmed accordingly on the -received descriptors. +tunable. +.Bl -tag -width indent +.It Va dev.ax.X.sph_enable +This variable controls split header feature for the interface. +Default is 1, meaning the split header support is enabled. .Pp -By default, this variable will be set to 0, meaning the interfaces will be -configured for regular data traffic (not netmap traffic). -.It Va dev.ax.X.sph_enabled This variable must be set before loading the driver, either via .Xr loader.conf 5 -or through the use of +or through .Xr kenv 1 . This cannot be modified when driver is loaded. .Pp @@ -177,24 +159,13 @@ needs the system to be restarted to take effect. When using .Xr kenv 1 , use the wrapper variable -.Va dev.ax.sph_enable\&, -which will configure(enable/disable) split header support in all -AMD interfaces. -.Pp -This variable is to control enable/disable of the split header feature in -the interface. -.Pp -Setting this variable to 1, will enable split header feature. -.Pp -Setting this variable to 0, will disable split header feature. -.Pp -By default, this variable will be set to 1, meaning the Split header support be -enabled. +.Va dev.ax.sph_enable , +which will configure(enable/disable) split header support for all +.Nm +interfaces. .Pp -NOTE: It is recommended to use this variable only when -.Va single_fl\& -is configured. -Otherwise let it be default value. +To use netmap with this device, split header support must be disabled +(set this variable to 0). .El .Sh SEE ALSO .Xr arp 4 , From owner-dev-commits-src-main@freebsd.org Wed Feb 24 05:22:35 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 753A15487FE; Wed, 24 Feb 2021 05:22: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dlknl2wMTz3nNp; Wed, 24 Feb 2021 05:22: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 56EF026F18; Wed, 24 Feb 2021 05:22: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 11O5MZZq048269; Wed, 24 Feb 2021 05:22:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11O5MZ7B048268; Wed, 24 Feb 2021 05:22:35 GMT (envelope-from git) Date: Wed, 24 Feb 2021 05:22:35 GMT Message-Id: <202102240522.11O5MZ7B048268@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 6e822e99570f - main - rc: fix parse of $local_startup MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e822e99570fdf4c564be04840a054bccc070222 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 05:22:35 -0000 The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=6e822e99570fdf4c564be04840a054bccc070222 commit 6e822e99570fdf4c564be04840a054bccc070222 Author: Cy Schubert AuthorDate: 2021-02-24 05:12:49 +0000 Commit: Cy Schubert CommitDate: 2021-02-24 05:12:49 +0000 rc: fix parse of $local_startup 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 introduced parallel execution of rc. It separated groups with line feeds (\n) and elements within groups using spaces. This is a natural separation due to rcorder using spaces and lines to separate elements within groups with groups of services separated by line feeds. 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 parses the output from rcorder by setting $IFS. However it failed to reset $IFS to default ' \t\n' prior to calling find_local_scripts_new(), causing find_local_scripts_new() to fail parsing $local_startup for site-specific local rc scripts, i.e. ${LOCALBASE}/etc/rc.d. This caused daemons from ports and packages such as postfix, dovecot, nut, and others in ${LOCALBASE} not to be started. PR: 249192 MFC after: 3 week X-MFC with: 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 --- libexec/rc/rc | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/rc/rc b/libexec/rc/rc index 722d7fe35884..b5bc188fc7c0 100644 --- a/libexec/rc/rc +++ b/libexec/rc/rc @@ -119,6 +119,7 @@ for _rc_group in ${files}; do done unset files local_rc +unset IFS # Now that disks are mounted, for each dir in $local_startup # search for init scripts that use the new rc.d semantics. From owner-dev-commits-src-main@freebsd.org Wed Feb 24 07:56:58 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5AAF35533F1; Wed, 24 Feb 2021 07:56: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlpCt27qLz4Yhd; Wed, 24 Feb 2021 07:56: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 3C35E28C1B; Wed, 24 Feb 2021 07:56: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 11O7uwBA045736; Wed, 24 Feb 2021 07: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 11O7uw64045735; Wed, 24 Feb 2021 07:56:58 GMT (envelope-from git) Date: Wed, 24 Feb 2021 07:56:58 GMT Message-Id: <202102240756.11O7uw64045735@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: cc9958bf22f1 - main - ffs_reallocblks: change the guard for softdep_prealloc() call to DOINGSUJ() 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: cc9958bf22f1426faf4be8bf492ce69587a9008f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 07:56:58 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cc9958bf22f1426faf4be8bf492ce69587a9008f commit cc9958bf22f1426faf4be8bf492ce69587a9008f Author: Konstantin Belousov AuthorDate: 2021-02-19 12:37:12 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-24 07:54:30 +0000 ffs_reallocblks: change the guard for softdep_prealloc() call to DOINGSUJ() instead of DOINGSOFTDEP(). The softdep_prealloc() function does nothing in SU case. Note that the call should be safe with regard to the vnode relock, because it is called with MNT_NOWAIT, which does not descend into fsync. Reviewed by: mckusick Tested by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/ufs/ffs/ffs_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 3b652ea14303..c7a1e2dec15e 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -543,7 +543,7 @@ ffs_reallocblks(ap) * here. Instead we simply fail to reallocate blocks if this * rare condition arises. */ - if (DOINGSOFTDEP(ap->a_vp)) + if (DOINGSUJ(ap->a_vp)) if (softdep_prealloc(ap->a_vp, MNT_NOWAIT) != 0) return (ENOSPC); if (ump->um_fstype == UFS1) From owner-dev-commits-src-main@freebsd.org Wed Feb 24 07:56:59 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 824875533F9; Wed, 24 Feb 2021 07: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlpCv3B9Vz4Ybt; Wed, 24 Feb 2021 07: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 5E8C228E0F; Wed, 24 Feb 2021 07: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 11O7uxQ1045754; Wed, 24 Feb 2021 07:56:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11O7uxKk045753; Wed, 24 Feb 2021 07:56:59 GMT (envelope-from git) Date: Wed, 24 Feb 2021 07:56:59 GMT Message-Id: <202102240756.11O7uxKk045753@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: 498314627946 - main - ffs: do not call softdep_prealloc() from UFS_BALLOC() 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: 49831462794690155ce8dbe02679e6d9390f3d7d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 07:56:59 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=49831462794690155ce8dbe02679e6d9390f3d7d commit 49831462794690155ce8dbe02679e6d9390f3d7d Author: Konstantin Belousov AuthorDate: 2021-02-18 14:51:50 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-24 07:54:50 +0000 ffs: do not call softdep_prealloc() from UFS_BALLOC() Do it in ffs_write(), where we can gracefuly handle relock and its consequences. In particular, recheck the v_data to see if the vnode reclamation ended, and return EBADF when we cannot proceed with the write. Reviewed by: mckusick Reported by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/ufs/ffs/ffs_balloc.c | 5 ----- sys/ufs/ffs/ffs_vnops.c | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/ufs/ffs/ffs_balloc.c b/sys/ufs/ffs/ffs_balloc.c index daa897dfe032..1b53a90a48c4 100644 --- a/sys/ufs/ffs/ffs_balloc.c +++ b/sys/ufs/ffs/ffs_balloc.c @@ -128,8 +128,6 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffset, int size, return (EFBIG); gbflags = (flags & BA_UNMAPPED) != 0 ? GB_UNMAPPED : 0; - if (DOINGSOFTDEP(vp)) - softdep_prealloc(vp, MNT_WAIT); /* * If the next write will extend the file into a new block, * and the file is currently composed of a fragment @@ -621,9 +619,6 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, int size, return (EFBIG); gbflags = (flags & BA_UNMAPPED) != 0 ? GB_UNMAPPED : 0; - if (DOINGSOFTDEP(vp)) - softdep_prealloc(vp, MNT_WAIT); - /* * Check for allocating external data. */ diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 686bfddcb0ea..db14d2099be9 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -834,6 +834,11 @@ ffs_write(ap) int blkoffset, error, flags, ioflag, size, xfersize; vp = ap->a_vp; + if (DOINGSUJ(vp)) + softdep_prealloc(vp, MNT_WAIT); + if (vp->v_data == NULL) + return (EBADF); + uio = ap->a_uio; ioflag = ap->a_ioflag; if (ap->a_ioflag & IO_EXT) From owner-dev-commits-src-main@freebsd.org Wed Feb 24 07:57:03 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46B7A553664; Wed, 24 Feb 2021 07:57: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlpCy1KKDz4Yc3; Wed, 24 Feb 2021 07:57: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 C2E5928E10; Wed, 24 Feb 2021 07:57: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 11O7v1qb045798; Wed, 24 Feb 2021 07:57:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11O7v1u1045797; Wed, 24 Feb 2021 07:57:01 GMT (envelope-from git) Date: Wed, 24 Feb 2021 07:57:01 GMT Message-Id: <202102240757.11O7v1u1045797@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: 5e198e7646a2 - main - ffs_close_ea: do not relock vnode under lock_ea 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: 5e198e7646a27412c0541719f7bf1bbc0bd89223 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 07:57:06 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5e198e7646a27412c0541719f7bf1bbc0bd89223 commit 5e198e7646a27412c0541719f7bf1bbc0bd89223 Author: Konstantin Belousov AuthorDate: 2021-02-21 10:10:06 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-24 07:55:04 +0000 ffs_close_ea: do not relock vnode under lock_ea ffs_lock_ea is after the vnode lock, so vnode must not be relocked under lock_ea. Move ffs_truncate() call in ffs_close_ea() after the lock_ea is dropped, and only truncate to length zero, since this is the only mode supported by ffs_truncate() for EAs. Previously code did truncation and then write. Zero the part of the ext area that is unused, if truncation is due but not done because ea area is not zero-length. Reviewed by: mckusick Tested by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/ufs/ffs/ffs_vnops.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 4e574f85c9e4..9be46951c04e 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -1422,9 +1422,10 @@ ffs_close_ea(struct vnode *vp, int commit, struct ucred *cred, struct thread *td { struct inode *ip; struct uio luio; - struct iovec liovec; + struct iovec *liovec; struct ufs2_dinode *dp; - int error; + size_t ea_len, tlen; + int error, i, lcnt; ip = VTOI(vp); @@ -1439,18 +1440,31 @@ ffs_close_ea(struct vnode *vp, int commit, struct ucred *cred, struct thread *td ASSERT_VOP_ELOCKED(vp, "ffs_close_ea commit"); if (cred == NOCRED) cred = vp->v_mount->mnt_cred; - liovec.iov_base = ip->i_ea_area; - liovec.iov_len = ip->i_ea_len; - luio.uio_iov = &liovec; - luio.uio_iovcnt = 1; + + ea_len = MAX(ip->i_ea_len, dp->di_extsize); + for (lcnt = 1, tlen = ea_len - ip->i_ea_len; tlen > 0;) { + tlen -= MIN(ZERO_REGION_SIZE, tlen); + lcnt++; + } + + liovec = __builtin_alloca(lcnt * sizeof(struct iovec)); + luio.uio_iovcnt = lcnt; + + liovec[0].iov_base = ip->i_ea_area; + liovec[0].iov_len = ip->i_ea_len; + for (i = 1, tlen = ea_len; i < lcnt; i++) { + liovec[i].iov_base = __DECONST(void *, zero_region); + liovec[i].iov_len = MIN(ZERO_REGION_SIZE, tlen); + tlen -= liovec[i].iov_len; + } + MPASS(tlen == ip->i_ea_len); + + luio.uio_iov = liovec; luio.uio_offset = 0; - luio.uio_resid = ip->i_ea_len; + luio.uio_resid = ea_len; luio.uio_segflg = UIO_SYSSPACE; luio.uio_rw = UIO_WRITE; luio.uio_td = td; - /* XXX: I'm not happy about truncating to zero size */ - if (ip->i_ea_len < dp->di_extsize) - error = ffs_truncate(vp, 0, IO_EXT, cred); error = ffs_extwrite(vp, &luio, IO_EXT | IO_SYNC, cred); } if (--ip->i_ea_refs == 0) { @@ -1460,6 +1474,9 @@ ffs_close_ea(struct vnode *vp, int commit, struct ucred *cred, struct thread *td ip->i_ea_error = 0; } ffs_unlock_ea(vp); + + if (commit && error == 0 && ip->i_ea_len == 0) + ffs_truncate(vp, 0, IO_EXT, cred); return (error); } From owner-dev-commits-src-main@freebsd.org Wed Feb 24 07:57:00 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E32FE553663; Wed, 24 Feb 2021 07:57: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlpCw5p3rz4YLP; Wed, 24 Feb 2021 07:57: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 9D2E02857F; Wed, 24 Feb 2021 07:57: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 11O7v0sD045777; Wed, 24 Feb 2021 07:57:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11O7v0Y4045776; Wed, 24 Feb 2021 07:57:00 GMT (envelope-from git) Date: Wed, 24 Feb 2021 07:57:00 GMT Message-Id: <202102240757.11O7v0Y4045776@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: c6d68ca842a3 - main - ffs_vnops.c: style 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: c6d68ca842a3f5b6814cdd5c87e406bad579b792 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 07:57:01 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c6d68ca842a3f5b6814cdd5c87e406bad579b792 commit c6d68ca842a3f5b6814cdd5c87e406bad579b792 Author: Konstantin Belousov AuthorDate: 2021-02-20 17:01:40 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-24 07:54:53 +0000 ffs_vnops.c: style Use local var to shorten ap->a_vp expression. Reviewed by: mckusick Tested by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/ufs/ffs/ffs_vnops.c | 48 +++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index db14d2099be9..4e574f85c9e4 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -1423,8 +1423,8 @@ ffs_close_ea(struct vnode *vp, int commit, struct ucred *cred, struct thread *td struct inode *ip; struct uio luio; struct iovec liovec; - int error; struct ufs2_dinode *dp; + int error; ip = VTOI(vp); @@ -1527,14 +1527,15 @@ struct vop_closeextattr_args { }; */ { + struct vnode *vp; - if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) + vp = ap->a_vp; + if (vp->v_type == VCHR || vp->v_type == VBLK) return (EOPNOTSUPP); - - if (ap->a_commit && (ap->a_vp->v_mount->mnt_flag & MNT_RDONLY)) + if (ap->a_commit && (vp->v_mount->mnt_flag & MNT_RDONLY) != 0) return (EROFS); - return (ffs_close_ea(ap->a_vp, ap->a_commit, ap->a_cred, ap->a_td)); + return (ffs_close_ea(vp, ap->a_commit, ap->a_cred, ap->a_td)); } /* @@ -1552,6 +1553,7 @@ vop_deleteextattr { }; */ { + struct vnode *vp; struct inode *ip; struct extattr *eap; uint32_t ul; @@ -1559,18 +1561,17 @@ vop_deleteextattr { u_char *eae; void *tmp; - ip = VTOI(ap->a_vp); + vp = ap->a_vp; + ip = VTOI(vp); - if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) + if (vp->v_type == VCHR || vp->v_type == VBLK) return (EOPNOTSUPP); - if (strlen(ap->a_name) == 0) return (EINVAL); - - if (ap->a_vp->v_mount->mnt_flag & MNT_RDONLY) + if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); - error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, + error = extattr_check_cred(vp, ap->a_attrnamespace, ap->a_cred, ap->a_td, VWRITE); if (error) { /* @@ -1582,7 +1583,7 @@ vop_deleteextattr { return (error); } - error = ffs_open_ea(ap->a_vp, ap->a_cred, ap->a_td); + error = ffs_open_ea(vp, ap->a_cred, ap->a_td); if (error) return (error); @@ -1596,7 +1597,7 @@ vop_deleteextattr { if (olen == -1) { /* delete but nonexistent */ free(eae, M_TEMP); - ffs_close_ea(ap->a_vp, 0, ap->a_cred, ap->a_td); + ffs_close_ea(vp, 0, ap->a_cred, ap->a_td); return (ENOATTR); } ul = eap->ea_length; @@ -1608,7 +1609,7 @@ vop_deleteextattr { ip->i_ea_area = eae; ip->i_ea_len = easize; free(tmp, M_TEMP); - error = ffs_close_ea(ap->a_vp, 1, ap->a_cred, ap->a_td); + error = ffs_close_ea(vp, 1, ap->a_cred, ap->a_td); return (error); } @@ -1741,6 +1742,7 @@ vop_setextattr { }; */ { + struct vnode *vp; struct inode *ip; struct fs *fs; struct extattr *eap; @@ -1750,12 +1752,12 @@ vop_setextattr { u_char *eae; void *tmp; - ip = VTOI(ap->a_vp); + vp = ap->a_vp; + ip = VTOI(vp); fs = ITOFS(ip); - if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) + if (vp->v_type == VCHR || vp->v_type == VBLK) return (EOPNOTSUPP); - if (strlen(ap->a_name) == 0) return (EINVAL); @@ -1763,14 +1765,14 @@ vop_setextattr { if (ap->a_uio == NULL) return (EOPNOTSUPP); - if (ap->a_vp->v_mount->mnt_flag & MNT_RDONLY) + if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); ealen = ap->a_uio->uio_resid; if (ealen < 0 || ealen > lblktosize(fs, UFS_NXADDR)) return (EINVAL); - error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, + error = extattr_check_cred(vp, ap->a_attrnamespace, ap->a_cred, ap->a_td, VWRITE); if (error) { /* @@ -1782,7 +1784,7 @@ vop_setextattr { return (error); } - error = ffs_open_ea(ap->a_vp, ap->a_cred, ap->a_td); + error = ffs_open_ea(vp, ap->a_cred, ap->a_td); if (error) return (error); @@ -1819,7 +1821,7 @@ vop_setextattr { } if (easize > lblktosize(fs, UFS_NXADDR)) { free(eae, M_TEMP); - ffs_close_ea(ap->a_vp, 0, ap->a_cred, ap->a_td); + ffs_close_ea(vp, 0, ap->a_cred, ap->a_td); if (ip->i_ea_area != NULL && ip->i_ea_error == 0) ip->i_ea_error = ENOSPC; return (ENOSPC); @@ -1833,7 +1835,7 @@ vop_setextattr { error = uiomove(EXTATTR_CONTENT(eap), ealen, ap->a_uio); if (error) { free(eae, M_TEMP); - ffs_close_ea(ap->a_vp, 0, ap->a_cred, ap->a_td); + ffs_close_ea(vp, 0, ap->a_cred, ap->a_td); if (ip->i_ea_area != NULL && ip->i_ea_error == 0) ip->i_ea_error = error; return (error); @@ -1844,7 +1846,7 @@ vop_setextattr { ip->i_ea_area = eae; ip->i_ea_len = easize; free(tmp, M_TEMP); - error = ffs_close_ea(ap->a_vp, 1, ap->a_cred, ap->a_td); + error = ffs_close_ea(vp, 1, ap->a_cred, ap->a_td); return (error); } From owner-dev-commits-src-main@freebsd.org Wed Feb 24 07:57:04 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E33DF5533FA; Wed, 24 Feb 2021 07:57: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlpCz72F5z4Ykh; Wed, 24 Feb 2021 07:57: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 E064928B53; Wed, 24 Feb 2021 07:57: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 11O7v2M5045817; Wed, 24 Feb 2021 07:57:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11O7v20J045816; Wed, 24 Feb 2021 07:57:02 GMT (envelope-from git) Date: Wed, 24 Feb 2021 07:57:02 GMT Message-Id: <202102240757.11O7v20J045816@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: 6f30ac9995ff - main - Call softdep_prealloc() before taking ffs_lock_ea(), if unlock is committing 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: 6f30ac9995ff662a2fee5eda4cd87dd0f0e337ba Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 07:57:06 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6f30ac9995ff662a2fee5eda4cd87dd0f0e337ba commit 6f30ac9995ff662a2fee5eda4cd87dd0f0e337ba Author: Konstantin Belousov AuthorDate: 2021-02-21 10:11:54 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-24 07:55:21 +0000 Call softdep_prealloc() before taking ffs_lock_ea(), if unlock is committing softdep_prealloc() must be called to ensure enough journal space is available, before ffs_extwrite(). Also it must be done before taking ffs_lock_ea(), because it calls ffs_syncvnode(), potentially dropping the vnode lock. Reviewed by: mckusick Tested by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/ufs/ffs/ffs_vnops.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 9be46951c04e..050a6f66be17 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -1552,6 +1552,12 @@ struct vop_closeextattr_args { if (ap->a_commit && (vp->v_mount->mnt_flag & MNT_RDONLY) != 0) return (EROFS); + if (ap->a_commit && DOINGSUJ(vp)) { + ASSERT_VOP_ELOCKED(vp, "ffs_closeextattr commit"); + softdep_prealloc(vp, MNT_WAIT); + if (vp->v_data == NULL) + return (EBADF); + } return (ffs_close_ea(vp, ap->a_commit, ap->a_cred, ap->a_td)); } @@ -1600,6 +1606,13 @@ vop_deleteextattr { return (error); } + if (DOINGSUJ(vp)) { + ASSERT_VOP_ELOCKED(vp, "ffs_deleteextattr"); + softdep_prealloc(vp, MNT_WAIT); + if (vp->v_data == NULL) + return (EBADF); + } + error = ffs_open_ea(vp, ap->a_cred, ap->a_td); if (error) return (error); @@ -1801,6 +1814,13 @@ vop_setextattr { return (error); } + if (DOINGSUJ(vp)) { + ASSERT_VOP_ELOCKED(vp, "ffs_deleteextattr"); + softdep_prealloc(vp, MNT_WAIT); + if (vp->v_data == NULL) + return (EBADF); + } + error = ffs_open_ea(vp, ap->a_cred, ap->a_td); if (error) return (error); From owner-dev-commits-src-main@freebsd.org Wed Feb 24 09:20:49 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E5958556821; Wed, 24 Feb 2021 09:20:49 +0000 (UTC) (envelope-from bapt@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dlr4d5Wjkz4jLr; Wed, 24 Feb 2021 09:20:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from aniel.nours.eu (unknown [IPv6:2001:41d0:8:3a4d::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 6A21A85EB; Wed, 24 Feb 2021 09:20:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id CC3C53314C; Wed, 24 Feb 2021 10:20:47 +0100 (CET) Date: Wed, 24 Feb 2021 10:20:47 +0100 From: Baptiste Daroussin To: Cy Schubert Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 77e1ccbee3ed - main - rc: implement parallel boot Message-ID: <20210224092047.qjazicrzfvnf4vb2@aniel.nours.eu> References: <202102231027.11NARYYE041280@gitrepo.freebsd.org> <202102240105.11O15bKn096987@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7stizekjxx47ph24" Content-Disposition: inline In-Reply-To: <202102240105.11O15bKn096987@slippy.cwsent.com> X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 09:20:50 -0000 --7stizekjxx47ph24 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 23, 2021 at 05:05:37PM -0800, Cy Schubert wrote: > In message <202102231027.11NARYYE041280@gitrepo.freebsd.org>, Baptiste=20 > Daroussi > n writes: > > The branch main has been updated by bapt: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D77e1ccbee3ed6c837929e4e2= 32fd07f9 > > 5bfc8294 > > > > commit 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 > > Author: Rick Parrish > > AuthorDate: 2021-02-07 06:15:21 +0000 > > Commit: Baptiste Daroussin > > CommitDate: 2021-02-23 10:16:53 +0000 > > > > rc: implement parallel boot > > =20 > > take advantage of the rcorder -p argument to implement parallel > > booting in rc. > > =20 > > According to the author non scientific tests: > > on a Core 2 Duo with spinning disk: > > =20 > > | Services enabled | before | after | saving | > > | 0 | 8s | 8s | 0 | > > | 1 | 13s | 13s | 0 | > > | 2 | 17s | 13s | 5 | > > | 3 | 23s | 13s | 10 | > > | 4 | 28s | 13s | 15 | > > | 5 | 33s | 13s | 20 | > > =20 > > PR: 249192 > > MFC after: 3 weeks > > --- > > libexec/rc/rc | 49 ++++++++++++++++++++++++++++++++++--------------- > > 1 file changed, 34 insertions(+), 15 deletions(-) > > > > diff --git a/libexec/rc/rc b/libexec/rc/rc > > index 35db4a850516..722d7fe35884 100644 > > --- a/libexec/rc/rc > > +++ b/libexec/rc/rc > > @@ -91,19 +91,31 @@ if ! [ -e ${firstboot_sentinel} ]; then > > skip_firstboot=3D"-s firstboot" > > fi > > =20 > > +# rc_parallel_start default is "NO" > > +rc_parallel_start=3D${rc_parallel_start:-NO} > > +_rc_parallel=3D'' > > +# enable rcorder -p if /etc/rc.conf rc_parallel_start is "YES" > > +checkyesno rc_parallel_start && _rc_parallel=3D'-p' > > + > > # Do a first pass to get everything up to $early_late_divider so that > > # we can do a second pass that includes $local_startup directories > > # > > -files=3D`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* 2>/dev/null` > > +files=3D`rcorder ${skip} ${skip_firstboot} ${_rc_parallel} /etc/rc.d/*= 2>/dev/ > > null` > > =20 > > _rc_elem_done=3D' ' > > -for _rc_elem in ${files}; do > > - run_rc_script ${_rc_elem} ${_boot} > > - _rc_elem_done=3D"${_rc_elem_done}${_rc_elem} " > > - > > - case "$_rc_elem" in > > - */${early_late_divider}) break ;; > > - esac > > +IFS=3D$'\n' > > +for _rc_group in ${files}; do > > + IFS=3D$' ' > > + for _rc_elem in ${_rc_group}; do > > + run_rc_script ${_rc_elem} ${_boot} & > > + _rc_elem_done=3D"${_rc_elem_done}${_rc_elem} " > > + > > + case "$_rc_elem" in > > + */${early_late_divider}) break ;; > > + esac > > + done > > + wait > > + IFS=3D$'\n' > > done > > =20 > > unset files local_rc > > @@ -122,14 +134,21 @@ if [ -e ${firstboot_sentinel} ]; then > > skip_firstboot=3D"" > > fi > > =20 > > -files=3D`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} 2>/= dev/null > > ` > > -for _rc_elem in ${files}; do > > - case "$_rc_elem_done" in > > - *" $_rc_elem "*) continue ;; > > - esac > > - > > - run_rc_script ${_rc_elem} ${_boot} > > +files=3D`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} ${_= rc_paral > > lel} 2>/dev/null` > > +IFS=3D$'\n' > > +for _rc_group in ${files}; do > > + IFS=3D$' ' > > + for _rc_elem in ${_rc_group}; do > > + case "$_rc_elem_done" in > > + *" $_rc_elem "*) continue ;; > > + esac > > + > > + run_rc_script ${_rc_elem} ${_boot} & > > + done > > + wait > > + IFS=3D$'\n' > > done > > +unset IFS > > =20 > > # Remove the firstboot sentinel, and reboot if it was requested. > > # Be a bit paranoid about removing it to handle the common failure > > >=20 > Since this commit my postfix, dovecot and nut fail to start at boot, and= =20 > must be started by hand. >=20 >=20 I cannot reproduce, what failure do you have?=20 Best regards, Bapt --7stizekjxx47ph24 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAmA2Gm0ACgkQY4mL3PG3 PlrMXA//QhyZ/eSQO/bykVc21yMPOaArRUOC10a7zApG/cVNu8PXzAMG7eFGgP11 Vv915uEtquHuALMBfzqmE6Ujf/XIi/xr7odJvFFYo9zmzKP74wBir4uGg6JfDlYV OQzwoxJGV/qUuA1d3pqDUUlCsFWN2M//9Six78sy09Dn098GsTb8DadE0L9HA+HW wh321Wa8aqLgHVZcwQgNsPtRqUaJY3TIOTAigI609tbN+VehzFoxRg9g7yIFIKoD 1ANRkHEGWsGMF2mtVQwutIsuF0Vm+ScQY3An7xuF7rw42YsxZo3jljhrx1znttg5 VziKWO5viDJo460qv9ex6loVqcW/JBfO8rUpQQHu1mY7/dK0uASczMTHKORnkUz3 03ZCA8beO3Bh1VY/Lv5DQaQia5OTM2I00636EayncHmnvocdXzHW7FZw/00xM02K WguZ+xyN9KJ2GLLKirkyuSmIuemh1+HU3EjWZF3GZV7MJwf/zIaUrR2+jFnjTLiI EXOxzVf7KE/k6eVIrLBtXFg1J95l3i7Brk7f6Rh3arQRLTran8LAlIlkqljP/nLp JWs2Bcp7cY9OoQH2EDN5kPkXylZr9ZkHrzBuxt3661NAFpl5zCtzo+PsV5zaMYKj XA1moNFLy5F0hogmyDtVSQJXpxg2LzjN7iesTAP3ibgMnntYVlo= =Zxua -----END PGP SIGNATURE----- --7stizekjxx47ph24-- From owner-dev-commits-src-main@freebsd.org Wed Feb 24 13:19:45 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0A15055C7F2; Wed, 24 Feb 2021 13:19: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlxNJ6wmyz3FVT; Wed, 24 Feb 2021 13:19: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 DC56B2CDA3; Wed, 24 Feb 2021 13:19: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 11ODJiXK069627; Wed, 24 Feb 2021 13:19:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11ODJiwv069626; Wed, 24 Feb 2021 13:19:44 GMT (envelope-from git) Date: Wed, 24 Feb 2021 13:19:44 GMT Message-Id: <202102241319.11ODJiwv069626@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Nathan Whitehorn Subject: git: e70eb4027151 - main - Mount the ESP on /boot/efi in VM images. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nwhitehorn X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e70eb40271512dfbca7cecf823e4b445e3989c2e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 13:19:45 -0000 The branch main has been updated by nwhitehorn: URL: https://cgit.FreeBSD.org/src/commit/?id=e70eb40271512dfbca7cecf823e4b445e3989c2e commit e70eb40271512dfbca7cecf823e4b445e3989c2e Author: Nathan Whitehorn AuthorDate: 2021-02-24 13:18:07 +0000 Commit: Nathan Whitehorn CommitDate: 2021-02-24 13:18:07 +0000 Mount the ESP on /boot/efi in VM images. This follows an earlier change (0b7472b3d8d2) for mounting the ESP from systems set up through the installer and should be MFC'ed with it. --- release/tools/vmimage.subr | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 7bad725c9870..7bd971013656 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -52,7 +52,16 @@ write_partition_layout() { # Create an ESP espfilename=$(mktemp /tmp/efiboot.XXXXXX) make_esp_file ${espfilename} ${fat32min} ${BOOTFILES}/efi/loader_lua/loader_lua.efi - BOOTPARTS="${BOOTPARTS} -p efi:=${espfilename}" + BOOTPARTS="${BOOTPARTS} -p efi/efiesp:=${espfilename}" + + # Add this to fstab, requires temporarily remounting the fs + mddev=$(mdconfig -f ${VMBASE}) + mount /dev/${mddev} ${DESTDIR} + mkdir -p ${DESTDIR}/boot/efi + echo "/dev/${ROOTLABEL}/efiesp /boot/efi msdosfs rw 2 2" \ + >> ${DESTDIR}/etc/fstab + umount ${DESTDIR} + mdconfig -d -u ${mddev} fi mkimg -s ${SCHEME} -f ${VMFORMAT} \ From owner-dev-commits-src-main@freebsd.org Wed Feb 24 13:20:32 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 846C655CC53; Wed, 24 Feb 2021 13:20:32 +0000 (UTC) (envelope-from nwhitehorn@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlxPD3PW0z3Fxl; Wed, 24 Feb 2021 13:20:32 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:f44f:4e72:b9db:4490]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 30701A466; Wed, 24 Feb 2021 13:20:32 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. From: Nathan Whitehorn To: Warner Losh Cc: Colin Percival , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <01000177d0e7f033-389acb59-2004-4040-ba7c-762878ef86b4-000000@email.amazonses.com> Message-ID: <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> Date: Wed, 24 Feb 2021 08:20:31 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 13:20:32 -0000 On 2/23/21 10:15 PM, Nathan Whitehorn wrote: > > > On 2/23/21 5:39 PM, Warner Losh wrote: >> >> >> On Tue, Feb 23, 2021 at 3:02 PM Nathan Whitehorn >> > wrote: >> >> >> >>     On 2/23/21 4:59 PM, Colin Percival wrote: >>     > On 2/23/21 1:24 PM, Nathan Whitehorn wrote: >>     >>      Mount the EFI system partition (ESP) on newly-installed >>     systems. >>     > Should we do this in VM/cloudware images too? >>     > >> >>     That's a good point. I think so, though I don't have the time or >> test >>     setup to make that change. >> >> >> It would be best if we could do it. >> >> Warner > > I'm giving it a shot and will try to get a patch in tomorrow. > -Nathan > Now in the tree (e70eb402715). Thanks for pointing this out! -Nathan From owner-dev-commits-src-main@freebsd.org Wed Feb 24 13:48:26 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 86EDA55DA98; Wed, 24 Feb 2021 13:48:26 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dly1Q0ChNz3HLX; Wed, 24 Feb 2021 13:48:25 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id EuWclmwQwnRGtEuWdlR4Wl; Wed, 24 Feb 2021 06:48:24 -0700 X-Authority-Analysis: v=2.4 cv=cagXElPM c=1 sm=1 tr=0 ts=60365928 a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=qa6Q16uM49sA:10 a=w16vAm4-AAAA:8 a=6I5d2MoRAAAA:8 a=pGLkceISAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=T19QZEnd91e3Mc5AHPkA:9 a=CjuIK1q_8ugA:10 a=eWus_ag6ds_90y4h1ov8:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 616803D8; Wed, 24 Feb 2021 05:48:11 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 11ODmB3X003509; Wed, 24 Feb 2021 05:48:11 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202102241348.11ODmB3X003509@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Baptiste Daroussin cc: Cy Schubert , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 77e1ccbee3ed - main - rc: implement parallel boot In-reply-to: <20210224092047.qjazicrzfvnf4vb2@aniel.nours.eu> References: <202102231027.11NARYYE041280@gitrepo.freebsd.org> <202102240105.11O15bKn096987@slippy.cwsent.com> <20210224092047.qjazicrzfvnf4vb2@aniel.nours.eu> Comments: In-reply-to Baptiste Daroussin message dated "Wed, 24 Feb 2021 10:20:47 +0100." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 24 Feb 2021 05:48:11 -0800 X-CMAE-Envelope: MS4xfGcGrbqNAPeqjp+mttAmsaRpD0cgk4rKEQVZARTfkgucdL3gaXrpTzH4jKkcWXBy3HPqA/T9YwBOcHWrU3uP6RJoJsC2Maw9+XZB7vJK4stuTKYq9xdZ aD24NyaFu6kVPxH8tVVs3ou/U0AIsWFjMTA7ubw7o+WYI4dSR8+uQMtRAhKB9ovwR6xaTjw4iTy4kyBkKEveQCmz9mYQB3f21LA4lLDa/6X3BROMP4ongjm4 EDV9EYAMCD/EVBPbI6f1ZVaAXvFcJFnhk4HDgkwKM2yBuRKj4kdZYotYV9allMVr7wiwwiaaWoSydrUqvyGwQitQOoz1mxsOY32lSaT++No= X-Rspamd-Queue-Id: 4Dly1Q0ChNz3HLX 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 13:48:26 -0000 In message <20210224092047.qjazicrzfvnf4vb2@aniel.nours.eu>, Baptiste Daroussin writes: > > > --7stizekjxx47ph24 > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > Content-Transfer-Encoding: quoted-printable > > On Tue, Feb 23, 2021 at 05:05:37PM -0800, Cy Schubert wrote: > > In message <202102231027.11NARYYE041280@gitrepo.freebsd.org>, Baptiste=20 > > Daroussi > > n writes: > > > The branch main has been updated by bapt: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D77e1ccbee3ed6c837929e4e2= > 32fd07f9 > > > 5bfc8294 > > > > > > commit 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 > > > Author: Rick Parrish > > > AuthorDate: 2021-02-07 06:15:21 +0000 > > > Commit: Baptiste Daroussin > > > CommitDate: 2021-02-23 10:16:53 +0000 > > > > > > rc: implement parallel boot > > > =20 > > > take advantage of the rcorder -p argument to implement parallel > > > booting in rc. > > > =20 > > > According to the author non scientific tests: > > > on a Core 2 Duo with spinning disk: > > > =20 > > > | Services enabled | before | after | saving | > > > | 0 | 8s | 8s | 0 | > > > | 1 | 13s | 13s | 0 | > > > | 2 | 17s | 13s | 5 | > > > | 3 | 23s | 13s | 10 | > > > | 4 | 28s | 13s | 15 | > > > | 5 | 33s | 13s | 20 | > > > =20 > > > PR: 249192 > > > MFC after: 3 weeks > > > --- > > > libexec/rc/rc | 49 ++++++++++++++++++++++++++++++++++--------------- > > > 1 file changed, 34 insertions(+), 15 deletions(-) > > > > > > diff --git a/libexec/rc/rc b/libexec/rc/rc > > > index 35db4a850516..722d7fe35884 100644 > > > --- a/libexec/rc/rc > > > +++ b/libexec/rc/rc > > > @@ -91,19 +91,31 @@ if ! [ -e ${firstboot_sentinel} ]; then > > > skip_firstboot=3D"-s firstboot" > > > fi > > > =20 > > > +# rc_parallel_start default is "NO" > > > +rc_parallel_start=3D${rc_parallel_start:-NO} > > > +_rc_parallel=3D'' > > > +# enable rcorder -p if /etc/rc.conf rc_parallel_start is "YES" > > > +checkyesno rc_parallel_start && _rc_parallel=3D'-p' > > > + > > > # Do a first pass to get everything up to $early_late_divider so that > > > # we can do a second pass that includes $local_startup directories > > > # > > > -files=3D`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* 2>/dev/null` > > > +files=3D`rcorder ${skip} ${skip_firstboot} ${_rc_parallel} /etc/rc.d/*= > 2>/dev/ > > > null` > > > =20 > > > _rc_elem_done=3D' ' > > > -for _rc_elem in ${files}; do > > > - run_rc_script ${_rc_elem} ${_boot} > > > - _rc_elem_done=3D"${_rc_elem_done}${_rc_elem} " > > > - > > > - case "$_rc_elem" in > > > - */${early_late_divider}) break ;; > > > - esac > > > +IFS=3D$'\n' > > > +for _rc_group in ${files}; do > > > + IFS=3D$' ' > > > + for _rc_elem in ${_rc_group}; do > > > + run_rc_script ${_rc_elem} ${_boot} & > > > + _rc_elem_done=3D"${_rc_elem_done}${_rc_elem} " > > > + > > > + case "$_rc_elem" in > > > + */${early_late_divider}) break ;; > > > + esac > > > + done > > > + wait > > > + IFS=3D$'\n' > > > done > > > =20 > > > unset files local_rc > > > @@ -122,14 +134,21 @@ if [ -e ${firstboot_sentinel} ]; then > > > skip_firstboot=3D"" > > > fi > > > =20 > > > -files=3D`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} 2>/= > dev/null > > > ` > > > -for _rc_elem in ${files}; do > > > - case "$_rc_elem_done" in > > > - *" $_rc_elem "*) continue ;; > > > - esac > > > - > > > - run_rc_script ${_rc_elem} ${_boot} > > > +files=3D`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} ${_= > rc_paral > > > lel} 2>/dev/null` > > > +IFS=3D$'\n' > > > +for _rc_group in ${files}; do > > > + IFS=3D$' ' > > > + for _rc_elem in ${_rc_group}; do > > > + case "$_rc_elem_done" in > > > + *" $_rc_elem "*) continue ;; > > > + esac > > > + > > > + run_rc_script ${_rc_elem} ${_boot} & > > > + done > > > + wait > > > + IFS=3D$'\n' > > > done > > > +unset IFS > > > =20 > > > # Remove the firstboot sentinel, and reboot if it was requested. > > > # Be a bit paranoid about removing it to handle the common failure > > > > >=20 > > Since this commit my postfix, dovecot and nut fail to start at boot, and= > =20 > > must be started by hand. > >=20 > >=20 > I cannot reproduce, what failure do you have?=20 It was a missing unset IFS and it's been fixed. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-dev-commits-src-main@freebsd.org Wed Feb 24 13:51:00 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9895355DC41; Wed, 24 Feb 2021 13:51:00 +0000 (UTC) (envelope-from bapt@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dly4N3sB9z3HY2; Wed, 24 Feb 2021 13:51:00 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from aniel.nours.eu (ns393929.ip-176-31-115.eu [176.31.115.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 3F6F0A847; Wed, 24 Feb 2021 13:51:00 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from [127.0.0.1] (10.246.39.62.rev.sfr.net [62.39.246.10]) (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 aniel.nours.eu (Postfix) with ESMTPSA id 78BD13383A; Wed, 24 Feb 2021 14:50:57 +0100 (CET) Date: Wed, 24 Feb 2021 13:50:53 +0000 (UTC) From: Baptiste Daroussin To: Cy Schubert Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Message-ID: In-Reply-To: <202102241348.11ODmB3X003509@slippy.cwsent.com> References: <202102231027.11NARYYE041280@gitrepo.freebsd.org> <202102240105.11O15bKn096987@slippy.cwsent.com> <20210224092047.qjazicrzfvnf4vb2@aniel.nours.eu> <202102241348.11ODmB3X003509@slippy.cwsent.com> Subject: Re: git: 77e1ccbee3ed - main - rc: implement parallel boot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Correlation-ID: X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 13:51:00 -0000 24 f=C3=A9vr. 2021 14:48:29 Cy Schubert : > In message <20210224092047.qjazicrzfvnf4vb2@aniel.nours.eu>, Baptiste > Daroussin > writes: >> >> >> --7stizekjxx47ph24 >> Content-Type: text/plain; charset=3Dus-ascii >> Content-Disposition: inline >> Content-Transfer-Encoding: quoted-printable >> >> On Tue, Feb 23, 2021 at 05:05:37PM -0800, Cy Schubert wrote: >>> In message <202102231027.11NARYYE041280@gitrepo.freebsd.org>, Baptiste= =3D20 >>> Daroussi >>> n writes: >>>> The branch main has been updated by bapt: >>>> >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=3D3D77e1ccbee3ed6c837929e= 4e2=3D >> 32fd07f9 >>>> 5bfc8294 >>>> >>>> commit 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 >>>> Author:=C2=A0=C2=A0=C2=A0=C2=A0 Rick Parrish >>>> AuthorDate: 2021-02-07 06:15:21 +0000 >>>> Commit:=C2=A0=C2=A0=C2=A0=C2=A0 Baptiste Daroussin >>>> CommitDate: 2021-02-23 10:16:53 +0000 >>>> >>>> =C2=A0=C2=A0=C2=A0 rc: implement parallel boot >>>> =C2=A0=C2=A0 =3D20 >>>> =C2=A0=C2=A0=C2=A0 take advantage of the rcorder -p argument to implem= ent parallel >>>> =C2=A0=C2=A0=C2=A0 booting in rc. >>>> =C2=A0=C2=A0 =3D20 >>>> =C2=A0=C2=A0=C2=A0 According to the author non scientific tests: >>>> =C2=A0=C2=A0=C2=A0 on a Core 2 Duo with spinning disk: >>>> =C2=A0=C2=A0 =3D20 >>>> =C2=A0=C2=A0=C2=A0 | Services enabled | before | after | saving | >>>> =C2=A0=C2=A0=C2=A0 | 0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 8s=C2=A0=C2=A0=C2=A0=C2=A0 | 8= s=C2=A0=C2=A0=C2=A0 | 0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | >>>> =C2=A0=C2=A0=C2=A0 | 1=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 13s=C2=A0=C2=A0=C2=A0 | 13s=C2= =A0=C2=A0 | 0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | >>>> =C2=A0=C2=A0=C2=A0 | 2=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 17s=C2=A0=C2=A0=C2=A0 | 13s=C2= =A0=C2=A0 | 5=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | >>>> =C2=A0=C2=A0=C2=A0 | 3=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 23s=C2=A0=C2=A0=C2=A0 | 13s=C2= =A0=C2=A0 | 10=C2=A0=C2=A0=C2=A0=C2=A0 | >>>> =C2=A0=C2=A0=C2=A0 | 4=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 28s=C2=A0=C2=A0=C2=A0 | 13s=C2= =A0=C2=A0 | 15=C2=A0=C2=A0=C2=A0=C2=A0 | >>>> =C2=A0=C2=A0=C2=A0 | 5=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 33s=C2=A0=C2=A0=C2=A0 | 13s=C2= =A0=C2=A0 | 20=C2=A0=C2=A0=C2=A0=C2=A0 | >>>> =C2=A0=C2=A0 =3D20 >>>> =C2=A0=C2=A0=C2=A0 PR:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 249192 >>>> =C2=A0=C2=A0=C2=A0 MFC after:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 3 weeks >>>> --- >>>> libexec/rc/rc | 49 ++++++++++++++++++++++++++++++++++--------------- >>>> 1 file changed, 34 insertions(+), 15 deletions(-) >>>> >>>> diff --git a/libexec/rc/rc b/libexec/rc/rc >>>> index 35db4a850516..722d7fe35884 100644 >>>> --- a/libexec/rc/rc >>>> +++ b/libexec/rc/rc >>>> @@ -91,19 +91,31 @@ if ! [ -e ${firstboot_sentinel} ]; then >>>> =C2=A0 skip_firstboot=3D3D"-s firstboot" >>>> fi >>>> =3D20 >>>> +# rc_parallel_start default is "NO" >>>> +rc_parallel_start=3D3D${rc_parallel_start:-NO} >>>> +_rc_parallel=3D3D'' >>>> +# enable rcorder -p if /etc/rc.conf rc_parallel_start is "YES" >>>> +checkyesno rc_parallel_start && _rc_parallel=3D3D'-p' >>>> + >>>> # Do a first pass to get everything up to $early_late_divider so that >>>> # we can do a second pass that includes $local_startup directories >>>> # >>>> -files=3D3D`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* 2>/dev/null` >>>> +files=3D3D`rcorder ${skip} ${skip_firstboot} ${_rc_parallel} /etc/rc.= d/*=3D >> 2>/dev/ >>>> null` >>>> =3D20 >>>> _rc_elem_done=3D3D' ' >>>> -for _rc_elem in ${files}; do >>>> - run_rc_script ${_rc_elem} ${_boot} >>>> - _rc_elem_done=3D3D"${_rc_elem_done}${_rc_elem} " >>>> - >>>> - case "$_rc_elem" in >>>> - */${early_late_divider})=C2=A0 break ;; >>>> - esac >>>> +IFS=3D3D$'\n' >>>> +for _rc_group in ${files}; do >>>> + IFS=3D3D$' ' >>>> + for _rc_elem in ${_rc_group}; do >>>> +=C2=A0=C2=A0 run_rc_script ${_rc_elem} ${_boot} & >>>> +=C2=A0=C2=A0 _rc_elem_done=3D3D"${_rc_elem_done}${_rc_elem} " >>>> + >>>> +=C2=A0=C2=A0 case "$_rc_elem" in >>>> +=C2=A0=C2=A0 */${early_late_divider}) break ;; >>>> +=C2=A0=C2=A0 esac >>>> + done >>>> + wait >>>> + IFS=3D3D$'\n' >>>> done >>>> =3D20 >>>> unset files local_rc >>>> @@ -122,14 +134,21 @@ if [ -e ${firstboot_sentinel} ]; then >>>> =C2=A0 skip_firstboot=3D3D"" >>>> fi >>>> =3D20 >>>> -files=3D3D`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} = 2>/=3D >> dev/null >>>> ` >>>> -for _rc_elem in ${files}; do >>>> - case "$_rc_elem_done" in >>>> - *" $_rc_elem "*)=C2=A0 continue ;; >>>> - esac >>>> - >>>> - run_rc_script ${_rc_elem} ${_boot} >>>> +files=3D3D`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} = ${_=3D >> rc_paral >>>> lel} 2>/dev/null` >>>> +IFS=3D3D$'\n' >>>> +for _rc_group in ${files}; do >>>> + IFS=3D3D$' ' >>>> + for _rc_elem in ${_rc_group}; do >>>> +=C2=A0=C2=A0 case "$_rc_elem_done" in >>>> +=C2=A0=C2=A0 *" $_rc_elem "*) continue ;; >>>> +=C2=A0=C2=A0 esac >>>> + >>>> +=C2=A0=C2=A0 run_rc_script ${_rc_elem} ${_boot} & >>>> + done >>>> + wait >>>> + IFS=3D3D$'\n' >>>> done >>>> +unset IFS >>>> =3D20 >>>> # Remove the firstboot sentinel, and reboot if it was requested. >>>> # Be a bit paranoid about removing it to handle the common failure >>>> >>> =3D20 >>> Since this commit my postfix, dovecot and nut fail to start at boot, an= d=3D >> =3D20 >>> must be started by hand. >>> =3D20 >>> =3D20 >> I cannot reproduce, what failure do you have?=3D20 > > It was a missing unset IFS and it's been fixed. > > Thank you for the fix and sorry about that! Bapt From owner-dev-commits-src-main@freebsd.org Wed Feb 24 14:15:28 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7BE2E55E811; Wed, 24 Feb 2021 14:15:28 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dlycc0bSfz3K9m; Wed, 24 Feb 2021 14:15:27 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id Euwmln4lpnRGtEuwolR8c6; Wed, 24 Feb 2021 07:15:26 -0700 X-Authority-Analysis: v=2.4 cv=cagXElPM c=1 sm=1 tr=0 ts=60365f7e a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=8nJEP1OIZ-IA:10 a=qa6Q16uM49sA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=w16vAm4-AAAA:8 a=pGLkceISAAAA:8 a=EkcXrb_YAAAA:8 a=f200sBVU4sSyzcJi4CQA:9 a=wPNLvfGTeEIA:10 a=UJ0tAi3fqDAA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=eWus_ag6ds_90y4h1ov8:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 8A12145C; Wed, 24 Feb 2021 06:15:23 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 11OEFNB2047672; Wed, 24 Feb 2021 06:15:23 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202102241415.11OEFNB2047672@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Baptiste Daroussin cc: Cy Schubert , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 77e1ccbee3ed - main - rc: implement parallel boot In-reply-to: References: <202102231027.11NARYYE041280@gitrepo.freebsd.org> <202102240105.11O15bKn096987@slippy.cwsent.com> <20210224092047.qjazicrzfvnf4vb2@aniel.nours.eu> <202102241348.11ODmB3X003509@slippy.cwsent.com> Comments: In-reply-to Baptiste Daroussin message dated "Wed, 24 Feb 2021 13:50:53 +0000." Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Wed, 24 Feb 2021 06:15:23 -0800 X-CMAE-Envelope: MS4xfPJ9S8Rg9OBjyPs4AsreMzOwPofDWlpZOE6eI9DcKZHQNzGD2soJ/CWurvVFKN8hERu/P5Dpztv4suVDvg7WbMg8ra5io49PdC7zd5NLSAEbf8kEqPm1 c2Q+tFsrCnZJT6yVM0F77QYpZHJdV0CeO6xhgZiC2MdgOR8EdIzmkKNlwviuqZdGUQBHUXo/2zR8AdQvZjPN5b6FhfEK1+xLxmj/A2M8iENcA2UtmqoQM88p fa+9D5cWNLE+oW3nBYxN+k5K+csX+1CDuQy0LTxwhWWRHfw2M/XZAcC7RPv+skZpSliCT/cvAlQtI7CuCS6h9owTottF3jneQ6GNJbmlyhk= X-Rspamd-Queue-Id: 4Dlycc0bSfz3K9m 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 14:15:28 -0000 In message , Baptiste Darouss in writes: > > 24 févr. 2021 14:48:29 Cy Schubert : > > > In message <20210224092047.qjazicrzfvnf4vb2@aniel.nours.eu>, Baptiste > > Daroussin > > writes: > >> > >> > >> --7stizekjxx47ph24 > >> Content-Type: text/plain; charset=us-ascii > >> Content-Disposition: inline > >> Content-Transfer-Encoding: quoted-printable > >> > >> On Tue, Feb 23, 2021 at 05:05:37PM -0800, Cy Schubert wrote: > >>> In message <202102231027.11NARYYE041280@gitrepo.freebsd.org>, Baptiste=20 > >>> Daroussi > >>> n writes: > >>>> The branch main has been updated by bapt: > >>>> > >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=3D77e1ccbee3ed6c837929e4e2= > >> 32fd07f9 > >>>> 5bfc8294 > >>>> > >>>> commit 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 > >>>> Author:     Rick Parrish > >>>> AuthorDate: 2021-02-07 06:15:21 +0000 > >>>> Commit:     Baptiste Daroussin > >>>> CommitDate: 2021-02-23 10:16:53 +0000 > >>>> > >>>>     rc: implement parallel boot > >>>>    =20 > >>>>     take advantage of the rcorder -p argument to implement parallel > >>>>     booting in rc. > >>>>    =20 > >>>>     According to the author non scientific tests: > >>>>     on a Core 2 Duo with spinning disk: > >>>>    =20 > >>>>     | Services enabled | before | after | saving | > >>>>     | 0                | 8s     | 8s    | 0   >     | > >>>>     | 1                | 13s    | 13s   | 0    >    | > >>>>     | 2                | 17s    | 13s   | 5    >    | > >>>>     | 3                | 23s    | 13s   | 10   >  Â  | > >>>>     | 4                | 28s    | 13s   | 15   >  Â  | > >>>>     | 5                | 33s    | 13s   | 20   >  Â  | > >>>>    =20 > >>>>     PR:             249192 > >>>>     MFC after:      3 weeks > >>>> --- > >>>> libexec/rc/rc | 49 ++++++++++++++++++++++++++++++++++--------------- > >>>> 1 file changed, 34 insertions(+), 15 deletions(-) > >>>> > >>>> diff --git a/libexec/rc/rc b/libexec/rc/rc > >>>> index 35db4a850516..722d7fe35884 100644 > >>>> --- a/libexec/rc/rc > >>>> +++ b/libexec/rc/rc > >>>> @@ -91,19 +91,31 @@ if ! [ -e ${firstboot_sentinel} ]; then > >>>>   skip_firstboot=3D"-s firstboot" > >>>> fi > >>>> =20 > >>>> +# rc_parallel_start default is "NO" > >>>> +rc_parallel_start=3D${rc_parallel_start:-NO} > >>>> +_rc_parallel=3D'' > >>>> +# enable rcorder -p if /etc/rc.conf rc_parallel_start is "YES" > >>>> +checkyesno rc_parallel_start && _rc_parallel=3D'-p' > >>>> + > >>>> # Do a first pass to get everything up to $early_late_divider so that > >>>> # we can do a second pass that includes $local_startup directories > >>>> # > >>>> -files=3D`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* 2>/dev/null` > >>>> +files=3D`rcorder ${skip} ${skip_firstboot} ${_rc_parallel} /etc/rc.d/*= > >> 2>/dev/ > >>>> null` > >>>> =20 > >>>> _rc_elem_done=3D' ' > >>>> -for _rc_elem in ${files}; do > >>>> - run_rc_script ${_rc_elem} ${_boot} > >>>> - _rc_elem_done=3D"${_rc_elem_done}${_rc_elem} " > >>>> - > >>>> - case "$_rc_elem" in > >>>> - */${early_late_divider})  break ;; > >>>> - esac > >>>> +IFS=3D$'\n' > >>>> +for _rc_group in ${files}; do > >>>> + IFS=3D$' ' > >>>> + for _rc_elem in ${_rc_group}; do > >>>> +   run_rc_script ${_rc_elem} ${_boot} & > >>>> +   _rc_elem_done=3D"${_rc_elem_done}${_rc_elem} " > >>>> + > >>>> +   case "$_rc_elem" in > >>>> +   */${early_late_divider}) break ;; > >>>> +   esac > >>>> + done > >>>> + wait > >>>> + IFS=3D$'\n' > >>>> done > >>>> =20 > >>>> unset files local_rc > >>>> @@ -122,14 +134,21 @@ if [ -e ${firstboot_sentinel} ]; then > >>>>   skip_firstboot=3D"" > >>>> fi > >>>> =20 > >>>> -files=3D`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} 2>/= > >> dev/null > >>>> ` > >>>> -for _rc_elem in ${files}; do > >>>> - case "$_rc_elem_done" in > >>>> - *" $_rc_elem "*)  continue ;; > >>>> - esac > >>>> - > >>>> - run_rc_script ${_rc_elem} ${_boot} > >>>> +files=3D`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} ${_= > >> rc_paral > >>>> lel} 2>/dev/null` > >>>> +IFS=3D$'\n' > >>>> +for _rc_group in ${files}; do > >>>> + IFS=3D$' ' > >>>> + for _rc_elem in ${_rc_group}; do > >>>> +   case "$_rc_elem_done" in > >>>> +   *" $_rc_elem "*) continue ;; > >>>> +   esac > >>>> + > >>>> +   run_rc_script ${_rc_elem} ${_boot} & > >>>> + done > >>>> + wait > >>>> + IFS=3D$'\n' > >>>> done > >>>> +unset IFS > >>>> =20 > >>>> # Remove the firstboot sentinel, and reboot if it was requested. > >>>> # Be a bit paranoid about removing it to handle the common failure > >>>> > >>> =20 > >>> Since this commit my postfix, dovecot and nut fail to start at boot, and= > >> =20 > >>> must be started by hand. > >>> =20 > >>> =20 > >> I cannot reproduce, what failure do you have?=20 > > > > It was a missing unset IFS and it's been fixed. > > > > > > > > Thank you for the fix and sorry about that! No problem. IFS is easy to miss. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-dev-commits-src-main@freebsd.org Wed Feb 24 15:13:21 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD31155FE46; Wed, 24 Feb 2021 15:13: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DlzvP4b9Zz3PRr; Wed, 24 Feb 2021 15:13: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 904BE2E732; Wed, 24 Feb 2021 15:13: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 11OFDLVb026487; Wed, 24 Feb 2021 15:13:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11OFDLK1026486; Wed, 24 Feb 2021 15:13:21 GMT (envelope-from git) Date: Wed, 24 Feb 2021 15:13:21 GMT Message-Id: <202102241513.11OFDLK1026486@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: b6999635b195 - main - iflib: Avoid double counting in rxeof MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b6999635b195e8c0dd5c08ac9ff268c92107cc66 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 15:13:21 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b6999635b195e8c0dd5c08ac9ff268c92107cc66 commit b6999635b195e8c0dd5c08ac9ff268c92107cc66 Author: Mark Johnston AuthorDate: 2021-02-24 15:08:53 +0000 Commit: Mark Johnston CommitDate: 2021-02-24 15:08:53 +0000 iflib: Avoid double counting in rxeof iflib_rxeof() was counting everything twice. This was introduced when pfil hooks were added to the iflib receive path. We want to count rx packets/bytes before the pfil hooks are executed, so remove the counter adjustments that are executed after. PR: 253583 Reviewed by: gallatin, erj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28900 --- sys/net/iflib.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 6312499feac8..5366b652373d 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2973,8 +2973,6 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) if (!IP_ALIGNED(m) && (m = iflib_fixup_rx(m)) == NULL) continue; #endif - rx_bytes += m->m_pkthdr.len; - rx_pkts++; #if defined(INET6) || defined(INET) if (lro_enabled) { if (!lro_possible) { From owner-dev-commits-src-main@freebsd.org Wed Feb 24 15:33:31 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E57A5606E3; Wed, 24 Feb 2021 15: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dm0Lg3hWJz3Qv7; Wed, 24 Feb 2021 15: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 7181B2E760; Wed, 24 Feb 2021 15: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 11OFXVEj053098; Wed, 24 Feb 2021 15:33:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11OFXVc8053097; Wed, 24 Feb 2021 15:33:31 GMT (envelope-from git) Date: Wed, 24 Feb 2021 15:33:31 GMT Message-Id: <202102241533.11OFXVc8053097@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Nathan Whitehorn Subject: git: f7aebfbe5c0a - main - Add GPT PREP-boot type to mkimg(1) from geom_gpt. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nwhitehorn X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7aebfbe5c0ab63dbb3d134d143ccff2c2b278bb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 15:33:31 -0000 The branch main has been updated by nwhitehorn: URL: https://cgit.FreeBSD.org/src/commit/?id=f7aebfbe5c0ab63dbb3d134d143ccff2c2b278bb commit f7aebfbe5c0ab63dbb3d134d143ccff2c2b278bb Author: Nathan Whitehorn AuthorDate: 2021-02-24 15:31:44 +0000 Commit: Nathan Whitehorn CommitDate: 2021-02-24 15:31:44 +0000 Add GPT PREP-boot type to mkimg(1) from geom_gpt. This partition type can be used to boot some PowerKVM VMs. We don't support it well because of some limitations in SLOF, but it's worth at least have feature parity in geom and mkimg. --- usr.bin/mkimg/gpt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/mkimg/gpt.c b/usr.bin/mkimg/gpt.c index b386ef6bc208..a071fbfac272 100644 --- a/usr.bin/mkimg/gpt.c +++ b/usr.bin/mkimg/gpt.c @@ -51,6 +51,7 @@ static mkimg_uuid_t gpt_uuid_freebsd_vinum = GPT_ENT_TYPE_FREEBSD_VINUM; static mkimg_uuid_t gpt_uuid_freebsd_zfs = GPT_ENT_TYPE_FREEBSD_ZFS; static mkimg_uuid_t gpt_uuid_mbr = GPT_ENT_TYPE_MBR; static mkimg_uuid_t gpt_uuid_ms_basic_data = GPT_ENT_TYPE_MS_BASIC_DATA; +static mkimg_uuid_t gpt_uuid_prep_boot = GPT_ENT_TYPE_PREP_BOOT; static struct mkimg_alias gpt_aliases[] = { { ALIAS_EFI, ALIAS_PTR2TYPE(&gpt_uuid_efi) }, @@ -63,6 +64,7 @@ static struct mkimg_alias gpt_aliases[] = { { ALIAS_FREEBSD_ZFS, ALIAS_PTR2TYPE(&gpt_uuid_freebsd_zfs) }, { ALIAS_MBR, ALIAS_PTR2TYPE(&gpt_uuid_mbr) }, { ALIAS_NTFS, ALIAS_PTR2TYPE(&gpt_uuid_ms_basic_data) }, + { ALIAS_PPCBOOT, ALIAS_PTR2TYPE(&gpt_uuid_prep_boot) }, { ALIAS_NONE, 0 } /* Keep last! */ }; From owner-dev-commits-src-main@freebsd.org Wed Feb 24 16:57:00 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F3004562577; Wed, 24 Feb 2021 16:57: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dm2C06VLzz3mh1; Wed, 24 Feb 2021 16:57: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 CD7932FD8B; Wed, 24 Feb 2021 16:57: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 11OGv0DS058521; Wed, 24 Feb 2021 16:57:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11OGv0WC058520; Wed, 24 Feb 2021 16:57:00 GMT (envelope-from git) Date: Wed, 24 Feb 2021 16:57:00 GMT Message-Id: <202102241657.11OGv0WC058520@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 43d4dfac96f7 - main - pwm_backlight: Add MODULE_DEPEND on backlight MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 43d4dfac96f7f8285a27989f315c075d28aadb12 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 16:57:01 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=43d4dfac96f7f8285a27989f315c075d28aadb12 commit 43d4dfac96f7f8285a27989f315c075d28aadb12 Author: Brett Mastbergen AuthorDate: 2021-02-22 10:28:28 +0000 Commit: Emmanuel Vadot CommitDate: 2021-02-24 16:56:26 +0000 pwm_backlight: Add MODULE_DEPEND on backlight Make the pwm_backlight module depend on backlight, so it has access to the backlight interface symbols. Otherwise you'll get an error like: link_elf: symbol backlight_get_info_desc undefined Signed-off-by: Brett Mastbergen MFC after: 3 days PR: 253765 --- sys/dev/pwm/pwm_backlight.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/pwm/pwm_backlight.c b/sys/dev/pwm/pwm_backlight.c index 352a5a02fed5..3a6ec7f61fec 100644 --- a/sys/dev/pwm/pwm_backlight.c +++ b/sys/dev/pwm/pwm_backlight.c @@ -308,4 +308,5 @@ devclass_t pwm_backlight_devclass; DRIVER_MODULE(pwm_backlight, simplebus, pwm_backlight_driver, pwm_backlight_devclass, 0, 0); +MODULE_DEPEND(pwm_backlight, backlight, 1, 1, 1); OFWBUS_PNP_INFO(compat_data); From owner-dev-commits-src-main@freebsd.org Wed Feb 24 20:56:28 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 84BE2549405; Wed, 24 Feb 2021 20:56: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dm7WJ3LWgz4d45; Wed, 24 Feb 2021 20:56: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 616E12F2F; Wed, 24 Feb 2021 20:56: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 11OKuSmo075429; Wed, 24 Feb 2021 20:56:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11OKuSrC075428; Wed, 24 Feb 2021 20:56:28 GMT (envelope-from git) Date: Wed, 24 Feb 2021 20:56:28 GMT Message-Id: <202102242056.11OKuSrC075428@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: e2494f7561c8 - main - atomic: add atomic_interrupt_fence() 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: e2494f7561c852951d8ac567314f5e12f19ee7af Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 20:56:28 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e2494f7561c852951d8ac567314f5e12f19ee7af commit e2494f7561c852951d8ac567314f5e12f19ee7af Author: Konstantin Belousov AuthorDate: 2021-02-23 22:12:29 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-24 20:45:24 +0000 atomic: add atomic_interrupt_fence() with the semantic following C11 signal_fence, that is, it establishes ordering between its place and any interrupt handler executing on the same CPU. Reviewed by: markj, mjg, rlibby Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28909 --- share/man/man9/atomic.9 | 13 ++++++++++++- sys/sys/atomic_common.h | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/share/man/man9/atomic.9 b/share/man/man9/atomic.9 index 39a4fa9c6f96..397a8fcd6b18 100644 --- a/share/man/man9/atomic.9 +++ b/share/man/man9/atomic.9 @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 18, 2019 +.Dd February 24, 2021 .Dt ATOMIC 9 .Os .Sh NAME @@ -31,6 +31,7 @@ .Nm atomic_cmpset , .Nm atomic_fcmpset , .Nm atomic_fetchadd , +.Nm atomic_interrupt_fence , .Nm atomic_load , .Nm atomic_readandclear , .Nm atomic_set , @@ -59,6 +60,8 @@ .Fc .Ft .Fn atomic_fetchadd_ "volatile *p" " v" +.Ft void +.Fn atomic_interrupt_fence "void" .Ft .Fn atomic_load_[acq_] "volatile *p" .Ft @@ -292,6 +295,14 @@ release stores, by separating access from ordering, they can sometimes facilitate more efficient implementations of synchronization primitives. For example, they can be used to avoid executing a memory barrier until a memory access shows that some condition is satisfied. +.Ss Interrupt Fence Operations +The +.Fn atomic_interrupt_fence() +function establishes ordering between its call location and any interrupt +handler executing on the same CPU. +It is modeled after the similar C11 function +.Fn atomic_signal_fence() , +and adapted for the kernel environment. .Ss Multiple Processors In multiprocessor systems, the atomicity of the atomic operations on memory depends on support for cache coherence in the underlying architecture. diff --git a/sys/sys/atomic_common.h b/sys/sys/atomic_common.h index 48f0a8b8939c..403b3de8a092 100644 --- a/sys/sys/atomic_common.h +++ b/sys/sys/atomic_common.h @@ -78,4 +78,6 @@ #define atomic_load_consume_ptr(p) \ ((__typeof(*p)) atomic_load_acq_ptr((uintptr_t *)p)) +#define atomic_interrupt_fence() __compiler_membar() + #endif From owner-dev-commits-src-main@freebsd.org Wed Feb 24 22:46:50 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62C2F54B9E5; Wed, 24 Feb 2021 22:46: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dm9yf0yWYz4kYk; Wed, 24 Feb 2021 22:46: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 13E264177; Wed, 24 Feb 2021 22:46: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 11OMknQT020371; Wed, 24 Feb 2021 22:46:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11OMknLT020370; Wed, 24 Feb 2021 22:46:49 GMT (envelope-from git) Date: Wed, 24 Feb 2021 22:46:49 GMT Message-Id: <202102242246.11OMknLT020370@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: cc3fa1e29fda - main - Fix crash with rtadv-originated multipath IPv6 routes. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc3fa1e29fda2cc761e793a61cef3bd2522b3468 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 22:46:50 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=cc3fa1e29fda2cc761e793a61cef3bd2522b3468 commit cc3fa1e29fda2cc761e793a61cef3bd2522b3468 Author: Alexander V. Chernikov AuthorDate: 2021-02-24 16:42:48 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-02-24 16:44:10 +0000 Fix crash with rtadv-originated multipath IPv6 routes. PR: 253800 Reported by: Frederic Denis MFC after: immediately --- sys/netinet6/nd6_rtr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index 51b831a956bc..2f721b4edcc3 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -699,7 +698,7 @@ defrouter_addreq(struct nd_defrouter *new) NET_EPOCH_ASSERT(); error = rib_action(fibnum, RTM_ADD, &info, &rc); if (error == 0) { - struct nhop_object *nh = nhop_select(rc.rc_nh_new, 0); + struct nhop_object *nh = nhop_select_func(rc.rc_nh_new, 0); rt_routemsg(RTM_ADD, rc.rc_rt, nh, fibnum); new->installed = 1; } @@ -739,7 +738,7 @@ defrouter_delreq(struct nd_defrouter *dr) NET_EPOCH_ENTER(et); error = rib_action(fibnum, RTM_DELETE, &info, &rc); if (error == 0) { - struct nhop_object *nh = nhop_select(rc.rc_nh_old, 0); + struct nhop_object *nh = nhop_select_func(rc.rc_nh_old, 0); rt_routemsg(RTM_DELETE, rc.rc_rt, nh, fibnum); } NET_EPOCH_EXIT(et); From owner-dev-commits-src-main@freebsd.org Wed Feb 24 23:26:41 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B5BA54C835; Wed, 24 Feb 2021 23:26: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmBrd2qL0z4mT4; Wed, 24 Feb 2021 23:26: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 4FBF8519E; Wed, 24 Feb 2021 23:26: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 11ONQf6V073135; Wed, 24 Feb 2021 23:26:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11ONQfWA073134; Wed, 24 Feb 2021 23:26:41 GMT (envelope-from git) Date: Wed, 24 Feb 2021 23:26:41 GMT Message-Id: <202102242326.11ONQfWA073134@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 6dd69f0064f1 - main - iflib: introduce isc_dma_width MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6dd69f0064f1e54671cdb46ce5975a332fb761e8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 23:26:41 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=6dd69f0064f1e54671cdb46ce5975a332fb761e8 commit 6dd69f0064f1e54671cdb46ce5975a332fb761e8 Author: Marcin Wojtas AuthorDate: 2021-02-24 22:56:45 +0000 Commit: Marcin Wojtas CommitDate: 2021-02-24 23:25:39 +0000 iflib: introduce isc_dma_width Some DMA controllers are unable to address the full host memory space and are instead limited to a subset of address range (e.g. 48-bit). Allow the driver to specify the maximum allowed DMA addressing width (in bits) for the NIC hardware, by introducing a new field in if_softc_ctx. If said field is omitted (set to 0), the lowaddr of DMA window bounds defaults to BUS_SPACE_MAXADDR. Submitted by: Artur Rojek Obtained from: Semihalf Sponsored by: Amazon, Inc. Differential Revision: https://reviews.freebsd.org/D28706 --- sys/net/iflib.c | 23 +++++++++++++++++++---- sys/net/iflib.h | 2 ++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 5366b652373d..6fd0ee3751f0 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -1389,15 +1389,22 @@ _iflib_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int err) *(bus_addr_t *) arg = segs[0].ds_addr; } +#define DMA_WIDTH_TO_BUS_LOWADDR(width) \ + (((width) == 0) || (width) == flsl(BUS_SPACE_MAXADDR) ? \ + BUS_SPACE_MAXADDR : (1ULL << (width)) - 1ULL) + int iflib_dma_alloc_align(if_ctx_t ctx, int size, int align, iflib_dma_info_t dma, int mapflags) { int err; device_t dev = ctx->ifc_dev; + bus_addr_t lowaddr; + + lowaddr = DMA_WIDTH_TO_BUS_LOWADDR(ctx->ifc_softc_ctx.isc_dma_width); err = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ align, 0, /* alignment, bounds */ - BUS_SPACE_MAXADDR, /* lowaddr */ + lowaddr, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ size, /* maxsize */ @@ -1648,6 +1655,7 @@ iflib_txsd_alloc(iflib_txq_t txq) if_softc_ctx_t scctx = &ctx->ifc_softc_ctx; device_t dev = ctx->ifc_dev; bus_size_t tsomaxsize; + bus_addr_t lowaddr; int err, nsegments, ntsosegments; bool tso; @@ -1664,12 +1672,14 @@ iflib_txsd_alloc(iflib_txq_t txq) MPASS(sctx->isc_tso_maxsize >= tsomaxsize); } + lowaddr = DMA_WIDTH_TO_BUS_LOWADDR(scctx->isc_dma_width); + /* * Set up DMA tags for TX buffers. */ if ((err = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0, /* alignment, bounds */ - BUS_SPACE_MAXADDR, /* lowaddr */ + lowaddr, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ sctx->isc_tx_maxsize, /* maxsize */ @@ -1687,7 +1697,7 @@ iflib_txsd_alloc(iflib_txq_t txq) tso = (if_getcapabilities(ctx->ifc_ifp) & IFCAP_TSO) != 0; if (tso && (err = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0, /* alignment, bounds */ - BUS_SPACE_MAXADDR, /* lowaddr */ + lowaddr, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ tsomaxsize, /* maxsize */ @@ -1889,18 +1899,21 @@ iflib_rxsd_alloc(iflib_rxq_t rxq) if_softc_ctx_t scctx = &ctx->ifc_softc_ctx; device_t dev = ctx->ifc_dev; iflib_fl_t fl; + bus_addr_t lowaddr; int err; MPASS(scctx->isc_nrxd[0] > 0); MPASS(scctx->isc_nrxd[rxq->ifr_fl_offset] > 0); + lowaddr = DMA_WIDTH_TO_BUS_LOWADDR(scctx->isc_dma_width); + fl = rxq->ifr_fl; for (int i = 0; i < rxq->ifr_nfl; i++, fl++) { fl->ifl_size = scctx->isc_nrxd[rxq->ifr_fl_offset]; /* this isn't necessarily the same */ /* Set up DMA tag for RX buffers. */ err = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, 0, /* alignment, bounds */ - BUS_SPACE_MAXADDR, /* lowaddr */ + lowaddr, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ sctx->isc_rx_maxsize, /* maxsize */ @@ -4748,6 +4761,8 @@ iflib_device_register(device_t dev, void *sc, if_shared_ctx_t sctx, if_ctx_t *ct _iflib_pre_assert(scctx); ctx->ifc_txrx = *scctx->isc_txrx; + MPASS(scctx->isc_dma_width <= flsl(BUS_SPACE_MAXADDR)); + if (sctx->isc_flags & IFLIB_DRIVER_MEDIA) ctx->ifc_mediap = scctx->isc_media; diff --git a/sys/net/iflib.h b/sys/net/iflib.h index a30740e67b6e..95305850f7d3 100644 --- a/sys/net/iflib.h +++ b/sys/net/iflib.h @@ -236,6 +236,8 @@ typedef struct if_softc_ctx { int isc_disable_msix; if_txrx_t isc_txrx; struct ifmedia *isc_media; + bus_size_t isc_dma_width; /* device dma width in bits, 0 means + use BUS_SPACE_MAXADDR instead */ } *if_softc_ctx_t; /* From owner-dev-commits-src-main@freebsd.org Wed Feb 24 23:26:42 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9FDD054C83C; Wed, 24 Feb 2021 23:26: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmBrf3kJ0z4mR0; Wed, 24 Feb 2021 23:26: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 72E374F5B; Wed, 24 Feb 2021 23:26: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 11ONQgMC073153; Wed, 24 Feb 2021 23:26:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11ONQg18073152; Wed, 24 Feb 2021 23:26:42 GMT (envelope-from git) Date: Wed, 24 Feb 2021 23:26:42 GMT Message-Id: <202102242326.11ONQg18073152@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: cd992885bcdf - main - Disable PIE for MIPS ubldr MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd992885bcdfb3c2c6b761f5c3bf1c86949acdc3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 23:26:42 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=cd992885bcdfb3c2c6b761f5c3bf1c86949acdc3 commit cd992885bcdfb3c2c6b761f5c3bf1c86949acdc3 Author: Marcin Wojtas AuthorDate: 2021-02-12 15:41:49 +0000 Commit: Marcin Wojtas CommitDate: 2021-02-24 23:26:11 +0000 Disable PIE for MIPS ubldr When performing buildworld for MIPS with PIE enabled, the build fails with "position-independent code requires '-mabicalls'" message. -mno-abicalls and -fno-pic flags are explicitly set in MIPS ubldr makefile, so to work around this problem, set MK_PIE=no for MIPS ubldr. Submitted by: Dawid Gorecki Reviewed by: emaste Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D28370 --- stand/mips/uboot/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stand/mips/uboot/Makefile b/stand/mips/uboot/Makefile index 1162b7fed3b0..984582027de5 100644 --- a/stand/mips/uboot/Makefile +++ b/stand/mips/uboot/Makefile @@ -44,6 +44,10 @@ LDADD= ${LDR_INTERP} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA} OBJS+= ${SRCS:N*.h:R:S/$/.o/g} +# ubldr on MIPS is built with '-mno-abicalls' flag, +# which is incompatible with PIE +MK_PIE= no + ldscript.abs: echo "UBLDR_LOADADDR = ${UBLDR_LOADADDR};" >${.TARGET} From owner-dev-commits-src-main@freebsd.org Wed Feb 24 23:26:43 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC75454C465; Wed, 24 Feb 2021 23:26: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmBrg4SPRz4m8b; Wed, 24 Feb 2021 23:26: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 8B939512E; Wed, 24 Feb 2021 23:26: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 11ONQhhX073176; Wed, 24 Feb 2021 23:26:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11ONQhk4073175; Wed, 24 Feb 2021 23:26:43 GMT (envelope-from git) Date: Wed, 24 Feb 2021 23:26:43 GMT Message-Id: <202102242326.11ONQhk4073175@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 3aa023643e9d - main - Disable PIE for powerpc bootloaders. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3aa023643e9db78f4da314ff9bfb1643533c004f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 23:26:43 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=3aa023643e9db78f4da314ff9bfb1643533c004f commit 3aa023643e9db78f4da314ff9bfb1643533c004f Author: Marcin Wojtas AuthorDate: 2021-02-23 12:42:26 +0000 Commit: Marcin Wojtas CommitDate: 2021-02-24 23:26:11 +0000 Disable PIE for powerpc bootloaders. Bootloaders for powerpc are not built as position independent code. Since bsd.prog.mk is used for building, when PIE is enabled, the PIE flags are added and that causes the build to fail. Adding MK_PIE=no stops bsd.prog.mk from adding PIE specific flags. Submitted by: Dawid Gorecki Reviewed by: emaste Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D28893 --- stand/powerpc/boot1.chrp/Makefile | 2 ++ stand/powerpc/kboot/Makefile | 2 ++ stand/powerpc/ofw/Makefile | 2 ++ stand/powerpc/uboot/Makefile | 2 ++ 4 files changed, 8 insertions(+) diff --git a/stand/powerpc/boot1.chrp/Makefile b/stand/powerpc/boot1.chrp/Makefile index e2f1739a4f4e..928f30e7eabb 100644 --- a/stand/powerpc/boot1.chrp/Makefile +++ b/stand/powerpc/boot1.chrp/Makefile @@ -43,5 +43,7 @@ boot1.hfs: boot1.elf bootinfo.txt CLEANFILES+= boot1.hfs +MK_PIE= no + .include diff --git a/stand/powerpc/kboot/Makefile b/stand/powerpc/kboot/Makefile index 8b632ae3d076..a5e43ab6fdaa 100644 --- a/stand/powerpc/kboot/Makefile +++ b/stand/powerpc/kboot/Makefile @@ -42,4 +42,6 @@ LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA} LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA} +MK_PIE= no + .include diff --git a/stand/powerpc/ofw/Makefile b/stand/powerpc/ofw/Makefile index a35a7c7c56bf..7c2e97ebb382 100644 --- a/stand/powerpc/ofw/Makefile +++ b/stand/powerpc/ofw/Makefile @@ -53,4 +53,6 @@ CFLAGS+= -I${BOOTSRC}/libofw DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA} LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA} +MK_PIE= no + .include diff --git a/stand/powerpc/uboot/Makefile b/stand/powerpc/uboot/Makefile index 9124507397ad..b0635104e454 100644 --- a/stand/powerpc/uboot/Makefile +++ b/stand/powerpc/uboot/Makefile @@ -31,4 +31,6 @@ LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc DPADD= ${LDR_INTERP} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA} LDADD= ${LDR_INTERP} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA} +MK_PIE= no + .include From owner-dev-commits-src-main@freebsd.org Wed Feb 24 23:26:45 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 77F1154C9DB; Wed, 24 Feb 2021 23:26: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmBrh6R4cz4mHn; Wed, 24 Feb 2021 23:26: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 B04F34F5C; Wed, 24 Feb 2021 23:26: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 11ONQic5073198; Wed, 24 Feb 2021 23:26:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11ONQikl073197; Wed, 24 Feb 2021 23:26:44 GMT (envelope-from git) Date: Wed, 24 Feb 2021 23:26:44 GMT Message-Id: <202102242326.11ONQikl073197@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 9a227a2fd642 - main - Enable PIE by default on 64-bit architectures MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a227a2fd642ec057a0ec70d67d5699d65553294 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 23:26:45 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=9a227a2fd642ec057a0ec70d67d5699d65553294 commit 9a227a2fd642ec057a0ec70d67d5699d65553294 Author: Marcin Wojtas AuthorDate: 2021-01-22 12:13:03 +0000 Commit: Marcin Wojtas CommitDate: 2021-02-24 23:26:11 +0000 Enable PIE by default on 64-bit architectures This patch adds Position Independent Executables (PIE) flags for building OS. It allows to enable the ASLR feature based only on the sysctl knobs, without need to rebuild the image. Tests showed that no problems with stability / performance degradation were seen when using PIEs with ASLR disabled. The change is limited only for 64-bit architectures. Use bsd.opts.mk instead of the src.opts.mk in order to satisfy all build dependencies related to MK_PIE. Reviewed by: emaste, imp Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D28328 --- share/mk/bsd.opts.mk | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk index 88c73cc6bfe4..9f9889d0a0f0 100644 --- a/share/mk/bsd.opts.mk +++ b/share/mk/bsd.opts.mk @@ -75,7 +75,6 @@ __DEFAULT_NO_OPTIONS = \ INIT_ALL_PATTERN \ INIT_ALL_ZERO \ INSTALL_AS_USER \ - PIE \ RETPOLINE \ STALE_STAGED @@ -85,6 +84,21 @@ __DEFAULT_DEPENDENT_OPTIONS = \ STAGING_PROG/STAGING \ STALE_STAGED/STAGING \ +# +# Default to disabling PIE on 32-bit architectures. The small address space +# means that ASLR is of limited effectiveness, and it may cause issues with +# some memory-hungry workloads. +# +.if ${MACHINE_ARCH} == "armv6" || ${MACHINE_ARCH} == "armv7" \ + || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "mips" \ + || ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipselhf" \ + || ${MACHINE_ARCH} == "mipshf" || ${MACHINE_ARCH} == "mipsn32" \ + || ${MACHINE_ARCH} == "mipsn32el" || ${MACHINE_ARCH} == "powerpc" \ + || ${MACHINE_ARCH} == "powerpcspe" +__DEFAULT_NO_OPTIONS+= PIE +.else +__DEFAULT_YES_OPTIONS+=PIE +.endif .include From owner-dev-commits-src-main@freebsd.org Wed Feb 24 23:59:10 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5ECB454D91E; Wed, 24 Feb 2021 23:59: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmCZ62FNVz4pVK; Wed, 24 Feb 2021 23:59: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 3556957BC; Wed, 24 Feb 2021 23:59: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 11ONxApr012917; Wed, 24 Feb 2021 23:59:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11ONxAvU012916; Wed, 24 Feb 2021 23:59:10 GMT (envelope-from git) Date: Wed, 24 Feb 2021 23:59:10 GMT Message-Id: <202102242359.11ONxAvU012916@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: 14b5a3c7d5c0 - main - vm pqbatch: move unmanaged page assert under pagequeue lock 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: 14b5a3c7d5c034c2a5a487b5e2d0de79c2801a65 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 23:59:10 -0000 The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=14b5a3c7d5c034c2a5a487b5e2d0de79c2801a65 commit 14b5a3c7d5c034c2a5a487b5e2d0de79c2801a65 Author: Max Laier AuthorDate: 2021-02-24 23:56:16 +0000 Commit: Ryan Libby CommitDate: 2021-02-24 23:56:16 +0000 vm pqbatch: move unmanaged page assert under pagequeue lock This KASSERT is overzealous because of the following race condition: 1) A managed page which is currently in PQ_LAUNDRY is freed. vm_page_free_prep calls vm_page_dequeue_deferred() The page state is: PQ_LAUNDRY, PGA_DEQUEUE|PGA_ENQUEUED 2) The laundry worker comes around and pick up the page and calls vm_pageout_defer(m, PQ_LAUNDRY, true) to check if page is still in the queue. We do a vm_page_astate_load and get PQ_LAUNDRY, PGA_DEQUEUE|PGA_ENQUEUED as per above. 3) The laundry worker is pre-empted and another thread allocates our page from the free pool. For example vm_page_alloc_domain_after calls vm_page_dequeue() and sets VPO_UNMANAGED because we are allocating for an OBJT_UNMANAGED object. The page state is: PQ_NONE, 0 - VPO_UNMANAGED 4) The laundry worker resumes, and processes vm_pageout_defer based on the stale astate which leads to a call to vm_page_pqbatch_submit, which will trip on the KASSERT. Submitted by: mlaier Reviewed by: markj, rlibby Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28563 --- sys/vm/vm_page.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index c36b8cdc5762..20fbbc304490 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -3545,9 +3545,8 @@ vm_pqbatch_process_page(struct vm_pagequeue *pq, vm_page_t m, uint8_t queue) counter_u64_add(queue_nops, 1); break; } - KASSERT(old.queue != PQ_NONE || - (old.flags & PGA_QUEUE_STATE_MASK) == 0, - ("%s: page %p has unexpected queue state", __func__, m)); + KASSERT((m->oflags & VPO_UNMANAGED) == 0, + ("%s: page %p is unmanaged", __func__, m)); new = old; if ((old.flags & PGA_DEQUEUE) != 0) { @@ -3594,8 +3593,6 @@ vm_page_pqbatch_submit(vm_page_t m, uint8_t queue) struct vm_pagequeue *pq; int domain; - KASSERT((m->oflags & VPO_UNMANAGED) == 0, - ("page %p is unmanaged", m)); KASSERT(queue < PQ_COUNT, ("invalid queue %d", queue)); domain = vm_page_domain(m); From owner-dev-commits-src-main@freebsd.org Wed Feb 24 23:59:11 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 681F054DA1B; Wed, 24 Feb 2021 23:59: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmCZ72Y8tz4pSg; Wed, 24 Feb 2021 23:59: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 4B04C59E5; Wed, 24 Feb 2021 23:59: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 11ONxBMj012940; Wed, 24 Feb 2021 23:59:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11ONxBYv012939; Wed, 24 Feb 2021 23:59:11 GMT (envelope-from git) Date: Wed, 24 Feb 2021 23:59:11 GMT Message-Id: <202102242359.11ONxBYv012939@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: d85c9cef1380 - main - ddb: reliably fail with ambiguous commands 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: d85c9cef1380f4f135aee95ad8c1f4d3eca74c5b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 23:59:11 -0000 The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=d85c9cef1380f4f135aee95ad8c1f4d3eca74c5b commit d85c9cef1380f4f135aee95ad8c1f4d3eca74c5b Author: Ryan Libby AuthorDate: 2021-02-24 23:56:16 +0000 Commit: Ryan Libby CommitDate: 2021-02-24 23:56:16 +0000 ddb: reliably fail with ambiguous commands db_cmd_match had an even/odd bug, where if a third command was partially matched (or any odd number greater than one) the search result would be set back from CMD_AMBIGUOUS to CMD_FOUND, causing the last command in the list to be executed instead of failing the match. Reported by: mlaier Reviewed by: markj, mlaier, vangyzen Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28659 --- sys/ddb/db_command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index fedec1dd33a4..e1f822ef44d8 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -293,7 +293,7 @@ db_cmd_match(char *name, struct command *cmd, struct command **cmdp, *resultp = CMD_AMBIGUOUS; /* but keep looking for a full match - this lets us match single letters */ - } else { + } else if (*resultp == CMD_NONE) { *cmdp = cmd; *resultp = CMD_FOUND; } From owner-dev-commits-src-main@freebsd.org Wed Feb 24 23:59:13 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4506E54D76A; Wed, 24 Feb 2021 23:59: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmCZ85bn8z4pdC; Wed, 24 Feb 2021 23:59: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 786A254D1; Wed, 24 Feb 2021 23:59: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 11ONxCU8012962; Wed, 24 Feb 2021 23:59:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11ONxCSi012961; Wed, 24 Feb 2021 23:59:12 GMT (envelope-from git) Date: Wed, 24 Feb 2021 23:59:12 GMT Message-Id: <202102242359.11ONxCSi012961@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: d8404b7ec36d - main - ddb: just move cursor when the lexer backs up 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: d8404b7ec36d4974e7ac586df1d74be4ef6b141e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 23:59:13 -0000 The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=d8404b7ec36d4974e7ac586df1d74be4ef6b141e commit d8404b7ec36d4974e7ac586df1d74be4ef6b141e Author: Ryan Libby AuthorDate: 2021-02-24 23:56:16 +0000 Commit: Ryan Libby CommitDate: 2021-02-24 23:56:16 +0000 ddb: just move cursor when the lexer backs up Get rid of db_look_char because it's not compatible with db_get_line(). This fixes the following issue: db> script lockinfo=show alllocks db> run lockinfo db:0:lockinfo> how alllocks No such command; use "help" to list available commands Reported by: markj Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28725 --- sys/ddb/db_lex.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/sys/ddb/db_lex.c b/sys/ddb/db_lex.c index 457790ee8605..215e7cd7f2ab 100644 --- a/sys/ddb/db_lex.c +++ b/sys/ddb/db_lex.c @@ -97,18 +97,12 @@ db_flush_line() db_endlp = db_line; } -static int db_look_char = 0; - static int db_read_char(void) { int c; - if (db_look_char != 0) { - c = db_look_char; - db_look_char = 0; - } - else if (db_lp >= db_endlp) + if (db_lp >= db_endlp) c = -1; else c = *db_lp++; @@ -116,10 +110,22 @@ db_read_char(void) } static void -db_unread_char(c) - int c; +db_unread_char(int c) { - db_look_char = c; + + if (c == -1) { + /* Unread EOL at EOL is okay. */ + if (db_lp < db_endlp) + db_error("db_unread_char(-1) before end of line\n"); + } else { + if (db_lp > db_line) { + db_lp--; + if (*db_lp != c) + db_error("db_unread_char() wrong char\n"); + } else { + db_error("db_unread_char() at beginning of line\n"); + } + } } static int db_look_token = 0; @@ -155,7 +161,6 @@ void db_flush_lex(void) { db_flush_line(); - db_look_char = 0; db_look_token = 0; } From owner-dev-commits-src-main@freebsd.org Wed Feb 24 23:59:13 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BC8BC54D93E; Wed, 24 Feb 2021 23:59: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmCZ94Rs5z4pY5; Wed, 24 Feb 2021 23:59: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 8912957BD; Wed, 24 Feb 2021 23:59: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 11ONxDMI012980; Wed, 24 Feb 2021 23:59:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11ONxD8B012979; Wed, 24 Feb 2021 23:59:13 GMT (envelope-from git) Date: Wed, 24 Feb 2021 23:59:13 GMT Message-Id: <202102242359.11ONxD8B012979@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: bf667f282a7b - main - ofed: quiet gcc -Wint-in-bool-context 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: bf667f282a7b98e7456d11e1cb46d9707ab8e774 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 23:59:14 -0000 The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=bf667f282a7b98e7456d11e1cb46d9707ab8e774 commit bf667f282a7b98e7456d11e1cb46d9707ab8e774 Author: Ryan Libby AuthorDate: 2021-02-24 23:56:16 +0000 Commit: Ryan Libby CommitDate: 2021-02-24 23:56:16 +0000 ofed: quiet gcc -Wint-in-bool-context The int in the argument to the ternary triggered -Wint-in-bool-context from gcc. Upstream linux has a larger and more entangled patch, 12f727721eee61b3d19dedb95cb893b2baa9fe41, which doesn't apply cleanly. When we eventually sync that, we can just drop this change. Reviewed by: hselasky, imp, kib MFC after: 3 days Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28762 --- sys/ofed/drivers/infiniband/core/uverbs.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/ofed/drivers/infiniband/core/uverbs.h b/sys/ofed/drivers/infiniband/core/uverbs.h index 6c8d9632b0dc..0db0d47cc691 100644 --- a/sys/ofed/drivers/infiniband/core/uverbs.h +++ b/sys/ofed/drivers/infiniband/core/uverbs.h @@ -64,8 +64,10 @@ #define INIT_UDATA_BUF_OR_NULL(udata, ibuf, obuf, ilen, olen) \ do { \ - (udata)->inbuf = (ilen) ? (const void __user *) (ibuf) : NULL; \ - (udata)->outbuf = (olen) ? (void __user *) (obuf) : NULL; \ + (udata)->inbuf = ((ilen) != 0) ? \ + (const void __user *) (ibuf) : NULL; \ + (udata)->outbuf = ((olen) != 0) ? \ + (void __user *) (obuf) : NULL; \ (udata)->inlen = (ilen); \ (udata)->outlen = (olen); \ } while (0) From owner-dev-commits-src-main@freebsd.org Thu Feb 25 01:35:57 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A488C5520A2; Thu, 25 Feb 2021 01:35: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmFjn4GdDz3CwJ; Thu, 25 Feb 2021 01:35: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 858086CB9; Thu, 25 Feb 2021 01:35: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 11P1Zvr1045574; Thu, 25 Feb 2021 01:35:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11P1ZvhN045573; Thu, 25 Feb 2021 01:35:57 GMT (envelope-from git) Date: Thu, 25 Feb 2021 01:35:57 GMT Message-Id: <202102250135.11P1ZvhN045573@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: ef567155d35f - main - Fix powerpc build after 6dd69f0064f1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef567155d35fd8f783d9b907e9a2765640a11527 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 01:35:57 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=ef567155d35fd8f783d9b907e9a2765640a11527 commit ef567155d35fd8f783d9b907e9a2765640a11527 Author: Marcin Wojtas AuthorDate: 2021-02-25 01:29:33 +0000 Commit: Marcin Wojtas CommitDate: 2021-02-25 01:35:41 +0000 Fix powerpc build after 6dd69f0064f1 Commit 6dd69f0064f1 ("iflib: introduce isc_dma_width") failed to build on powerpc due to implicit type conversion error. Fix that. Submitted by: Artur Rojek Obtained from: Semihalf Sponsored by: Amazon, Inc. --- sys/net/iflib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 6fd0ee3751f0..a7d5a8c24658 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -1390,7 +1390,7 @@ _iflib_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int err) } #define DMA_WIDTH_TO_BUS_LOWADDR(width) \ - (((width) == 0) || (width) == flsl(BUS_SPACE_MAXADDR) ? \ + (((width) == 0) || (width) == flsll(BUS_SPACE_MAXADDR) ? \ BUS_SPACE_MAXADDR : (1ULL << (width)) - 1ULL) int @@ -4761,7 +4761,7 @@ iflib_device_register(device_t dev, void *sc, if_shared_ctx_t sctx, if_ctx_t *ct _iflib_pre_assert(scctx); ctx->ifc_txrx = *scctx->isc_txrx; - MPASS(scctx->isc_dma_width <= flsl(BUS_SPACE_MAXADDR)); + MPASS(scctx->isc_dma_width <= flsll(BUS_SPACE_MAXADDR)); if (sctx->isc_flags & IFLIB_DRIVER_MEDIA) ctx->ifc_mediap = scctx->isc_media; From owner-dev-commits-src-main@freebsd.org Thu Feb 25 02:25:14 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F00055536C5; Thu, 25 Feb 2021 02:25: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmGpf6Qwjz3H99; Thu, 25 Feb 2021 02:25: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 CFCEC7716; Thu, 25 Feb 2021 02:25: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 11P2PECK011967; Thu, 25 Feb 2021 02:25:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11P2PE1I011966; Thu, 25 Feb 2021 02:25:14 GMT (envelope-from git) Date: Thu, 25 Feb 2021 02:25:14 GMT Message-Id: <202102250225.11P2PE1I011966@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Nathan Whitehorn Subject: git: 1ca8842f3ad9 - main - Use makefs(8) in release VM-image generation instead of md(4) and newfs. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nwhitehorn X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1ca8842f3ad9725863c9affc044d1974a51818a9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 02:25:15 -0000 The branch main has been updated by nwhitehorn: URL: https://cgit.FreeBSD.org/src/commit/?id=1ca8842f3ad9725863c9affc044d1974a51818a9 commit 1ca8842f3ad9725863c9affc044d1974a51818a9 Author: Nathan Whitehorn AuthorDate: 2021-02-25 02:16:56 +0000 Commit: Nathan Whitehorn CommitDate: 2021-02-25 02:16:56 +0000 Use makefs(8) in release VM-image generation instead of md(4) and newfs. Using makefs instead reduces the privileges needed to build VM images, simplifies the script (no need to copy files to a fresh image at the end), and improves portability by allowing generation of cross-endian images. As a result of the last, this patch also adds support for generation of powerpc64 and powerpc64le VM images. No other changes to the output. Tested and working for both amd64 and powerpc64 targets. Reviewed by: gjb Differential Revision: https://reviews.freebsd.org/D28912 --- release/scripts/mk-vmimage.sh | 2 - release/tools/vmimage.subr | 177 ++++++++++++++++++------------------------ 2 files changed, 77 insertions(+), 102 deletions(-) diff --git a/release/scripts/mk-vmimage.sh b/release/scripts/mk-vmimage.sh index cf795e04655b..d5985ceb0d25 100755 --- a/release/scripts/mk-vmimage.sh +++ b/release/scripts/mk-vmimage.sh @@ -93,8 +93,6 @@ main() { . "${VMCONFIG}" fi - ROOTLABEL="gpt" - vm_create_base vm_install_base vm_extra_install_base diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 7bd971013656..6e0c1ea633e2 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -12,70 +12,17 @@ scriptdir=$(dirname $(realpath $0)) export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin" trap "cleanup" INT QUIT TRAP ABRT TERM -write_partition_layout() { - if [ -z "${NOSWAP}" ]; then - SWAPOPT="-p freebsd-swap/swapfs::${SWAPSIZE}" - fi - - BOOTFILES="$(env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - WITH_UNIFIED_OBJDIR=yes \ - make -C ${WORLDDIR}/stand -V .OBJDIR)" - BOOTFILES="$(realpath ${BOOTFILES})" - - case "${TARGET}:${TARGET_ARCH}" in - amd64:amd64 | i386:i386) - ESP=yes - SCHEME=gpt - BOOTPARTS="-b ${BOOTFILES}/i386/pmbr/pmbr \ - -p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot" - ROOTFSPART="-p freebsd-ufs/rootfs:=${VMBASE}" - ;; - arm64:aarch64 | riscv:riscv64*) - ESP=yes - SCHEME=gpt - BOOTPARTS= - ROOTFSPART="-p freebsd-ufs/rootfs:=${VMBASE}" - ;; - powerpc:powerpc*) - ESP=no - SCHEME=apm - BOOTPARTS="-p apple-boot/bootfs:=${BOOTFILES}/powerpc/boot1.chrp/boot1.hfs" - ROOTFSPART="-p freebsd-ufs/rootfs:=${VMBASE}" - ;; - *) - echo "vmimage.subr: unsupported target '${TARGET}:${TARGET_ARCH}'" >&2 - exit 1 - ;; - esac - - if [ ${ESP} = "yes" ]; then - # Create an ESP - espfilename=$(mktemp /tmp/efiboot.XXXXXX) - make_esp_file ${espfilename} ${fat32min} ${BOOTFILES}/efi/loader_lua/loader_lua.efi - BOOTPARTS="${BOOTPARTS} -p efi/efiesp:=${espfilename}" - - # Add this to fstab, requires temporarily remounting the fs - mddev=$(mdconfig -f ${VMBASE}) - mount /dev/${mddev} ${DESTDIR} - mkdir -p ${DESTDIR}/boot/efi - echo "/dev/${ROOTLABEL}/efiesp /boot/efi msdosfs rw 2 2" \ - >> ${DESTDIR}/etc/fstab - umount ${DESTDIR} - mdconfig -d -u ${mddev} - fi - - mkimg -s ${SCHEME} -f ${VMFORMAT} \ - ${BOOTPARTS} \ - ${SWAPOPT} \ - ${ROOTFSPART} \ - -o ${VMIMAGE} - - if [ ${ESP} = "yes" ]; then - rm ${espfilename} - fi - - return 0 -} +# Platform-specific large-scale setup +# Most platforms use GPT, so put that as default, then special cases +PARTSCHEME=gpt +ROOTLABEL="gpt" +case "${TARGET}:${TARGET_ARCH}" in + powerpc:powerpc*) + PARTSCHEME=mbr + ROOTLABEL="ufs" + NOSWAP=yes # Can't label swap partition with MBR, so no swap + ;; +esac err() { printf "${@}\n" @@ -87,10 +34,6 @@ cleanup() { if [ -c "${DESTDIR}/dev/null" ]; then umount_loop ${DESTDIR}/dev 2>/dev/null fi - umount_loop ${DESTDIR} - if [ ! -z "${mddev}" ]; then - mdconfig -d -u ${mddev} - fi return 0 } @@ -100,42 +43,12 @@ vm_create_base() { # written to the formatted disk image with mkimg(1). mkdir -p ${DESTDIR} - truncate -s ${VMSIZE} ${VMBASE} - mddev=$(mdconfig -f ${VMBASE}) - newfs -L rootfs /dev/${mddev} - mount /dev/${mddev} ${DESTDIR} return 0 } vm_copy_base() { - # Creates a new UFS root filesystem and copies the contents of the - # current root filesystem into it. This produces a "clean" disk - # image without any remnants of files which were created temporarily - # during image-creation and have since been deleted (e.g., downloaded - # package archives). - - mkdir -p ${DESTDIR}/old - mdold=$(mdconfig -f ${VMBASE}) - mount /dev/${mdold} ${DESTDIR}/old - - truncate -s ${VMSIZE} ${VMBASE}.tmp - mkdir -p ${DESTDIR}/new - mdnew=$(mdconfig -f ${VMBASE}.tmp) - newfs -L rootfs /dev/${mdnew} - mount /dev/${mdnew} ${DESTDIR}/new - - tar -cf- -C ${DESTDIR}/old . | tar -xUf- -C ${DESTDIR}/new - - umount_loop /dev/${mdold} - rmdir ${DESTDIR}/old - mdconfig -d -u ${mdold} - - umount_loop /dev/${mdnew} - rmdir ${DESTDIR}/new - tunefs -n enable /dev/${mdnew} - mdconfig -d -u ${mdnew} - mv ${VMBASE}.tmp ${VMBASE} + # Defunct } vm_install_base() { @@ -276,7 +189,71 @@ vm_create_disk() { echo "Creating image... Please wait." echo - write_partition_layout || return 1 + if [ -z "${NOSWAP}" ]; then + SWAPOPT="-p freebsd-swap/swapfs::${SWAPSIZE}" + fi + + BOOTFILES="$(env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + WITH_UNIFIED_OBJDIR=yes \ + make -C ${WORLDDIR}/stand -V .OBJDIR)" + BOOTFILES="$(realpath ${BOOTFILES})" + + case "${TARGET}:${TARGET_ARCH}" in + amd64:amd64 | i386:i386) + ESP=yes + BOOTPARTS="-b ${BOOTFILES}/i386/pmbr/pmbr \ + -p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot" + ROOTFSPART="-p freebsd-ufs/rootfs:=${VMBASE}" + MAKEFSARGS="-B little" + ;; + arm64:aarch64 | riscv:riscv64*) + ESP=yes + BOOTPARTS= + ROOTFSPART="-p freebsd-ufs/rootfs:=${VMBASE}" + MAKEFSARGS="-B little" + ;; + powerpc:powerpc*) + ESP=no + BOOTPARTS="-p prepboot:=${BOOTFILES}/powerpc/boot1.chrp/boot1.elf -a 1" + ROOTFSPART="-p freebsd:=${VMBASE}" + if [ ${TARGET_ARCH} = powerpc64le ]; then + MAKEFSARGS="-B little" + else + MAKEFSARGS="-B big" + fi + ;; + *) + echo "vmimage.subr: unsupported target '${TARGET}:${TARGET_ARCH}'" >&2 + exit 1 + ;; + esac + + if [ ${ESP} = "yes" ]; then + # Create an ESP + espfilename=$(mktemp /tmp/efiboot.XXXXXX) + make_esp_file ${espfilename} ${fat32min} ${BOOTFILES}/efi/loader_lua/loader_lua.efi + BOOTPARTS="${BOOTPARTS} -p efi/efiesp:=${espfilename}" + + # Add this to fstab + mkdir -p ${DESTDIR}/boot/efi + echo "/dev/${ROOTLABEL}/efiesp /boot/efi msdosfs rw 2 2" \ + >> ${DESTDIR}/etc/fstab + fi + + echo "Building filesystem... Please wait." + makefs ${MAKEFSARGS} -o label=rootfs -o version=2 -o softupdates=1 \ + -s ${VMSIZE} ${VMBASE} ${DESTDIR} + + echo "Building final disk image... Please wait." + mkimg -s ${PARTSCHEME} -f ${VMFORMAT} \ + ${BOOTPARTS} \ + ${SWAPOPT} \ + ${ROOTFSPART} \ + -o ${VMIMAGE} + + if [ ${ESP} = "yes" ]; then + rm ${espfilename} + fi return 0 } From owner-dev-commits-src-main@freebsd.org Thu Feb 25 05:12:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3CFA7556DF0; Thu, 25 Feb 2021 05:12: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmLWk1J9Gz3R56; Thu, 25 Feb 2021 05:12: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 1F4C81201D; Thu, 25 Feb 2021 05:12: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 11P5CYo1037268; Thu, 25 Feb 2021 05:12:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11P5CY55037267; Thu, 25 Feb 2021 05:12:34 GMT (envelope-from git) Date: Thu, 25 Feb 2021 05:12:34 GMT Message-Id: <202102250512.11P5CY55037267@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: ddfffb41a22d - main - jail: back out 811e27fa3c44 until it doesn't break Jenkins 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: ddfffb41a22d4798a036fe2d30e59694ba7cdad3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 05:12:34 -0000 The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=ddfffb41a22d4798a036fe2d30e59694ba7cdad3 commit ddfffb41a22d4798a036fe2d30e59694ba7cdad3 Author: Jamie Gritton AuthorDate: 2021-02-25 05:10:47 +0000 Commit: Jamie Gritton CommitDate: 2021-02-25 05:10:47 +0000 jail: back out 811e27fa3c44 until it doesn't break Jenkins Reported by: arichardson --- sys/kern/kern_jail.c | 258 +++++++++++++++++++-------------------------------- 1 file changed, 93 insertions(+), 165 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 4f434637ccfa..67abfb06d2e5 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -141,13 +141,12 @@ static int get_next_prid(struct prison **insprp); static int do_jail_attach(struct thread *td, struct prison *pr, int drflags); static void prison_complete(void *context, int pending); static void prison_deref(struct prison *pr, int flags); -static void prison_deref_kill(struct prison *pr, struct prisonlist *freeprison); static int prison_lock_xlock(struct prison *pr, int flags); static void prison_free_not_last(struct prison *pr); -static void prison_proc_free_not_last(struct prison *pr); static void prison_set_allow_locked(struct prison *pr, unsigned flag, int enable); static char *prison_path(struct prison *pr1, struct prison *pr2); +static void prison_remove_one(struct prison *pr); #ifdef RACCT static void prison_racct_attach(struct prison *pr); static void prison_racct_modify(struct prison *pr); @@ -157,10 +156,9 @@ static void prison_racct_detach(struct prison *pr); /* Flags for prison_deref */ #define PD_DEREF 0x01 /* Decrement pr_ref */ #define PD_DEUREF 0x02 /* Decrement pr_uref */ -#define PD_KILL 0x04 /* Remove jail, kill processes, etc */ -#define PD_LOCKED 0x10 /* pr_mtx is held */ -#define PD_LIST_SLOCKED 0x20 /* allprison_lock is held shared */ -#define PD_LIST_XLOCKED 0x40 /* allprison_lock is held exclusive */ +#define PD_LOCKED 0x04 /* pr_mtx is held */ +#define PD_LIST_SLOCKED 0x08 /* allprison_lock is held shared */ +#define PD_LIST_XLOCKED 0x10 /* allprison_lock is held exclusive */ /* * Parameter names corresponding to PR_* flag values. Size values are for kvm @@ -1752,12 +1750,6 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) pr->pr_flags = (pr->pr_flags & ~ch_flags) | pr_flags; mtx_unlock(&pr->pr_mtx); drflags &= ~PD_LOCKED; - /* - * Any errors past this point will need to de-persist newly created - * prisons, as well as call remove methods. - */ - if (born) - drflags |= PD_KILL; #ifdef RACCT if (racct_enable && created) @@ -1817,12 +1809,17 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) /* Let the modules do their work. */ if (born) { error = osd_jail_call(pr, PR_METHOD_CREATE, opts); - if (error) + if (error) { + (void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL); goto done_deref; + } } error = osd_jail_call(pr, PR_METHOD_SET, opts); - if (error) + if (error) { + if (born) + (void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL); goto done_deref; + } /* * A new prison is now ready to be seen; either it has gained a user @@ -1857,7 +1854,6 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) } #endif - drflags &= ~PD_KILL; td->td_retval[0] = pr->pr_id; done_deref: @@ -2281,8 +2277,8 @@ kern_jail_get(struct thread *td, struct uio *optuio, int flags) int sys_jail_remove(struct thread *td, struct jail_remove_args *uap) { - struct prison *pr; - int error; + struct prison *pr, *cpr, *lpr; + int descend, error; error = priv_check(td, PRIV_JAIL_REMOVE); if (error) @@ -2294,16 +2290,90 @@ sys_jail_remove(struct thread *td, struct jail_remove_args *uap) sx_xunlock(&allprison_lock); return (EINVAL); } - if (!prison_isalive(pr)) { - /* Silently ignore already-dying prisons. */ + + /* Remove all descendants of this prison, then remove this prison. */ + prison_hold(pr); + if (!LIST_EMPTY(&pr->pr_children)) { mtx_unlock(&pr->pr_mtx); - sx_xunlock(&allprison_lock); - return (0); + lpr = NULL; + FOREACH_PRISON_DESCENDANT(pr, cpr, descend) { + prison_hold(cpr); + if (lpr != NULL) { + mtx_lock(&lpr->pr_mtx); + prison_remove_one(lpr); + sx_xlock(&allprison_lock); + } + lpr = cpr; + } + if (lpr != NULL) { + mtx_lock(&lpr->pr_mtx); + prison_remove_one(lpr); + sx_xlock(&allprison_lock); + } + mtx_lock(&pr->pr_mtx); } - prison_deref(pr, PD_KILL | PD_LOCKED | PD_LIST_XLOCKED); + prison_remove_one(pr); return (0); } +static void +prison_remove_one(struct prison *pr) +{ + struct proc *p; + int was_alive, drflags; + + drflags = PD_DEREF | PD_LOCKED | PD_LIST_XLOCKED; + + /* + * Mark the prison as doomed, so it doesn't accidentally come back + * to life. It may still be explicitly brought back by jail_set(2). + */ + was_alive = pr->pr_state == PRISON_STATE_ALIVE; + pr->pr_state = PRISON_STATE_DYING; + + /* If the prison was persistent, it is not anymore. */ + if (pr->pr_flags & PR_PERSIST) { + drflags |= PD_DEUREF; + prison_free_not_last(pr); + pr->pr_flags &= ~PR_PERSIST; + } + + /* + * jail_remove added a reference. If that's the only one, remove + * the prison now. refcount(9) doesn't guarantee the cache coherence + * of non-zero counters, so force it here. + */ + KASSERT(refcount_load(&pr->pr_ref) > 0, + ("prison_remove_one removing a dead prison (jid=%d)", pr->pr_id)); + if (atomic_load_acq_int(&pr->pr_ref) == 1) { + prison_deref(pr, drflags); + return; + } + + /* Tell modules this prison has died. */ + mtx_unlock(&pr->pr_mtx); + drflags &= ~PD_LOCKED; + if (was_alive) + (void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL); + + sx_xunlock(&allprison_lock); + drflags &= ~PD_LIST_XLOCKED; + /* + * Kill all processes unfortunate enough to be attached to this prison. + */ + sx_slock(&allproc_lock); + FOREACH_PROC_IN_SYSTEM(p) { + PROC_LOCK(p); + if (p->p_state != PRS_NEW && p->p_ucred && + p->p_ucred->cr_prison == pr) + kern_psignal(p, SIGKILL); + PROC_UNLOCK(p); + } + sx_sunlock(&allproc_lock); + /* Remove the temporary reference added by jail_remove. */ + prison_deref(pr, drflags); +} + /* * struct jail_attach_args { * int jid; @@ -2655,24 +2725,6 @@ prison_proc_free(struct prison *pr) } } -static void -prison_proc_free_not_last(struct prison *pr) -{ -#ifdef INVARIANTS - int lastref; - - KASSERT(refcount_load(&pr->pr_uref) > 0, - ("Trying to free dead prison %p (jid=%d).", - pr, pr->pr_id)); - lastref = refcount_release(&pr->pr_uref); - KASSERT(!lastref, - ("prison_proc_free_not_last freed last uref on prison %p (jid=%d).", - pr, pr->pr_id)); -#else - refcount_release(&pr->pr_uref); -#endif -} - /* * Complete a call to either prison_free or prison_proc_free. */ @@ -2706,25 +2758,14 @@ static void prison_deref(struct prison *pr, int flags) { struct prisonlist freeprison; - struct prison *killpr, *rpr, *ppr, *tpr; - struct proc *p; + struct prison *rpr, *ppr, *tpr; - killpr = NULL; TAILQ_INIT(&freeprison); /* * Release this prison as requested, which may cause its parent * to be released, and then maybe its grandparent, etc. */ for (;;) { - if (flags & PD_KILL) { - /* Kill the prison and its descendents. */ - if (!(flags & PD_DEREF)) { - prison_hold(pr); - flags |= PD_DEREF; - } - flags = prison_lock_xlock(pr, flags); - prison_deref_kill(pr, &freeprison); - } if (flags & PD_DEUREF) { /* Drop a user reference. */ KASSERT(refcount_load(&pr->pr_uref) > 0, @@ -2753,16 +2794,6 @@ prison_deref(struct prison *pr, int flags) } } } - if (flags & PD_KILL) { - flags &= ~PD_KILL; - /* - * Any remaining user references are probably processes - * that need to be killed, either in this prison or its - * descendants. - */ - if (refcount_load(&pr->pr_uref) > 0) - killpr = pr; - } if (flags & PD_DEREF) { /* Drop a reference. */ KASSERT(refcount_load(&pr->pr_ref) > 0, @@ -2815,25 +2846,6 @@ prison_deref(struct prison *pr, int flags) else if (flags & PD_LIST_XLOCKED) sx_xunlock(&allprison_lock); - /* Kill any processes attached to a killed prison. */ - if (killpr != NULL) { - sx_slock(&allproc_lock); - FOREACH_PROC_IN_SYSTEM(p) { - PROC_LOCK(p); - if (p->p_state != PRS_NEW && p->p_ucred != NULL) { - for (ppr = p->p_ucred->cr_prison; - ppr != &prison0; - ppr = ppr->pr_parent) - if (ppr == killpr) { - kern_psignal(p, SIGKILL); - break; - } - } - PROC_UNLOCK(p); - } - sx_sunlock(&allproc_lock); - } - /* * Finish removing any unreferenced prisons, which couldn't happen * while allprison_lock was held (to avoid a LOR on vrele). @@ -2864,90 +2876,6 @@ prison_deref(struct prison *pr, int flags) } } -/* - * Kill the prison and its descendants. Mark them as dying, clear the - * persist flag, and call module remove methods. - */ -static void -prison_deref_kill(struct prison *pr, struct prisonlist *freeprison) -{ - struct prison *cpr, *ppr, *rpr; - bool descend; - - /* - * Unlike the descendants, the target prison can be killed - * even if it is currently dying. This is useful for failed - * creation in jail_set(2). - */ - KASSERT(refcount_load(&pr->pr_ref) > 0, - ("Trying to kill dead prison %p (jid=%d).", - pr, pr->pr_id)); - refcount_acquire(&pr->pr_uref); - pr->pr_state = PRISON_STATE_DYING; - mtx_unlock(&pr->pr_mtx); - - rpr = NULL; - FOREACH_PRISON_DESCENDANT_PRE_POST(pr, cpr, descend) { - if (descend) { - if (!prison_isalive(cpr)) { - descend = false; - continue; - } - prison_hold(cpr); - prison_proc_hold(cpr); - mtx_lock(&cpr->pr_mtx); - cpr->pr_state = PRISON_STATE_DYING; - cpr->pr_flags |= PR_REMOVE; - mtx_unlock(&cpr->pr_mtx); - } - if (!(cpr->pr_flags & PR_REMOVE)) - continue; - (void)osd_jail_call(cpr, PR_METHOD_REMOVE, NULL); - mtx_lock(&cpr->pr_mtx); - cpr->pr_flags &= ~PR_REMOVE; - if (cpr->pr_flags & PR_PERSIST) { - cpr->pr_flags &= ~PR_PERSIST; - prison_proc_free_not_last(cpr); - prison_free_not_last(cpr); - } - (void)refcount_release(&cpr->pr_uref); - if (refcount_release(&cpr->pr_ref)) { - /* - * When the last reference goes, unlink the prison - * and set it aside for prison_deref() to handle. - * Delay unlinking the sibling list to keep the loop - * safe. - */ - if (rpr != NULL) - LIST_REMOVE(rpr, pr_sibling); - rpr = cpr; - rpr->pr_state = PRISON_STATE_INVALID; - TAILQ_REMOVE(&allprison, rpr, pr_list); - TAILQ_INSERT_TAIL(freeprison, rpr, pr_list); - /* - * Removing a prison frees references from its parent. - */ - ppr = rpr->pr_parent; - prison_proc_free_not_last(ppr); - prison_free_not_last(ppr); - for (; ppr != NULL; ppr = ppr->pr_parent) - ppr->pr_childcount--; - } - mtx_unlock(&cpr->pr_mtx); - } - if (rpr != NULL) - LIST_REMOVE(rpr, pr_sibling); - - (void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL); - mtx_lock(&pr->pr_mtx); - if (pr->pr_flags & PR_PERSIST) { - pr->pr_flags &= ~PR_PERSIST; - prison_proc_free_not_last(pr); - prison_free_not_last(pr); - } - (void)refcount_release(&pr->pr_uref); -} - /* * Given the current locking state in the flags, make sure allprison_lock * is held exclusive, and the prison is locked. Return flags indicating From owner-dev-commits-src-main@freebsd.org Thu Feb 25 05:29:38 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 180BF55731F; Thu, 25 Feb 2021 05:29:38 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmLvQ07lDz3hKH; Thu, 25 Feb 2021 05:29:38 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (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 E67AC21BFF; Thu, 25 Feb 2021 05:29:37 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f169.google.com with SMTP id z190so4626896qka.9; Wed, 24 Feb 2021 21:29:37 -0800 (PST) X-Gm-Message-State: AOAM532Zk/fs/rror8+1fdUCjgs08bIPmLw5WsGns8oRyRW9+DxLgCKu BZ9n6YAYc+tGbVet1hPVYhlbPh5+2BBMzzUMoog= X-Google-Smtp-Source: ABdhPJy8MMv1F6SETwrljMa0NwLp4vP4wYGTr+3owxPiejj1mZLNLJdsPhSvAmZvO+iR14IFGyQm90wJmJTp10yfr1M= X-Received: by 2002:a37:6484:: with SMTP id y126mr1372123qkb.430.1614230977327; Wed, 24 Feb 2021 21:29:37 -0800 (PST) MIME-Version: 1.0 References: <202102222027.11MKRtcl033616@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Wed, 24 Feb 2021 23:29:26 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 811e27fa3c44 - main - jail: Add PD_KILL to remove a prison in prison_deref(). To: Alexander Richardson Cc: Jamie Gritton , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 05:29:38 -0000 On Tue, Feb 23, 2021 at 7:16 AM Alexander Richardson wrote: > > On Mon, 22 Feb 2021 at 20:28, Jamie Gritton wrote: > > > > The branch main has been updated by jamie: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=811e27fa3c445664e36071a7d08228fc7fb85676 > > > > commit 811e27fa3c445664e36071a7d08228fc7fb85676 > > Author: Jamie Gritton > > AuthorDate: 2021-02-22 20:27:44 +0000 > > Commit: Jamie Gritton > > CommitDate: 2021-02-22 20:27:44 +0000 > > > > jail: Add PD_KILL to remove a prison in prison_deref(). > > > > Add the PD_KILL flag that instructs prison_deref() to take steps > > to actively kill a prison and its descendents, namely marking it > > PRISON_STATE_DYING, clearing its PR_PERSIST flag, and killing any > > attached processes. > > > > This replaces a similar loop in sys_jail_remove(), bringing the > > operation under the same single hold on allprison_lock that it already > > has. It is also used to clean up failed jail (re-)creations in > > kern_jail_set(), which didn't generally take all the proper steps. > > > > Differential Revision: https://reviews.freebsd.org/D28473 > > Hi Jamie, > > After this commit running cd /usr/tests/lib/libc/sys && kyua test > cpuset_test renders the entire system unusable: all exec calls > afterwards seem to fail. In Jenkins it's triggering a kernel panic: > https://ci.freebsd.org/job/FreeBSD-main-amd64-test/17630/consoleFull > Reverting this commit fixes the issue. > Based on the backtrace and a wild stab in the dark, the last prison_deref() in do_jail_attach() prior to successful return should explicitly clear the PD_KILL flag from drflags. Thanks, Kyle Evans From owner-dev-commits-src-main@freebsd.org Thu Feb 25 05:50:50 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF0EB557960; Thu, 25 Feb 2021 05:50: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmMMt4VY9z3j2H; Thu, 25 Feb 2021 05:50: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 8DADE123AE; Thu, 25 Feb 2021 05:50: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 11P5ooNX087389; Thu, 25 Feb 2021 05:50:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11P5ooIQ087388; Thu, 25 Feb 2021 05:50:50 GMT (envelope-from git) Date: Thu, 25 Feb 2021 05:50:50 GMT Message-Id: <202102250550.11P5ooIQ087388@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 19cd12a32afe - main - Disable PIE for MIPS BERI boot loader MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 19cd12a32afe801dc5e753013993e15e924ceb39 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 05:50:50 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=19cd12a32afe801dc5e753013993e15e924ceb39 commit 19cd12a32afe801dc5e753013993e15e924ceb39 Author: Marcin Wojtas AuthorDate: 2021-02-25 05:41:35 +0000 Commit: Marcin Wojtas CommitDate: 2021-02-25 05:41:35 +0000 Disable PIE for MIPS BERI boot loader MIPS BERI boot loader is built with -mno-abicalls and -fno-pic so prevent adding PIE-related build flags. Fix build after 9a227a2fd642 ("Enable PIE by default on 64-bit architectures") Obtained from: Semihalf Sponsored by: Stormshield --- stand/mips/beri/Makefile.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stand/mips/beri/Makefile.inc b/stand/mips/beri/Makefile.inc index 5a7b18e393c0..a95ca3dc1861 100644 --- a/stand/mips/beri/Makefile.inc +++ b/stand/mips/beri/Makefile.inc @@ -2,4 +2,8 @@ LDFLAGS+= -nostdlib +# BERI boot loader is built with '-mno-abicalls' flag, +# which is incompatible with PIE +MK_PIE= no + .include "../Makefile.inc" From owner-dev-commits-src-main@freebsd.org Thu Feb 25 05:53:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B72525579E6; Thu, 25 Feb 2021 05:53:34 +0000 (UTC) (envelope-from jamie@freebsd.org) Received: from gritton.org (gritton.org [199.192.165.131]) (using TLSv1.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 4DmMR240vCz3jmr; Thu, 25 Feb 2021 05:53:34 +0000 (UTC) (envelope-from jamie@freebsd.org) Received: from gritton.org ([127.0.0.131]) (authenticated bits=0) by gritton.org (8.15.2/8.15.2) with ESMTPA id 11P5lwgI012007; Wed, 24 Feb 2021 21:47:58 -0800 (PST) (envelope-from jamie@freebsd.org) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 24 Feb 2021 21:47:58 -0800 From: James Gritton To: Kyle Evans Cc: Alexander Richardson , src-committers , , dev-commits-src-main@freebsd.org Subject: Re: git: 811e27fa3c44 - main - jail: Add PD_KILL to remove a prison in prison_deref(). In-Reply-To: References: <202102222027.11MKRtcl033616@gitrepo.freebsd.org> User-Agent: Roundcube Webmail/1.4.1 Message-ID: X-Sender: jamie@freebsd.org X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (gritton.org [127.0.0.131]); Wed, 24 Feb 2021 21:47:58 -0800 (PST) X-Rspamd-Queue-Id: 4DmMR240vCz3jmr 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 05:53:34 -0000 On 2021-02-24 21:29, Kyle Evans wrote: > On Tue, Feb 23, 2021 at 7:16 AM Alexander Richardson > wrote: >> >> On Mon, 22 Feb 2021 at 20:28, Jamie Gritton wrote: >> > >> > The branch main has been updated by jamie: >> > >> > URL: https://cgit.FreeBSD.org/src/commit/?id=811e27fa3c445664e36071a7d08228fc7fb85676 >> > >> > commit 811e27fa3c445664e36071a7d08228fc7fb85676 >> > Author: Jamie Gritton >> > AuthorDate: 2021-02-22 20:27:44 +0000 >> > Commit: Jamie Gritton >> > CommitDate: 2021-02-22 20:27:44 +0000 >> > >> > jail: Add PD_KILL to remove a prison in prison_deref(). >> > >> > Add the PD_KILL flag that instructs prison_deref() to take steps >> > to actively kill a prison and its descendents, namely marking it >> > PRISON_STATE_DYING, clearing its PR_PERSIST flag, and killing any >> > attached processes. >> > >> > This replaces a similar loop in sys_jail_remove(), bringing the >> > operation under the same single hold on allprison_lock that it already >> > has. It is also used to clean up failed jail (re-)creations in >> > kern_jail_set(), which didn't generally take all the proper steps. >> > >> > Differential Revision: https://reviews.freebsd.org/D28473 >> >> Hi Jamie, >> >> After this commit running cd /usr/tests/lib/libc/sys && kyua test >> cpuset_test renders the entire system unusable: all exec calls >> afterwards seem to fail. In Jenkins it's triggering a kernel panic: >> https://ci.freebsd.org/job/FreeBSD-main-amd64-test/17630/consoleFull >> Reverting this commit fixes the issue. >> > > Based on the backtrace and a wild stab in the dark, the last > prison_deref() in do_jail_attach() prior to successful return should > explicitly clear the PD_KILL flag from drflags. > > Thanks, > > Kyle Evans Yep, that's what's doing it. Actually, PD_KILL has no business being passed to do_jail_attach in the first place. Running a test on that right now. - Jamie From owner-dev-commits-src-main@freebsd.org Thu Feb 25 05:54:58 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1856B557F83; Thu, 25 Feb 2021 05:54: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmMSf0Bk8z3jnh; Thu, 25 Feb 2021 05:54: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 E97D6126B1; Thu, 25 Feb 2021 05:54: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 11P5svvH089653; Thu, 25 Feb 2021 05:54:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11P5svqJ089652; Thu, 25 Feb 2021 05:54:57 GMT (envelope-from git) Date: Thu, 25 Feb 2021 05:54:57 GMT Message-Id: <202102250554.11P5svqJ089652@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: c861373bdff9 - main - jail: re-commit 811e27fa3c44 with fixes 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: c861373bdff90d8167a0d998899ca718ccdb541b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 05:54:58 -0000 The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=c861373bdff90d8167a0d998899ca718ccdb541b commit c861373bdff90d8167a0d998899ca718ccdb541b Author: Jamie Gritton AuthorDate: 2021-02-25 05:54:49 +0000 Commit: Jamie Gritton CommitDate: 2021-02-25 05:54:49 +0000 jail: re-commit 811e27fa3c44 with fixes Make sure PD_KILL isn't passed to do_jail_attach, where it might end up trying to kill the caller's prison (even prison0). Fix the child jail loop in prison_deref_kill, which was doing the post-order part during the pre-order part. That's not a system- killer, but make jails not always die correctly. --- sys/kern/kern_jail.c | 262 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 168 insertions(+), 94 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 67abfb06d2e5..c58751e6f5fe 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -141,12 +141,13 @@ static int get_next_prid(struct prison **insprp); static int do_jail_attach(struct thread *td, struct prison *pr, int drflags); static void prison_complete(void *context, int pending); static void prison_deref(struct prison *pr, int flags); +static void prison_deref_kill(struct prison *pr, struct prisonlist *freeprison); static int prison_lock_xlock(struct prison *pr, int flags); static void prison_free_not_last(struct prison *pr); +static void prison_proc_free_not_last(struct prison *pr); static void prison_set_allow_locked(struct prison *pr, unsigned flag, int enable); static char *prison_path(struct prison *pr1, struct prison *pr2); -static void prison_remove_one(struct prison *pr); #ifdef RACCT static void prison_racct_attach(struct prison *pr); static void prison_racct_modify(struct prison *pr); @@ -156,9 +157,10 @@ static void prison_racct_detach(struct prison *pr); /* Flags for prison_deref */ #define PD_DEREF 0x01 /* Decrement pr_ref */ #define PD_DEUREF 0x02 /* Decrement pr_uref */ -#define PD_LOCKED 0x04 /* pr_mtx is held */ -#define PD_LIST_SLOCKED 0x08 /* allprison_lock is held shared */ -#define PD_LIST_XLOCKED 0x10 /* allprison_lock is held exclusive */ +#define PD_KILL 0x04 /* Remove jail, kill processes, etc */ +#define PD_LOCKED 0x10 /* pr_mtx is held */ +#define PD_LIST_SLOCKED 0x20 /* allprison_lock is held shared */ +#define PD_LIST_XLOCKED 0x40 /* allprison_lock is held exclusive */ /* * Parameter names corresponding to PR_* flag values. Size values are for kvm @@ -1750,6 +1752,12 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) pr->pr_flags = (pr->pr_flags & ~ch_flags) | pr_flags; mtx_unlock(&pr->pr_mtx); drflags &= ~PD_LOCKED; + /* + * Any errors past this point will need to de-persist newly created + * prisons, as well as call remove methods. + */ + if (born) + drflags |= PD_KILL; #ifdef RACCT if (racct_enable && created) @@ -1809,17 +1817,12 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) /* Let the modules do their work. */ if (born) { error = osd_jail_call(pr, PR_METHOD_CREATE, opts); - if (error) { - (void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL); + if (error) goto done_deref; - } } error = osd_jail_call(pr, PR_METHOD_SET, opts); - if (error) { - if (born) - (void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL); + if (error) goto done_deref; - } /* * A new prison is now ready to be seen; either it has gained a user @@ -1832,7 +1835,8 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) /* Attach this process to the prison if requested. */ if (flags & JAIL_ATTACH) { - error = do_jail_attach(td, pr, prison_lock_xlock(pr, drflags)); + error = do_jail_attach(td, pr, + prison_lock_xlock(pr, drflags & ~PD_KILL)); drflags &= ~(PD_LOCKED | PD_LIST_XLOCKED); if (error) { vfs_opterror(opts, "attach failed"); @@ -1854,6 +1858,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) } #endif + drflags &= ~PD_KILL; td->td_retval[0] = pr->pr_id; done_deref: @@ -2277,8 +2282,8 @@ kern_jail_get(struct thread *td, struct uio *optuio, int flags) int sys_jail_remove(struct thread *td, struct jail_remove_args *uap) { - struct prison *pr, *cpr, *lpr; - int descend, error; + struct prison *pr; + int error; error = priv_check(td, PRIV_JAIL_REMOVE); if (error) @@ -2290,90 +2295,16 @@ sys_jail_remove(struct thread *td, struct jail_remove_args *uap) sx_xunlock(&allprison_lock); return (EINVAL); } - - /* Remove all descendants of this prison, then remove this prison. */ - prison_hold(pr); - if (!LIST_EMPTY(&pr->pr_children)) { + if (!prison_isalive(pr)) { + /* Silently ignore already-dying prisons. */ mtx_unlock(&pr->pr_mtx); - lpr = NULL; - FOREACH_PRISON_DESCENDANT(pr, cpr, descend) { - prison_hold(cpr); - if (lpr != NULL) { - mtx_lock(&lpr->pr_mtx); - prison_remove_one(lpr); - sx_xlock(&allprison_lock); - } - lpr = cpr; - } - if (lpr != NULL) { - mtx_lock(&lpr->pr_mtx); - prison_remove_one(lpr); - sx_xlock(&allprison_lock); - } - mtx_lock(&pr->pr_mtx); + sx_xunlock(&allprison_lock); + return (0); } - prison_remove_one(pr); + prison_deref(pr, PD_KILL | PD_LOCKED | PD_LIST_XLOCKED); return (0); } -static void -prison_remove_one(struct prison *pr) -{ - struct proc *p; - int was_alive, drflags; - - drflags = PD_DEREF | PD_LOCKED | PD_LIST_XLOCKED; - - /* - * Mark the prison as doomed, so it doesn't accidentally come back - * to life. It may still be explicitly brought back by jail_set(2). - */ - was_alive = pr->pr_state == PRISON_STATE_ALIVE; - pr->pr_state = PRISON_STATE_DYING; - - /* If the prison was persistent, it is not anymore. */ - if (pr->pr_flags & PR_PERSIST) { - drflags |= PD_DEUREF; - prison_free_not_last(pr); - pr->pr_flags &= ~PR_PERSIST; - } - - /* - * jail_remove added a reference. If that's the only one, remove - * the prison now. refcount(9) doesn't guarantee the cache coherence - * of non-zero counters, so force it here. - */ - KASSERT(refcount_load(&pr->pr_ref) > 0, - ("prison_remove_one removing a dead prison (jid=%d)", pr->pr_id)); - if (atomic_load_acq_int(&pr->pr_ref) == 1) { - prison_deref(pr, drflags); - return; - } - - /* Tell modules this prison has died. */ - mtx_unlock(&pr->pr_mtx); - drflags &= ~PD_LOCKED; - if (was_alive) - (void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL); - - sx_xunlock(&allprison_lock); - drflags &= ~PD_LIST_XLOCKED; - /* - * Kill all processes unfortunate enough to be attached to this prison. - */ - sx_slock(&allproc_lock); - FOREACH_PROC_IN_SYSTEM(p) { - PROC_LOCK(p); - if (p->p_state != PRS_NEW && p->p_ucred && - p->p_ucred->cr_prison == pr) - kern_psignal(p, SIGKILL); - PROC_UNLOCK(p); - } - sx_sunlock(&allproc_lock); - /* Remove the temporary reference added by jail_remove. */ - prison_deref(pr, drflags); -} - /* * struct jail_attach_args { * int jid; @@ -2725,6 +2656,24 @@ prison_proc_free(struct prison *pr) } } +static void +prison_proc_free_not_last(struct prison *pr) +{ +#ifdef INVARIANTS + int lastref; + + KASSERT(refcount_load(&pr->pr_uref) > 0, + ("Trying to free dead prison %p (jid=%d).", + pr, pr->pr_id)); + lastref = refcount_release(&pr->pr_uref); + KASSERT(!lastref, + ("prison_proc_free_not_last freed last uref on prison %p (jid=%d).", + pr, pr->pr_id)); +#else + refcount_release(&pr->pr_uref); +#endif +} + /* * Complete a call to either prison_free or prison_proc_free. */ @@ -2758,14 +2707,25 @@ static void prison_deref(struct prison *pr, int flags) { struct prisonlist freeprison; - struct prison *rpr, *ppr, *tpr; + struct prison *killpr, *rpr, *ppr, *tpr; + struct proc *p; + killpr = NULL; TAILQ_INIT(&freeprison); /* * Release this prison as requested, which may cause its parent * to be released, and then maybe its grandparent, etc. */ for (;;) { + if (flags & PD_KILL) { + /* Kill the prison and its descendents. */ + if (!(flags & PD_DEREF)) { + prison_hold(pr); + flags |= PD_DEREF; + } + flags = prison_lock_xlock(pr, flags); + prison_deref_kill(pr, &freeprison); + } if (flags & PD_DEUREF) { /* Drop a user reference. */ KASSERT(refcount_load(&pr->pr_uref) > 0, @@ -2794,6 +2754,16 @@ prison_deref(struct prison *pr, int flags) } } } + if (flags & PD_KILL) { + flags &= ~PD_KILL; + /* + * Any remaining user references are probably processes + * that need to be killed, either in this prison or its + * descendants. + */ + if (refcount_load(&pr->pr_uref) > 0) + killpr = pr; + } if (flags & PD_DEREF) { /* Drop a reference. */ KASSERT(refcount_load(&pr->pr_ref) > 0, @@ -2846,6 +2816,25 @@ prison_deref(struct prison *pr, int flags) else if (flags & PD_LIST_XLOCKED) sx_xunlock(&allprison_lock); + /* Kill any processes attached to a killed prison. */ + if (killpr != NULL) { + sx_slock(&allproc_lock); + FOREACH_PROC_IN_SYSTEM(p) { + PROC_LOCK(p); + if (p->p_state != PRS_NEW && p->p_ucred != NULL) { + for (ppr = p->p_ucred->cr_prison; + ppr != &prison0; + ppr = ppr->pr_parent) + if (ppr == killpr) { + kern_psignal(p, SIGKILL); + break; + } + } + PROC_UNLOCK(p); + } + sx_sunlock(&allproc_lock); + } + /* * Finish removing any unreferenced prisons, which couldn't happen * while allprison_lock was held (to avoid a LOR on vrele). @@ -2876,6 +2865,91 @@ prison_deref(struct prison *pr, int flags) } } +/* + * Kill the prison and its descendants. Mark them as dying, clear the + * persist flag, and call module remove methods. + */ +static void +prison_deref_kill(struct prison *pr, struct prisonlist *freeprison) +{ + struct prison *cpr, *ppr, *rpr; + bool descend; + + /* + * Unlike the descendants, the target prison can be killed + * even if it is currently dying. This is useful for failed + * creation in jail_set(2). + */ + KASSERT(refcount_load(&pr->pr_ref) > 0, + ("Trying to kill dead prison %p (jid=%d).", + pr, pr->pr_id)); + refcount_acquire(&pr->pr_uref); + pr->pr_state = PRISON_STATE_DYING; + mtx_unlock(&pr->pr_mtx); + + rpr = NULL; + FOREACH_PRISON_DESCENDANT_PRE_POST(pr, cpr, descend) { + if (descend) { + if (!prison_isalive(cpr)) { + descend = false; + continue; + } + prison_hold(cpr); + prison_proc_hold(cpr); + mtx_lock(&cpr->pr_mtx); + cpr->pr_state = PRISON_STATE_DYING; + cpr->pr_flags |= PR_REMOVE; + mtx_unlock(&cpr->pr_mtx); + continue; + } + if (!(cpr->pr_flags & PR_REMOVE)) + continue; + (void)osd_jail_call(cpr, PR_METHOD_REMOVE, NULL); + mtx_lock(&cpr->pr_mtx); + cpr->pr_flags &= ~PR_REMOVE; + if (cpr->pr_flags & PR_PERSIST) { + cpr->pr_flags &= ~PR_PERSIST; + prison_proc_free_not_last(cpr); + prison_free_not_last(cpr); + } + (void)refcount_release(&cpr->pr_uref); + if (refcount_release(&cpr->pr_ref)) { + /* + * When the last reference goes, unlink the prison + * and set it aside for prison_deref() to handle. + * Delay unlinking the sibling list to keep the loop + * safe. + */ + if (rpr != NULL) + LIST_REMOVE(rpr, pr_sibling); + rpr = cpr; + rpr->pr_state = PRISON_STATE_INVALID; + TAILQ_REMOVE(&allprison, rpr, pr_list); + TAILQ_INSERT_TAIL(freeprison, rpr, pr_list); + /* + * Removing a prison frees references from its parent. + */ + ppr = rpr->pr_parent; + prison_proc_free_not_last(ppr); + prison_free_not_last(ppr); + for (; ppr != NULL; ppr = ppr->pr_parent) + ppr->pr_childcount--; + } + mtx_unlock(&cpr->pr_mtx); + } + if (rpr != NULL) + LIST_REMOVE(rpr, pr_sibling); + + (void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL); + mtx_lock(&pr->pr_mtx); + if (pr->pr_flags & PR_PERSIST) { + pr->pr_flags &= ~PR_PERSIST; + prison_proc_free_not_last(pr); + prison_free_not_last(pr); + } + (void)refcount_release(&pr->pr_uref); +} + /* * Given the current locking state in the flags, make sure allprison_lock * is held exclusive, and the prison is locked. Return flags indicating From owner-dev-commits-src-main@freebsd.org Thu Feb 25 06:03:05 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4C5D5557C7A; Thu, 25 Feb 2021 06:03:05 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmMf11cZhz3k8b; Thu, 25 Feb 2021 06:03:05 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (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 2A6D221AD5; Thu, 25 Feb 2021 06:03:05 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f169.google.com with SMTP id l132so3460999qke.7; Wed, 24 Feb 2021 22:03:05 -0800 (PST) X-Gm-Message-State: AOAM5327wWeSWNIJC5t4gEuXj70n/gqSB46IDV6AG77hw5u8XRqFn2+b e9q30JLLxE32El8O3ifbxX0sF56RK4/Dseyc5N0= X-Google-Smtp-Source: ABdhPJzZrGqSydT3HTRDZTq4/2RmDQGvpL17YdIvhVookpop9C/y6J6aWMWy1dXBTVU+ba+JE3DEM4+C+c287AZ1KiY= X-Received: by 2002:a37:a3c9:: with SMTP id m192mr1293846qke.103.1614232984780; Wed, 24 Feb 2021 22:03:04 -0800 (PST) MIME-Version: 1.0 References: <202102222027.11MKRtcl033616@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Thu, 25 Feb 2021 00:02:53 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 811e27fa3c44 - main - jail: Add PD_KILL to remove a prison in prison_deref(). To: James Gritton Cc: Alexander Richardson , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 06:03:05 -0000 On Wed, Feb 24, 2021 at 11:53 PM James Gritton wrote: > > On 2021-02-24 21:29, Kyle Evans wrote: > > On Tue, Feb 23, 2021 at 7:16 AM Alexander Richardson > > wrote: > >> > >> On Mon, 22 Feb 2021 at 20:28, Jamie Gritton wrote: > >> > > >> > The branch main has been updated by jamie: > >> > > >> > URL: https://cgit.FreeBSD.org/src/commit/?id=811e27fa3c445664e36071a7d08228fc7fb85676 > >> > > >> > commit 811e27fa3c445664e36071a7d08228fc7fb85676 > >> > Author: Jamie Gritton > >> > AuthorDate: 2021-02-22 20:27:44 +0000 > >> > Commit: Jamie Gritton > >> > CommitDate: 2021-02-22 20:27:44 +0000 > >> > > >> > jail: Add PD_KILL to remove a prison in prison_deref(). > >> > > >> > Add the PD_KILL flag that instructs prison_deref() to take steps > >> > to actively kill a prison and its descendents, namely marking it > >> > PRISON_STATE_DYING, clearing its PR_PERSIST flag, and killing any > >> > attached processes. > >> > > >> > This replaces a similar loop in sys_jail_remove(), bringing the > >> > operation under the same single hold on allprison_lock that it already > >> > has. It is also used to clean up failed jail (re-)creations in > >> > kern_jail_set(), which didn't generally take all the proper steps. > >> > > >> > Differential Revision: https://reviews.freebsd.org/D28473 > >> > >> Hi Jamie, > >> > >> After this commit running cd /usr/tests/lib/libc/sys && kyua test > >> cpuset_test renders the entire system unusable: all exec calls > >> afterwards seem to fail. In Jenkins it's triggering a kernel panic: > >> https://ci.freebsd.org/job/FreeBSD-main-amd64-test/17630/consoleFull > >> Reverting this commit fixes the issue. > >> > > > > Based on the backtrace and a wild stab in the dark, the last > > prison_deref() in do_jail_attach() prior to successful return should > > explicitly clear the PD_KILL flag from drflags. > > > > Thanks, > > > > Kyle Evans > > Yep, that's what's doing it. Actually, PD_KILL has no business being > passed to do_jail_attach in the first place. Running a test on that > right now. > Ah, good point! IMHO we should KASSERT() that as well in do_jail_attach(); it doesn't feel like we can do anything sensible with the flag there, so we might as well raise awareness that the caller needs to be more careful if attach failure is significant to the lifetime of the target. From owner-dev-commits-src-main@freebsd.org Thu Feb 25 12:31:17 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 074A35614F5; Thu, 25 Feb 2021 12:31: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmXFw6mVCz4cR2; Thu, 25 Feb 2021 12:31: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 D09511746F; Thu, 25 Feb 2021 12:31: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 11PCVGeX013076; Thu, 25 Feb 2021 12:31:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PCVGrU013075; Thu, 25 Feb 2021 12:31:16 GMT (envelope-from git) Date: Thu, 25 Feb 2021 12:31:16 GMT Message-Id: <202102251231.11PCVGrU013075@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: f3245be3499b - main - net: remove legacy in_addmulti() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f3245be3499b60e790f59f84ebe24f9cc91dd982 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 12:31:17 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f3245be3499b60e790f59f84ebe24f9cc91dd982 commit f3245be3499b60e790f59f84ebe24f9cc91dd982 Author: Kristof Provost AuthorDate: 2021-02-23 19:21:19 +0000 Commit: Kristof Provost CommitDate: 2021-02-25 09:13:52 +0000 net: remove legacy in_addmulti() Despite the comment to the contrary neither pf nor carp use in_addmulti(). Nothing does, so get rid of it. Carp stopped using it in 08b68b0e4c6b132127919cfbaf7275c727ca7843 (2011). It's unclear when pf stopped using it, but before d6d3f01e0a3395c1fae34a3c4be7b051cb2d7581 (2012). Reviewed by: bz@, melifaro@ Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D28918 --- sys/netinet/in_mcast.c | 29 ----------------------------- sys/netinet/in_var.h | 2 -- 2 files changed, 31 deletions(-) diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c index 6d390a0b263c..392856785dd2 100644 --- a/sys/netinet/in_mcast.c +++ b/sys/netinet/in_mcast.c @@ -120,8 +120,6 @@ int ifma_restart; * Functions with non-static linkage defined in this file should be * declared in in_var.h: * imo_multi_filter() - * in_addmulti() - * in_delmulti() * in_joingroup() * in_joingroup_locked() * in_leavegroup() @@ -130,9 +128,6 @@ int ifma_restart; * inp_freemoptions() * inp_getmoptions() * inp_setmoptions() - * - * XXX: Both carp and pf need to use the legacy (*,G) KPIs in_addmulti() - * and in_delmulti(). */ static void imf_commit(struct in_mfilter *); static int imf_get_source(struct in_mfilter *imf, @@ -1367,30 +1362,6 @@ in_leavegroup_locked(struct in_multi *inm, /*const*/ struct in_mfilter *imf) } /*#ifndef BURN_BRIDGES*/ -/* - * Join an IPv4 multicast group in (*,G) exclusive mode. - * The group must be a 224.0.0.0/24 link-scope group. - * This KPI is for legacy kernel consumers only. - */ -struct in_multi * -in_addmulti(struct in_addr *ap, struct ifnet *ifp) -{ - struct in_multi *pinm; - int error; -#ifdef INVARIANTS - char addrbuf[INET_ADDRSTRLEN]; -#endif - - KASSERT(IN_LOCAL_GROUP(ntohl(ap->s_addr)), - ("%s: %s not in 224.0.0.0/24", __func__, - inet_ntoa_r(*ap, addrbuf))); - - error = in_joingroup(ifp, ap, NULL, &pinm); - if (error != 0) - pinm = NULL; - - return (pinm); -} /* * Block or unblock an ASM multicast source on an inpcb. diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h index c7ebff80e56d..b42ca00d5ae7 100644 --- a/sys/netinet/in_var.h +++ b/sys/netinet/in_var.h @@ -450,8 +450,6 @@ int inm_record_source(struct in_multi *inm, const in_addr_t); void inm_release_deferred(struct in_multi *); void inm_release_list_deferred(struct in_multi_head *); void inm_release_wait(void *); -struct in_multi * -in_addmulti(struct in_addr *, struct ifnet *); int in_joingroup(struct ifnet *, const struct in_addr *, /*const*/ struct in_mfilter *, struct in_multi **); int in_joingroup_locked(struct ifnet *, const struct in_addr *, From owner-dev-commits-src-main@freebsd.org Thu Feb 25 12:31:19 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 50D53561888; Thu, 25 Feb 2021 12:31: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmXFz1LRrz4cnT; Thu, 25 Feb 2021 12:31: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 1F3641789B; Thu, 25 Feb 2021 12:31: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 11PCVJvm013117; Thu, 25 Feb 2021 12:31:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PCVJrg013116; Thu, 25 Feb 2021 12:31:19 GMT (envelope-from git) Date: Thu, 25 Feb 2021 12:31:19 GMT Message-Id: <202102251231.11PCVJrg013116@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 7a4dbffa4205 - main - bridge tests: Test that we also forward on some interfaces MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7a4dbffa4205fc274b4884a6332d4831c5791320 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 12:31:19 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=7a4dbffa4205fc274b4884a6332d4831c5791320 commit 7a4dbffa4205fc274b4884a6332d4831c5791320 Author: Kristof Provost AuthorDate: 2021-02-24 15:40:37 +0000 Commit: Kristof Provost CommitDate: 2021-02-25 09:17:03 +0000 bridge tests: Test that we also forward on some interfaces Ensure that we not only block on some interfaces, but also forward on some. Without the previous commit we wound up discarding on all ports, rather than only on the ports needed to break the loop. MFC after: 1 week Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D28917 --- tests/sys/net/if_bridge_test.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/sys/net/if_bridge_test.sh b/tests/sys/net/if_bridge_test.sh index bc9add68ce25..1f10fe325a2c 100755 --- a/tests/sys/net/if_bridge_test.sh +++ b/tests/sys/net/if_bridge_test.sh @@ -117,6 +117,15 @@ stp_body() then atf_fail "STP failed to detect bridging loop" fi + + # We must also have at least some forwarding interfaces + a_forwarding=$(jexec a ifconfig ${bridge_a} | grep forwarding) + b_forwarding=$(jexec b ifconfig ${bridge_b} | grep forwarding) + + if [ -z "${a_forwarding}" ] && [ -z "${b_forwarding}" ] + then + atf_fail "STP failed to detect bridging loop" + fi } stp_cleanup() @@ -182,6 +191,15 @@ stp_vlan_body() then atf_fail "STP failed to detect bridging loop" fi + + # We must also have at least some forwarding interfaces + a_forwarding=$(jexec a ifconfig ${bridge_a} | grep forwarding) + b_forwarding=$(jexec b ifconfig ${bridge_b} | grep forwarding) + + if [ -z "${a_forwarding}" ] && [ -z "${b_forwarding}" ] + then + atf_fail "STP failed to detect bridging loop" + fi } stp_vlan_cleanup() From owner-dev-commits-src-main@freebsd.org Thu Feb 25 12:31:18 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 12065561659; Thu, 25 Feb 2021 12:31: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmXFx75JDz4cgF; Thu, 25 Feb 2021 12:31: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 E63ED17899; Thu, 25 Feb 2021 12:31: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 11PCVHC9013098; Thu, 25 Feb 2021 12:31:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PCVH5v013097; Thu, 25 Feb 2021 12:31:17 GMT (envelope-from git) Date: Thu, 25 Feb 2021 12:31:17 GMT Message-Id: <202102251231.11PCVH5v013097@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: f5537cd0693c - main - bridgestp: Ensure we send STP on VLAN interfaces MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5537cd0693c85efdb2180a0a107c51eae15ba39 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 12:31:18 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f5537cd0693c85efdb2180a0a107c51eae15ba39 commit f5537cd0693c85efdb2180a0a107c51eae15ba39 Author: Kristof Provost AuthorDate: 2021-02-24 15:38:53 +0000 Commit: Kristof Provost CommitDate: 2021-02-25 09:16:25 +0000 bridgestp: Ensure we send STP on VLAN interfaces Reviewed by: donner@ MFC after: 1 week X-MFC-with: 711ed156b94562c3dcb2ee9c1b3f240f960a75d2 Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D28916 --- sys/net/bridgestp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c index 82524440c241..9e3a3e14ecda 100644 --- a/sys/net/bridgestp.c +++ b/sys/net/bridgestp.c @@ -2052,7 +2052,7 @@ bstp_reinit(struct bstp_state *bs) */ NET_EPOCH_ENTER(et); CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { - if (ifp->if_type != IFT_ETHER) + if (ifp->if_type != IFT_ETHER && ifp->if_type != IFT_L2VLAN) continue; /* Not Ethernet */ if (ifp->if_bridge != bridgeptr) From owner-dev-commits-src-main@freebsd.org Thu Feb 25 12:46:33 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 39903561F78; Thu, 25 Feb 2021 12:46: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmXbY171tz4fF9; Thu, 25 Feb 2021 12:46: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 1941C17AEA; Thu, 25 Feb 2021 12:46: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 11PCkXCj030690; Thu, 25 Feb 2021 12:46:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PCkXOm030689; Thu, 25 Feb 2021 12:46:33 GMT (envelope-from git) Date: Thu, 25 Feb 2021 12:46:33 GMT Message-Id: <202102251246.11PCkXOm030689@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: 59f6ddb2bc9c - main - Use pmap_qenter in the N1SDP PCIe driver 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: 59f6ddb2bc9c560c84b6ac30a2e1f140325f0a86 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 12:46:33 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=59f6ddb2bc9c560c84b6ac30a2e1f140325f0a86 commit 59f6ddb2bc9c560c84b6ac30a2e1f140325f0a86 Author: Andrew Turner AuthorDate: 2021-02-23 12:34:45 +0000 Commit: Andrew Turner CommitDate: 2021-02-25 12:38:05 +0000 Use pmap_qenter in the N1SDP PCIe driver In the Neoverse N1 SDP PCIe driver we need to map a page shared between the firmware and the kernel. Previously we would use pmap_kenter for this, however as this is not standardised between architectures switch to the common pmap_qenter. While here fix the error handling code to clean up on failure. Reviewed by: br Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D28890 --- sys/dev/pci/controller/pci_n1sdp.c | 39 +++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/sys/dev/pci/controller/pci_n1sdp.c b/sys/dev/pci/controller/pci_n1sdp.c index d51641c432f4..74d893ff1288 100644 --- a/sys/dev/pci/controller/pci_n1sdp.c +++ b/sys/dev/pci/controller/pci_n1sdp.c @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -66,6 +67,9 @@ __FBSDID("$FreeBSD$"); #define BDF_TABLE_SIZE (16 * 1024) #define PCI_CFG_SPACE_SIZE 0x1000 +_Static_assert(BDF_TABLE_SIZE >= PAGE_SIZE, + "pci_n1sdp.c assumes a 4k or 16k page size when mapping the shared data"); + struct pcie_discovery_data { uint32_t rc_base_addr; uint32_t nr_bdfs; @@ -85,30 +89,40 @@ n1sdp_init(struct generic_pcie_n1sdp_softc *sc) vm_offset_t vaddr; vm_paddr_t paddr_rc; vm_paddr_t paddr; + vm_page_t m[BDF_TABLE_SIZE / PAGE_SIZE]; int table_count; int bdfs_size; int error, i; paddr = AP_NS_SHARED_MEM_BASE + sc->acpi.segment * BDF_TABLE_SIZE; + vm_phys_fictitious_reg_range(paddr, paddr + BDF_TABLE_SIZE, + VM_MEMATTR_UNCACHEABLE); + + for (i = 0; i < nitems(m); i++) { + m[i] = PHYS_TO_VM_PAGE(paddr + i * PAGE_SIZE); + MPASS(m[i] != NULL); + } + vaddr = kva_alloc((vm_size_t)BDF_TABLE_SIZE); if (vaddr == 0) { printf("%s: Can't allocate KVA memory.", __func__); - return (ENXIO); + error = ENXIO; + goto out; } - pmap_kenter(vaddr, (vm_size_t)BDF_TABLE_SIZE, paddr, - VM_MEMATTR_UNCACHEABLE); + pmap_qenter(vaddr, m, nitems(m)); shared_data = (struct pcie_discovery_data *)vaddr; - bdfs_size = sizeof(struct pcie_discovery_data) + - sizeof(uint32_t) * shared_data->nr_bdfs; - sc->n1_discovery_data = malloc(bdfs_size, M_DEVBUF, M_WAITOK | M_ZERO); - memcpy(sc->n1_discovery_data, shared_data, bdfs_size); - paddr_rc = (vm_offset_t)shared_data->rc_base_addr; error = bus_space_map(sc->acpi.base.bst, paddr_rc, PCI_CFG_SPACE_SIZE, 0, &sc->n1_bsh); if (error != 0) - return (error); + goto out_pmap; + + bdfs_size = sizeof(struct pcie_discovery_data) + + sizeof(uint32_t) * shared_data->nr_bdfs; + sc->n1_discovery_data = malloc(bdfs_size, M_DEVBUF, + M_WAITOK | M_ZERO); + memcpy(sc->n1_discovery_data, shared_data, bdfs_size); if (bootverbose) { table_count = sc->n1_discovery_data->nr_bdfs; @@ -117,10 +131,13 @@ n1sdp_init(struct generic_pcie_n1sdp_softc *sc) sc->n1_discovery_data->valid_bdfs[i]); } - pmap_kremove(vaddr); +out_pmap: + pmap_qremove(vaddr, nitems(m)); kva_free(vaddr, (vm_size_t)BDF_TABLE_SIZE); - return (0); +out: + vm_phys_fictitious_unreg_range(paddr, paddr + BDF_TABLE_SIZE); + return (error); } static int From owner-dev-commits-src-main@freebsd.org Thu Feb 25 12:46:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5700B562300; Thu, 25 Feb 2021 12:46: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmXbZ249cz4fFB; Thu, 25 Feb 2021 12:46: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 39E5517B52; Thu, 25 Feb 2021 12:46: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 11PCkY9L030710; Thu, 25 Feb 2021 12:46:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PCkYss030709; Thu, 25 Feb 2021 12:46:34 GMT (envelope-from git) Date: Thu, 25 Feb 2021 12:46:34 GMT Message-Id: <202102251246.11PCkYss030709@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: 3fd63ddfdf35 - main - Limit when we call DELAY from KCSAN on amd64 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: 3fd63ddfdf3541faea762143365dbc70c16fa49e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 12:46:34 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=3fd63ddfdf3541faea762143365dbc70c16fa49e commit 3fd63ddfdf3541faea762143365dbc70c16fa49e Author: Andrew Turner AuthorDate: 2021-02-05 11:41:17 +0000 Commit: Andrew Turner CommitDate: 2021-02-25 12:38:05 +0000 Limit when we call DELAY from KCSAN on amd64 In some cases the DELAY implementation on amd64 can recurse on a spin mutex in the i8254 early delay code. Detect when this is going to happen and don't call delay in this case. It is safe to not delay here with the only issue being KCSAN may not detect data races. Reviewed by: kib Tested by: arichardson Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D28895 --- sys/amd64/include/csan.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sys/amd64/include/csan.h b/sys/amd64/include/csan.h index c886daa12f69..9daf8275492c 100644 --- a/sys/amd64/include/csan.h +++ b/sys/amd64/include/csan.h @@ -31,6 +31,9 @@ * $FreeBSD$ */ +#include + +#include #include #include #include @@ -64,7 +67,14 @@ kcsan_md_enable_intrs(uint64_t *state) static inline void kcsan_md_delay(uint64_t us) { - DELAY(us); + /* + * Only call DELAY if not using the early delay code. The i8254 + * early delay function may cause us to recurse on a spin lock + * leading to a panic. + */ + if ((tsc_is_invariant && tsc_freq != 0) || + timecounter->tc_quality > 0) + DELAY(us); } static void From owner-dev-commits-src-main@freebsd.org Thu Feb 25 13:27:02 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B5214562DFA; Thu, 25 Feb 2021 13:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmYVG4krXz4j8S; Thu, 25 Feb 2021 13:27: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 9536F1858D; Thu, 25 Feb 2021 13:27: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 11PDR2IP083798; Thu, 25 Feb 2021 13:27:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PDR2W2083797; Thu, 25 Feb 2021 13:27:02 GMT (envelope-from git) Date: Thu, 25 Feb 2021 13:27:02 GMT Message-Id: <202102251327.11PDR2W2083797@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 61f66a1f4403 - main - ncurses: Add support for terminfo database MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61f66a1f4403fded9aae14d890ad96914a3c0bc1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 13:27:02 -0000 The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=61f66a1f4403fded9aae14d890ad96914a3c0bc1 commit 61f66a1f4403fded9aae14d890ad96914a3c0bc1 Author: Baptiste Daroussin AuthorDate: 2021-01-12 16:34:49 +0000 Commit: Baptiste Daroussin CommitDate: 2021-02-25 13:25:11 +0000 ncurses: Add support for terminfo database Along with the termcap database, ncurses will now lookup for the terminfo database, note that the terminfo database is being looked up first and then it fallsback on the termcap one. While here drop our custom reader for the termcap database, over the time it is needed maintenance to be able to catchup with changes on ncurses side. Install the ncurses tools which are needed to deal with the terminfo database: tic, infocmp, toe Replace our termcap only aware tools with the ncurses counterpart: tput, tabs, tset, clear and reset In particular they can your the extra capabilities described in the terminfo database, which does not exist in termcap Note that to add a new terminfo information to the database from ports the ports will just need to add their extra information into: /usr/local/share/site-terminfo// Tested by: jbeich, manu --- lib/ncurses/config.mk | 14 +- lib/ncurses/ncurses/Makefile | 9 +- lib/ncurses/ncurses/ncurses_cfg.h | 63 +++--- lib/ncurses/ncurses/termcap.c | 266 ------------------------ share/mk/src.tools.mk | 1 + usr.bin/Makefile | 4 +- usr.bin/ncurses/Makefile | 40 ++++ usr.bin/ncurses/transform.h | 10 + usr.bin/tput/Makefile | 9 - usr.bin/tput/Makefile.depend | 18 -- usr.bin/tput/clear.sh | 37 ---- usr.bin/tput/tput.1 | 179 ---------------- usr.bin/tput/tput.c | 214 ------------------- usr.bin/tset/Makefile | 11 - usr.bin/tset/Makefile.depend | 18 -- usr.bin/tset/extern.h | 51 ----- usr.bin/tset/map.c | 254 ----------------------- usr.bin/tset/misc.c | 68 ------ usr.bin/tset/set.c | 324 ----------------------------- usr.bin/tset/term.c | 158 -------------- usr.bin/tset/tset.1 | 421 -------------------------------------- usr.bin/tset/tset.c | 299 --------------------------- usr.bin/tset/wrterm.c | 116 ----------- 23 files changed, 98 insertions(+), 2486 deletions(-) diff --git a/lib/ncurses/config.mk b/lib/ncurses/config.mk index f199c5829b65..7a64a7b948ee 100644 --- a/lib/ncurses/config.mk +++ b/lib/ncurses/config.mk @@ -3,8 +3,11 @@ # This Makefile is shared by libncurses, libform, libmenu, libpanel. NCURSES_DIR= ${SRCTOP}/contrib/ncurses +NCURSES_MAJOR= 6 +NCURSES_MINOR= 2 +NCURSES_PATCH= 20200215 -CFLAGS+= -D_XOPEN_SOURCE_EXTENDED -DENABLE_WIDEC +CFLAGS+= -D_XOPEN_SOURCE_EXTENDED NCURSES_CFG_H= ${.CURDIR}/ncurses_cfg.h CFLAGS+= -I. @@ -41,5 +44,12 @@ MANFILTER= sed -e 's%@TERMINFO@%${TERMINFODIR}/terminfo%g' \ -e 's%@NCURSES_MAJOR@%${NCURSES_MAJOR}%g' \ -e 's%@NCURSES_MINOR@%${NCURSES_MINOR}%g' \ -e 's%@NCURSES_PATCH@%${NCURSES_PATCH}%g' \ + -e 's%@TSET@%tset%g' \ + -e 's%@RESET@%reset%g' \ + -e 's%@CLEAR@%clear%g' \ + -e 's%@TABS@%tabs%g' \ -e 's%@TIC@%tic%g' \ - -e 's%@INFOCMP@%infocmp%g' + -e 's%@TOE@%toe%g' \ + -e 's%@INFOCMP@%infocmp%g' \ + -e 's%@CAPTOINFO@%captoinfo%g' \ + -e 's%@INFOTOCAP@%infotocap%g' diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile index 6f03d93a9ac6..aff569a79845 100644 --- a/lib/ncurses/ncurses/Makefile +++ b/lib/ncurses/ncurses/Makefile @@ -216,6 +216,7 @@ SRCS+= \ obsolete.c \ parse_entry.c \ read_entry.c \ + read_termcap.c \ strings.c \ trim_sgr0.c \ write_entry.c @@ -270,14 +271,10 @@ DBGSRCS= \ trace_xnames.c \ varargs.c -# From our old libtermcap. -# Used instead of the hideous read_termcap.c abomination. -SRCS+= termcap.c - CLEANFILES= ${GENSRCS} ${GENHDRS} keys.list make_hash term.h.new \ make_keys MKterm.h.awk comp_captab.c curses.head -CFLAGS+= -DFREEBSD_NATIVE -DTERMIOS +CFLAGS+= -DTERMIOS # Installed HEADERS= curses.h term.h termcap.h unctrl.h @@ -416,7 +413,7 @@ make_hash: make_hash.c hashsize.h ncurses_def.h ${HEADERS} ${BUILD_TOOLS_META} MKterm.h.awk: MKterm.h.awk.in sed <${NCURSES_DIR}/include/MKterm.h.awk.in >$@ \ -e "/@BROKEN_LINKER@/s%%${BROKEN_LINKER}%" \ - -e "s%@NCURSES_USE_DATABASE@%0%g" \ + -e "s%@NCURSES_USE_DATABASE@%1%g" \ -e "s%@NCURSES_USE_TERMCAP@%1%g" \ -e "/@NCURSES_MAJOR@/s%%${NCURSES_MAJOR}%" \ -e "/@NCURSES_MINOR@/s%%${NCURSES_MINOR}%" \ diff --git a/lib/ncurses/ncurses/ncurses_cfg.h b/lib/ncurses/ncurses/ncurses_cfg.h index 0a92c2f23ba4..49cef464b803 100644 --- a/lib/ncurses/ncurses/ncurses_cfg.h +++ b/lib/ncurses/ncurses/ncurses_cfg.h @@ -59,6 +59,8 @@ #define HAVE_LONG_FILE_NAMES 1 #define MIXEDCASE_FILENAMES 1 #define USE_SYSMOUSE 1 +#define TERMINFO_DIRS "/usr/share/terminfo:/usr/local/share/site-terminfo" +#define TERMINFO "/usr/share/terminfo" #define HAVE_BIG_CORE 1 #define TERMPATH "/etc/termcap:/usr/share/misc/termcap" #define USE_GETCAP 1 @@ -70,6 +72,23 @@ #define USE_LINKS 1 #define BSD_TPUTS 1 #define HAVE_LANGINFO_CODESET 1 +#define USE_WIDEC_SUPPORT 1 +#define NCURSES_WIDECHAR 1 +#define HAVE_WCHAR_H 1 +#define HAVE_WCTYPE_H 1 +#define HAVE_PUTWC 1 +#define HAVE_BTOWC 1 +#define HAVE_WCTOB 1 +#define HAVE_MBTOWC 1 +#define HAVE_WCTOMB 1 +#define HAVE_MBLEN 1 +#define HAVE_MBRLEN 1 +#define HAVE_MBRTOWC 1 +#define HAVE_WCSRTOMBS 1 +#define HAVE_MBSRTOWCS 1 +#define HAVE_WCSTOMBS 1 +#define HAVE_MBSTOWCS 1 +#define NEED_WCHAR_H 1 #define HAVE_FSEEKO 1 #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 @@ -96,6 +115,10 @@ #define HAVE_WRESIZE 1 #define NCURSES_SP_FUNCS 1 #define HAVE_TPUTS_SP 1 +#define NCURSES_EXT_COLORS 1 +#define HAVE_ALLOC_PAIR 1 +#define HAVE_INIT_EXTENDED_COLOR 1 +#define HAVE_RESET_COLOR_PAIRS 1 #define NCURSES_EXT_PUTWIN 1 #define NCURSES_NO_PADDING 1 #define USE_SIGWINCH 1 @@ -133,6 +156,11 @@ #define HAVE_UNISTD_H 1 #define HAVE_GETOPT_H 1 #define HAVE_GETOPT_HEADER 1 +#define DECL_ENVIRON 1 +#define HAVE_ENVIRON 1 +#define HAVE_PUTENV 1 +#define HAVE_SETENV 1 +#define HAVE_STRDUP 1 #define HAVE_SYS_TIME_SELECT 1 #define SIG_ATOMIC_T volatile sig_atomic_t #define HAVE_ERRNO 1 @@ -153,6 +181,7 @@ #define HAVE_SETVBUF 1 #define HAVE_SIGACTION 1 #define HAVE_SIGVEC 1 +#define HAVE_SNPRINTF 1 #define HAVE_STRDUP 1 #define HAVE_STRSTR 1 #define HAVE_SYSCONF 1 @@ -181,11 +210,12 @@ #define USE_FOPEN_BIN_R 1 #define USE_OPENPTY_HEADER #define USE_XTERM_PTY 1 -#define USE_HASHED_DB 1 #define HAVE_TYPEINFO 1 #define HAVE_IOSTREAM 1 #define IOSTREAM_NAMESPACE 1 +#define SIZEOF_BOOL 1 #define CPP_HAS_STATIC_CAST 1 +#define SIZEOF_WCHAR_T 4 #define HAVE_SLK_COLOR 1 #define HAVE_PANEL_H 1 #define HAVE_LIBPANEL 1 @@ -198,37 +228,6 @@ #define NCURSES_OSPEED_COMPAT 1 #define HAVE_CURSES_DATA_BOOLNAMES 1 -/* - * Begin FreeBSD-specific changes - */ -/* Support ENABLE_WIDEC */ -#ifdef ENABLE_WIDEC -#define USE_WIDEC_SUPPORT 1 -#define NCURSES_WIDECHAR 1 -#define NCURSES_EXT_FUNCS 1 -#define NCURSES_EXT_COLORS 1 -#define HAVE_ALLOC_PAIR 1 -#define HAVE_INIT_EXTENDED_COLOR 1 -#define HAVE_RESET_COLOR_PAIRS 1 -#define HAVE_PUTWC 1 -#define HAVE_BTOWC 1 -#define HAVE_WCTOB 1 -#define HAVE_MBTOWC 1 -#define HAVE_WCTOMB 1 -#define HAVE_MBLEN 1 -#define HAVE_MBRLEN 1 -#define HAVE_MBRTOWC 1 -#define HAVE_WCSRTOMBS 1 -#define HAVE_MBSRTOWCS 1 -#define HAVE_WCSTOMBS 1 -#define HAVE_MBSTOWCS 1 -#define NEED_WCHAR_H 1 -#define SIZEOF_WCHAR_T 4 -#endif -/* - * End FreeBSD-specific changes - */ - #include /* The C compiler may not treat these properly but C++ has to */ diff --git a/lib/ncurses/ncurses/termcap.c b/lib/ncurses/ncurses/termcap.c deleted file mode 100644 index 535301a1b474..000000000000 --- a/lib/ncurses/ncurses/termcap.c +++ /dev/null @@ -1,266 +0,0 @@ -/* A portion of this file is from ncurses: */ -/*************************************************************************** -* COPYRIGHT NOTICE * -**************************************************************************** -* ncurses is copyright (C) 1992-1995 * -* Zeyd M. Ben-Halim * -* zmbenhal@netcom.com * -* Eric S. Raymond * -* esr@snark.thyrsus.com * -* * -* Permission is hereby granted to reproduce and distribute ncurses * -* by any means and for any fee, whether alone or as part of a * -* larger distribution, in source or in binary form, PROVIDED * -* this notice is included with any such distribution, and is not * -* removed from any of its header files. Mention of ncurses in any * -* applications linked with it is highly appreciated. * -* * -* ncurses comes AS IS with no warranty, implied or expressed. * -* * -***************************************************************************/ - -#include - -#include -#include -#include -#include - -/* The rest is from BSD */ -/*- - * SPDX-License-Identifier: BSD-3-Clause - * - * Copyright (c) 1980, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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$"); - -#if 0 -#ifndef lint -static const char sccsid[] = "@(#)termcap.c 8.1 (Berkeley) 6/4/93"; -#endif /* not lint */ -#endif - -#include -#include -#include -#include -#include -#include -#include "pathnames.h" - -#define PBUFSIZ MAXPATHLEN /* max length of filename path */ -#define PVECSIZ 32 /* max number of names in path */ -#define TBUFSIZ 1024 /* max length of _nc_tgetent buffer */ - -char _nc_termcap[TBUFSIZ + 1]; /* Last getcap, provided to tgetent() emul */ - -/* - * termcap - routines for dealing with the terminal capability data base - * - * BUG: Should use a "last" pointer in tbuf, so that searching - * for capabilities alphabetically would not be a n**2/2 - * process when large numbers of capabilities are given. - * Note: If we add a last pointer now we will screw up the - * tc capability. We really should compile termcap. - * - * Essentially all the work here is scanning and decoding escapes - * in string capabilities. We don't use stdio because the editor - * doesn't, and because living w/o it is not hard. - */ - -/* - * Get an entry for terminal name in buffer _nc_termcap from the termcap - * file. - */ -int -_nc_read_termcap_entry(const char *const name, TERMTYPE2 *const tp) -{ - ENTRY *ep; - char *p; - char *cp; - char *dummy; - char **fname; - char *home; - int i; - char pathbuf[PBUFSIZ]; /* holds raw path of filenames */ - char *pathvec[PVECSIZ]; /* to point to names in pathbuf */ - char **pvec; /* holds usable tail of path vector */ - char *termpath; - - _nc_termcap[0] = '\0'; /* in case */ - dummy = NULL; - fname = pathvec; - pvec = pathvec; - p = pathbuf; - cp = getenv("TERMCAP"); - /* - * TERMCAP can have one of two things in it. It can be the - * name of a file to use instead of /etc/termcap. In this - * case it better start with a "/". Or it can be an entry to - * use so we don't have to read the file. In this case it - * has to already have the newlines crunched out. If TERMCAP - * does not hold a file name then a path of names is searched - * instead. The path is found in the TERMPATH variable, or - * becomes "$HOME/.termcap /etc/termcap" if no TERMPATH exists. - */ - if (!cp || *cp != '/') { /* no TERMCAP or it holds an entry */ - if ( (termpath = getenv("TERMPATH")) ) - strncpy(pathbuf, termpath, PBUFSIZ); - else { - if ( (home = getenv("HOME")) ) {/* set up default */ - strncpy(pathbuf, home, PBUFSIZ - 1); /* $HOME first */ - pathbuf[PBUFSIZ - 2] = '\0'; /* -2 because we add a slash */ - p += strlen(pathbuf); /* path, looking in */ - *p++ = '/'; - } /* if no $HOME look in current directory */ - strncpy(p, _PATH_DEF, PBUFSIZ - (p - pathbuf)); - } - } - else /* user-defined name in TERMCAP */ - strncpy(pathbuf, cp, PBUFSIZ); /* still can be tokenized */ - - /* For safety */ - if (issetugid()) - strcpy(pathbuf, _PATH_DEF_SEC); - - pathbuf[PBUFSIZ - 1] = '\0'; - - *fname++ = pathbuf; /* tokenize path into vector of names */ - while (*++p) - if (*p == ' ' || *p == ':') { - *p = '\0'; - while (*++p) - if (*p != ' ' && *p != ':') - break; - if (*p == '\0') - break; - *fname++ = p; - if (fname >= pathvec + PVECSIZ) { - fname--; - break; - } - } - *fname = (char *) 0; /* mark end of vector */ - if (cp && *cp && *cp != '/') - if (cgetset(cp) < 0) - return(-2); - - i = cgetent(&dummy, pathvec, (char *)name); - - if (i == 0) { - char *pd, *ps, *tok, *s, *tcs; - size_t len; - - pd = _nc_termcap; - ps = dummy; - if ((tok = strchr(ps, ':')) == NULL) { - len = strlen(ps); - if (len >= TBUFSIZ) - i = -1; - else - strcpy(pd, ps); - goto done; - } - len = tok - ps + 1; - if (pd + len + 1 - _nc_termcap >= TBUFSIZ) { - i = -1; - goto done; - } - memcpy(pd, ps, len); - ps += len; - pd += len; - *pd = '\0'; - tcs = pd - 1; - for (;;) { - while ((tok = strsep(&ps, ":")) != NULL && - *(tok - 2) != '\\' && - (*tok == '\0' || *tok == '\\' || !isgraph(UChar(*tok)))) - ; - if (tok == NULL) - break; - for (s = tcs; s != NULL && s[1] != '\0'; - s = strchr(s, ':')) { - s++; - if (s[0] == tok[0] && s[1] == tok[1]) - goto skip_it; - } - len = strlen(tok); - if (pd + len + 1 - _nc_termcap >= TBUFSIZ) { - i = -1; - break; - } - memcpy(pd, tok, len); - pd += len; - *pd++ = ':'; - *pd = '\0'; - skip_it: ; - } - } -done: - if (dummy) - free(dummy); - - -/* - * From here on is ncurses-specific glue code - */ - - if (i < 0) - return(TGETENT_ERR); - - _nc_set_source("TERMCAP"); - _nc_read_entry_source((FILE *)NULL, _nc_termcap, FALSE, TRUE, NULLHOOK); - - if (_nc_head == (ENTRY *)NULL) - return(TGETENT_ERR); - - /* resolve all use references */ - _nc_resolve_uses2(TRUE, FALSE); - - for_entry_list(ep) - if (_nc_name_match(ep->tterm.term_names, name, "|:")) - { - /* - * Make a local copy of the terminal capabilities, delinked - * from the list. - */ - memcpy(tp, &ep->tterm, sizeof(TERMTYPE)); - _nc_delink_entry(_nc_head, &(ep->tterm)); - free(ep); - _nc_free_entries(_nc_head); - _nc_head = _nc_tail = NULL; /* do not reuse! */ - - return TGETENT_YES; /* OK */ - } - - _nc_free_entries(_nc_head); - _nc_head = _nc_tail = NULL; /* do not reuse! */ - return(TGETENT_NO); /* not found */ -} diff --git a/share/mk/src.tools.mk b/share/mk/src.tools.mk index 722734bbfc1a..5e3b7048409b 100644 --- a/share/mk/src.tools.mk +++ b/share/mk/src.tools.mk @@ -20,6 +20,7 @@ MTREE_CMD?= mtree PWD_MKDB_CMD?= pwd_mkdb SERVICES_MKDB_CMD?= services_mkdb CAP_MKDB_CMD?= cap_mkdb +TIC_CMD?= tic ____: .endif # !target(____) diff --git a/usr.bin/Makefile b/usr.bin/Makefile index fcc406d2efc5..3e71dbb30e6b 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -97,6 +97,7 @@ SUBDIR= alias \ mkuzip \ mt \ ncal \ + ncurses \ netstat \ newgrp \ nfsstat \ @@ -146,7 +147,6 @@ SUBDIR= alias \ strings \ su \ systat \ - tabs \ tail \ tar \ tcopy \ @@ -156,11 +156,9 @@ SUBDIR= alias \ tip \ top \ touch \ - tput \ tr \ true \ truncate \ - tset \ tsort \ tty \ uname \ diff --git a/usr.bin/ncurses/Makefile b/usr.bin/ncurses/Makefile new file mode 100644 index 000000000000..cd8344aa1a97 --- /dev/null +++ b/usr.bin/ncurses/Makefile @@ -0,0 +1,40 @@ +PACKAGE= runtime + +.include +.include "${SRCTOP}/lib/ncurses/config.mk" + +.PATH: ${NCURSES_DIR}/progs ${NCURSES_DIR}/man + +PROGS= tic tput infocmp toe tabs clear tset +SRCS.tic= tic.c transform.c dump_entry.c tparm_type.c +SRCS.tput= tput.c tparm_type.c transform.c dump_entry.c clear_cmd.c reset_cmd.c \ + tty_settings.c +SRCS.infocmp= infocmp.c dump_entry.c +SRCS.tabs= tabs.c tty_settings.c +SRCS.clear= clear.c clear_cmd.c tty_settings.c +SRCS.tset= tset.c tty_settings.c transform.c reset_cmd.c +CFLAGS+= -I${NCURSES_DIR}/progs \ + -I${NCURSES_DIR}/include \ + -I${SRCTOP}/lib/ncurses/ncurses \ + -I${OBJTOP}/lib/ncurses/ncurses \ + -I${.CURDIR} +LIBADD= ncursesw +CLEANFILES= termsort.c + +termsort.c: MKtermsort.sh + sh ${NCURSES_DIR}/progs/MKtermsort.sh ${AWK} ${NCURSES_DIR}/include/Caps > ${.TARGET} +dump_entry.c: termsort.c + +LINKS.tic= ${BINDIR}/tic ${BINDIR}/captoinfo \ + ${BINDIR}/tic ${BINDIR}/infotocap +LINKS.tset= ${BINDIR}/tset ${BINDIR}/reset + +MLINKS.tic= tic.1 captoinfo.1 \ + tic.1 infotocap.1 +MLINKS.tset= tset.1 reset.1 + +.include + +.SUFFIXES: .1 .1m +.1m.1: + cat ${.IMPSRC} > ${.TARGET} diff --git a/usr.bin/ncurses/transform.h b/usr.bin/ncurses/transform.h new file mode 100644 index 000000000000..ec255c05c4dd --- /dev/null +++ b/usr.bin/ncurses/transform.h @@ -0,0 +1,10 @@ +#ifndef __TRANSFORM_H +#define __TRANSFORM_H 1 +#include +extern bool same_program(const char *, const char *); +#define PROG_CAPTOINFO "captoinfo" +#define PROG_INFOTOCAP "infotocap" +#define PROG_CLEAR "clear" +#define PROG_RESET "reset" +#define PROG_INIT "init" +#endif /* __TRANSFORM_H */ diff --git a/usr.bin/tput/Makefile b/usr.bin/tput/Makefile deleted file mode 100644 index d3171dab7ef0..000000000000 --- a/usr.bin/tput/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# @(#)Makefile 8.1 (Berkeley) 6/6/93 -# $FreeBSD$ - -PROG= tput -LIBADD= ncursesw -SCRIPTS=clear.sh -MLINKS= tput.1 clear.1 - -.include diff --git a/usr.bin/tput/Makefile.depend b/usr.bin/tput/Makefile.depend deleted file mode 100644 index 9b2a343de2dc..000000000000 --- a/usr.bin/tput/Makefile.depend +++ /dev/null @@ -1,18 +0,0 @@ -# $FreeBSD$ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - gnu/lib/csu \ - include \ - include/xlocale \ - lib/${CSU_DIR} \ - lib/libc \ - lib/libcompiler_rt \ - lib/ncurses/ncursesw \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/usr.bin/tput/clear.sh b/usr.bin/tput/clear.sh deleted file mode 100644 index 2c6e093e10c7..000000000000 --- a/usr.bin/tput/clear.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -# -# SPDX-License-Identifier: BSD-3-Clause -# -# Copyright (c) 1989, 1993 -# The Regents of the University of California. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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$ -# -# @(#)clear.sh 8.1 (Berkeley) 6/6/93 -# - -exec tput clear diff --git a/usr.bin/tput/tput.1 b/usr.bin/tput/tput.1 deleted file mode 100644 index 996575bb622e..000000000000 --- a/usr.bin/tput/tput.1 +++ /dev/null @@ -1,179 +0,0 @@ -.\" Copyright (c) 1989, 1990, 1993 -.\" The Regents of the University of California. All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. -.\" -.\" @(#)tput.1 8.2 (Berkeley) 3/19/94 -.\" $FreeBSD$ -.\" -.Dd June 15, 2002 -.Dt TPUT 1 -.Os -.Sh NAME -.Nm tput , -.Nm clear -.Nd terminal capability interface -.Sh SYNOPSIS -.Nm -.Op Fl T Ar term -.Op Ar attribute ... -.Nm clear -.Sh DESCRIPTION -The -.Nm -utility makes terminal-dependent information available to users or shell -applications. -.Pp -The -.Nm clear -utility executes the -.Dl tput clear -command, ignoring any arguments. -.Pp -The only option to -.Nm -is: -.Bl -tag -width 2n -.It Fl T -The terminal name as specified in the -.Xr termcap 5 -database, for example, -.Dq vt100 -or -.Dq xterm . -If not specified, -.Nm -retrieves the -.Dq Ev TERM -variable from the environment unless that too is not specified, -in which case an error message will be sent to standard error and -the error status will be 2. -.El -.Pp -The -.Nm -utility outputs a string for each -.Ar attribute -that is of type string; a number for each of type integer. -Otherwise, -.Nm -exits 0 if the terminal has the capability and 1 if it does not, -without further action. -.Pp -If an -.Ar attribute -is of type string, and takes arguments (e.g.\& cursor movement, -the termcap -.Dq cm -capability) the arguments are taken from the command line immediately -following the attribute. -.Pp -The following special attributes are available. -The first three use the capabilities of the specified terminal, -and only work if compatible with the utility's terminal. -.Bl -tag -width Ar -.It Cm clear -Clear the screen (the -.Xr termcap 5 -.Dq cl -capability). -.It Cm init -Initialize the terminal (the -.Xr termcap 5 -.Dq is -capability). -.It Cm reset -Reset the terminal (the -.Xr termcap 5 -.Dq rs -capability). -.It Cm longname -Print the descriptive name of the user's terminal type. -.El -.Sh ENVIRONMENT -.Bl -tag -width ".Ev TERM" -.It Ev TERM -The terminal name, if set and -.Fl T -is not used. -.El -.Sh EXIT STATUS -The exit status of -.Nm -is as follows: -.Bl -tag -width indent -.It 0 -If the last -.Ar attribute -is of type string or integer, its value was successfully written -to standard output. -If the -.Ar attribute -is of type boolean, the terminal does have the -.Ar attribute . -Otherwise, no -.Ar attribute -was specified. -.It 1 -If the last -.Ar attribute -is of type boolean, -this terminal does not have the -.Ar attribute . -.It 2 -Usage error. -For example, see -.Fl T -description. -.It 3 -No information is available about the specified terminal type. -.El -.Sh SEE ALSO -.Xr termcap 5 , -.Xr terminfo 5 -.Sh STANDARDS -The -.Nm -utility conforms to -.St -p1003.1-2001 . -.Sh HISTORY -The -.Nm -utility appeared in -.Bx 4.4 . -.Sh BUGS -The -.Nm -utility cannot really distinguish between different types of attributes. -.Pp -Some termcap entries depend upon having a -.Sq % -in them that is just a -.Sq % -and nothing more. -Right now we just warn about them if they do not -have a valid type declaration. -These warnings are sent to -stderr. diff --git a/usr.bin/tput/tput.c b/usr.bin/tput/tput.c deleted file mode 100644 index 8f678f61b1a0..000000000000 --- a/usr.bin/tput/tput.c +++ /dev/null @@ -1,214 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-3-Clause - * - * Copyright (c) 1980, 1988, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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$"); - -#ifndef lint -static const char copyright[] = -"@(#) Copyright (c) 1980, 1988, 1993\n\ - The Regents of the University of California. All rights reserved.\n"; -#endif - -#ifndef lint -static const char sccsid[] = "@(#)tput.c 8.2 (Berkeley) 3/19/94"; -#endif - -#include - -#include -#include -#include -#include -#include -#include - -#undef putchar -#define outc putchar - -static void prlongname(char *); -static void usage(void); -static char **process(const char *, char *, char **); - -int -main(int argc, char **argv) -{ - int ch, exitval, n; - char *cptr, *term, buf[1024], tbuf[1024]; - const char *p; - - term = NULL; - while ((ch = getopt(argc, argv, "T:")) != -1) - switch(ch) { - case 'T': - term = optarg; - break; - case '?': - default: - usage(); - } - argc -= optind; - argv += optind; - - if (argc < 1) - usage(); - - if (!term && !(term = getenv("TERM"))) -errx(2, "no terminal type specified and no TERM environmental variable."); - if (tgetent(tbuf, term) != 1) - err(3, "tgetent failure"); *** 1906 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Thu Feb 25 13:27:05 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 63BE95630BE; Thu, 25 Feb 2021 13:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmYVJ6fzFz4jFK; Thu, 25 Feb 2021 13:27: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 D108B17FF9; Thu, 25 Feb 2021 13:27: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 11PDR474083843; Thu, 25 Feb 2021 13:27:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PDR4eC083842; Thu, 25 Feb 2021 13:27:04 GMT (envelope-from git) Date: Thu, 25 Feb 2021 13:27:04 GMT Message-Id: <202102251327.11PDR4eC083842@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 2a50a9de8340 - main - terminfo: add terminfo database MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2a50a9de8340f08bd876e9e5993332ae14376f80 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 13:27:06 -0000 The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=2a50a9de8340f08bd876e9e5993332ae14376f80 commit 2a50a9de8340f08bd876e9e5993332ae14376f80 Author: Baptiste Daroussin AuthorDate: 2021-02-23 16:17:32 +0000 Commit: Baptiste Daroussin CommitDate: 2021-02-25 13:25:32 +0000 terminfo: add terminfo database Tested by: manu, jbeich --- share/Makefile | 1 + share/terminfo/Makefile | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/share/Makefile b/share/Makefile index c4e12b05f7db..d6854b230ae5 100644 --- a/share/Makefile +++ b/share/Makefile @@ -26,6 +26,7 @@ SUBDIR= ${_colldef} \ ${_syscons} \ tabset \ termcap \ + terminfo \ ${_timedef} \ ${_vt} \ ${_zoneinfo} diff --git a/share/terminfo/Makefile b/share/terminfo/Makefile new file mode 100644 index 000000000000..7bb11f3fdf24 --- /dev/null +++ b/share/terminfo/Makefile @@ -0,0 +1,34 @@ +PACKAGE= runtime + +.PATH: ${SRCTOP}/contrib/ncurses/misc +TINFOBUILDDIR= ${.OBJDIR}/builddir +CLEANDIRS+= builddir + +.include + +.if !defined(_SKIP_BUILD) +all: terminfo +.endif +META_TARGETS+= terminfo install-terminfo + +terminfo: terminfo.src + mkdir -p ${TINFOBUILDDIR} + ${TIC_CMD} -x -o ${TINFOBUILDDIR} ${.ALLSRC} + +.if make(*install*) +TINFOS!= cd ${TINFOBUILDDIR} && find * -type f | LC_ALL=C sort +TINFOSDIRS= ${TINFOS:C/(.).*/\1/g:O:u} +.endif + +beforeinstall: install-terminfo +install-terminfo: + mkdir -p ${DESTDIR}/usr/share/terminfo + cd ${DESTDIR}/usr/share/terminfo; mkdir -p ${TINFOSDIRS} +.for f in ${TINFOS} + ${INSTALL} ${TAG_ARGS} \ + -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ + ${TINFOBUILDDIR}/${f} ${DESTDIR}/usr/share/terminfo/${f} +.endfor + +.include + From owner-dev-commits-src-main@freebsd.org Thu Feb 25 13:27:03 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D204E562E6A; Thu, 25 Feb 2021 13:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmYVH5gVrz4jH9; Thu, 25 Feb 2021 13:27: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 B5BA218611; Thu, 25 Feb 2021 13:27: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 11PDR3TN083821; Thu, 25 Feb 2021 13:27:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PDR3LC083820; Thu, 25 Feb 2021 13:27:03 GMT (envelope-from git) Date: Thu, 25 Feb 2021 13:27:03 GMT Message-Id: <202102251327.11PDR3LC083820@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 0af562d7e185 - main - bootstrap: add tic to the bootstrap tools MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0af562d7e1850bbef230d30805c101b26588a3ed Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 13:27:03 -0000 The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=0af562d7e1850bbef230d30805c101b26588a3ed commit 0af562d7e1850bbef230d30805c101b26588a3ed Author: Baptiste Daroussin AuthorDate: 2021-02-23 06:21:52 +0000 Commit: Baptiste Daroussin CommitDate: 2021-02-25 13:25:28 +0000 bootstrap: add tic to the bootstrap tools tic is necessary early in the build to be able to build the terminfo database later on. Tested by: manu, jbeich --- Makefile.inc1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index 005d9d25afb3..839d4d9db02b 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2433,6 +2433,9 @@ ${_bt}-usr.sbin/config: ${_bt}-usr.bin/file2c ${_bt_lex_depend} # since "make" will usually point to GNU make there. _other_bootstrap_tools+=usr.bin/bmake +_other_bootstrap_tools+=lib/ncurses/ncurses +${_bt}-usr.bin/ncurses: ${_bt}-lib/ncurses/ncurses + # Avoid dependency on host bz2 headers: _other_bootstrap_tools+=lib/libbz2 ${_bt}-usr.bin/grep: ${_bt}-lib/libbz2 @@ -2479,6 +2482,7 @@ bootstrap-tools: ${_bt}-links .PHONY lib/libopenbsd \ usr.bin/mandoc \ usr.bin/rpcgen \ + lib/ncurses/ncurses \ ${_yacc} \ ${_m4} \ ${_lex} \ @@ -2493,6 +2497,7 @@ bootstrap-tools: ${_bt}-links .PHONY ${_nmtree} \ ${_vtfontcvt} \ ${_localedef} \ + usr.bin/ncurses \ ${LOCAL_BSTOOL_DIRS} ${_bt}-${_tool}: ${_bt}-links .PHONY .MAKE ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ @@ -2514,6 +2519,9 @@ ${_bt}-usr.bin/xinstall: ${_bt}-lib/libmd ${_bt}-sbin/md5: ${_bt}-lib/libmd .endif +if target(${_bt}-usr.bin/ncurses) +${_bt}-usr.bin/ncurses: ${_bt}-lib/ncurses/ncurses +.endif # # build-tools: Build special purpose build tools From owner-dev-commits-src-main@freebsd.org Thu Feb 25 13:53:20 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F22A8563E47; Thu, 25 Feb 2021 13:53: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmZ4c5slqz4lD5; Thu, 25 Feb 2021 13:53: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 BC68418C65; Thu, 25 Feb 2021 13:53: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 11PDrKfe022027; Thu, 25 Feb 2021 13:53:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PDrK0V022026; Thu, 25 Feb 2021 13:53:20 GMT (envelope-from git) Date: Thu, 25 Feb 2021 13:53:20 GMT Message-Id: <202102251353.11PDrK0V022026@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: b6a51d39e3a2 - main - bootstrap: fix a last edit typo MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b6a51d39e3a2e2f75d5b42a8c17a531063258a15 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 13:53:21 -0000 The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=b6a51d39e3a2e2f75d5b42a8c17a531063258a15 commit b6a51d39e3a2e2f75d5b42a8c17a531063258a15 Author: Baptiste Daroussin AuthorDate: 2021-02-25 13:52:43 +0000 Commit: Baptiste Daroussin CommitDate: 2021-02-25 13:53:00 +0000 bootstrap: fix a last edit typo Reported by: cy --- Makefile.inc1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 839d4d9db02b..fd5097d1f8dd 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2519,7 +2519,7 @@ ${_bt}-usr.bin/xinstall: ${_bt}-lib/libmd ${_bt}-sbin/md5: ${_bt}-lib/libmd .endif -if target(${_bt}-usr.bin/ncurses) +.if target(${_bt}-usr.bin/ncurses) ${_bt}-usr.bin/ncurses: ${_bt}-lib/ncurses/ncurses .endif From owner-dev-commits-src-main@freebsd.org Thu Feb 25 14:06:40 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B9D61564266; Thu, 25 Feb 2021 14:06:40 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmZN04xbcz4mHf; Thu, 25 Feb 2021 14:06:40 +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 9D26418E0E; Thu, 25 Feb 2021 14:06: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 11PE6eW1036974; Thu, 25 Feb 2021 14:06:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PE6eWB036973; Thu, 25 Feb 2021 14:06:40 GMT (envelope-from git) Date: Thu, 25 Feb 2021 14:06:40 GMT Message-Id: <202102251406.11PE6eWB036973@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: 13ad237a19b7 - main - ipfw: make algo name argument optional for some table types MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 13ad237a19b7368124483d9d1dc3258c27880fef Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 14:06:40 -0000 The branch main has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=13ad237a19b7368124483d9d1dc3258c27880fef commit 13ad237a19b7368124483d9d1dc3258c27880fef Author: Andrey V. Elsukov AuthorDate: 2021-02-25 13:57:47 +0000 Commit: Andrey V. Elsukov CommitDate: 2021-02-25 13:57:47 +0000 ipfw: make algo name argument optional for some table types Most of table types currently supported by ipfw have only one algorithm implementation. When user creates such tables, allow to omit algo name in arguments. E.g. now it is possible: ipfw table T1 create type number ipfw table T2 create type iface ipfw table T3 create type flow PR: 233072 MFC after: 1 week Sponsored by: Yandex LLC --- sbin/ipfw/tables.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/sbin/ipfw/tables.c b/sbin/ipfw/tables.c index 57b8cef00889..81cf7e392586 100644 --- a/sbin/ipfw/tables.c +++ b/sbin/ipfw/tables.c @@ -83,6 +83,15 @@ static struct _s_x tabletypes[] = { { NULL, 0 } }; +/* Default algorithms for various table types */ +static struct _s_x tablealgos[] = { + { "addr:radix", IPFW_TABLE_ADDR }, + { "flow:hash", IPFW_TABLE_FLOW }, + { "iface:array", IPFW_TABLE_INTERFACE }, + { "number:array", IPFW_TABLE_NUMBER }, + { NULL, 0 } +}; + static struct _s_x tablevaltypes[] = { { "skipto", IPFW_VTYPE_SKIPTO }, { "pipe", IPFW_VTYPE_PIPE }, @@ -468,8 +477,15 @@ table_create(ipfw_obj_header *oh, int ac, char *av[]) } /* Set some defaults to preserve compatibility. */ - if (xi.algoname[0] == '\0' && xi.type == 0) - xi.type = IPFW_TABLE_ADDR; + if (xi.algoname[0] == '\0') { + const char *algo; + + if (xi.type == 0) + xi.type = IPFW_TABLE_ADDR; + algo = match_value(tablealgos, xi.type); + if (algo != NULL) + strlcpy(xi.algoname, algo, sizeof(xi.algoname)); + } if (xi.vmask == 0) xi.vmask = IPFW_VTYPE_LEGACY; From owner-dev-commits-src-main@freebsd.org Thu Feb 25 15:05:50 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0F6A8565F24; Thu, 25 Feb 2021 15:05: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmbhF71yXz4r50; Thu, 25 Feb 2021 15:05:49 +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 E3A0919AF2; Thu, 25 Feb 2021 15:05:49 +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 11PF5nIE015591; Thu, 25 Feb 2021 15:05:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PF5nOs015589; Thu, 25 Feb 2021 15:05:49 GMT (envelope-from git) Date: Thu, 25 Feb 2021 15:05:49 GMT Message-Id: <202102251505.11PF5nOs015589@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: faa998f6ff69 - main - sendfile: Use the pager size to determine the file extent when possible MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: faa998f6ff69573fe82765c77c7268ee89ac945e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 15:05:50 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=faa998f6ff69573fe82765c77c7268ee89ac945e commit faa998f6ff69573fe82765c77c7268ee89ac945e Author: Mark Johnston AuthorDate: 2021-02-25 15:04:44 +0000 Commit: Mark Johnston CommitDate: 2021-02-25 15:04:44 +0000 sendfile: Use the pager size to determine the file extent when possible Previously sendfile would issue a VOP_GETATTR and use the returned size, i.e., the file size. When paging in file data, sendfile_swapin() will use the pager to determine whether it needs to zero-fill, most often because of a hole in a sparse file. An attempt to page in beyond the end of a file is treated this way, and occurs when the requested page is past the end of the pager. In other words, both the file size and pager size were used interchangeably. With ZFS, updates to the pager and file sizes are not synchronized by the exclusive vnode lock, at least partially due to its use of MNTK_SHARED_WRITES. In particular, the pager size is updated after the file size, so in the presence of a writer concurrently extending the file, sendfile could incorrectly instantiate "holes" in the page cache pages backing the file, which manifests as data corruption when reading the file back from the page cache. The on-disk copy is unaffected. Fix this by consistently using the pager size when available. Reported by: dumbbell Reviewed by: chs, kib Tested by: dumbbell, pho MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28811 --- sys/kern/kern_sendfile.c | 55 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 41 insertions(+), 14 deletions(-) diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c index 7d7be6f072e9..95bfba0538dc 100644 --- a/sys/kern/kern_sendfile.c +++ b/sys/kern/kern_sendfile.c @@ -588,28 +588,40 @@ sendfile_getobj(struct thread *td, struct file *fp, vm_object_t *obj_res, goto out; } *bsize = vp->v_mount->mnt_stat.f_iosize; - error = VOP_GETATTR(vp, &va, td->td_ucred); - if (error != 0) - goto out; - *obj_size = va.va_size; obj = vp->v_object; if (obj == NULL) { error = EINVAL; goto out; } + + /* + * Use the pager size when available to simplify synchronization + * with filesystems, which otherwise must atomically update both + * the vnode pager size and file size. + */ + if (obj->type == OBJT_VNODE) { + VM_OBJECT_RLOCK(obj); + *obj_size = obj->un_pager.vnp.vnp_size; + } else { + error = VOP_GETATTR(vp, &va, td->td_ucred); + if (error != 0) + goto out; + *obj_size = va.va_size; + VM_OBJECT_RLOCK(obj); + } } else if (fp->f_type == DTYPE_SHM) { error = 0; shmfd = fp->f_data; obj = shmfd->shm_object; + VM_OBJECT_RLOCK(obj); *obj_size = shmfd->shm_size; } else { error = EINVAL; goto out; } - VM_OBJECT_WLOCK(obj); if ((obj->flags & OBJ_DEAD) != 0) { - VM_OBJECT_WUNLOCK(obj); + VM_OBJECT_RUNLOCK(obj); error = EBADF; goto out; } @@ -620,7 +632,7 @@ sendfile_getobj(struct thread *td, struct file *fp, vm_object_t *obj_res, * immediately destroy it. */ vm_object_reference_locked(obj); - VM_OBJECT_WUNLOCK(obj); + VM_OBJECT_RUNLOCK(obj); *obj_res = obj; *vp_res = vp; *shmfd_res = shmfd; @@ -679,7 +691,7 @@ vn_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio, struct shmfd *shmfd; struct sendfile_sync *sfs; struct vattr va; - off_t off, sbytes, rem, obj_size; + off_t off, sbytes, rem, obj_size, nobj_size; int bsize, error, ext_pgs_idx, hdrlen, max_pgs, softerr; #ifdef KERN_TLS int tls_enq_cnt; @@ -852,15 +864,30 @@ retry_space: error = vn_lock(vp, LK_SHARED); if (error != 0) goto done; - error = VOP_GETATTR(vp, &va, td->td_ucred); - if (error != 0 || off >= va.va_size) { + + /* + * Check to see if the file size has changed. + */ + if (obj->type == OBJT_VNODE) { + VM_OBJECT_RLOCK(obj); + nobj_size = obj->un_pager.vnp.vnp_size; + VM_OBJECT_RUNLOCK(obj); + } else { + error = VOP_GETATTR(vp, &va, td->td_ucred); + if (error != 0) { + VOP_UNLOCK(vp); + goto done; + } + nobj_size = va.va_size; + } + if (off >= nobj_size) { VOP_UNLOCK(vp); goto done; } - if (va.va_size != obj_size) { - obj_size = va.va_size; - rem = nbytes ? - omin(nbytes + offset, obj_size) : obj_size; + if (nobj_size != obj_size) { + obj_size = nobj_size; + rem = nbytes ? omin(nbytes + offset, obj_size) : + obj_size; rem -= off; } } From owner-dev-commits-src-main@freebsd.org Thu Feb 25 15:05:51 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36B8B565F26; Thu, 25 Feb 2021 15:05: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmbhH18pYz4r2T; Thu, 25 Feb 2021 15:05: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 1AA3119B0A; Thu, 25 Feb 2021 15:05: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 11PF5pID015612; Thu, 25 Feb 2021 15:05:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PF5pfW015611; Thu, 25 Feb 2021 15:05:51 GMT (envelope-from git) Date: Thu, 25 Feb 2021 15:05:51 GMT Message-Id: <202102251505.11PF5pfW015611@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 369706a6f887 - main - buf: Fix the dirtybufthresh check MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 369706a6f887f8ffe1037d78bc31565ec701d72b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 15:05:51 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=369706a6f887f8ffe1037d78bc31565ec701d72b commit 369706a6f887f8ffe1037d78bc31565ec701d72b Author: Mark Johnston AuthorDate: 2021-02-25 15:04:44 +0000 Commit: Mark Johnston CommitDate: 2021-02-25 15:04:44 +0000 buf: Fix the dirtybufthresh check dirtybufthresh is a watermark, slightly below the high watermark for dirty buffers. When a delayed write is issued, the dirtying thread will start flushing buffers if the dirtybufthresh watermark is reached. This helps ensure that the high watermark is not reached, otherwise performance will degrade as clustering and other optimizations are disabled (see buf_dirty_count_severe()). When the buffer cache was partitioned into "domains", the dirtybufthresh threshold checks were not updated. Fix this. Reported by: Shrikanth R Kamath Reviewed by: rlibby, mckusick, kib, bdrewery Sponsored by: Juniper Networks, Inc., Klara, Inc. Fixes: 3cec5c77d6 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28901 --- sys/kern/vfs_bio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 45be14b47207..8e8cf3f083d4 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -2325,11 +2325,13 @@ void bufbdflush(struct bufobj *bo, struct buf *bp) { struct buf *nbp; + struct bufdomain *bd; - if (bo->bo_dirty.bv_cnt > dirtybufthresh + 10) { + bd = &bdomain[bo->bo_domain]; + if (bo->bo_dirty.bv_cnt > bd->bd_dirtybufthresh + 10) { (void) VOP_FSYNC(bp->b_vp, MNT_NOWAIT, curthread); altbufferflushes++; - } else if (bo->bo_dirty.bv_cnt > dirtybufthresh) { + } else if (bo->bo_dirty.bv_cnt > bd->bd_dirtybufthresh) { BO_LOCK(bo); /* * Try to find a buffer to flush. From owner-dev-commits-src-main@freebsd.org Thu Feb 25 15:37:30 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99C50567003; Thu, 25 Feb 2021 15:37: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmcNp3cpVz4tcR; Thu, 25 Feb 2021 15:37: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 6F5C319CFC; Thu, 25 Feb 2021 15:37: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 11PFbUAm055046; Thu, 25 Feb 2021 15:37:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PFbUed055045; Thu, 25 Feb 2021 15:37:30 GMT (envelope-from git) Date: Thu, 25 Feb 2021 15:37:30 GMT Message-Id: <202102251537.11PFbUed055045@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 3b6268bb9e4a - main - mkimg: We always want the last block of the last inserted partition MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3b6268bb9e4aea939c4ce7f37353174aa90e6751 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 15:37:30 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=3b6268bb9e4aea939c4ce7f37353174aa90e6751 commit 3b6268bb9e4aea939c4ce7f37353174aa90e6751 Author: Emmanuel Vadot AuthorDate: 2021-02-25 15:34:28 +0000 Commit: Emmanuel Vadot CommitDate: 2021-02-25 15:34:28 +0000 mkimg: We always want the last block of the last inserted partition Even with an absolute offset we want to know the last block the partition otherwise we endup with an image the size of the metadata. This allow to create image with the ESP placed at a specific position which is useful on arm/arm64 where u-boot have always a hard time to read the ESP if it's not aligned on 512k. mkimg -v -o sdcard -s gpt -p efi::54M:1M -p freebsd-ufs::1G now works. MFC after: 3 days --- usr.bin/mkimg/mkimg.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/usr.bin/mkimg/mkimg.c b/usr.bin/mkimg/mkimg.c index d870f3a8f0c3..c4f0acbe3927 100644 --- a/usr.bin/mkimg/mkimg.c +++ b/usr.bin/mkimg/mkimg.c @@ -528,10 +528,8 @@ mkimg(void) (long long)blkoffset); } } - if (!abs_offset) { - block = scheme_metadata(SCHEME_META_PART_AFTER, - part->block + part->size); - } + block = scheme_metadata(SCHEME_META_PART_AFTER, + part->block + part->size); } mkimg_validate(); From owner-dev-commits-src-main@freebsd.org Thu Feb 25 16:02:49 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9477D567988; Thu, 25 Feb 2021 16:02: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dmcy13bQjz4w9T; Thu, 25 Feb 2021 16:02:49 +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 6E1831A2C9; Thu, 25 Feb 2021 16:02:49 +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 11PG2npI094385; Thu, 25 Feb 2021 16:02:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PG2n9U094384; Thu, 25 Feb 2021 16:02:49 GMT (envelope-from git) Date: Thu, 25 Feb 2021 16:02:49 GMT Message-Id: <202102251602.11PG2n9U094384@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: ba7ede0b9b3d - main - Add UPDATING entry for PIE default 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: ba7ede0b9b3d0c3a64e6e7d8cbfe26b6f882f39f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 16:02:49 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ba7ede0b9b3d0c3a64e6e7d8cbfe26b6f882f39f commit ba7ede0b9b3d0c3a64e6e7d8cbfe26b6f882f39f Author: Ed Maste AuthorDate: 2021-02-25 15:59:54 +0000 Commit: Ed Maste CommitDate: 2021-02-25 16:02:09 +0000 Add UPDATING entry for PIE default As of commit 9a227a2fd642 PIE is on by default for 64-bit architectures. Relnotes: yes --- UPDATING | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UPDATING b/UPDATING index 31ec79ed8437..edad902d0ab1 100644 --- a/UPDATING +++ b/UPDATING @@ -26,6 +26,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 14.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20210225: + For 64-bit architectures the base system is now built with Position + Independent Executable (PIE) support enabled by default. It may be + disabled using the WITHOUT_PIE knob. A clean build is required. + 20210128: Various LinuxKPI functionality was added which conflicts with DRM. Please update your drm-kmod port to after the __FreeBSD_verison 1400003 From owner-dev-commits-src-main@freebsd.org Thu Feb 25 16:45:22 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D9492569260; Thu, 25 Feb 2021 16:45: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dmdv65qqtz50Ts; Thu, 25 Feb 2021 16:45: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 B6CE11AF0D; Thu, 25 Feb 2021 16:45: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 11PGjMe8047437; Thu, 25 Feb 2021 16:45:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PGjMrC047436; Thu, 25 Feb 2021 16:45:22 GMT (envelope-from git) Date: Thu, 25 Feb 2021 16:45:22 GMT Message-Id: <202102251645.11PGjMrC047436@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 655fa0440601 - main - Add if_wg.4 MLINK MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 655fa04406010e56822802e12bf52f42e333988b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 16:45:22 -0000 The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=655fa04406010e56822802e12bf52f42e333988b commit 655fa04406010e56822802e12bf52f42e333988b Author: Li-Wen Hsu AuthorDate: 2021-02-25 16:43:15 +0000 Commit: Li-Wen Hsu CommitDate: 2021-02-25 16:43:15 +0000 Add if_wg.4 MLINK --- share/man/man4/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 4929ec9fd3f6..686e86cf6897 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -767,6 +767,7 @@ MLINKS+=vr.4 if_vr.4 MLINKS+=vte.4 if_vte.4 MLINKS+=vtnet.4 if_vtnet.4 MLINKS+=watchdog.4 SW_WATCHDOG.4 +MLINKS+=wg.4 if_wg.4 MLINKS+=${_wpi.4} ${_if_wpi.4} MLINKS+=xl.4 if_xl.4 From owner-dev-commits-src-main@freebsd.org Thu Feb 25 17:12:01 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 05F5C569AE6; Thu, 25 Feb 2021 17:12: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmfTr6hSBz52CN; Thu, 25 Feb 2021 17:12: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 CEB281B653; Thu, 25 Feb 2021 17:12: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 11PHC0lR088413; Thu, 25 Feb 2021 17:12:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PHC0gJ088412; Thu, 25 Feb 2021 17:12:00 GMT (envelope-from git) Date: Thu, 25 Feb 2021 17:12:00 GMT Message-Id: <202102251712.11PHC0gJ088412@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 8f3c71c85e5f - main - mkimg: Add support for offset if the source is an image MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f3c71c85e5f6a4d2bddbfead225d33b96dbd7d7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 17:12:01 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=8f3c71c85e5f6a4d2bddbfead225d33b96dbd7d7 commit 8f3c71c85e5f6a4d2bddbfead225d33b96dbd7d7 Author: Emmanuel Vadot AuthorDate: 2021-02-25 17:10:19 +0000 Commit: Emmanuel Vadot CommitDate: 2021-02-25 17:11:50 +0000 mkimg: Add support for offset if the source is an image This allow us to create image with the following format: mkimg -v -o sdcard -s gpt -p efi:=esp_aarch64.img:1M -p freebsd-ufs::1G Which will add a efi partition at a 1M offset on the image with its content coming from the esp_aarch64.img file. MFC after: 3 days --- usr.bin/mkimg/mkimg.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/usr.bin/mkimg/mkimg.c b/usr.bin/mkimg/mkimg.c index c4f0acbe3927..e5e6c036575b 100644 --- a/usr.bin/mkimg/mkimg.c +++ b/usr.bin/mkimg/mkimg.c @@ -174,8 +174,10 @@ usage(const char *why) fprintf(stderr, "\t[/]::[:[+]]\t- " "empty partition of given size and\n\t\t\t\t\t" " optional relative or absolute offset\n"); - fprintf(stderr, "\t[/]:=\t\t- partition content and size " - "are\n\t\t\t\t\t determined by the named file\n"); + fprintf(stderr, "\t[/]:=[:[+]offset]\t- partition " + "content and size are\n\t\t\t\t\t" + " determined by the named file and\n" + "\t\t\t\t\t optional relative or absolute offset\n"); fprintf(stderr, "\t[/]:-\t\t- partition content and size " "are taken\n\t\t\t\t\t from the output of the command to run\n"); fprintf(stderr, "\t-\t\t\t\t- unused partition entry\n"); @@ -459,9 +461,11 @@ mkimg(void) /* Look for an offset. Set size too if we can. */ switch (part->kind) { case PART_KIND_SIZE: + case PART_KIND_FILE: offset = part->contents; size = strsep(&offset, ":"); - if (expand_number(size, &bytesize) == -1) + if (part->kind == PART_KIND_SIZE && + expand_number(size, &bytesize) == -1) error = errno; if (offset != NULL) { if (*offset != '+') @@ -476,14 +480,13 @@ mkimg(void) /* Work out exactly where the partition starts. */ blkoffset = (byteoffset + secsz - 1) / secsz; - if (abs_offset) { - part->block = scheme_metadata(SCHEME_META_PART_ABSOLUTE, + if (abs_offset) + block = scheme_metadata(SCHEME_META_PART_ABSOLUTE, blkoffset); - } else { + else block = scheme_metadata(SCHEME_META_PART_BEFORE, block + blkoffset); - part->block = block; - } + part->block = block; if (verbose) fprintf(stderr, "partition %d: starting block %llu " From owner-dev-commits-src-main@freebsd.org Thu Feb 25 17:34:20 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5CF3356A82B; Thu, 25 Feb 2021 17:34: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dmfzc29v6z53wD; Thu, 25 Feb 2021 17:34: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 331811B772; Thu, 25 Feb 2021 17:34: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 11PHYKx0014730; Thu, 25 Feb 2021 17:34:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PHYKkH014729; Thu, 25 Feb 2021 17:34:20 GMT (envelope-from git) Date: Thu, 25 Feb 2021 17:34:20 GMT Message-Id: <202102251734.11PHYKkH014729@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 48396dc77922 - main - Address two incorrect calculations and enhance readability of PRR code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48396dc77922c68377ecac0ead2f8b0b5453c451 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 17:34:20 -0000 The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=48396dc77922c68377ecac0ead2f8b0b5453c451 commit 48396dc77922c68377ecac0ead2f8b0b5453c451 Author: Richard Scheffenegger AuthorDate: 2021-02-25 16:59:45 +0000 Commit: Richard Scheffenegger CommitDate: 2021-02-25 17:32:04 +0000 Address two incorrect calculations and enhance readability of PRR code - address second instance of cwnd potentially becoming zero - fix sublte bug due to implicit int to uint typecase in max() - fix bug due to typo in hand-coded CEILING() function by using howmany() macro - use int instead of long, and add a missing long typecast - replace if conditionals with easier to read imax/imin (as in pseudocode) Reviewed By: #transport, kbowling MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28813 --- sys/netinet/tcp_input.c | 60 ++++++++++++++++++++----------------------------- 1 file changed, 24 insertions(+), 36 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 59a5a2d6bf34..ca4a4c833dc2 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2570,8 +2570,8 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, if (V_tcp_do_prr && IN_FASTRECOVERY(tp->t_flags) && (tp->t_flags & TF_SACK_PERMIT)) { - long snd_cnt = 0, limit = 0; - long del_data = 0, pipe = 0; + int snd_cnt = 0, limit = 0; + int del_data = 0, pipe = 0; /* * In a duplicate ACK del_data is only the * diff_in_sack. If no SACK is used del_data @@ -2588,39 +2588,29 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, if (pipe > tp->snd_ssthresh) { if (tp->sackhint.recover_fs == 0) tp->sackhint.recover_fs = - max(1, tp->snd_nxt - tp->snd_una); - snd_cnt = (tp->sackhint.prr_delivered * - tp->snd_ssthresh / - tp->sackhint.recover_fs) + - 1 - tp->sackhint.sack_bytes_rexmit; + imax(1, tp->snd_nxt - tp->snd_una); + snd_cnt = howmany((long)tp->sackhint.prr_delivered * + tp->snd_ssthresh, tp->sackhint.recover_fs) - + tp->sackhint.sack_bytes_rexmit; } else { if (V_tcp_do_prr_conservative) limit = tp->sackhint.prr_delivered - tp->sackhint.sack_bytes_rexmit; else - if ((tp->sackhint.prr_delivered - - tp->sackhint.sack_bytes_rexmit) > - del_data) - limit = tp->sackhint.prr_delivered - - tp->sackhint.sack_bytes_rexmit + - maxseg; - else - limit = del_data + maxseg; - if ((tp->snd_ssthresh - pipe) < limit) - snd_cnt = tp->snd_ssthresh - pipe; - else - snd_cnt = limit; + limit = imax(tp->sackhint.prr_delivered - + tp->sackhint.sack_bytes_rexmit, + del_data) + maxseg; + snd_cnt = imin(tp->snd_ssthresh - pipe, limit); } - snd_cnt = max((snd_cnt / maxseg), 0); + snd_cnt = imax(snd_cnt, 0) / maxseg; /* * Send snd_cnt new data into the network in * response to this ACK. If there is a going * to be a SACK retransmission, adjust snd_cwnd * accordingly. */ - tp->snd_cwnd = tp->snd_nxt - tp->snd_recover + - tp->sackhint.sack_bytes_rexmit + - (snd_cnt * maxseg); + tp->snd_cwnd = imax(maxseg, tp->snd_nxt - tp->snd_recover + + tp->sackhint.sack_bytes_rexmit + (snd_cnt * maxseg)); } else if ((tp->t_flags & TF_SACK_PERMIT) && IN_FASTRECOVERY(tp->t_flags)) { int awnd; @@ -3948,7 +3938,7 @@ tcp_mssopt(struct in_conninfo *inc) void tcp_prr_partialack(struct tcpcb *tp, struct tcphdr *th) { - long snd_cnt = 0, limit = 0, del_data = 0, pipe = 0; + int snd_cnt = 0, limit = 0, del_data = 0, pipe = 0; int maxseg = tcp_maxseg(tp); INP_WLOCK_ASSERT(tp->t_inpcb); @@ -3974,29 +3964,27 @@ tcp_prr_partialack(struct tcpcb *tp, struct tcphdr *th) if (pipe > tp->snd_ssthresh) { if (tp->sackhint.recover_fs == 0) tp->sackhint.recover_fs = - max(1, tp->snd_nxt - tp->snd_una); - snd_cnt = (tp->sackhint.prr_delivered * tp->snd_ssthresh / - tp->sackhint.recover_fs) - tp->sackhint.sack_bytes_rexmit; + imax(1, tp->snd_nxt - tp->snd_una); + snd_cnt = howmany((long)tp->sackhint.prr_delivered * + tp->snd_ssthresh, tp->sackhint.recover_fs) - + tp->sackhint.sack_bytes_rexmit; } else { if (V_tcp_do_prr_conservative) limit = tp->sackhint.prr_delivered - tp->sackhint.sack_bytes_rexmit; else - if ((tp->sackhint.prr_delivered - - tp->sackhint.sack_bytes_rexmit) > del_data) - limit = tp->sackhint.prr_delivered - - tp->sackhint.sack_bytes_rexmit + maxseg; - else - limit = del_data + maxseg; - snd_cnt = min((tp->snd_ssthresh - pipe), limit); + limit = imax(tp->sackhint.prr_delivered - + tp->sackhint.sack_bytes_rexmit, + del_data) + maxseg; + snd_cnt = imin((tp->snd_ssthresh - pipe), limit); } - snd_cnt = max((snd_cnt / maxseg), 0); + snd_cnt = imax(snd_cnt, 0) / maxseg; /* * Send snd_cnt new data into the network in response to this ack. * If there is going to be a SACK retransmission, adjust snd_cwnd * accordingly. */ - tp->snd_cwnd = max(maxseg, (int64_t)tp->snd_nxt - tp->snd_recover + + tp->snd_cwnd = imax(maxseg, tp->snd_nxt - tp->snd_recover + tp->sackhint.sack_bytes_rexmit + (snd_cnt * maxseg)); tp->t_flags |= TF_ACKNOW; (void) tcp_output(tp); From owner-dev-commits-src-main@freebsd.org Thu Feb 25 18:08:27 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8CAE156B1C5; Thu, 25 Feb 2021 18:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dmgkz3JqBz56RF; Thu, 25 Feb 2021 18:08: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 605711BFC2; Thu, 25 Feb 2021 18:08: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 11PI8RJ4055144; Thu, 25 Feb 2021 18:08:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PI8R7a055143; Thu, 25 Feb 2021 18:08:27 GMT (envelope-from git) Date: Thu, 25 Feb 2021 18:08:27 GMT Message-Id: <202102251808.11PI8R7a055143@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 31d7a27c6e88 - main - PRR: Avoid accounting left-edge twice in partial ACK. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31d7a27c6e88c3d5bd0907774ec70176a92da5bb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 18:08:27 -0000 The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=31d7a27c6e88c3d5bd0907774ec70176a92da5bb commit 31d7a27c6e88c3d5bd0907774ec70176a92da5bb Author: Richard Scheffenegger AuthorDate: 2021-02-25 17:36:49 +0000 Commit: Richard Scheffenegger CommitDate: 2021-02-25 17:37:47 +0000 PRR: Avoid accounting left-edge twice in partial ACK. Reviewed By: #transport, kbowling MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28819 --- sys/netinet/tcp_input.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index ca4a4c833dc2..bbc93a93810c 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -3950,9 +3950,7 @@ tcp_prr_partialack(struct tcpcb *tp, struct tcphdr *th) * (del_data) and an estimate of how many bytes are in the * network. */ - if (SEQ_GEQ(th->th_ack, tp->snd_una)) - del_data = BYTES_THIS_ACK(tp, th); - del_data += tp->sackhint.delivered_data; + del_data = tp->sackhint.delivered_data; if (V_tcp_do_rfc6675_pipe) pipe = tcp_compute_pipe(tp); else From owner-dev-commits-src-main@freebsd.org Thu Feb 25 18:21:01 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 13AE556B906; Thu, 25 Feb 2021 18:21: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dmh1S72TVz57lG; Thu, 25 Feb 2021 18:21: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 D9C261C2C1; Thu, 25 Feb 2021 18:21: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 11PIL0uE078841; Thu, 25 Feb 2021 18:21:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PIL060078840; Thu, 25 Feb 2021 18:21:00 GMT (envelope-from git) Date: Thu, 25 Feb 2021 18:21:00 GMT Message-Id: <202102251821.11PIL060078840@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 2593f858d7d0 - main - A TCP server has to take into consideration, if TCP_NOOPT is preventing the negotiation of TCP features. This affects most TCP options but adherance to RFC7323 with the timestamp option will prevent a session from getting established. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2593f858d7d078efa85f78f20b6bfa0931cc1dc5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 18:21:01 -0000 The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=2593f858d7d078efa85f78f20b6bfa0931cc1dc5 commit 2593f858d7d078efa85f78f20b6bfa0931cc1dc5 Author: Richard Scheffenegger AuthorDate: 2021-02-25 18:10:55 +0000 Commit: Richard Scheffenegger CommitDate: 2021-02-25 18:12:20 +0000 A TCP server has to take into consideration, if TCP_NOOPT is preventing the negotiation of TCP features. This affects most TCP options but adherance to RFC7323 with the timestamp option will prevent a session from getting established. PR: 253576 Reviewed By: tuexen, #transport MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28652 --- sys/netinet/tcp_input.c | 12 ++++++++---- sys/netinet/tcp_syncache.c | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index bbc93a93810c..6338b7491a7f 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1644,7 +1644,8 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, TCPSTAT_INC(tcps_ecn_shs); } if ((to.to_flags & TOF_SCALE) && - (tp->t_flags & TF_REQ_SCALE)) { + (tp->t_flags & TF_REQ_SCALE) && + !(tp->t_flags & TF_NOOPT)) { tp->t_flags |= TF_RCVD_SCALE; tp->snd_scale = to.to_wscale; } else @@ -1655,7 +1656,8 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, */ tp->snd_wnd = th->th_win; if ((to.to_flags & TOF_TS) && - (tp->t_flags & TF_REQ_TSTMP)) { + (tp->t_flags & TF_REQ_TSTMP) && + !(tp->t_flags & TF_NOOPT)) { tp->t_flags |= TF_RCVD_TSTMP; tp->ts_recent = to.to_tsval; tp->ts_recent_age = tcp_ts_getticks(); @@ -1664,10 +1666,12 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, if (to.to_flags & TOF_MSS) tcp_mss(tp, to.to_mss); if ((tp->t_flags & TF_SACK_PERMIT) && - (to.to_flags & TOF_SACKPERM) == 0) + (!(to.to_flags & TOF_SACKPERM) || + (tp->t_flags & TF_NOOPT))) tp->t_flags &= ~TF_SACK_PERMIT; if (IS_FASTOPEN(tp->t_flags)) { - if (to.to_flags & TOF_FASTOPEN) { + if ((to.to_flags & TOF_FASTOPEN) && + !(tp->t_flags & TF_NOOPT)) { uint16_t mss; if (to.to_flags & TOF_MSS) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index e59a41fc1102..771ff44b8924 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -1655,7 +1655,8 @@ skip_alloc: win = imin(win, TCP_MAXWIN); sc->sc_wnd = win; - if (V_tcp_do_rfc1323) { + if (V_tcp_do_rfc1323 && + !(ltflags & TF_NOOPT)) { /* * A timestamp received in a SYN makes * it ok to send timestamp requests and replies. From owner-dev-commits-src-main@freebsd.org Thu Feb 25 18:22:31 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7E5EB56BAA8; Thu, 25 Feb 2021 18:22: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dmh3C31PVz58Yg; Thu, 25 Feb 2021 18:22: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 5A7211C54E; Thu, 25 Feb 2021 18:22: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 11PIMVmB080867; Thu, 25 Feb 2021 18:22:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PIMVaE080866; Thu, 25 Feb 2021 18:22:31 GMT (envelope-from git) Date: Thu, 25 Feb 2021 18:22:31 GMT Message-Id: <202102251822.11PIMVaE080866@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Renato Botelho Subject: git: 220c6d922a84 - main - ncurses: Silence MKuserdefs.sh call MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: garga X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 220c6d922a84f6679d72dfc5bac762b4c4812199 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 18:22:31 -0000 The branch main has been updated by garga (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=220c6d922a84f6679d72dfc5bac762b4c4812199 commit 220c6d922a84f6679d72dfc5bac762b4c4812199 Author: Renato Botelho AuthorDate: 2021-02-25 18:15:39 +0000 Commit: Renato Botelho CommitDate: 2021-02-25 18:22:17 +0000 ncurses: Silence MKuserdefs.sh call Remove -x flag from sh used to execute MKuserdefs.sh during ncurses build and stop polluting make -s output Reviewed by: bapt, manu Approved by: bapt Differential Revision: https://reviews.freebsd.org/D28885 --- lib/ncurses/ncurses/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile index aff569a79845..68ed3b39f458 100644 --- a/lib/ncurses/ncurses/Makefile +++ b/lib/ncurses/ncurses/Makefile @@ -362,7 +362,7 @@ fallback.c: MKfallback.sh mv -f ${.TARGET}.tmp ${.TARGET} comp_userdefs.c: MKuserdefs.sh Caps Caps-ncurses make_hash - env PATH=${BTOOLSPATH:U.}:${PATH} sh -x ${NCURSES_DIR}/ncurses/tinfo/MKuserdefs.sh "${AWK}" \ + env PATH=${BTOOLSPATH:U.}:${PATH} sh ${NCURSES_DIR}/ncurses/tinfo/MKuserdefs.sh "${AWK}" \ ${USE_BIG_STRINGS} ${NCURSES_DIR}/include/Caps ${NCURSES_DIR}/include/Caps-ncurses > ${.TARGET} # Generated headers From owner-dev-commits-src-main@freebsd.org Thu Feb 25 18:30:01 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C61E856BC7C; Thu, 25 Feb 2021 18:30: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmhCs5BKzz58rJ; Thu, 25 Feb 2021 18:30: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 A03F41C3AE; Thu, 25 Feb 2021 18:30: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 11PIU1bf083148; Thu, 25 Feb 2021 18:30:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PIU199083076; Thu, 25 Feb 2021 18:30:01 GMT (envelope-from git) Date: Thu, 25 Feb 2021 18:30:01 GMT Message-Id: <202102251830.11PIU199083076@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 7a65641922f4 - main - ncurses: import version 6.2-20210220 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7a65641922f404b84e9a249d48593de84d8e8d17 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 18:30:01 -0000 The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=7a65641922f404b84e9a249d48593de84d8e8d17 commit 7a65641922f404b84e9a249d48593de84d8e8d17 Merge: 220c6d922a84 bf0ab54638a5 Author: Baptiste Daroussin AuthorDate: 2021-02-25 18:26:18 +0000 Commit: Baptiste Daroussin CommitDate: 2021-02-25 18:26:56 +0000 ncurses: import version 6.2-20210220 contrib/ncurses/COPYING | 4 +- contrib/ncurses/INSTALL | 116 +- contrib/ncurses/MANIFEST | 11 +- contrib/ncurses/NEWS | 469 +- contrib/ncurses/README.MinGW | 139 +- contrib/ncurses/VERSION | 2 +- contrib/ncurses/aclocal.m4 | 1536 +- contrib/ncurses/announce.html.in | 10 +- contrib/ncurses/configure | 21719 ++++++++++++---------- contrib/ncurses/configure.in | 275 +- contrib/ncurses/convert_configure.pl | 120 - contrib/ncurses/dist.mk | 8 +- contrib/ncurses/doc/html/announce.html | 11 +- contrib/ncurses/form/Makefile.in | 39 +- contrib/ncurses/form/f_trace.c | 12 +- contrib/ncurses/form/fld_arg.c | 8 +- contrib/ncurses/form/fld_attr.c | 16 +- contrib/ncurses/form/fld_current.c | 10 +- contrib/ncurses/form/fld_def.c | 18 +- contrib/ncurses/form/fld_dup.c | 15 +- contrib/ncurses/form/fld_ftchoice.c | 4 +- contrib/ncurses/form/fld_ftlink.c | 4 +- contrib/ncurses/form/fld_info.c | 10 +- contrib/ncurses/form/fld_just.c | 12 +- contrib/ncurses/form/fld_link.c | 8 +- contrib/ncurses/form/fld_max.c | 4 +- contrib/ncurses/form/fld_move.c | 10 +- contrib/ncurses/form/fld_newftyp.c | 8 +- contrib/ncurses/form/fld_opts.c | 12 +- contrib/ncurses/form/fld_pad.c | 8 +- contrib/ncurses/form/fld_page.c | 10 +- contrib/ncurses/form/fld_stat.c | 10 +- contrib/ncurses/form/fld_type.c | 8 +- contrib/ncurses/form/fld_user.c | 10 +- contrib/ncurses/form/form.h | 203 +- contrib/ncurses/form/form.priv.h | 76 +- contrib/ncurses/form/frm_cursor.c | 4 +- contrib/ncurses/form/frm_data.c | 8 +- contrib/ncurses/form/frm_def.c | 82 +- contrib/ncurses/form/frm_driver.c | 78 +- contrib/ncurses/form/frm_hook.c | 6 +- contrib/ncurses/form/frm_opts.c | 18 +- contrib/ncurses/form/frm_page.c | 6 +- contrib/ncurses/form/frm_post.c | 6 +- contrib/ncurses/form/frm_req_name.c | 6 +- contrib/ncurses/form/frm_scale.c | 4 +- contrib/ncurses/form/frm_sub.c | 6 +- contrib/ncurses/form/frm_user.c | 10 +- contrib/ncurses/form/frm_win.c | 6 +- contrib/ncurses/form/fty_alnum.c | 12 +- contrib/ncurses/form/fty_alpha.c | 12 +- contrib/ncurses/form/fty_enum.c | 11 +- contrib/ncurses/form/fty_generic.c | 19 +- contrib/ncurses/form/fty_int.c | 15 +- contrib/ncurses/form/fty_ipv4.c | 8 +- contrib/ncurses/form/fty_num.c | 15 +- contrib/ncurses/form/fty_regex.c | 12 +- contrib/ncurses/include/Caps | 10 +- contrib/ncurses/include/Caps-ncurses | 12 +- contrib/ncurses/include/Caps.aix4 | 10 +- contrib/ncurses/include/Caps.hpux11 | 10 +- contrib/ncurses/include/Caps.keys | 10 +- contrib/ncurses/include/Caps.osf1r5 | 10 +- contrib/ncurses/include/Caps.uwin | 10 +- contrib/ncurses/include/MKkey_defs.sh | 14 +- contrib/ncurses/include/MKterm.h.awk.in | 37 +- contrib/ncurses/include/Makefile.in | 20 +- contrib/ncurses/include/curses.events | 55 + contrib/ncurses/include/curses.h.in | 54 +- contrib/ncurses/include/headers | 4 +- contrib/ncurses/include/nc_alloc.h | 4 +- contrib/ncurses/include/nc_mingw.h | 23 +- contrib/ncurses/include/nc_termios.h | 8 +- contrib/ncurses/include/nc_tparm.h | 14 +- contrib/ncurses/include/nc_win32.h | 183 + contrib/ncurses/include/ncurses_cfg.hin | 4 +- contrib/ncurses/include/ncurses_defs | 6 +- contrib/ncurses/include/ncurses_dll.h.in | 70 +- contrib/ncurses/include/term_entry.h | 6 +- contrib/ncurses/include/win32_curses.h | 75 + contrib/ncurses/man/curs_add_wch.3x | 23 +- contrib/ncurses/man/curs_add_wchstr.3x | 8 +- contrib/ncurses/man/curs_addch.3x | 38 +- contrib/ncurses/man/curs_addchstr.3x | 24 +- contrib/ncurses/man/curs_addstr.3x | 20 +- contrib/ncurses/man/curs_addwstr.3x | 4 +- contrib/ncurses/man/curs_bkgd.3x | 6 +- contrib/ncurses/man/curs_bkgrnd.3x | 6 +- contrib/ncurses/man/curs_border.3x | 38 +- contrib/ncurses/man/curs_clear.3x | 36 +- contrib/ncurses/man/curs_color.3x | 20 +- contrib/ncurses/man/curs_delch.3x | 8 +- contrib/ncurses/man/curs_deleteln.3x | 14 +- contrib/ncurses/man/curs_extend.3x | 4 +- contrib/ncurses/man/curs_get_wch.3x | 4 +- contrib/ncurses/man/curs_get_wstr.3x | 4 +- contrib/ncurses/man/curs_getch.3x | 10 +- contrib/ncurses/man/curs_getstr.3x | 20 +- contrib/ncurses/man/curs_getyx.3x | 10 +- contrib/ncurses/man/curs_in_wch.3x | 6 +- contrib/ncurses/man/curs_in_wchstr.3x | 4 +- contrib/ncurses/man/curs_inch.3x | 10 +- contrib/ncurses/man/curs_inchstr.3x | 20 +- contrib/ncurses/man/curs_initscr.3x | 6 +- contrib/ncurses/man/curs_inopts.3x | 79 +- contrib/ncurses/man/curs_ins_wch.3x | 10 +- contrib/ncurses/man/curs_ins_wstr.3x | 4 +- contrib/ncurses/man/curs_insch.3x | 12 +- contrib/ncurses/man/curs_insstr.3x | 20 +- contrib/ncurses/man/curs_instr.3x | 20 +- contrib/ncurses/man/curs_inwstr.3x | 4 +- contrib/ncurses/man/curs_kernel.3x | 10 +- contrib/ncurses/man/curs_legacy.3x | 28 +- contrib/ncurses/man/curs_memleaks.3x | 23 +- contrib/ncurses/man/curs_mouse.3x | 17 +- contrib/ncurses/man/curs_move.3x | 6 +- contrib/ncurses/man/curs_opaque.3x | 32 +- contrib/ncurses/man/curs_outopts.3x | 101 +- contrib/ncurses/man/curs_print.3x | 6 +- contrib/ncurses/man/curs_printw.3x | 52 +- contrib/ncurses/man/curs_refresh.3x | 12 +- contrib/ncurses/man/curs_scanw.3x | 54 +- contrib/ncurses/man/curs_scr_dump.3x | 10 +- contrib/ncurses/man/curs_scroll.3x | 10 +- contrib/ncurses/man/curs_slk.3x | 4 +- contrib/ncurses/man/curs_sp_funcs.3x | 289 +- contrib/ncurses/man/curs_termcap.3x | 83 +- contrib/ncurses/man/curs_terminfo.3x | 60 +- contrib/ncurses/man/curs_threads.3x | 14 +- contrib/ncurses/man/curs_touch.3x | 22 +- contrib/ncurses/man/curs_util.3x | 37 +- contrib/ncurses/man/curs_variables.3x | 4 +- contrib/ncurses/man/default_colors.3x | 8 +- contrib/ncurses/man/define_key.3x | 4 +- contrib/ncurses/man/form.3x | 12 +- contrib/ncurses/man/form_cursor.3x | 6 +- contrib/ncurses/man/form_data.3x | 8 +- contrib/ncurses/man/form_driver.3x | 6 +- contrib/ncurses/man/form_field.3x | 14 +- contrib/ncurses/man/form_field_attributes.3x | 20 +- contrib/ncurses/man/form_field_buffer.3x | 18 +- contrib/ncurses/man/form_field_info.3x | 18 +- contrib/ncurses/man/form_field_just.3x | 8 +- contrib/ncurses/man/form_field_new.3x | 20 +- contrib/ncurses/man/form_field_opts.3x | 14 +- contrib/ncurses/man/form_field_userptr.3x | 11 +- contrib/ncurses/man/form_field_validation.3x | 104 +- contrib/ncurses/man/form_fieldtype.3x | 119 +- contrib/ncurses/man/form_hook.3x | 26 +- contrib/ncurses/man/form_new.3x | 10 +- contrib/ncurses/man/form_new_page.3x | 8 +- contrib/ncurses/man/form_opts.3x | 14 +- contrib/ncurses/man/form_page.3x | 22 +- contrib/ncurses/man/form_post.3x | 8 +- contrib/ncurses/man/form_requestname.3x | 17 +- contrib/ncurses/man/form_userptr.3x | 10 +- contrib/ncurses/man/form_variables.3x | 5 +- contrib/ncurses/man/form_win.3x | 18 +- contrib/ncurses/man/infocmp.1m | 6 +- contrib/ncurses/man/infotocap.1m | 6 +- contrib/ncurses/man/key_defined.3x | 4 +- contrib/ncurses/man/keybound.3x | 4 +- contrib/ncurses/man/keyok.3x | 4 +- contrib/ncurses/man/legacy_coding.3x | 4 +- contrib/ncurses/man/manhtml.aliases | 11 +- contrib/ncurses/man/manhtml.externs | 4 +- contrib/ncurses/man/manlinks.sed | 8 +- contrib/ncurses/man/menu_attributes.3x | 26 +- contrib/ncurses/man/menu_cursor.3x | 6 +- contrib/ncurses/man/menu_driver.3x | 10 +- contrib/ncurses/man/menu_format.3x | 8 +- contrib/ncurses/man/menu_hook.3x | 26 +- contrib/ncurses/man/menu_items.3x | 12 +- contrib/ncurses/man/menu_mark.3x | 10 +- contrib/ncurses/man/menu_new.3x | 10 +- contrib/ncurses/man/menu_opts.3x | 14 +- contrib/ncurses/man/menu_pattern.3x | 10 +- contrib/ncurses/man/menu_post.3x | 8 +- contrib/ncurses/man/menu_requestname.3x | 12 +- contrib/ncurses/man/menu_spacing.3x | 20 +- contrib/ncurses/man/menu_userptr.3x | 10 +- contrib/ncurses/man/menu_win.3x | 18 +- contrib/ncurses/man/mitem_current.3x | 20 +- contrib/ncurses/man/mitem_name.3x | 10 +- contrib/ncurses/man/mitem_new.3x | 10 +- contrib/ncurses/man/mitem_opts.3x | 14 +- contrib/ncurses/man/mitem_userptr.3x | 10 +- contrib/ncurses/man/mitem_value.3x | 8 +- contrib/ncurses/man/mitem_visible.3x | 6 +- contrib/ncurses/man/ncurses.3x | 185 +- contrib/ncurses/man/new_pair.3x | 8 +- contrib/ncurses/man/resizeterm.3x | 8 +- contrib/ncurses/man/tabs.1 | 4 +- contrib/ncurses/man/term.5 | 124 +- contrib/ncurses/man/terminfo.tail | 6 +- contrib/ncurses/man/tic.1m | 4 +- contrib/ncurses/man/toe.1m | 6 +- contrib/ncurses/man/tput.1 | 8 +- contrib/ncurses/man/user_caps.5 | 19 +- contrib/ncurses/man/wresize.3x | 4 +- contrib/ncurses/menu/Makefile.in | 31 +- contrib/ncurses/menu/m_attribs.c | 6 +- contrib/ncurses/menu/m_cursor.c | 16 +- contrib/ncurses/menu/m_driver.c | 10 +- contrib/ncurses/menu/m_format.c | 10 +- contrib/ncurses/menu/m_global.c | 62 +- contrib/ncurses/menu/m_hook.c | 6 +- contrib/ncurses/menu/m_item_cur.c | 16 +- contrib/ncurses/menu/m_item_nam.c | 10 +- contrib/ncurses/menu/m_item_new.c | 24 +- contrib/ncurses/menu/m_item_opt.c | 18 +- contrib/ncurses/menu/m_item_top.c | 12 +- contrib/ncurses/menu/m_item_use.c | 10 +- contrib/ncurses/menu/m_item_val.c | 10 +- contrib/ncurses/menu/m_item_vis.c | 6 +- contrib/ncurses/menu/m_items.c | 16 +- contrib/ncurses/menu/m_new.c | 19 +- contrib/ncurses/menu/m_opts.c | 20 +- contrib/ncurses/menu/m_pad.c | 12 +- contrib/ncurses/menu/m_pattern.c | 10 +- contrib/ncurses/menu/m_post.c | 22 +- contrib/ncurses/menu/m_req_name.c | 6 +- contrib/ncurses/menu/m_scale.c | 6 +- contrib/ncurses/menu/m_spacing.c | 10 +- contrib/ncurses/menu/m_sub.c | 10 +- contrib/ncurses/menu/m_trace.c | 20 +- contrib/ncurses/menu/m_userptr.c | 10 +- contrib/ncurses/menu/m_win.c | 10 +- contrib/ncurses/menu/menu.h | 330 +- contrib/ncurses/menu/menu.priv.h | 40 +- contrib/ncurses/misc/Makefile.in | 8 +- contrib/ncurses/misc/gen-pkgconfig.in | 58 +- contrib/ncurses/misc/ncurses-config.in | 45 +- contrib/ncurses/misc/terminfo.src | 2071 ++- contrib/ncurses/mk-1st.awk | 36 +- contrib/ncurses/mk-2nd.awk | 11 +- contrib/ncurses/mk-hdr.awk | 11 +- contrib/ncurses/ncurses/Makefile.in | 46 +- contrib/ncurses/ncurses/base/MKlib_gen.sh | 17 +- contrib/ncurses/ncurses/base/lib_addch.c | 18 +- contrib/ncurses/ncurses/base/lib_addstr.c | 10 +- contrib/ncurses/ncurses/base/lib_bkgd.c | 74 +- contrib/ncurses/ncurses/base/lib_color.c | 45 +- contrib/ncurses/ncurses/base/lib_driver.c | 4 +- contrib/ncurses/ncurses/base/lib_getch.c | 74 +- contrib/ncurses/ncurses/base/lib_getstr.c | 3 +- contrib/ncurses/ncurses/base/lib_initscr.c | 9 +- contrib/ncurses/ncurses/base/lib_mouse.c | 62 +- contrib/ncurses/ncurses/base/lib_newterm.c | 13 +- contrib/ncurses/ncurses/base/lib_screen.c | 8 +- contrib/ncurses/ncurses/base/lib_set_term.c | 29 +- contrib/ncurses/ncurses/base/new_pair.c | 27 +- contrib/ncurses/ncurses/base/wresize.c | 12 +- contrib/ncurses/ncurses/curses.priv.h | 79 +- contrib/ncurses/ncurses/llib-lncurses | 283 +- contrib/ncurses/ncurses/llib-lncursest | 283 +- contrib/ncurses/ncurses/llib-lncursestw | 419 +- contrib/ncurses/ncurses/llib-lncursesw | 419 +- contrib/ncurses/ncurses/llib-ltinfo | 17 + contrib/ncurses/ncurses/llib-ltinfot | 17 + contrib/ncurses/ncurses/llib-ltinfotw | 17 + contrib/ncurses/ncurses/llib-ltinfow | 17 + contrib/ncurses/ncurses/modules | 8 +- contrib/ncurses/ncurses/new_pair.h | 5 +- contrib/ncurses/ncurses/report_hashing.c | 73 + contrib/ncurses/ncurses/tinfo/MKcaptab.sh | 0 contrib/ncurses/ncurses/tinfo/MKfallback.sh | 16 +- contrib/ncurses/ncurses/tinfo/access.c | 12 +- contrib/ncurses/ncurses/tinfo/captoinfo.c | 13 +- contrib/ncurses/ncurses/tinfo/comp_parse.c | 4 +- contrib/ncurses/ncurses/tinfo/doalloc.c | 4 +- contrib/ncurses/ncurses/tinfo/lib_baudrate.c | 22 +- contrib/ncurses/ncurses/tinfo/lib_cur_term.c | 7 +- contrib/ncurses/ncurses/tinfo/lib_data.c | 7 +- contrib/ncurses/ncurses/tinfo/lib_kernel.c | 12 +- contrib/ncurses/ncurses/tinfo/lib_napms.c | 4 +- contrib/ncurses/ncurses/tinfo/lib_options.c | 6 +- contrib/ncurses/ncurses/tinfo/lib_print.c | 6 +- contrib/ncurses/ncurses/tinfo/lib_raw.c | 11 +- contrib/ncurses/ncurses/tinfo/lib_setup.c | 29 +- contrib/ncurses/ncurses/tinfo/lib_tgoto.c | 4 +- contrib/ncurses/ncurses/tinfo/lib_tparm.c | 459 +- contrib/ncurses/ncurses/tinfo/lib_tputs.c | 16 +- contrib/ncurses/ncurses/tinfo/lib_ttyflags.c | 6 +- contrib/ncurses/ncurses/tinfo/lib_win32con.c | 1256 ++ contrib/ncurses/ncurses/tinfo/lib_win32util.c | 134 + contrib/ncurses/ncurses/tinfo/parse_entry.c | 10 +- contrib/ncurses/ncurses/tinfo/read_entry.c | 16 +- contrib/ncurses/ncurses/tinfo/tinfo_driver.c | 137 +- contrib/ncurses/ncurses/tinfo/trim_sgr0.c | 4 +- contrib/ncurses/ncurses/tinfo/write_entry.c | 4 +- contrib/ncurses/ncurses/trace/lib_trace.c | 6 +- contrib/ncurses/ncurses/trace/lib_tracebits.c | 42 +- contrib/ncurses/ncurses/tty/hashmap.c | 4 +- contrib/ncurses/ncurses/tty/lib_mvcur.c | 105 +- contrib/ncurses/ncurses/tty/lib_twait.c | 4 +- contrib/ncurses/ncurses/tty/lib_vidattr.c | 22 +- contrib/ncurses/ncurses/tty/tty_update.c | 62 +- contrib/ncurses/ncurses/wcwidth.h | 8 +- contrib/ncurses/ncurses/widechar/lib_cchar.c | 16 +- contrib/ncurses/ncurses/widechar/lib_ins_wch.c | 6 +- contrib/ncurses/ncurses/widechar/lib_vid_attr.c | 23 +- contrib/ncurses/ncurses/widechar/widechars.c | 6 +- contrib/ncurses/ncurses/win32con/gettimeofday.c | 4 +- contrib/ncurses/ncurses/win32con/wcwidth.c | 10 +- contrib/ncurses/ncurses/win32con/win32_driver.c | 1221 ++ contrib/ncurses/ncurses/win32con/win_driver.c | 22 +- contrib/ncurses/panel/Makefile.in | 28 +- contrib/ncurses/panel/llib-lpanel | 3 +- contrib/ncurses/panel/llib-lpanelt | 3 +- contrib/ncurses/panel/llib-lpaneltw | 3 +- contrib/ncurses/panel/llib-lpanelw | 3 +- contrib/ncurses/panel/p_above.c | 6 +- contrib/ncurses/panel/p_below.c | 6 +- contrib/ncurses/panel/p_bottom.c | 6 +- contrib/ncurses/panel/p_delete.c | 17 +- contrib/ncurses/panel/p_hidden.c | 4 +- contrib/ncurses/panel/p_hide.c | 6 +- contrib/ncurses/panel/p_move.c | 4 +- contrib/ncurses/panel/p_new.c | 54 +- contrib/ncurses/panel/p_replace.c | 4 +- contrib/ncurses/panel/p_show.c | 6 +- contrib/ncurses/panel/p_top.c | 4 +- contrib/ncurses/panel/p_update.c | 6 +- contrib/ncurses/panel/p_user.c | 6 +- contrib/ncurses/panel/p_win.c | 4 +- contrib/ncurses/panel/panel.c | 34 +- contrib/ncurses/panel/panel.h | 49 +- contrib/ncurses/panel/panel.priv.h | 22 +- contrib/ncurses/progs/Makefile.in | 24 +- contrib/ncurses/progs/dump_entry.c | 22 +- contrib/ncurses/progs/dump_entry.h | 4 +- contrib/ncurses/progs/infocmp.c | 9 +- contrib/ncurses/progs/progs.priv.h | 20 +- contrib/ncurses/progs/reset_cmd.c | 43 +- contrib/ncurses/progs/tabs.c | 4 +- contrib/ncurses/progs/tic.c | 124 +- contrib/ncurses/progs/tparm_type.c | 30 +- contrib/ncurses/progs/tparm_type.h | 6 +- contrib/ncurses/progs/tput.c | 20 +- contrib/ncurses/progs/tset.c | 15 +- contrib/ncurses/test/back_ground.c | 300 + contrib/ncurses/test/dup_field.c | 394 + contrib/ncurses/test/move_field.c | 524 + contrib/ncurses/test/test_tparm.c | 388 + 345 files changed, 24747 insertions(+), 14861 deletions(-) diff --cc contrib/ncurses/include/curses.events index 000000000000,25a2583fc9b5..25a2583fc9b5 mode 000000,100644..100644 --- a/contrib/ncurses/include/curses.events +++ b/contrib/ncurses/include/curses.events diff --cc contrib/ncurses/include/nc_win32.h index 000000000000,790e8dfe9388..790e8dfe9388 mode 000000,100644..100644 --- a/contrib/ncurses/include/nc_win32.h +++ b/contrib/ncurses/include/nc_win32.h diff --cc contrib/ncurses/include/win32_curses.h index 000000000000,5babf47d214a..5babf47d214a mode 000000,100644..100644 --- a/contrib/ncurses/include/win32_curses.h +++ b/contrib/ncurses/include/win32_curses.h diff --cc contrib/ncurses/ncurses/curses.priv.h index 2846791fbdd6,000000000000..4243373f9a7a mode 100644,000000..100644 --- a/contrib/ncurses/ncurses/curses.priv.h +++ b/contrib/ncurses/ncurses/curses.priv.h @@@ -1,2746 -1,0 +1,2793 @@@ +/**************************************************************************** + * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 1998-2017,2018 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Zeyd M. Ben-Halim 1992,1995 * + * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-on * + * and: Juergen Pfeifer * + ****************************************************************************/ + +/* - * $Id: curses.priv.h,v 1.628 2020/02/02 23:34:34 tom Exp $ ++ * $Id: curses.priv.h,v 1.639 2020/11/14 23:37:54 tom Exp $ + * + * curses.priv.h + * + * Header file for curses library objects which are private to + * the library. + * + */ + +#ifndef CURSES_PRIV_H +#define CURSES_PRIV_H 1 +/* *INDENT-OFF* */ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#if USE_RCS_IDS +#define MODULE_ID(id) static const char Ident[] = id; +#else +#define MODULE_ID(id) /*nothing*/ +#endif + +#include /* for offsetof */ +#include +#include +#include +#include + +#if HAVE_UNISTD_H +#include +#endif + - #if HAVE_SYS_BSDTYPES_H && !(defined(_WIN32) || defined(_WIN64)) - #include /* needed for ISC */ - #endif - +#if HAVE_LIMITS_H +# include +#elif HAVE_SYS_PARAM_H +# include +#endif + +#include +#include + +#include + +#if defined __hpux +# ifndef EILSEQ +# define EILSEQ 47 +# endif +#endif + +#ifndef PATH_MAX +# if defined(_POSIX_PATH_MAX) +# define PATH_MAX _POSIX_PATH_MAX +# elif defined(MAXPATHLEN) +# define PATH_MAX MAXPATHLEN +# else +# define PATH_MAX 255 /* the Posix minimum path-size */ +# endif +#endif + +#if DECL_ERRNO +extern int errno; +#endif + ++/* Some Windows related defines */ ++#undef _NC_WINDOWS ++#if (defined(_WIN32) || defined(_WIN64)) ++#define _NC_WINDOWS ++#else ++#undef EXP_WIN32_DRIVER ++#endif ++ ++#undef _NC_MINGW ++#if (defined(__MINGW32__) || defined(__MINGW64__)) ++#define _NC_MINGW ++#endif ++ ++#undef _NC_MSC ++#ifdef _MSC_VER ++#define _NC_MSC ++#endif ++ +/* Some systems have a broken 'select()', but workable 'poll()'. Use that */ +#if HAVE_WORKING_POLL +#define USE_FUNC_POLL 1 +#if HAVE_POLL_H +#include +#else +#include +#endif +#else +#define USE_FUNC_POLL 0 +#endif + +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif + +/* include signal.h before curses.h to work-around defect in glibc 2.1.3 */ +#include + +/* Alessandro Rubini's GPM (general-purpose mouse) */ +#if HAVE_LIBGPM && HAVE_GPM_H +#define USE_GPM_SUPPORT 1 +#else +#define USE_GPM_SUPPORT 0 +#endif + +/* QNX mouse support */ +#if defined(__QNX__) && !defined(__QNXNTO__) +#define USE_QNX_MOUSE 1 +#else +#define USE_QNX_MOUSE 0 +#endif + +/* EMX mouse support */ +#ifdef __EMX__ +#define USE_EMX_MOUSE 1 +#else +#define USE_EMX_MOUSE 0 +#endif + +/* kLIBC keyboard/mouse support */ +#if defined(__OS2__) && defined(__KLIBC__) +#define USE_KLIBC_KBD 1 +#define USE_KLIBC_MOUSE 1 +#else +#define USE_KLIBC_KBD 0 +#define USE_KLIBC_MOUSE 0 +#endif + +#define DEFAULT_MAXCLICK 166 +#define EV_MAX 8 /* size of mouse circular event queue */ + +/* + * If we don't have signals to support it, don't add a sigwinch handler. + * In any case, resizing is an extended feature. Use it if we've got it. + */ +#if !NCURSES_EXT_FUNCS +#undef HAVE_SIZECHANGE +#define HAVE_SIZECHANGE 0 +#endif + +#if HAVE_SIZECHANGE && USE_SIGWINCH && defined(SIGWINCH) +#define USE_SIZECHANGE 1 +#else +#define USE_SIZECHANGE 0 +#undef USE_SIGWINCH +#define USE_SIGWINCH 0 +#endif + +/* + * When building in the MSYS2 environment, the automatic discovery of + * the path separator in configure doesn't work properly. So, if building + * for MinGW, we enforce the correct Windows PATH separator + */ - #ifdef _WIN32 ++#if defined(_NC_WINDOWS) +# ifdef NCURSES_PATHSEP +# undef NCURSES_PATHSEP +# endif +# define NCURSES_PATHSEP ';' +#endif + +/* + * If desired, one can configure this, disabling environment variables that + * point to custom terminfo/termcap locations. + */ +#ifdef USE_ROOT_ENVIRON +#define use_terminfo_vars() 1 +#else +#define use_terminfo_vars() _nc_env_access() +extern NCURSES_EXPORT(int) _nc_env_access (void); +#endif + +/* + * Not all platforms have memmove; some have an equivalent bcopy. (Some may + * have neither). + */ +#if USE_OK_BCOPY +#define memmove(d,s,n) bcopy(s,d,n) +#elif USE_MY_MEMMOVE +#define memmove(d,s,n) _nc_memmove(d,s,n) +extern NCURSES_EXPORT(void *) _nc_memmove (void *, const void *, size_t); +#endif + +/* + * If we have va_copy(), use it for assigning va_list's. + */ +#if defined(HAVE___VA_COPY) +#define begin_va_copy(dst,src) __va_copy(dst, src) +#define end_va_copy(dst) va_end(dst) +#elif defined(va_copy) || defined(HAVE_VA_COPY) +#define begin_va_copy(dst,src) va_copy(dst, src) +#define end_va_copy(dst) va_end(dst) +#else +#define begin_va_copy(dst,src) (dst) = (src) +#define end_va_copy(dst) /* nothing */ +#endif + +/* + * Either/both S_ISxxx and/or S_IFxxx are defined in sys/types.h; some systems + * lack one or the other. + */ +#ifndef S_ISDIR +#define S_ISDIR(mode) ((mode & S_IFMT) == S_IFDIR) +#endif + +#ifndef S_ISREG +#define S_ISREG(mode) ((mode & S_IFMT) == S_IFREG) +#endif + +/* + * POSIX ignores the "b", which c89 specified. Some very old systems do not + * accept it. + */ +#if USE_FOPEN_BIN_R +#define BIN_R "rb" +#define BIN_W "wb" +#else +#define BIN_R "r" +#define BIN_W "w" +#endif + +/* + * Scroll hints are useless when hashmap is used + */ +#if !USE_SCROLL_HINTS +#if !USE_HASHMAP +#define USE_SCROLL_HINTS 1 +#else +#define USE_SCROLL_HINTS 0 +#endif +#endif + +#if USE_SCROLL_HINTS +#define if_USE_SCROLL_HINTS(stmt) stmt +#else +#define if_USE_SCROLL_HINTS(stmt) /*nothing*/ +#endif + +#include + +/* + * Options for terminal drivers, etc... + */ +#ifdef USE_TERM_DRIVER ++#define NO_TERMINAL "unknown" +#define USE_SP_RIPOFF 1 +#define USE_SP_TERMTYPE 1 +#define USE_SP_WINDOWLIST 1 ++#else ++#define NO_TERMINAL 0 +#endif + ++#define VALID_TERM_ENV(term_env, no_terminal) \ ++ (term_env = (NonEmpty(term_env) \ ++ ? term_env \ ++ : no_terminal), \ ++ NonEmpty(term_env)) ++ +/* + * Note: ht/cbt expansion flakes out randomly under Linux 1.1.47, but only + * when we're throwing control codes at the screen at high volume. To see + * this, re-enable USE_HARD_TABS and run worm for a while. Other systems + * probably don't want to define this either due to uncertainties about tab + * delays and expansion in raw mode. + */ + +#define TRIES struct tries +typedef TRIES { + TRIES *child; /* ptr to child. NULL if none */ + TRIES *sibling; /* ptr to sibling. NULL if none */ + unsigned char ch; /* character at this node */ + unsigned short value; /* code of string so far. 0 if none. */ +#undef TRIES +} TRIES; + +/* + * Common/troublesome character definitions + */ +#define StringOf(ch) {ch, 0} + +#define L_BRACE '{' +#define R_BRACE '}' +#define S_QUOTE '\'' +#define D_QUOTE '"' + +#define VT_ACSC "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~" + +/* + * Structure for palette tables + */ + +#define MAXCOLUMNS 135 +#define MAXLINES 66 +#define FIFO_SIZE MAXCOLUMNS+2 /* for nocbreak mode input */ + +#define ACS_LEN 128 + +#define WINDOWLIST struct _win_list + +#if USE_WIDEC_SUPPORT +#define _nc_bkgd _bkgrnd +#else +#undef _XOPEN_SOURCE_EXTENDED +#undef _XPG5 +#define _nc_bkgd _bkgd +#define wgetbkgrnd(win, wch) ((*wch = win->_bkgd) != 0 ? OK : ERR) +#define wbkgrnd wbkgd +#endif + +#undef NCURSES_OPAQUE +#define NCURSES_INTERNALS 1 +#define NCURSES_OPAQUE 0 + +#include /* we'll use -Ipath directive to get the right one! */ + ++#if !(defined(NCURSES_WGETCH_EVENTS) && defined(NEED_KEY_EVENT)) ++#undef KEY_EVENT /* reduce compiler-warnings with Visual C++ */ ++#endif ++ +typedef struct +{ + int red, green, blue; /* what color_content() returns */ + int r, g, b; /* params to init_color() */ + int init; /* true if we called init_color() */ +} +color_t; + +typedef union { + struct { + unsigned char red; + unsigned char green; + unsigned char blue; + } bits; /* bits per color-value in RGB */ + unsigned value; +} rgb_bits_t; + +/* + * If curses.h did not expose the SCREEN-functions, then we do not need the + * parameter in the corresponding unextended functions. + */ + +#define USE_SP_FUNC_SUPPORT NCURSES_SP_FUNCS +#define USE_EXT_SP_FUNC_SUPPORT (NCURSES_SP_FUNCS && NCURSES_EXT_FUNCS) + +#if NCURSES_SP_FUNCS +#define SP_PARM sp /* use parameter */ +#define NCURSES_SP_ARG SP_PARM +#define NCURSES_SP_DCL SCREEN *NCURSES_SP_ARG +#define NCURSES_SP_DCL0 NCURSES_SP_DCL +#define NCURSES_SP_ARGx NCURSES_SP_ARG, +#define NCURSES_SP_DCLx SCREEN *NCURSES_SP_ARGx +#else +#define SP_PARM SP /* use global variable */ +#define NCURSES_SP_ARG +#define NCURSES_SP_DCL +#define NCURSES_SP_DCL0 void +#define NCURSES_SP_ARGx +#define NCURSES_SP_DCLx +#endif + +#include + +#include +#include + +#define IsPreScreen(sp) (((sp) != 0) && sp->_prescreen) +#define HasTerminal(sp) (((sp) != 0) && (0 != ((sp)->_term))) +#define IsValidScreen(sp) (HasTerminal(sp) && !IsPreScreen(sp)) + +#if USE_REENTRANT +#define CurTerm _nc_prescreen._cur_term +#else +#define CurTerm cur_term +#endif + +#if NCURSES_SP_FUNCS +#define TerminalOf(sp) ((sp) ? ((sp)->_term ? (sp)->_term : CurTerm) : CurTerm) +#else +#define TerminalOf(sp) CurTerm +#endif + +/* + * The legacy layout for TERMTYPE uses "short" for all of the numbers. Moving + * past that, numeric capabilities can be "int" by using a TERMTYPE2 structure + * in TERMINAL, and doing most of the internal work using TERMTYPE2. There are + * a few places (mostly to expose the legacy layout) where the distinction + * needs attention. + */ +#if NCURSES_EXT_COLORS && HAVE_INIT_EXTENDED_COLOR +#define NCURSES_EXT_NUMBERS 1 +#define NCURSES_INT2 int +#define SIZEOF_INT2 4 +#define TerminalType(tp) (tp)->type2 +#else +#define NCURSES_EXT_NUMBERS 0 +#define NCURSES_INT2 short +#define SIZEOF_INT2 2 +#define TerminalType(tp) (tp)->type +#endif + +#define SIZEOF_SHORT 2 + +#ifdef CUR +#undef CUR +#define CUR TerminalType(cur_term). +#endif + +/* + * Reduce dependency on cur_term global by using terminfo data from SCREEN's + * pointer to this data. + */ +#ifdef USE_SP_TERMTYPE +#undef CUR +#endif + +#define SP_TERMTYPE TerminalType(TerminalOf(sp)). + +#include + +#include + +/* + * Simplify ifdef's for the "*_ATTR" macros in case italics are not configured. + */ +#if defined(A_ITALIC) && defined(exit_italics_mode) +#define USE_ITALIC 1 +#else +#define USE_ITALIC 0 +#undef A_ITALIC +#define A_ITALIC 0 +#endif + +/* + * Use these macros internally, to make tracing less verbose. But leave the + * option for compiling the tracing into the library. + */ +#if 1 +#define ColorPair(n) (NCURSES_BITS(n, 0) & A_COLOR) +#define PairNumber(a) (NCURSES_CAST(int,(((unsigned long)(a) & A_COLOR) >> NCURSES_ATTR_SHIFT))) +#else +#define ColorPair(pair) COLOR_PAIR(pair) +#define PairNumber(attr) PAIR_NUMBER(attr) +#endif + +#define unColor(n) unColor2(AttrOf(n)) +#define unColor2(a) ((a) & ALL_BUT_COLOR) + +/* + * Extended-colors stores the color pair in a separate struct-member than the + * attributes. But for compatibility, we handle most cases where a program + * written for non-extended colors stores the color in the attributes by + * checking for a color pair in both places. + */ +#if NCURSES_EXT_COLORS +#define if_EXT_COLORS(stmt) stmt +#define SetPair(value,p) SetPair2((value).ext_color, AttrOf(value), p) +#define SetPair2(c,a,p) c = (p), \ + a = (unColor2(a) | ColorPair(oldColor(c))) +#define GetPair(value) GetPair2((value).ext_color, AttrOf(value)) +#define GetPair2(c,a) ((c) ? (c) : PairNumber(a)) +#define oldColor(p) (((p) > 255) ? 255 : (p)) +#define GET_WINDOW_PAIR(w) GetPair2((w)->_color, (w)->_attrs) +#define SET_WINDOW_PAIR(w,p) (w)->_color = (p) +#define SameAttrOf(a,b) (AttrOf(a) == AttrOf(b) && GetPair(a) == GetPair(b)) + +#define VIDPUTS(sp,attr,pair) do { \ + int vid_pair = pair; \ + NCURSES_SP_NAME(vid_puts)( \ + NCURSES_SP_ARGx attr, \ + (NCURSES_PAIRS_T) pair, \ + &vid_pair, \ + NCURSES_OUTC_FUNC); \ + } while (0) + +#else /* !NCURSES_EXT_COLORS */ + +#define if_EXT_COLORS(stmt) /* nothing */ +#define SetPair(value,p) RemAttr(value, A_COLOR), \ + SetAttr(value, AttrOf(value) | ColorPair(p)) +#define GetPair(value) PairNumber(AttrOf(value)) +#define GET_WINDOW_PAIR(w) PairNumber(WINDOW_ATTRS(w)) +#define SET_WINDOW_PAIR(w,p) WINDOW_ATTRS(w) &= ALL_BUT_COLOR, \ + WINDOW_ATTRS(w) |= ColorPair(p) +#define SameAttrOf(a,b) (AttrOf(a) == AttrOf(b)) + +#define VIDPUTS(sp,attr,pair) NCURSES_SP_NAME(vidputs)(NCURSES_SP_ARGx attr, NCURSES_OUTC_FUNC) + +#endif /* NCURSES_EXT_COLORS */ + +#define NCURSES_OUTC_FUNC NCURSES_SP_NAME(_nc_outch) +#define NCURSES_PUTP2(name,value) NCURSES_SP_NAME(_nc_putp)(NCURSES_SP_ARGx name, value) +#define NCURSES_PUTP2_FLUSH(name,value) NCURSES_SP_NAME(_nc_putp_flush)(NCURSES_SP_ARGx name, value) + +#if NCURSES_NO_PADDING +#define GetNoPadding(sp) ((sp) ? (sp)->_no_padding : _nc_prescreen._no_padding) +#define SetNoPadding(sp) _nc_set_no_padding(sp) +extern NCURSES_EXPORT(void) _nc_set_no_padding(SCREEN *); +#else +#define GetNoPadding(sp) FALSE +#define SetNoPadding(sp) /*nothing*/ +#endif + +#define WINDOW_ATTRS(w) ((w)->_attrs) + +#define SCREEN_ATTRS(s) (*((s)->_current_attr)) +#define GET_SCREEN_PAIR(s) GetPair(SCREEN_ATTRS(s)) +#define SET_SCREEN_PAIR(s,p) SetPair(SCREEN_ATTRS(s), p) + +#if USE_REENTRANT || NCURSES_SP_FUNCS +NCURSES_EXPORT(int *) _nc_ptr_Lines (SCREEN *); +NCURSES_EXPORT(int *) _nc_ptr_Cols (SCREEN *); +NCURSES_EXPORT(int *) _nc_ptr_Tabsize (SCREEN *); +NCURSES_EXPORT(int *) _nc_ptr_Escdelay (SCREEN *); +#endif + +#if USE_REENTRANT + +#define ptrLines(sp) (sp ? &(sp->_LINES) : &(_nc_prescreen._LINES)) +#define ptrCols(sp) (sp ? &(sp->_COLS) : &(_nc_prescreen._COLS)) +#define ptrTabsize(sp) (sp ? &(sp->_TABSIZE) : &(_nc_prescreen._TABSIZE)) +#define ptrEscdelay(sp) (sp ? &(sp->_ESCDELAY) : &(_nc_prescreen._ESCDELAY)) + +#define SET_LINES(value) *_nc_ptr_Lines(SP_PARM) = value +#define SET_COLS(value) *_nc_ptr_Cols(SP_PARM) = value +#define SET_TABSIZE(value) *_nc_ptr_Tabsize(SP_PARM) = value +#define SET_ESCDELAY(value) *_nc_ptr_Escdelay(SP_PARM) = value + +#else + +#define ptrLines(sp) &LINES +#define ptrCols(sp) &COLS +#define ptrTabsize(sp) &TABSIZE +#define ptrEscdelay(sp) &ESCDELAY + +#define SET_LINES(value) LINES = value +#define SET_COLS(value) COLS = value +#define SET_TABSIZE(value) TABSIZE = value +#define SET_ESCDELAY(value) ESCDELAY = value + +#endif + +#define HasHardTabs() (NonEmpty(clear_all_tabs) && NonEmpty(set_tab)) + +#define TR_MUTEX(data) _tracef("%s@%d: me:%08lX COUNT:%2u/%2d/%6d/%2d/%s%9u: " #data, \ + __FILE__, __LINE__, \ + (unsigned long) (pthread_self()), \ + data.__data.__lock, \ + data.__data.__count, \ + data.__data.__owner, \ + data.__data.__kind, \ + (data.__data.__nusers > 5) ? " OOPS " : "", \ + data.__data.__nusers) +#define TR_GLOBAL_MUTEX(name) TR_MUTEX(_nc_globals.mutex_##name) *** 2248 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Thu Feb 25 18:30:02 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C781356BF87; Thu, 25 Feb 2021 18:30: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmhCt5K3tz58rL; Thu, 25 Feb 2021 18:30: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 A7CAB1C680; Thu, 25 Feb 2021 18:30: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 11PIU2HO083355; Thu, 25 Feb 2021 18:30:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PIU2KU083352; Thu, 25 Feb 2021 18:30:02 GMT (envelope-from git) Date: Thu, 25 Feb 2021 18:30:02 GMT Message-Id: <202102251830.11PIU2KU083352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 705d726338c3 - main - ncurses: ensure we prefer the generated ncurses_dll.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 705d726338c39a225a433d9277f16ba61b613d16 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 18:30:02 -0000 The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=705d726338c39a225a433d9277f16ba61b613d16 commit 705d726338c39a225a433d9277f16ba61b613d16 Author: Baptiste Daroussin AuthorDate: 2021-02-25 18:27:29 +0000 Commit: Baptiste Daroussin CommitDate: 2021-02-25 18:27:29 +0000 ncurses: ensure we prefer the generated ncurses_dll.h --- lib/ncurses/config.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ncurses/config.mk b/lib/ncurses/config.mk index 7a64a7b948ee..fc77567b2594 100644 --- a/lib/ncurses/config.mk +++ b/lib/ncurses/config.mk @@ -18,6 +18,7 @@ CFLAGS+= -I${.CURDIR:H}/ncurses CFLAGS+= -I${NCURSES_DIR}/include CFLAGS+= -I${NCURSES_DIR}/ncurses +CFLAGS+= -I${.OBJDIR:H}/ncurses/ CFLAGS+= -Wall From owner-dev-commits-src-main@freebsd.org Thu Feb 25 18:30:05 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EA90A56BE79; Thu, 25 Feb 2021 18:30: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmhCw01whz58rT; Thu, 25 Feb 2021 18:30: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 D0B6F1C42C; Thu, 25 Feb 2021 18:30: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 11PIU3BC083564; Thu, 25 Feb 2021 18:30:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PIU3tq083561; Thu, 25 Feb 2021 18:30:03 GMT (envelope-from git) Date: Thu, 25 Feb 2021 18:30:03 GMT Message-Id: <202102251830.11PIU3tq083561@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 304bc766050d - main - ncurses: update configuration header after update MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 304bc766050d1ad0ca1e5e95835babab17494cbd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 18:30:05 -0000 The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=304bc766050d1ad0ca1e5e95835babab17494cbd commit 304bc766050d1ad0ca1e5e95835babab17494cbd Author: Baptiste Daroussin AuthorDate: 2021-02-25 18:28:31 +0000 Commit: Baptiste Daroussin CommitDate: 2021-02-25 18:28:31 +0000 ncurses: update configuration header after update --- lib/ncurses/ncurses/ncurses_cfg.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/ncurses/ncurses/ncurses_cfg.h b/lib/ncurses/ncurses/ncurses_cfg.h index 49cef464b803..ca4ce6b5f32a 100644 --- a/lib/ncurses/ncurses/ncurses_cfg.h +++ b/lib/ncurses/ncurses/ncurses_cfg.h @@ -1,6 +1,7 @@ /* include/ncurses_cfg.h. Generated automatically by configure. */ /**************************************************************************** - * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * + * Copyright 2020 Thomas E. Dickey * + * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +32,7 @@ * Author: Thomas E. Dickey 1997-on * ****************************************************************************/ /* - * $Id: ncurses_cfg.hin,v 1.11 2017/12/09 20:41:54 tom Exp $ + * $Id: ncurses_cfg.hin,v 1.13 2020/03/08 12:37:59 tom Exp $ * * Both ncurses_cfg.h and ncurses_def.h are internal header-files used when * building ncurses. @@ -43,7 +44,7 @@ * 971222) to autoconf 2.12 or 2.13 to do this. * * See: - * http://invisible-island.net/autoconf/ + * https://invisible-island.net/autoconf/ * ftp://ftp.invisible-island.net/autoconf/ */ @@ -52,6 +53,9 @@ #ifndef NC_CONFIG_H #define NC_CONFIG_H +#define PACKAGE "ncurses" +#define NCURSES_VERSION "6.2" +#define NCURSES_PATCHDATE 20210220 #define SYSTEM_NAME "FreeBSD" #if 0 #include @@ -224,7 +228,7 @@ #define HAVE_FORM_H 1 #define HAVE_LIBFORM 1 #define NCURSES_PATHSEP ':' -#define NCURSES_VERSION_STRING "6.2.20200215" +#define NCURSES_VERSION_STRING "6.2.20210220" #define NCURSES_OSPEED_COMPAT 1 #define HAVE_CURSES_DATA_BOOLNAMES 1 From owner-dev-commits-src-main@freebsd.org Thu Feb 25 18:42:50 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4268856C642; Thu, 25 Feb 2021 18:42: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmhVf1TWxz3D83; Thu, 25 Feb 2021 18:42: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 259111C88F; Thu, 25 Feb 2021 18:42: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 11PIgo6W006953; Thu, 25 Feb 2021 18:42:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PIgoCb006952; Thu, 25 Feb 2021 18:42:50 GMT (envelope-from git) Date: Thu, 25 Feb 2021 18:42:50 GMT Message-Id: <202102251842.11PIgoCb006952@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: f848d08e4528 - main - camcontrol: stop pretending cam_cmd is a bitmask 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: f848d08e4528a823aaf79dce173ae87e39f7ee3c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 18:42:50 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=f848d08e4528a823aaf79dce173ae87e39f7ee3c commit f848d08e4528a823aaf79dce173ae87e39f7ee3c Author: Edward Tomasz Napierala AuthorDate: 2021-02-25 18:39:22 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-02-25 18:40:07 +0000 camcontrol: stop pretending cam_cmd is a bitmask Cleanup only, no functional changes. Reviewed By: imp Sponsored By: NetApp, Inc. Sponsored By: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27813 --- sbin/camcontrol/camcontrol.c | 94 ++++++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index 27d545d924b3..748f54c9ce55 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -66,52 +66,52 @@ __FBSDID("$FreeBSD$"); #endif typedef enum { - CAM_CMD_NONE = 0x00000000, - CAM_CMD_DEVLIST = 0x00000001, - CAM_CMD_TUR = 0x00000002, - CAM_CMD_INQUIRY = 0x00000003, - CAM_CMD_STARTSTOP = 0x00000004, - CAM_CMD_RESCAN = 0x00000005, - CAM_CMD_READ_DEFECTS = 0x00000006, - CAM_CMD_MODE_PAGE = 0x00000007, - CAM_CMD_SCSI_CMD = 0x00000008, - CAM_CMD_DEVTREE = 0x00000009, - CAM_CMD_USAGE = 0x0000000a, - CAM_CMD_DEBUG = 0x0000000b, - CAM_CMD_RESET = 0x0000000c, - CAM_CMD_FORMAT = 0x0000000d, - CAM_CMD_TAG = 0x0000000e, - CAM_CMD_RATE = 0x0000000f, - CAM_CMD_DETACH = 0x00000010, - CAM_CMD_REPORTLUNS = 0x00000011, - CAM_CMD_READCAP = 0x00000012, - CAM_CMD_IDENTIFY = 0x00000013, - CAM_CMD_IDLE = 0x00000014, - CAM_CMD_STANDBY = 0x00000015, - CAM_CMD_SLEEP = 0x00000016, - CAM_CMD_SMP_CMD = 0x00000017, - CAM_CMD_SMP_RG = 0x00000018, - CAM_CMD_SMP_PC = 0x00000019, - CAM_CMD_SMP_PHYLIST = 0x0000001a, - CAM_CMD_SMP_MANINFO = 0x0000001b, - CAM_CMD_DOWNLOAD_FW = 0x0000001c, - CAM_CMD_SECURITY = 0x0000001d, - CAM_CMD_HPA = 0x0000001e, - CAM_CMD_SANITIZE = 0x0000001f, - CAM_CMD_PERSIST = 0x00000020, - CAM_CMD_APM = 0x00000021, - CAM_CMD_AAM = 0x00000022, - CAM_CMD_ATTRIB = 0x00000023, - CAM_CMD_OPCODES = 0x00000024, - CAM_CMD_REPROBE = 0x00000025, - CAM_CMD_ZONE = 0x00000026, - CAM_CMD_EPC = 0x00000027, - CAM_CMD_TIMESTAMP = 0x00000028, - CAM_CMD_MMCSD_CMD = 0x00000029, - CAM_CMD_POWER_MODE = 0x0000002a, - CAM_CMD_DEVTYPE = 0x0000002b, - CAM_CMD_AMA = 0x0000002c, -} cam_cmdmask; + CAM_CMD_NONE, + CAM_CMD_DEVLIST, + CAM_CMD_TUR, + CAM_CMD_INQUIRY, + CAM_CMD_STARTSTOP, + CAM_CMD_RESCAN, + CAM_CMD_READ_DEFECTS, + CAM_CMD_MODE_PAGE, + CAM_CMD_SCSI_CMD, + CAM_CMD_DEVTREE, + CAM_CMD_USAGE, + CAM_CMD_DEBUG, + CAM_CMD_RESET, + CAM_CMD_FORMAT, + CAM_CMD_TAG, + CAM_CMD_RATE, + CAM_CMD_DETACH, + CAM_CMD_REPORTLUNS, + CAM_CMD_READCAP, + CAM_CMD_IDENTIFY, + CAM_CMD_IDLE, + CAM_CMD_STANDBY, + CAM_CMD_SLEEP, + CAM_CMD_SMP_CMD, + CAM_CMD_SMP_RG, + CAM_CMD_SMP_PC, + CAM_CMD_SMP_PHYLIST, + CAM_CMD_SMP_MANINFO, + CAM_CMD_DOWNLOAD_FW, + CAM_CMD_SECURITY, + CAM_CMD_HPA, + CAM_CMD_SANITIZE, + CAM_CMD_PERSIST, + CAM_CMD_APM, + CAM_CMD_AAM, + CAM_CMD_ATTRIB, + CAM_CMD_OPCODES, + CAM_CMD_REPROBE, + CAM_CMD_ZONE, + CAM_CMD_EPC, + CAM_CMD_TIMESTAMP, + CAM_CMD_MMCSD_CMD, + CAM_CMD_POWER_MODE, + CAM_CMD_DEVTYPE, + CAM_CMD_AMA, +} cam_cmd; typedef enum { CAM_ARG_NONE = 0x00000000, @@ -248,7 +248,6 @@ struct cam_devlist { path_id_t path_id; }; -static cam_cmdmask cmdlist; static cam_argmask arglist; static const char *devtype_names[] = { @@ -10285,6 +10284,7 @@ main(int argc, char **argv) int error = 0, optstart = 2; int task_attr = MSG_SIMPLE_Q_TAG; int devopen = 1; + cam_cmd cmdlist; path_id_t bus; target_id_t target; lun_id_t lun; From owner-dev-commits-src-main@freebsd.org Thu Feb 25 18:46:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E66956CC80; Thu, 25 Feb 2021 18:46: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmhZy3c3wz3DP5; Thu, 25 Feb 2021 18:46: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 6AA461C9D7; Thu, 25 Feb 2021 18:46: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 11PIkYde007736; Thu, 25 Feb 2021 18:46:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PIkY1Q007735; Thu, 25 Feb 2021 18:46:34 GMT (envelope-from git) Date: Thu, 25 Feb 2021 18:46:34 GMT Message-Id: <202102251846.11PIkY1Q007735@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: 22267215d66d - main - camcontrol(8): remove unnecessary CCB zeroing 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: 22267215d66d9bd490ad1a12221472028e3174f4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 18:46:34 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=22267215d66d9bd490ad1a12221472028e3174f4 commit 22267215d66d9bd490ad1a12221472028e3174f4 Author: Edward Tomasz Napierala AuthorDate: 2021-02-24 23:00:25 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-02-25 18:45:21 +0000 camcontrol(8): remove unnecessary CCB zeroing After 3e404b8c53d, cam_getccb(3) clears the returned CCB, making a number of calls to CCB_CLEAR_ALL_EXCEPT_HDR(3) unnecessary. Reviewed By: imp Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27812 --- sbin/camcontrol/attrib.c | 2 -- sbin/camcontrol/camcontrol.c | 45 -------------------------------------------- sbin/camcontrol/epc.c | 2 -- sbin/camcontrol/fwdownload.c | 7 ------- sbin/camcontrol/persist.c | 2 -- sbin/camcontrol/zone.c | 2 -- 6 files changed, 60 deletions(-) diff --git a/sbin/camcontrol/attrib.c b/sbin/camcontrol/attrib.c index 52fd4be41060..05cabb1b8145 100644 --- a/sbin/camcontrol/attrib.c +++ b/sbin/camcontrol/attrib.c @@ -138,8 +138,6 @@ scsiattrib(struct cam_device *device, int argc, char **argv, char *combinedopt, goto bailout; } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); - STAILQ_INIT(&write_attr_list); /* diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index 748f54c9ce55..69939715898e 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -1021,9 +1021,6 @@ scsiinquiry(struct cam_device *device, int task_attr, int retry_count, return (1); } - /* cam_getccb cleans up the header, caller has to zero the payload */ - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); - inq_buf = (struct scsi_inquiry_data *)malloc( sizeof(struct scsi_inquiry_data)); @@ -1131,9 +1128,6 @@ scsiserial(struct cam_device *device, int task_attr, int retry_count, return (1); } - /* cam_getccb cleans up the header, caller has to zero the payload */ - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); - serial_buf = (struct scsi_vpd_unit_serial_number *) malloc(sizeof(*serial_buf)); @@ -1218,8 +1212,6 @@ camxferrate(struct cam_device *device) return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cts); - ccb->ccb_h.func_code = XPT_GET_TRAN_SETTINGS; ccb->cts.type = CTS_TYPE_CURRENT_SETTINGS; @@ -4480,8 +4472,6 @@ mode_select(struct cam_device *device, int cdb_len, int save_pages, if (ccb == NULL) errx(1, "mode_select: couldn't allocate CCB"); - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); - scsi_mode_select_len(&ccb->csio, /* retries */ retry_count, /* cbfcnp */ NULL, @@ -4620,8 +4610,6 @@ scsicmd(struct cam_device *device, int argc, char **argv, char *combinedopt, return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(ccb); - while ((c = getopt(argc, argv, combinedopt)) != -1) { switch(c) { case 'a': @@ -5106,7 +5094,6 @@ tagcontrol(struct cam_device *device, int argc, char **argv, cam_path_string(device, pathstr, sizeof(pathstr)); if (numtags >= 0) { - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->crs); ccb->ccb_h.func_code = XPT_REL_SIMQ; ccb->ccb_h.flags = CAM_DEV_QFREEZE; ccb->crs.release_flags = RELSIM_ADJUST_OPENINGS; @@ -5350,7 +5337,6 @@ get_cpi(struct cam_device *device, struct ccb_pathinq *cpi) warnx("get_cpi: couldn't allocate CCB"); return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cpi); ccb->ccb_h.func_code = XPT_PATH_INQ; if (cam_send_ccb(device, ccb) < 0) { warn("get_cpi: error sending Path Inquiry CCB"); @@ -5385,7 +5371,6 @@ get_cgd(struct cam_device *device, struct ccb_getdev *cgd) warnx("get_cgd: couldn't allocate CCB"); return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cgd); ccb->ccb_h.func_code = XPT_GDEV_TYPE; if (cam_send_ccb(device, ccb) < 0) { warn("get_cgd: error sending Get type information CCB"); @@ -5426,9 +5411,6 @@ dev_has_vpd_page(struct cam_device *dev, uint8_t page_id, int retry_count, goto bailout; } - /* cam_getccb cleans up the header, caller has to zero the payload */ - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); - bzero(&sup_pages, sizeof(sup_pages)); scsi_inquiry(&ccb->csio, @@ -5963,8 +5945,6 @@ get_print_cts(struct cam_device *device, int user_settings, int quiet, return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cts); - ccb->ccb_h.func_code = XPT_GET_TRAN_SETTINGS; if (user_settings == 0) @@ -6107,7 +6087,6 @@ ratecontrol(struct cam_device *device, int task_attr, int retry_count, */ if ((retval = get_cpi(device, &cpi)) != 0) goto ratecontrol_bailout; - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cts); if (quiet == 0) { fprintf(stdout, "%s parameters:\n", user_settings ? "User" : "Current"); @@ -6356,8 +6335,6 @@ scsiformat(struct cam_device *device, int argc, char **argv, return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); - while ((c = getopt(argc, argv, combinedopt)) != -1) { switch(c) { case 'q': @@ -6851,8 +6828,6 @@ sanitize(struct cam_device *device, int argc, char **argv, return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); - while ((c = getopt(argc, argv, combinedopt)) != -1) { switch(c) { case 'a': @@ -7209,8 +7184,6 @@ scsireportluns(struct cam_device *device, int argc, char **argv, return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); - countonly = 0; lunsonly = 0; @@ -7453,8 +7426,6 @@ scsireadcapacity(struct cam_device *device, int argc, char **argv, return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); - while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { case 'b': @@ -7654,8 +7625,6 @@ smpcmd(struct cam_device *device, int argc, char **argv, char *combinedopt, return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio); - while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { case 'R': @@ -8203,8 +8172,6 @@ smpreportgeneral(struct cam_device *device, int argc, char **argv, return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio); - while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { case 'l': @@ -8347,8 +8314,6 @@ smpphycontrol(struct cam_device *device, int argc, char **argv, return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio); - while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { case 'a': @@ -8604,8 +8569,6 @@ smpmaninfo(struct cam_device *device, int argc, char **argv, return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio); - while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { case 'l': @@ -8698,8 +8661,6 @@ getdevid(struct cam_devitem *item) goto bailout; } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cdai); - /* * On the first try, we just probe for the size of the data, and * then allocate that much memory and try again. @@ -8983,7 +8944,6 @@ smpphylist(struct cam_device *device, int argc, char **argv, return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio); STAILQ_INIT(&devlist.dev_queue); rgrequest = malloc(sizeof(*rgrequest)); @@ -9448,9 +9408,6 @@ scsigetopcodes(struct cam_device *device, int opcode_set, int opcode, goto bailout; } - /* cam_getccb cleans up the header, caller has to zero the payload */ - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); - if (opcode_set != 0) { options |= RSO_OPTIONS_OC; num_opcodes = 1; @@ -9888,8 +9845,6 @@ reprobe(struct cam_device *device) return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(ccb); - ccb->ccb_h.func_code = XPT_REPROBE_LUN; if (cam_send_ccb(device, ccb) < 0) { diff --git a/sbin/camcontrol/epc.c b/sbin/camcontrol/epc.c index 8b42f63c7523..f96ca6e68ba9 100644 --- a/sbin/camcontrol/epc.c +++ b/sbin/camcontrol/epc.c @@ -633,8 +633,6 @@ epc(struct cam_device *device, int argc, char **argv, char *combinedopt, goto bailout; } - CCB_CLEAR_ALL_EXCEPT_HDR(ccb); - while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { case 'c': { diff --git a/sbin/camcontrol/fwdownload.c b/sbin/camcontrol/fwdownload.c index 87aef6d3c240..dc97b3a221db 100644 --- a/sbin/camcontrol/fwdownload.c +++ b/sbin/camcontrol/fwdownload.c @@ -465,9 +465,6 @@ fw_validate_ibm(struct cam_device *dev, int retry_count, int timeout, int fd, goto bailout; } - /* cam_getccb cleans up the header, caller has to zero the payload */ - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); - bzero(&vpd_page, sizeof(vpd_page)); scsi_inquiry(&ccb->csio, @@ -671,8 +668,6 @@ fw_check_device_ready(struct cam_device *dev, camcontrol_devtype devtype, goto bailout; } - CCB_CLEAR_ALL_EXCEPT_HDR(ccb); - if (devtype != CC_DT_SCSI) { dxfer_len = sizeof(struct ata_params); @@ -802,8 +797,6 @@ fw_download_img(struct cam_device *cam_dev, struct fw_vendor *vp, goto bailout; } - CCB_CLEAR_ALL_EXCEPT_HDR(ccb); - max_pkt_size = vp->max_pkt_size; if (max_pkt_size == 0) max_pkt_size = UNKNOWN_MAX_PKT_SIZE; diff --git a/sbin/camcontrol/persist.c b/sbin/camcontrol/persist.c index ce4de9f8feb1..f7ef30e06ede 100644 --- a/sbin/camcontrol/persist.c +++ b/sbin/camcontrol/persist.c @@ -453,8 +453,6 @@ scsipersist(struct cam_device *device, int argc, char **argv, char *combinedopt, goto bailout; } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); - while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { case 'a': diff --git a/sbin/camcontrol/zone.c b/sbin/camcontrol/zone.c index 130f53226f57..3f7dfcec4f35 100644 --- a/sbin/camcontrol/zone.c +++ b/sbin/camcontrol/zone.c @@ -347,8 +347,6 @@ zone(struct cam_device *device, int argc, char **argv, char *combinedopt, goto bailout; } - CCB_CLEAR_ALL_EXCEPT_HDR(ccb); - while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { case 'a': From owner-dev-commits-src-main@freebsd.org Thu Feb 25 18:56:59 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DDDF056D110; Thu, 25 Feb 2021 18: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dmhpz60s0z3FTF; Thu, 25 Feb 2021 18: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 C18A01CC13; Thu, 25 Feb 2021 18: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 11PIuxW5020949; Thu, 25 Feb 2021 18:56:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PIuxwF020948; Thu, 25 Feb 2021 18:56:59 GMT (envelope-from git) Date: Thu, 25 Feb 2021 18:56:59 GMT Message-Id: <202102251856.11PIuxwF020948@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: e7a5b3bd0589 - main - Modify lock_delay() to increase the delay time after spinning 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: e7a5b3bd058975ff3ffa346664690e54c641fc0f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 18:56:59 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=e7a5b3bd058975ff3ffa346664690e54c641fc0f commit e7a5b3bd058975ff3ffa346664690e54c641fc0f Author: Edward Tomasz Napierala AuthorDate: 2021-02-25 18:48:50 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-02-25 18:55:26 +0000 Modify lock_delay() to increase the delay time after spinning Modify lock_delay() to increase the delay time after spinning, not before. Previously we would spin at least twice instead of once. In NetApp's benchmarks this fixes a performance regression compared to FreeBSD 10, which called cpu_spinwait() directly. Reviewed By: mjg Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27331 --- sys/kern/subr_lock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/subr_lock.c b/sys/kern/subr_lock.c index a74f7e62db4a..8b08c61715b3 100644 --- a/sys/kern/subr_lock.c +++ b/sys/kern/subr_lock.c @@ -128,10 +128,6 @@ lock_delay(struct lock_delay_arg *la) struct lock_delay_config *lc = la->config; u_short i; - la->delay <<= 1; - if (__predict_false(la->delay > lc->max)) - la->delay = lc->max; - for (i = la->delay; i > 0; i--) cpu_spinwait(); @@ -141,6 +137,10 @@ lock_delay(struct lock_delay_arg *la) if (restrict_starvation) la->delay = lc->base; } + + la->delay <<= 1; + if (__predict_false(la->delay > lc->max)) + la->delay = lc->max; } static u_int From owner-dev-commits-src-main@freebsd.org Thu Feb 25 18:58:45 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B81056D1A1; Thu, 25 Feb 2021 18:58: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dmhs072Lfz3Fvt; Thu, 25 Feb 2021 18:58: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 E0CC01CB17; Thu, 25 Feb 2021 18:58: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 11PIwi0l021453; Thu, 25 Feb 2021 18:58:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PIwiP5021452; Thu, 25 Feb 2021 18:58:44 GMT (envelope-from git) Date: Thu, 25 Feb 2021 18:58:44 GMT Message-Id: <202102251858.11PIwiP5021452@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Moeller Subject: git: b7109c3cfd28 - main - libifconfig: Add missing symbols to map MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: freqlabs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7109c3cfd28559dbb280d640c47ceba192108cc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 18:58:45 -0000 The branch main has been updated by freqlabs: URL: https://cgit.FreeBSD.org/src/commit/?id=b7109c3cfd28559dbb280d640c47ceba192108cc commit b7109c3cfd28559dbb280d640c47ceba192108cc Author: Ryan Moeller AuthorDate: 2021-02-25 18:54:16 +0000 Commit: Ryan Moeller CommitDate: 2021-02-25 18:58:33 +0000 libifconfig: Add missing symbols to map Regenerate the list of generated symbols for libifconfig: ``` grep -hr ^ifconfig_sfp_ /usr/obj/usr/src/amd64.amd64/lib/libifconfig \ | sed 's/(.*/;/' | sort -u ``` Spotted by build failures caused by a missing symbol while working on upgrading libifconfig from internal to private. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D28927 --- lib/libifconfig/Symbol.map | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/libifconfig/Symbol.map b/lib/libifconfig/Symbol.map index fd147554f085..4f82c8185d0b 100644 --- a/lib/libifconfig/Symbol.map +++ b/lib/libifconfig/Symbol.map @@ -59,16 +59,24 @@ FBSD_1.6 { ifconfig_sfp_cab_tech_symbol; ifconfig_sfp_conn_description; ifconfig_sfp_conn_symbol; - ifconfig_sfp_eth_10g_description; - ifconfig_sfp_eth_10g_symbol; ifconfig_sfp_eth_1040g_description; ifconfig_sfp_eth_1040g_symbol; + ifconfig_sfp_eth_10g_description; + ifconfig_sfp_eth_10g_symbol; ifconfig_sfp_eth_description; - ifconfig_sfp_eth_symbol; ifconfig_sfp_eth_ext_description; ifconfig_sfp_eth_ext_symbol; + ifconfig_sfp_eth_symbol; + ifconfig_sfp_fc_len_description; + ifconfig_sfp_fc_len_symbol; + ifconfig_sfp_fc_media_description; + ifconfig_sfp_fc_media_symbol; ifconfig_sfp_fc_speed_description; ifconfig_sfp_fc_speed_symbol; + ifconfig_sfp_id_description; + ifconfig_sfp_id_display; + ifconfig_sfp_id_is_qsfp; + ifconfig_sfp_id_symbol; ifconfig_sfp_rev_description; ifconfig_sfp_rev_symbol; }; From owner-dev-commits-src-main@freebsd.org Thu Feb 25 19:19:06 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4960056DB9C; Thu, 25 Feb 2021 19:19: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmjJV1hY8z3HJ8; Thu, 25 Feb 2021 19:19: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 2CB531C87E; Thu, 25 Feb 2021 19:19: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 11PJJ6Z0048723; Thu, 25 Feb 2021 19:19:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PJJ6Ru048722; Thu, 25 Feb 2021 19:19:06 GMT (envelope-from git) Date: Thu, 25 Feb 2021 19:19:06 GMT Message-Id: <202102251919.11PJJ6Ru048722@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Moeller Subject: git: 2ae79aa362e7 - main - Install links for zpool feature compat aliases MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: freqlabs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ae79aa362e7a2ee72657b39be64f1390158aaf6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 19:19:06 -0000 The branch main has been updated by freqlabs: URL: https://cgit.FreeBSD.org/src/commit/?id=2ae79aa362e7a2ee72657b39be64f1390158aaf6 commit 2ae79aa362e7a2ee72657b39be64f1390158aaf6 Author: Ryan Moeller AuthorDate: 2021-02-25 19:16:09 +0000 Commit: Ryan Moeller CommitDate: 2021-02-25 19:16:09 +0000 Install links for zpool feature compat aliases The alias links were missed when this feature was introduced to the FreeBSD build system in 10f57cb98fd61b2669640a84aa73ad118601f281. Reviewed by: mm MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D28925 --- cddl/share/zfs/compatibility.d/Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/cddl/share/zfs/compatibility.d/Makefile b/cddl/share/zfs/compatibility.d/Makefile index 6531430ef050..8bc18bcd6391 100644 --- a/cddl/share/zfs/compatibility.d/Makefile +++ b/cddl/share/zfs/compatibility.d/Makefile @@ -25,4 +25,25 @@ FILES= \ FILESDIR= ${SHAREDIR}/zfs/compatibility.d +LINKS= \ + ${FILESDIR}/compat-2018 ${FILESDIR}/2018 \ + ${FILESDIR}/compat-2019 ${FILESDIR}/2019 \ + ${FILESDIR}/compat-2020 ${FILESDIR}/2020 \ + ${FILESDIR}/compat-2021 ${FILESDIR}/2021 \ + ${FILESDIR}/freebsd-11.0 ${FILESDIR}/freebsd-11.1 \ + ${FILESDIR}/freebsd-11.0 ${FILESDIR}/freenas-11.0 \ + ${FILESDIR}/freebsd-11.2 ${FILESDIR}/freenas-11.2 \ + ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freebsd-11.4 \ + ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freebsd-12.0 \ + ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freebsd-12.1 \ + ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freebsd-12.2 \ + ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freenas-11.3 \ + ${FILESDIR}/freenas-11.0 ${FILESDIR}/freenas-11.1 \ + ${FILESDIR}/openzfsonosx-1.9.3 ${FILESDIR}/openzfsonosx-1.9.4 \ + ${FILESDIR}/openzfs-2.0-freebsd ${FILESDIR}/truenas-12.0 \ + ${FILESDIR}/zol-0.7 ${FILESDIR}/ubuntu-18.04 \ + ${FILESDIR}/zol-0.8 ${FILESDIR}/ubuntu-20.04 + +LINKMODE= ${NOBINMODE} + .include From owner-dev-commits-src-main@freebsd.org Thu Feb 25 20:07:31 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E0EA856E8DD; Thu, 25 Feb 2021 20:07: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmkNM63jrz3Kdr; Thu, 25 Feb 2021 20:07: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 C2F5A1DA2A; Thu, 25 Feb 2021 20:07: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 11PK7VjZ014318; Thu, 25 Feb 2021 20:07:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PK7Vld014317; Thu, 25 Feb 2021 20:07:31 GMT (envelope-from git) Date: Thu, 25 Feb 2021 20:07:31 GMT Message-Id: <202102252007.11PK7Vld014317@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: f1ab799927c8 - main - rc: fix rc script parsing MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f1ab799927c8e93e8f58e5039f287a2ca45675ec Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 20:07:31 -0000 The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=f1ab799927c8e93e8f58e5039f287a2ca45675ec commit f1ab799927c8e93e8f58e5039f287a2ca45675ec Author: Cy Schubert AuthorDate: 2021-02-25 19:04:50 +0000 Commit: Cy Schubert CommitDate: 2021-02-25 19:47:56 +0000 rc: fix rc script parsing 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 introduced a bug whereby rc scripts in etc/rc.d and $local_startup failed to parse output from called commands because IFS was set to " " instead of the default " \t\n". This caused parsing of output that contains any whitespace character, such as tabs and newlines, not matching just a space to fail. PR: 249192 MFC after: 3 weeks X-MFC with: 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 --- libexec/rc/rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc b/libexec/rc/rc index b5bc188fc7c0..92eb5c48aab7 100644 --- a/libexec/rc/rc +++ b/libexec/rc/rc @@ -105,7 +105,7 @@ files=`rcorder ${skip} ${skip_firstboot} ${_rc_parallel} /etc/rc.d/* 2>/dev/null _rc_elem_done=' ' IFS=$'\n' for _rc_group in ${files}; do - IFS=$' ' + unset IFS for _rc_elem in ${_rc_group}; do run_rc_script ${_rc_elem} ${_boot} & _rc_elem_done="${_rc_elem_done}${_rc_elem} " @@ -138,7 +138,7 @@ fi files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} ${_rc_parallel} 2>/dev/null` IFS=$'\n' for _rc_group in ${files}; do - IFS=$' ' + unset IFS for _rc_elem in ${_rc_group}; do case "$_rc_elem_done" in *" $_rc_elem "*) continue ;; From owner-dev-commits-src-main@freebsd.org Thu Feb 25 20:28:57 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B376156F093; Thu, 25 Feb 2021 20:28: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dmks54kMwz3Ly4; Thu, 25 Feb 2021 20:28: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 950E71DED7; Thu, 25 Feb 2021 20:28: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 11PKSveG040952; Thu, 25 Feb 2021 20:28:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PKSvQL040951; Thu, 25 Feb 2021 20:28:57 GMT (envelope-from git) Date: Thu, 25 Feb 2021 20:28:57 GMT Message-Id: <202102252028.11PKSvQL040951@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: d7671ad8d6eb - main - Close races in vm object chain traversal for unlock 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: d7671ad8d6ebe205933628466dc0a52d32eea2e8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 20:28:57 -0000 The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=d7671ad8d6ebe205933628466dc0a52d32eea2e8 commit d7671ad8d6ebe205933628466dc0a52d32eea2e8 Author: Ryan Libby AuthorDate: 2021-02-25 20:11:19 +0000 Commit: Ryan Libby CommitDate: 2021-02-25 20:11:19 +0000 Close races in vm object chain traversal for unlock We were unlocking the vm object before reading the backing_object field. In the meantime, the object could be freed and reused. This could cause us to go off the rails in the object chain traversal, failing to unlock the rest of the objects in the original chain and corrupting the lock state of the victim chain. Reviewed by: bdrewery, kib, markj, vangyzen MFC after: 3 days Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28926 --- sys/fs/procfs/procfs_map.c | 5 +++-- sys/kern/kern_proc.c | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/fs/procfs/procfs_map.c b/sys/fs/procfs/procfs_map.c index a9893e5e10f0..e4969d795dcc 100644 --- a/sys/fs/procfs/procfs_map.c +++ b/sys/fs/procfs/procfs_map.c @@ -84,7 +84,7 @@ procfs_doprocmap(PFS_FILL_ARGS) struct vnode *vp; char *fullpath, *freepath, *type; struct ucred *cred; - vm_object_t obj, tobj, lobj; + vm_object_t lobj, nobj, obj, tobj; int error, privateresident, ref_count, resident, shadow_count, flags; vm_offset_t e_start, e_end; vm_eflags_t e_eflags; @@ -144,7 +144,8 @@ procfs_doprocmap(PFS_FILL_ARGS) } if (obj != NULL) kern_proc_vmmap_resident(map, entry, &resident, &super); - for (tobj = obj; tobj != NULL; tobj = tobj->backing_object) { + for (tobj = obj; tobj != NULL; tobj = nobj) { + nobj = tobj->backing_object; if (tobj != obj && tobj != lobj) VM_OBJECT_RUNLOCK(tobj); } diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index f8fed2573712..817cb9766bbf 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -2505,7 +2505,7 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) vm_map_entry_t entry, tmp_entry; struct vattr va; vm_map_t map; - vm_object_t obj, tobj, lobj; + vm_object_t lobj, nobj, obj, tobj; char *fullpath, *freepath; struct kinfo_vmentry *kve; struct ucred *cred; @@ -2551,8 +2551,8 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) &kve->kve_resident, &super); if (super) kve->kve_flags |= KVME_FLAG_SUPER; - for (tobj = obj; tobj != NULL; - tobj = tobj->backing_object) { + for (tobj = obj; tobj != NULL; tobj = nobj) { + nobj = tobj->backing_object; if (tobj != obj && tobj != lobj) VM_OBJECT_RUNLOCK(tobj); } From owner-dev-commits-src-main@freebsd.org Thu Feb 25 20:51:31 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6292156FD4A; Thu, 25 Feb 2021 20:51: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmlM72KKHz3Nrh; Thu, 25 Feb 2021 20:51: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 42A4A1E596; Thu, 25 Feb 2021 20:51: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 11PKpVdX074725; Thu, 25 Feb 2021 20:51:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PKpVFQ074724; Thu, 25 Feb 2021 20:51:31 GMT (envelope-from git) Date: Thu, 25 Feb 2021 20:51:31 GMT Message-Id: <202102252051.11PKpVFQ074724@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brandon Bergren Subject: git: 5001c579baff - main - [PowerPC64LE] pseries: Fix input buffering logic. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bdragon X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5001c579baff78719919d79ec054207aa2938dbd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 20:51:31 -0000 The branch main has been updated by bdragon: URL: https://cgit.FreeBSD.org/src/commit/?id=5001c579baff78719919d79ec054207aa2938dbd commit 5001c579baff78719919d79ec054207aa2938dbd Author: Brandon Bergren AuthorDate: 2021-02-25 18:55:58 +0000 Commit: Brandon Bergren CommitDate: 2021-02-25 20:50:13 +0000 [PowerPC64LE] pseries: Fix input buffering logic. In uart_phyp_get(), when the internal buffer is empty, we make a hypercall to retrieve up to 16 bytes of input data from the hypervisor. As this is specified to be returned in BE format, we need to do a 64-bit byte swap on the first and second half of the data. If the buffer being passed in was insufficient to return the fetched data, we store the remainder in the internal buffer and use it to satisfy the following calls to uart_phyp_get() until it is drained. However, in this case, we were accidentally byteswapping the internal buffer again. Move the byteswapping code to just after the hypercall so it only gets swapped when we're filling the buffer. Fixes arrow keys in qemu on pseries, among other console oddities. Sponsored by: Tag1 Consulting, Inc. MFC after: 3 days --- sys/powerpc/pseries/phyp_console.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/powerpc/pseries/phyp_console.c b/sys/powerpc/pseries/phyp_console.c index 84ab292dae94..484952177d51 100644 --- a/sys/powerpc/pseries/phyp_console.c +++ b/sys/powerpc/pseries/phyp_console.c @@ -295,6 +295,10 @@ uart_phyp_get(struct uart_phyp_softc *sc, void *buffer, size_t bufsize) err = phyp_pft_hcall(H_GET_TERM_CHAR, sc->vtermid, 0, 0, 0, &sc->inbuflen, &sc->phyp_inbuf.u64[0], &sc->phyp_inbuf.u64[1]); +#if BYTE_ORDER == LITTLE_ENDIAN + sc->phyp_inbuf.u64[0] = be64toh(sc->phyp_inbuf.u64[0]); + sc->phyp_inbuf.u64[1] = be64toh(sc->phyp_inbuf.u64[1]); +#endif if (err != H_SUCCESS) { uart_unlock(&sc->sc_mtx); return (-1); @@ -307,11 +311,6 @@ uart_phyp_get(struct uart_phyp_softc *sc, void *buffer, size_t bufsize) return (0); } -#if BYTE_ORDER == LITTLE_ENDIAN - sc->phyp_inbuf.u64[0] = be64toh(sc->phyp_inbuf.u64[0]); - sc->phyp_inbuf.u64[1] = be64toh(sc->phyp_inbuf.u64[1]); -#endif - if ((sc->protocol == HVTERMPROT) && (hdr == 1)) { sc->inbuflen = sc->inbuflen - 4; /* The VTERM protocol has a 4 byte header, skip it here. */ From owner-dev-commits-src-main@freebsd.org Thu Feb 25 21:15:04 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE9A5549E09; Thu, 25 Feb 2021 21:15: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmltJ64HLz3lRR; Thu, 25 Feb 2021 21:15: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 C34F01E6CE; Thu, 25 Feb 2021 21:15: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 11PLF4v7007619; Thu, 25 Feb 2021 21:15:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PLF47Q007618; Thu, 25 Feb 2021 21:15:04 GMT (envelope-from git) Date: Thu, 25 Feb 2021 21:15:04 GMT Message-Id: <202102252115.11PLF47Q007618@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: 547739cc003a - main - [ar71xx] Fix routerstation / routerstation pro redboot FIS probing 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: 547739cc003a68f43a13981e5de1143861eca08c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 21:15:05 -0000 The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=547739cc003a68f43a13981e5de1143861eca08c commit 547739cc003a68f43a13981e5de1143861eca08c Author: Adrian Chadd AuthorDate: 2021-02-25 21:06:03 +0000 Commit: Adrian Chadd CommitDate: 2021-02-25 21:14:55 +0000 [ar71xx] Fix routerstation / routerstation pro redboot FIS probing Some changes back in ye olde times somewhere has changed the default block size the flash device exposes. So, the default geom redboot FIS probing (to find the partition table structure in flash!) is no longer finding it. So, force it to probe at the last 64k of flash regardless of the underlying flash block size. Tested: * Ubiquiti Routerstation pro, boots -HEAD MIPS --- sys/mips/conf/ROUTERSTATION.hints | 4 ++++ sys/mips/conf/RSPRO.hints | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sys/mips/conf/ROUTERSTATION.hints b/sys/mips/conf/ROUTERSTATION.hints index 7b35b229af30..c5740c035d8f 100644 --- a/sys/mips/conf/ROUTERSTATION.hints +++ b/sys/mips/conf/ROUTERSTATION.hints @@ -46,3 +46,7 @@ hint.gpioled.0.at="gpiobus0" hint.gpioled.0.name="rf" # pin 2 hint.gpioled.0.pins=0x0004 + +# Override this to ensure we definitely point to the last 64K of the +# 16MiB flash chip in case underlying block size of the flash driver changes. +hint.redboot.0.fisoffset="0xff0000" diff --git a/sys/mips/conf/RSPRO.hints b/sys/mips/conf/RSPRO.hints index a802328db3b5..6ed26ec0b9e6 100644 --- a/sys/mips/conf/RSPRO.hints +++ b/sys/mips/conf/RSPRO.hints @@ -47,3 +47,7 @@ hint.gpioled.0.at="gpiobus0" hint.gpioled.0.name="rf" # pin 2 hint.gpioled.0.pins=0x0004 + +# Override this to ensure we definitely point to the last 64K of the +# 16MiB flash chip in case underlying block size of the flash driver changes. +hint.redboot.0.fisoffset="0xff0000" From owner-dev-commits-src-main@freebsd.org Thu Feb 25 21:49:42 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B142454AAEA; Thu, 25 Feb 2021 21:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmmfF4Xq3z3p3Z; Thu, 25 Feb 2021 21:49: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 5CB641EEF4; Thu, 25 Feb 2021 21:49: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 11PLnfkn048008; Thu, 25 Feb 2021 21:49:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PLnfr3048007; Thu, 25 Feb 2021 21:49:41 GMT (envelope-from git) Date: Thu, 25 Feb 2021 21:49:41 GMT Message-Id: <202102252149.11PLnfr3048007@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: d2eb5dbd7d6d - main - ncurses: fix generation of term.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d2eb5dbd7d6d31e6ab85737e86c9a8bfc7f266c8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 21:49:42 -0000 The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=d2eb5dbd7d6d31e6ab85737e86c9a8bfc7f266c8 commit d2eb5dbd7d6d31e6ab85737e86c9a8bfc7f266c8 Author: Baptiste Daroussin AuthorDate: 2021-02-25 21:46:24 +0000 Commit: Baptiste Daroussin CommitDate: 2021-02-25 21:49:20 +0000 ncurses: fix generation of term.h All variable were not properly expanded Submitted by: cy (initial version) --- lib/ncurses/ncurses/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile index 68ed3b39f458..5a1fab7003a6 100644 --- a/lib/ncurses/ncurses/Makefile +++ b/lib/ncurses/ncurses/Makefile @@ -425,7 +425,9 @@ MKterm.h.awk: MKterm.h.awk.in -e "/@HAVE_TERMIOS_H@/s%%${HAVE_TERMIOS_H}%" \ -e "/@HAVE_TERMIO_H@/s%%${HAVE_TERMIO_H}%" \ -e "/@HAVE_TCGETATTR@/s%%${HAVE_TCGETATTR}%" \ - -e "s%@cf_cv_enable_reentrant@%${ENABLE_REENTRANT}%g" + -e "s%@cf_cv_enable_reentrant@%${ENABLE_REENTRANT}%g" \ + -e "s%@NCURSES_SP_FUNCS@%1%" \ + -e "s%@NCURSES_PATCH@%${NCURSES_PATCH}%" termcap.h: termcap.h.in sed <${NCURSES_DIR}/include/termcap.h.in >$@ \ From owner-dev-commits-src-main@freebsd.org Thu Feb 25 21:49:42 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ECEC854AAE7; Thu, 25 Feb 2021 21:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmmfF017Hz3p83; Thu, 25 Feb 2021 21:49:40 +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 44C0C1EEF3; Thu, 25 Feb 2021 21:49: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 11PLnevq047986; Thu, 25 Feb 2021 21:49:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PLneYj047985; Thu, 25 Feb 2021 21:49:40 GMT (envelope-from git) Date: Thu, 25 Feb 2021 21:49:40 GMT Message-Id: <202102252149.11PLneYj047985@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: e6b813522702 - main - ncurses: fix patch date MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e6b813522702811681247b9dd5fc1839c3e242f3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 21:49:42 -0000 The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=e6b813522702811681247b9dd5fc1839c3e242f3 commit e6b813522702811681247b9dd5fc1839c3e242f3 Author: Baptiste Daroussin AuthorDate: 2021-02-25 21:40:07 +0000 Commit: Baptiste Daroussin CommitDate: 2021-02-25 21:47:44 +0000 ncurses: fix patch date Submitted by: cy --- lib/ncurses/config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ncurses/config.mk b/lib/ncurses/config.mk index fc77567b2594..cd569ddf9ec8 100644 --- a/lib/ncurses/config.mk +++ b/lib/ncurses/config.mk @@ -5,7 +5,7 @@ NCURSES_DIR= ${SRCTOP}/contrib/ncurses NCURSES_MAJOR= 6 NCURSES_MINOR= 2 -NCURSES_PATCH= 20200215 +NCURSES_PATCH= 20210220 CFLAGS+= -D_XOPEN_SOURCE_EXTENDED NCURSES_CFG_H= ${.CURDIR}/ncurses_cfg.h From owner-dev-commits-src-main@freebsd.org Thu Feb 25 22:44:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 90D5554C42A; Thu, 25 Feb 2021 22:44: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmnsZ3hxpz3sZX; Thu, 25 Feb 2021 22:44: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 719D61FF82; Thu, 25 Feb 2021 22:44: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 11PMiYED026969; Thu, 25 Feb 2021 22:44:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PMiYld026968; Thu, 25 Feb 2021 22:44:34 GMT (envelope-from git) Date: Thu, 25 Feb 2021 22:44:34 GMT Message-Id: <202102252244.11PMiYld026968@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 5f1b1f184b7f - main - pf: Fix incorrect fragment handling MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5f1b1f184b7f12330cf4a027e3db7c6700c67640 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 22:44:34 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=5f1b1f184b7f12330cf4a027e3db7c6700c67640 commit 5f1b1f184b7f12330cf4a027e3db7c6700c67640 Author: Kristof Provost AuthorDate: 2021-02-25 07:07:36 +0000 Commit: Kristof Provost CommitDate: 2021-02-25 20:51:08 +0000 pf: Fix incorrect fragment handling A sequence of overlapping IPv4 fragments could crash the kernel in pf due to an assertion. Reported by: Alexander Bluhm Obtained from: OpenBSD MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_norm.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index b7a84437630b..d7310c7bccb4 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -549,6 +549,7 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, struct pf_frent *after, *next, *prev; struct pf_fragment *frag; uint16_t total; + int old_index, new_index; PF_FRAG_ASSERT(); @@ -660,8 +661,30 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, DPFPRINTF(("adjust overlap %d\n", aftercut)); if (aftercut < after->fe_len) { m_adj(after->fe_m, aftercut); + old_index = pf_frent_index(after); after->fe_off += aftercut; after->fe_len -= aftercut; + new_index = pf_frent_index(after); + if (old_index != new_index) { + DPFPRINTF(("frag index %d, new %d", + old_index, new_index)); + /* Fragment switched queue as fe_off changed */ + after->fe_off -= aftercut; + after->fe_len += aftercut; + /* Remove restored fragment from old queue */ + pf_frent_remove(frag, after); + after->fe_off += aftercut; + after->fe_len -= aftercut; + /* Insert into correct queue */ + if (pf_frent_insert(frag, after, prev)) { + DPFPRINTF( + ("fragment requeue limit exceeded")); + m_freem(after->fe_m); + uma_zfree(V_pf_frent_z, after); + /* There is not way to recover */ + goto bad_fragment; + } + } break; } From owner-dev-commits-src-main@freebsd.org Thu Feb 25 23:09:50 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E72AB54C4BD; Thu, 25 Feb 2021 23:09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmpQk6H8Cz3tN3; Thu, 25 Feb 2021 23:09: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 C621E1FF58; Thu, 25 Feb 2021 23:09: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 11PN9oYh054379; Thu, 25 Feb 2021 23:09:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PN9oQU054377; Thu, 25 Feb 2021 23:09:50 GMT (envelope-from git) Date: Thu, 25 Feb 2021 23:09:50 GMT Message-Id: <202102252309.11PN9oQU054377@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: 90972f04026a - main - ktls: Use COUNTER_U64_DEFINE_EARLY for the ktls_toe_chacha20 counter. 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: 90972f04026a2248d616d7466053ff53cf8fdf9d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 23:09:51 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=90972f04026a2248d616d7466053ff53cf8fdf9d commit 90972f04026a2248d616d7466053ff53cf8fdf9d Author: John Baldwin AuthorDate: 2021-02-20 00:33:46 +0000 Commit: John Baldwin CommitDate: 2021-02-25 23:00:13 +0000 ktls: Use COUNTER_U64_DEFINE_EARLY for the ktls_toe_chacha20 counter. I missed updating this counter when rebasing the changes in 9c64fc40290e08f6dc6b75aa04084b04e48a61af after the switch to COUNTER_U64_DEFINE_EARLY in 1755b2b9891bb1bfa7a58383ef5126821f7e46e3. Fixes: 9c64fc40290e Add Chacha20-Poly1305 as a KTLS cipher suite. Sponsored by: Netflix --- sys/kern/uipc_ktls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index f92314d9c607..9fc5f8b203c0 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -249,7 +249,7 @@ SYSCTL_COUNTER_U64(_kern_ipc_tls_toe, OID_AUTO, gcm, CTLFLAG_RD, &ktls_toe_gcm, "Active number of TOE TLS sessions using AES-GCM"); -static counter_u64_t ktls_toe_chacha20; +static COUNTER_U64_DEFINE_EARLY(ktls_toe_chacha20); SYSCTL_COUNTER_U64(_kern_ipc_tls_toe, OID_AUTO, chacha20, CTLFLAG_RD, &ktls_toe_chacha20, "Active number of TOE TLS sessions using Chacha20-Poly1305"); From owner-dev-commits-src-main@freebsd.org Thu Feb 25 23:49:57 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6FF8354D9C5; Thu, 25 Feb 2021 23:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmqK12jQwz3wXv; Thu, 25 Feb 2021 23:49: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 4B7D92093A; Thu, 25 Feb 2021 23:49: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 11PNnvWQ006584; Thu, 25 Feb 2021 23:49:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PNnvN6006583; Thu, 25 Feb 2021 23:49:57 GMT (envelope-from git) Date: Thu, 25 Feb 2021 23:49:57 GMT Message-Id: <202102252349.11PNnvN6006583@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: aac25e222525 - main - pmap: Fix largemap restart checks in the kernel_maps sysctl handler MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aac25e222525780db8939d07a594d3e090c0a148 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 23:49:57 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=aac25e222525780db8939d07a594d3e090c0a148 commit aac25e222525780db8939d07a594d3e090c0a148 Author: Mark Johnston AuthorDate: 2021-02-25 23:49:47 +0000 Commit: Mark Johnston CommitDate: 2021-02-25 23:49:47 +0000 pmap: Fix largemap restart checks in the kernel_maps sysctl handler The purpose of these checks is to ensure that the address of the next-level page table page is valid, since nothing is synchronizing with a concurrent update of the large map and large map PTPs are freed to the system. However, if PG_PS is set, there is no next level. Reported by: rpokala Reviewed by: kib Tested by: rpokala MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28922 --- sys/amd64/amd64/pmap.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 7dddeb3ee4ea..f509c40e760a 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -11348,9 +11348,6 @@ restart: continue; } pa = pdpe & PG_FRAME; - if (PMAP_ADDRESS_IN_LARGEMAP(sva) && - vm_phys_paddr_to_vm_page(pa) == NULL) - goto restart; if ((pdpe & PG_PS) != 0) { sva = rounddown2(sva, NBPDP); sysctl_kmaps_check(sb, &range, sva, pml4e, pdpe, @@ -11359,6 +11356,15 @@ restart: sva += NBPDP; continue; } + if (PMAP_ADDRESS_IN_LARGEMAP(sva) && + vm_phys_paddr_to_vm_page(pa) == NULL) { + /* + * Page table pages for the large map may be + * freed. Validate the next-level address + * before descending. + */ + goto restart; + } pd = (pd_entry_t *)PHYS_TO_DMAP(pa); for (k = pmap_pde_index(sva); k < NPDEPG; k++) { @@ -11370,9 +11376,6 @@ restart: continue; } pa = pde & PG_FRAME; - if (PMAP_ADDRESS_IN_LARGEMAP(sva) && - vm_phys_paddr_to_vm_page(pa) == NULL) - goto restart; if ((pde & PG_PS) != 0) { sva = rounddown2(sva, NBPDR); sysctl_kmaps_check(sb, &range, sva, @@ -11381,6 +11384,15 @@ restart: sva += NBPDR; continue; } + if (PMAP_ADDRESS_IN_LARGEMAP(sva) && + vm_phys_paddr_to_vm_page(pa) == NULL) { + /* + * Page table pages for the large map + * may be freed. Validate the + * next-level address before descending. + */ + goto restart; + } pt = (pt_entry_t *)PHYS_TO_DMAP(pa); for (l = pmap_pte_index(sva); l < NPTEPG; l++, From owner-dev-commits-src-main@freebsd.org Fri Feb 26 00:48:07 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9EB9254FCA4; Fri, 26 Feb 2021 00:48:07 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dmrc744Jlz4VPQ; Fri, 26 Feb 2021 00:48:07 +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 7A70521428; Fri, 26 Feb 2021 00:48: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 11Q0m7WL085419; Fri, 26 Feb 2021 00:48:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11Q0m7hS085418; Fri, 26 Feb 2021 00:48:07 GMT (envelope-from git) Date: Fri, 26 Feb 2021 00:48:07 GMT Message-Id: <202102260048.11Q0m7hS085418@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: a9bd22814f68 - main - Remove pointless lun->be_lun checks. 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: a9bd22814f680ce87259d56155204f9294e684ce Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2021 00:48:07 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=a9bd22814f680ce87259d56155204f9294e684ce commit a9bd22814f680ce87259d56155204f9294e684ce Author: Alexander Motin AuthorDate: 2021-02-26 00:45:59 +0000 Commit: Alexander Motin CommitDate: 2021-02-26 00:48:03 +0000 Remove pointless lun->be_lun checks. There is no such thing as LUN without backend, at least for years. MFC after: 1 week --- sys/cam/ctl/ctl.c | 13 +++++-------- sys/cam/ctl/ctl_tpc.c | 6 +++--- sys/cam/ctl/ctl_tpc_local.c | 6 +++--- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 9a9ae70c2173..18a82ca72d76 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -11022,16 +11022,15 @@ ctl_check_for_blockage(struct ctl_lun *lun, union ctl_io *pending_io, return (CTL_ACTION_BLOCK); case CTL_SER_EXTENT: return (ctl_extent_check(ooa_io, pending_io, - (lun->be_lun && lun->be_lun->serseq == CTL_LUN_SERSEQ_ON))); + (lun->be_lun->serseq == CTL_LUN_SERSEQ_ON))); case CTL_SER_EXTENTOPT: if ((lun->MODE_CTRL.queue_flags & SCP_QUEUE_ALG_MASK) != SCP_QUEUE_ALG_UNRESTRICTED) return (ctl_extent_check(ooa_io, pending_io, - (lun->be_lun && - lun->be_lun->serseq == CTL_LUN_SERSEQ_ON))); + (lun->be_lun->serseq == CTL_LUN_SERSEQ_ON))); return (CTL_ACTION_PASS); case CTL_SER_EXTENTSEQ: - if (lun->be_lun && lun->be_lun->serseq != CTL_LUN_SERSEQ_OFF) + if (lun->be_lun->serseq != CTL_LUN_SERSEQ_OFF) return (ctl_extent_check_seq(ooa_io, pending_io)); return (CTL_ACTION_PASS); case CTL_SER_PASS: @@ -11273,8 +11272,7 @@ ctl_scsiio_lun_check(struct ctl_lun *lun, } if (entry->pattern & CTL_LUN_PAT_WRITE) { - if (lun->be_lun && - lun->be_lun->flags & CTL_LUN_FLAG_READONLY) { + if (lun->be_lun->flags & CTL_LUN_FLAG_READONLY) { ctl_set_hw_write_protected(ctsio); retval = 1; goto bailout; @@ -13303,8 +13301,7 @@ ctl_serseq_done(union ctl_io *io) { struct ctl_lun *lun = CTL_LUN(io); - if (lun->be_lun == NULL || - lun->be_lun->serseq == CTL_LUN_SERSEQ_OFF) + if (lun->be_lun->serseq == CTL_LUN_SERSEQ_OFF) return; mtx_lock(&lun->lun_lock); io->io_hdr.flags |= CTL_FLAG_SERSEQ_DONE; diff --git a/sys/cam/ctl/ctl_tpc.c b/sys/cam/ctl/ctl_tpc.c index 5e6cb09760a7..de9e97b87a3e 100644 --- a/sys/cam/ctl/ctl_tpc.c +++ b/sys/cam/ctl/ctl_tpc.c @@ -759,12 +759,12 @@ tpc_resolve(struct tpc_list *list, uint16_t idx, uint32_t *ss, { if (idx == 0xffff) { - if (ss && list->lun->be_lun) + if (ss) *ss = list->lun->be_lun->blocksize; - if (pb && list->lun->be_lun) + if (pb) *pb = list->lun->be_lun->blocksize << list->lun->be_lun->pblockexp; - if (pbo && list->lun->be_lun) + if (pbo) *pbo = list->lun->be_lun->blocksize * list->lun->be_lun->pblockoff; return (list->lun->lun); diff --git a/sys/cam/ctl/ctl_tpc_local.c b/sys/cam/ctl/ctl_tpc_local.c index 9b2c85ac8173..ba6deada86a3 100644 --- a/sys/cam/ctl/ctl_tpc_local.c +++ b/sys/cam/ctl/ctl_tpc_local.c @@ -294,12 +294,12 @@ tpcl_resolve(struct ctl_softc *softc, int init_port, lun->lun_devid->len, &cscdid->codeset, cscdid->length + 4) == 0) { lunid = lun->lun; - if (ss && lun->be_lun) + if (ss) *ss = lun->be_lun->blocksize; - if (ps && lun->be_lun) + if (ps) *ps = lun->be_lun->blocksize << lun->be_lun->pblockexp; - if (pso && lun->be_lun) + if (pso) *pso = lun->be_lun->blocksize * lun->be_lun->pblockoff; break; From owner-dev-commits-src-main@freebsd.org Fri Feb 26 01:52:00 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE7D655149D; Fri, 26 Feb 2021 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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dmt1r6TgSz4YJL; Fri, 26 Feb 2021 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 D137022527; Fri, 26 Feb 2021 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 11Q1q0sE075068; Fri, 26 Feb 2021 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 11Q1q0hV075067; Fri, 26 Feb 2021 01:52:00 GMT (envelope-from git) Date: Fri, 26 Feb 2021 01:52:00 GMT Message-Id: <202102260152.11Q1q0hV075067@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 1fc928770b5d - main - Remove stale references to opt_sio.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1fc928770b5db5bafb7386c7a3bd4918a0d7e876 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2021 01:52:01 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=1fc928770b5db5bafb7386c7a3bd4918a0d7e876 commit 1fc928770b5db5bafb7386c7a3bd4918a0d7e876 Author: Mitchell Horne AuthorDate: 2021-02-25 21:37:42 +0000 Commit: Mitchell Horne CommitDate: 2021-02-26 01:43:12 +0000 Remove stale references to opt_sio.h The sio(4) driver was removed entirely in 2019, commit 71f0077631fa. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D28929 --- sys/conf/options.amd64 | 7 ------- sys/conf/options.i386 | 7 ------- 2 files changed, 14 deletions(-) diff --git a/sys/conf/options.amd64 b/sys/conf/options.amd64 index 05b295647b6b..608bcd117e2f 100644 --- a/sys/conf/options.amd64 +++ b/sys/conf/options.amd64 @@ -24,13 +24,6 @@ LINSYSFS opt_dontuse.h TIMER_FREQ opt_clock.h -# options for serial support -COM_ESP opt_sio.h -COM_MULTIPORT opt_sio.h -CONSPEED opt_sio.h -GDBSPEED opt_sio.h -COM_NO_ACPI opt_sio.h - VGA_ALT_SEQACCESS opt_vga.h VGA_DEBUG opt_vga.h VGA_NO_FONT_LOADING opt_vga.h diff --git a/sys/conf/options.i386 b/sys/conf/options.i386 index 011d787ec68c..02b4db48f4c7 100644 --- a/sys/conf/options.i386 +++ b/sys/conf/options.i386 @@ -67,13 +67,6 @@ I486_CPU opt_global.h I586_CPU opt_global.h I686_CPU opt_global.h -# options for serial support -COM_ESP opt_sio.h -COM_MULTIPORT opt_sio.h -CONSPEED opt_sio.h -GDBSPEED opt_sio.h -COM_NO_ACPI opt_sio.h - VGA_ALT_SEQACCESS opt_vga.h VGA_DEBUG opt_vga.h VGA_NO_FONT_LOADING opt_vga.h From owner-dev-commits-src-main@freebsd.org Fri Feb 26 03:54:01 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 730F7553D93; Fri, 26 Feb 2021 03:54: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dmwkd2pr3z4hkm; Fri, 26 Feb 2021 03:54: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 53CAA23E0C; Fri, 26 Feb 2021 03:54: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 11Q3s1SV036029; Fri, 26 Feb 2021 03:54:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11Q3s1cr036028; Fri, 26 Feb 2021 03:54:01 GMT (envelope-from git) Date: Fri, 26 Feb 2021 03:54:01 GMT Message-Id: <202102260354.11Q3s1cr036028@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: 108a9384e9e9 - main - jail: Fix locking on an early jail_set error. 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: 108a9384e9e945cccba73c959f7e9cdb023cbcad Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2021 03:54:01 -0000 The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=108a9384e9e945cccba73c959f7e9cdb023cbcad commit 108a9384e9e945cccba73c959f7e9cdb023cbcad Author: Jamie Gritton AuthorDate: 2021-02-26 03:52:58 +0000 Commit: Jamie Gritton CommitDate: 2021-02-26 03:52:58 +0000 jail: Fix locking on an early jail_set error. I had locked allprison_lock without immediately setting PD_LIST_LOCKED. --- sys/kern/kern_jail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index c58751e6f5fe..c8dcf928dfaa 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -998,13 +998,13 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) jid = 0; } sx_xlock(&allprison_lock); + drflags = PD_LIST_XLOCKED; ppr = mypr; if (!prison_isalive(ppr)) { /* This jail is dying. This process will surely follow. */ error = EAGAIN; goto done_deref; } - drflags = PD_LIST_XLOCKED; if (jid != 0) { if (jid < 0) { error = EINVAL; From owner-dev-commits-src-main@freebsd.org Fri Feb 26 04:10:08 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8EB5B553E4C; Fri, 26 Feb 2021 04:10:08 +0000 (UTC) (envelope-from jamie@freebsd.org) Received: from gritton.org (gritton.org [199.192.165.131]) (using TLSv1.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 4Dmx5D31WTz4jSk; Fri, 26 Feb 2021 04:10:08 +0000 (UTC) (envelope-from jamie@freebsd.org) Received: from gritton.org ([127.0.0.131]) (authenticated bits=0) by gritton.org (8.15.2/8.15.2) with ESMTPA id 11Q4A1Sv002533; Thu, 25 Feb 2021 20:10:01 -0800 (PST) (envelope-from jamie@freebsd.org) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 25 Feb 2021 20:10:01 -0800 From: James Gritton To: Kyle Evans Cc: Alexander Richardson , src-committers , , dev-commits-src-main@freebsd.org Subject: Re: git: 811e27fa3c44 - main - jail: Add PD_KILL to remove a prison in prison_deref(). In-Reply-To: References: <202102222027.11MKRtcl033616@gitrepo.freebsd.org> User-Agent: Roundcube Webmail/1.4.1 Message-ID: <6effcf7f64ec5efec1c275d4c7798017@freebsd.org> X-Sender: jamie@freebsd.org X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (gritton.org [127.0.0.131]); Thu, 25 Feb 2021 20:10:01 -0800 (PST) X-Rspamd-Queue-Id: 4Dmx5D31WTz4jSk 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2021 04:10:08 -0000 On 2021-02-24 22:02, Kyle Evans wrote: > On Wed, Feb 24, 2021 at 11:53 PM James Gritton > wrote: >> >> On 2021-02-24 21:29, Kyle Evans wrote: >> > On Tue, Feb 23, 2021 at 7:16 AM Alexander Richardson >> > wrote: >> >> >> >> On Mon, 22 Feb 2021 at 20:28, Jamie Gritton wrote: >> >> > >> >> > The branch main has been updated by jamie: >> >> > >> >> > URL: https://cgit.FreeBSD.org/src/commit/?id=811e27fa3c445664e36071a7d08228fc7fb85676 >> >> > >> >> > commit 811e27fa3c445664e36071a7d08228fc7fb85676 >> >> > Author: Jamie Gritton >> >> > AuthorDate: 2021-02-22 20:27:44 +0000 >> >> > Commit: Jamie Gritton >> >> > CommitDate: 2021-02-22 20:27:44 +0000 >> >> > >> >> > jail: Add PD_KILL to remove a prison in prison_deref(). >> >> > >> >> > Add the PD_KILL flag that instructs prison_deref() to take steps >> >> > to actively kill a prison and its descendents, namely marking it >> >> > PRISON_STATE_DYING, clearing its PR_PERSIST flag, and killing any >> >> > attached processes. >> >> > >> >> > This replaces a similar loop in sys_jail_remove(), bringing the >> >> > operation under the same single hold on allprison_lock that it already >> >> > has. It is also used to clean up failed jail (re-)creations in >> >> > kern_jail_set(), which didn't generally take all the proper steps. >> >> > >> >> > Differential Revision: https://reviews.freebsd.org/D28473 >> >> >> >> Hi Jamie, >> >> >> >> After this commit running cd /usr/tests/lib/libc/sys && kyua test >> >> cpuset_test renders the entire system unusable: all exec calls >> >> afterwards seem to fail. In Jenkins it's triggering a kernel panic: >> >> https://ci.freebsd.org/job/FreeBSD-main-amd64-test/17630/consoleFull >> >> Reverting this commit fixes the issue. >> >> >> > >> > Based on the backtrace and a wild stab in the dark, the last >> > prison_deref() in do_jail_attach() prior to successful return should >> > explicitly clear the PD_KILL flag from drflags. >> > >> > Thanks, >> > >> > Kyle Evans >> >> Yep, that's what's doing it. Actually, PD_KILL has no business being >> passed to do_jail_attach in the first place. Running a test on that >> right now. >> > > Ah, good point! IMHO we should KASSERT() that as well in > do_jail_attach(); it doesn't feel like we can do anything sensible > with the flag there, so we might as well raise awareness that the > caller needs to be more careful if attach failure is significant to > the lifetime of the target. That's a good point for safety, though I'm doing it slightly differently. Now do_jail_attach() explicitly only uses the lock-status-related flags. For the sake of redundancy, kern_jail_set() also only passes those flags. I've added a couple of defines in case some other function decides to take those flags: PD_OP_FLAGS for the operations that prison_deref() should do, and PD_LOCK_FLAGS for the status of the prison locks. I did add a KASSERT() in prison_deref() to detect any attempt to pass PD_KILL to prison0. A panic is a good deal better than a zombie system without processes. - Jamie From owner-dev-commits-src-main@freebsd.org Fri Feb 26 04:12:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 31838553E7B; Fri, 26 Feb 2021 04:12: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dmx820zYmz4jhw; Fri, 26 Feb 2021 04:12: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 151FD242D4; Fri, 26 Feb 2021 04:12: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 11Q4CXBK063118; Fri, 26 Feb 2021 04:12:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11Q4CX5T063117; Fri, 26 Feb 2021 04:12:33 GMT (envelope-from git) Date: Fri, 26 Feb 2021 04:12:33 GMT Message-Id: <202102260412.11Q4CX5T063117@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: 589e4c1df4a6 - main - jail: Add safety around prison_deref() flags. 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: 589e4c1df4a6e4b1368f26fc7fef704a2e5cb42c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2021 04:12:34 -0000 The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=589e4c1df4a6e4b1368f26fc7fef704a2e5cb42c commit 589e4c1df4a6e4b1368f26fc7fef704a2e5cb42c Author: Jamie Gritton AuthorDate: 2021-02-26 04:10:42 +0000 Commit: Jamie Gritton CommitDate: 2021-02-26 04:10:42 +0000 jail: Add safety around prison_deref() flags. do_jail_attach() now only uses the PD_XXX flags that refer to lock status, so make sure that something else like PD_KILL doesn't slip through. Add a KASSERT() in prison_deref() to catch any further PD_KILL misuse. --- sys/kern/kern_jail.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index c8dcf928dfaa..b5c8f6ebf9be 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -161,6 +161,8 @@ static void prison_racct_detach(struct prison *pr); #define PD_LOCKED 0x10 /* pr_mtx is held */ #define PD_LIST_SLOCKED 0x20 /* allprison_lock is held shared */ #define PD_LIST_XLOCKED 0x40 /* allprison_lock is held exclusive */ +#define PD_OP_FLAGS 0x07 /* Operation flags */ +#define PD_LOCK_FLAGS 0x70 /* Lock status flags */ /* * Parameter names corresponding to PR_* flag values. Size values are for kvm @@ -1836,7 +1838,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) /* Attach this process to the prison if requested. */ if (flags & JAIL_ATTACH) { error = do_jail_attach(td, pr, - prison_lock_xlock(pr, drflags & ~PD_KILL)); + prison_lock_xlock(pr, drflags & PD_LOCK_FLAGS)); drflags &= ~(PD_LOCKED | PD_LIST_XLOCKED); if (error) { vfs_opterror(opts, "attach failed"); @@ -2346,6 +2348,7 @@ do_jail_attach(struct thread *td, struct prison *pr, int drflags) mtx_assert(&pr->pr_mtx, MA_OWNED); sx_assert(&allprison_lock, SX_LOCKED); + drflags &= PD_LOCK_FLAGS; /* * XXX: Note that there is a slight race here if two threads * in the same privileged process attempt to attach to two @@ -2719,6 +2722,8 @@ prison_deref(struct prison *pr, int flags) for (;;) { if (flags & PD_KILL) { /* Kill the prison and its descendents. */ + KASSERT(pr != &prison0, + ("prison_deref trying to kill prison0")); if (!(flags & PD_DEREF)) { prison_hold(pr); flags |= PD_DEREF; @@ -2755,7 +2760,6 @@ prison_deref(struct prison *pr, int flags) } } if (flags & PD_KILL) { - flags &= ~PD_KILL; /* * Any remaining user references are probably processes * that need to be killed, either in this prison or its @@ -2763,6 +2767,8 @@ prison_deref(struct prison *pr, int flags) */ if (refcount_load(&pr->pr_uref) > 0) killpr = pr; + /* Make sure the parent prison doesn't get killed. */ + flags &= ~PD_KILL; } if (flags & PD_DEREF) { /* Drop a reference. */ From owner-dev-commits-src-main@freebsd.org Fri Feb 26 06:04:01 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 487A75562FB; Fri, 26 Feb 2021 06:04: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dmzcd1Zrgz4pHM; Fri, 26 Feb 2021 06:04: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 28BAE2581B; Fri, 26 Feb 2021 06:04: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 11Q64113009568; Fri, 26 Feb 2021 06:04:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11Q641sW009567; Fri, 26 Feb 2021 06:04:01 GMT (envelope-from git) Date: Fri, 26 Feb 2021 06:04:01 GMT Message-Id: <202102260604.11Q641sW009567@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 763db5893287 - main - rc: save and restore $IFS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 763db58932874bb47fc6f9322ab81cc947f80991 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2021 06:04:01 -0000 The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=763db58932874bb47fc6f9322ab81cc947f80991 commit 763db58932874bb47fc6f9322ab81cc947f80991 Author: Cy Schubert AuthorDate: 2021-02-26 05:39:18 +0000 Commit: Cy Schubert CommitDate: 2021-02-26 06:03:38 +0000 rc: save and restore $IFS Fix another bug in 77e1ccbee3ed6c837929e4e232fd07f95bfc8294. $IFS should be fully restored for its other users. PR: 249192 Reported by: jkim MFC after: 3 weeks X-MFC with: 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 --- libexec/rc/rc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libexec/rc/rc b/libexec/rc/rc index 92eb5c48aab7..2cb840e68919 100644 --- a/libexec/rc/rc +++ b/libexec/rc/rc @@ -103,9 +103,10 @@ checkyesno rc_parallel_start && _rc_parallel='-p' files=`rcorder ${skip} ${skip_firstboot} ${_rc_parallel} /etc/rc.d/* 2>/dev/null` _rc_elem_done=' ' +oldifs="$IFS" IFS=$'\n' for _rc_group in ${files}; do - unset IFS + IFS="$oldifs" for _rc_elem in ${_rc_group}; do run_rc_script ${_rc_elem} ${_boot} & _rc_elem_done="${_rc_elem_done}${_rc_elem} " @@ -119,7 +120,7 @@ for _rc_group in ${files}; do done unset files local_rc -unset IFS +IFS="$oldifs" # Now that disks are mounted, for each dir in $local_startup # search for init scripts that use the new rc.d semantics. @@ -138,7 +139,7 @@ fi files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} ${_rc_parallel} 2>/dev/null` IFS=$'\n' for _rc_group in ${files}; do - unset IFS + IFS="$oldifs" for _rc_elem in ${_rc_group}; do case "$_rc_elem_done" in *" $_rc_elem "*) continue ;; @@ -149,7 +150,7 @@ for _rc_group in ${files}; do wait IFS=$'\n' done -unset IFS +IFS="$oldifs" # Remove the firstboot sentinel, and reboot if it was requested. # Be a bit paranoid about removing it to handle the common failure From owner-dev-commits-src-main@freebsd.org Fri Feb 26 07:48:03 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 333725591B3; Fri, 26 Feb 2021 07:48: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dn1wg0shKz3C05; Fri, 26 Feb 2021 07:48: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 0C3F5265F3; Fri, 26 Feb 2021 07:48: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 11Q7m2fp042501; Fri, 26 Feb 2021 07:48:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11Q7m2Gc042499; Fri, 26 Feb 2021 07:48:02 GMT (envelope-from git) Date: Fri, 26 Feb 2021 07:48:02 GMT Message-Id: <202102260748.11Q7m2Gc042499@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: dfff1de729bd - main - cxgbe(4): Read the rx 'c' channel for a port and make it available. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dfff1de729bd73004404863b7f9e8a9bda7b0f04 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2021 07:48:03 -0000 The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=dfff1de729bd73004404863b7f9e8a9bda7b0f04 commit dfff1de729bd73004404863b7f9e8a9bda7b0f04 Author: Navdeep Parhar AuthorDate: 2021-02-26 02:10:52 +0000 Commit: Navdeep Parhar CommitDate: 2021-02-26 07:46:14 +0000 cxgbe(4): Read the rx 'c' channel for a port and make it available. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/adapter.h | 1 + sys/dev/cxgbe/common/t4_hw.c | 18 ++++++++++++++++++ sys/dev/cxgbe/t4_main.c | 2 ++ 3 files changed, 21 insertions(+) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 5fe7b76ccb0d..ff9e4eacf112 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -306,6 +306,7 @@ struct port_info { uint8_t tx_chan; uint8_t mps_bg_map; /* rx MPS buffer group bitmap */ uint8_t rx_e_chan_map; /* rx TP e-channel bitmap */ + uint8_t rx_c_chan; /* rx TP c-channel */ struct link_config link_cfg; struct ifmedia media; diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index b3934381ba7a..bb08c55c87b2 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -6818,6 +6818,23 @@ static unsigned int t4_get_rx_e_chan_map(struct adapter *adap, int idx) return 1 << idx; } +/* + * TP RX c-channel associated with the port. + */ +static unsigned int t4_get_rx_c_chan(struct adapter *adap, int idx) +{ + u32 param, val; + int ret; + + param = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_TPCHMAP)); + ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1, ¶m, &val); + if (!ret) + return (val >> (8 * idx)) & 0xff; + + return 0; +} + /** * t4_get_port_type_description - return Port Type string description * @port_type: firmware Port Type enumeration @@ -9840,6 +9857,7 @@ int t4_port_init(struct adapter *adap, int mbox, int pf, int vf, int port_id) p->tx_chan = j; p->mps_bg_map = t4_get_mps_bg_map(adap, j); p->rx_e_chan_map = t4_get_rx_e_chan_map(adap, j); + p->rx_c_chan = t4_get_rx_c_chan(adap, j); p->lport = j; if (!(adap->flags & IS_VF) || diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 3594db2ea136..c9a8b08e8d16 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -7077,6 +7077,8 @@ cxgbe_sysctls(struct port_info *pi) pi->mps_bg_map, "MPS buffer group map"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rx_e_chan_map", CTLFLAG_RD, NULL, pi->rx_e_chan_map, "TP rx e-channel map"); + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rx_c_chan", CTLFLAG_RD, NULL, + pi->rx_c_chan, "TP rx c-channel"); if (sc->flags & IS_VF) return; From owner-dev-commits-src-main@freebsd.org Fri Feb 26 09:17:29 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B2A9A55B2F4; Fri, 26 Feb 2021 09:17: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dn3vs4jspz3Hck; Fri, 26 Feb 2021 09:17: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 90AE627F1D; Fri, 26 Feb 2021 09:17: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 11Q9HTnR061176; Fri, 26 Feb 2021 09:17:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11Q9HTfq061175; Fri, 26 Feb 2021 09:17:29 GMT (envelope-from git) Date: Fri, 26 Feb 2021 09:17:29 GMT Message-Id: <202102260917.11Q9HTfq061175@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: a96ef4501919 - main - dialog: import dialog 1.3-20210117 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a96ef4501919d7ac08e94e98dc34b0bdd744802b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2021 09:17:29 -0000 The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=a96ef4501919d7ac08e94e98dc34b0bdd744802b commit a96ef4501919d7ac08e94e98dc34b0bdd744802b Merge: dfff1de729bd 01b7bcd408fd Author: Baptiste Daroussin AuthorDate: 2021-02-26 09:16:49 +0000 Commit: Baptiste Daroussin CommitDate: 2021-02-26 09:16:49 +0000 dialog: import dialog 1.3-20210117 contrib/dialog/CHANGES | 217 +- contrib/dialog/README | 4 +- contrib/dialog/VERSION | 2 +- contrib/dialog/aclocal.m4 | 1540 +- contrib/dialog/argv.c | 43 +- contrib/dialog/arrows.c | 16 +- contrib/dialog/buildlist.c | 45 +- contrib/dialog/buttons.c | 99 +- contrib/dialog/calendar.c | 95 +- contrib/dialog/checklist.c | 28 +- contrib/dialog/columns.c | 13 +- contrib/dialog/config.guess | 401 +- contrib/dialog/config.sub | 1627 +- contrib/dialog/configure | 26980 +++++++++++++----------- contrib/dialog/configure.in | 30 +- contrib/dialog/dialog-config.in | 148 +- contrib/dialog/dialog.1 | 549 +- contrib/dialog/dialog.3 | 439 +- contrib/dialog/dialog.c | 777 +- contrib/dialog/dialog.h | 80 +- contrib/dialog/dlg_colors.h | 82 +- contrib/dialog/dlg_internals.h | 47 + contrib/dialog/dlg_keys.c | 113 +- contrib/dialog/dlg_keys.h | 12 +- contrib/dialog/editbox.c | 55 +- contrib/dialog/formbox.c | 24 +- contrib/dialog/fselect.c | 121 +- contrib/dialog/guage.c | 17 +- contrib/dialog/inputbox.c | 40 +- contrib/dialog/inputstr.c | 22 +- contrib/dialog/makefile.in | 13 +- contrib/dialog/menubox.c | 59 +- contrib/dialog/mixedgauge.c | 19 +- contrib/dialog/mousewget.c | 9 +- contrib/dialog/msgbox.c | 42 +- contrib/dialog/package/debian/changelog | 108 + contrib/dialog/package/debian/compat | 2 +- contrib/dialog/package/debian/control | 9 + contrib/dialog/package/debian/copyright | 6 +- contrib/dialog/package/debian/rules | 36 +- contrib/dialog/package/dialog.map | 43 +- contrib/dialog/package/dialog.spec | 57 +- contrib/dialog/package/dialog.sym | 25 +- contrib/dialog/package/freebsd/Makefile | 2 +- contrib/dialog/pause.c | 21 +- contrib/dialog/po/ast.po | 115 + contrib/dialog/po/dialog.pot | 44 +- contrib/dialog/po/hi.po | 47 +- contrib/dialog/po/ja.po | 48 +- contrib/dialog/po/pt.po | 53 +- contrib/dialog/po/ro.po | 1 - contrib/dialog/po/sq.po | 88 +- contrib/dialog/prgbox.c | 11 +- contrib/dialog/progressbox.c | 41 +- contrib/dialog/rangebox.c | 45 +- contrib/dialog/rc.c | 305 +- contrib/dialog/{headers.sh => run_test.sh} | 107 +- contrib/dialog/samples/buildlist | 4 +- contrib/dialog/samples/buildlist2 | 10 +- contrib/dialog/samples/buildlist4 | 22 + contrib/dialog/samples/calendar | 6 +- contrib/dialog/samples/calendar-stdout | 6 +- contrib/dialog/samples/calendar2 | 6 +- contrib/dialog/samples/calendar2-stdout | 6 +- contrib/dialog/samples/calendar3 | 6 +- contrib/dialog/samples/calendar3-stdout | 6 +- contrib/dialog/samples/checklist | 4 +- contrib/dialog/samples/checklist-8bit | 18 +- contrib/dialog/samples/checklist-utf8 | 4 +- contrib/dialog/samples/checklist1 | 4 +- contrib/dialog/samples/checklist10 | 4 +- contrib/dialog/samples/checklist11 | 4 +- contrib/dialog/samples/checklist12 | 6 +- contrib/dialog/samples/checklist2 | 4 +- contrib/dialog/samples/checklist3 | 4 +- contrib/dialog/samples/checklist4 | 4 +- contrib/dialog/samples/checklist5 | 4 +- contrib/dialog/samples/checklist6 | 4 +- contrib/dialog/samples/checklist7 | 4 +- contrib/dialog/samples/checklist8 | 4 +- contrib/dialog/samples/checklist9 | 4 +- contrib/dialog/samples/copifuncs/copi.ifmcfg2 | 4 +- contrib/dialog/samples/copifuncs/copi.ifmcfg4 | 4 +- contrib/dialog/samples/dialog.py | 6 +- contrib/dialog/samples/dselect | 6 +- contrib/dialog/samples/editbox | 4 +- contrib/dialog/samples/editbox-utf8 | 4 +- contrib/dialog/samples/editbox2 | 4 +- contrib/dialog/samples/editbox3 | 4 +- contrib/dialog/samples/editbox4 | 4 +- contrib/dialog/samples/form1 | 16 +- contrib/dialog/samples/form1-both | 16 +- contrib/dialog/samples/form1-extra | 16 +- contrib/dialog/samples/form1-help | 16 +- contrib/dialog/samples/form1-utf8 | 16 +- contrib/dialog/samples/form2 | 8 +- contrib/dialog/samples/form3 | 8 +- contrib/dialog/samples/form4 | 8 +- contrib/dialog/samples/form5 | 8 +- contrib/dialog/samples/form6 | 8 +- contrib/dialog/samples/fselect | 6 +- contrib/dialog/samples/fselect-stdout | 6 +- contrib/dialog/samples/fselect0 | 6 +- contrib/dialog/samples/fselect1 | 8 +- contrib/dialog/samples/fselect1-stdout | 8 +- contrib/dialog/samples/fselect2 | 6 +- contrib/dialog/samples/fselect2-stdout | 6 +- contrib/dialog/samples/gauge2 | 4 +- contrib/dialog/samples/infobox | 4 +- contrib/dialog/samples/infobox1 | 4 +- contrib/dialog/samples/infobox2 | 4 +- contrib/dialog/samples/infobox3 | 4 +- contrib/dialog/samples/infobox4 | 4 +- contrib/dialog/samples/infobox5 | 4 +- contrib/dialog/samples/infobox6 | 4 +- contrib/dialog/samples/inputbox | 4 +- contrib/dialog/samples/inputbox-both | 4 +- contrib/dialog/samples/inputbox-extra | 4 +- contrib/dialog/samples/inputbox-help | 4 +- contrib/dialog/samples/inputbox1 | 4 +- contrib/dialog/samples/inputbox2 | 4 +- contrib/dialog/samples/inputbox3 | 4 +- contrib/dialog/samples/inputbox4 | 6 +- contrib/dialog/samples/inputbox5 | 4 +- contrib/dialog/samples/inputbox6-8bit | 10 +- contrib/dialog/samples/inputbox6-utf8 | 4 +- contrib/dialog/samples/inputbox7 | 6 +- contrib/dialog/samples/inputmenu | 12 +- contrib/dialog/samples/inputmenu-stdout | 12 +- contrib/dialog/samples/inputmenu1 | 12 +- contrib/dialog/samples/inputmenu2 | 12 +- contrib/dialog/samples/inputmenu3 | 14 +- contrib/dialog/samples/inputmenu4 | 12 +- contrib/dialog/samples/install/setup.c | 2 +- contrib/dialog/samples/install/setup.help | 2 +- contrib/dialog/samples/killall | 14 +- contrib/dialog/samples/menubox | 8 +- contrib/dialog/samples/menubox-8bit | 16 +- contrib/dialog/samples/menubox-utf8 | 4 +- contrib/dialog/samples/menubox1 | 8 +- contrib/dialog/samples/menubox10 | 6 +- contrib/dialog/samples/menubox11 | 6 +- contrib/dialog/samples/menubox12 | 10 +- contrib/dialog/samples/menubox2 | 12 +- contrib/dialog/samples/menubox3 | 8 +- contrib/dialog/samples/menubox4 | 8 +- contrib/dialog/samples/menubox5 | 10 +- contrib/dialog/samples/menubox6 | 8 +- contrib/dialog/samples/menubox7 | 8 +- contrib/dialog/samples/menubox8 | 12 +- contrib/dialog/samples/menubox9 | 6 +- contrib/dialog/samples/mixedform | 16 +- contrib/dialog/samples/mixedform2 | 16 +- contrib/dialog/samples/msgbox | 4 +- contrib/dialog/samples/msgbox-help | 4 +- contrib/dialog/samples/msgbox-utf8 | 4 +- contrib/dialog/samples/msgbox1 | 12 +- contrib/dialog/samples/msgbox2 | 12 +- contrib/dialog/samples/msgbox3 | 4 +- contrib/dialog/samples/msgbox4-8bit | 20 +- contrib/dialog/samples/msgbox4-utf8 | 18 +- contrib/dialog/samples/msgbox5 | 4 +- contrib/dialog/samples/msgbox6 | 4 +- contrib/dialog/samples/msgbox6a | 4 +- contrib/dialog/samples/password | 4 +- contrib/dialog/samples/password1 | 4 +- contrib/dialog/samples/password2 | 4 +- contrib/dialog/samples/passwordform1 | 16 +- contrib/dialog/samples/passwordform1-utf8 | 16 +- contrib/dialog/samples/pause | 4 +- contrib/dialog/samples/pause-both | 6 +- contrib/dialog/samples/pause-extra | 6 +- contrib/dialog/samples/pause-help | 4 +- contrib/dialog/samples/prgbox | 4 +- contrib/dialog/samples/prgbox2 | 4 +- contrib/dialog/samples/programbox | 4 +- contrib/dialog/samples/programbox2 | 4 +- contrib/dialog/samples/programbox3 | 22 + contrib/dialog/samples/progress | 4 +- contrib/dialog/samples/progress2 | 4 +- contrib/dialog/samples/radiolist | 4 +- contrib/dialog/samples/radiolist1 | 4 +- contrib/dialog/samples/radiolist10 | 4 +- contrib/dialog/samples/radiolist2 | 4 +- contrib/dialog/samples/radiolist3 | 4 +- contrib/dialog/samples/radiolist4 | 4 +- contrib/dialog/samples/rangebox | 6 +- contrib/dialog/samples/rangebox2 | 6 +- contrib/dialog/samples/rangebox3 | 6 +- contrib/dialog/samples/rangebox4 | 6 +- contrib/dialog/samples/report-button | 10 +- contrib/dialog/samples/report-edit | 10 +- contrib/dialog/samples/report-string | 18 +- contrib/dialog/samples/report-tempfile | 18 +- contrib/dialog/samples/report-yesno | 10 +- contrib/dialog/samples/rotated-data | 6 +- contrib/dialog/samples/run_test.sh | 10 +- contrib/dialog/samples/setup-vars | 29 +- contrib/dialog/samples/tailbox | 4 +- contrib/dialog/samples/tailboxbg | 4 +- contrib/dialog/samples/tailboxbg1 | 6 +- contrib/dialog/samples/tailboxbg2 | 6 +- contrib/dialog/samples/testdata-8bit | 0 contrib/dialog/samples/textbox | 6 +- contrib/dialog/samples/textbox-both | 8 +- contrib/dialog/samples/textbox-help | 8 +- contrib/dialog/samples/textbox2 | 6 +- contrib/dialog/samples/textbox3 | 8 +- contrib/dialog/samples/timebox | 6 +- contrib/dialog/samples/timebox-stdout | 6 +- contrib/dialog/samples/timebox2 | 6 +- contrib/dialog/samples/timebox2-stdout | 6 +- contrib/dialog/samples/treeview | 4 +- contrib/dialog/samples/treeview2 | 6 +- contrib/dialog/samples/treeview4 | 24 + contrib/dialog/samples/wheel | 81 +- contrib/dialog/samples/yesno | 4 +- contrib/dialog/samples/yesno-both | 4 +- contrib/dialog/samples/yesno-extra | 4 +- contrib/dialog/samples/yesno-help | 4 +- contrib/dialog/samples/yesno-utf8 | 4 +- contrib/dialog/samples/yesno2 | 4 +- contrib/dialog/samples/yesno3 | 4 +- contrib/dialog/samples/yesno4 | 4 +- contrib/dialog/tailbox.c | 40 +- contrib/dialog/textbox.c | 142 +- contrib/dialog/timebox.c | 41 +- contrib/dialog/trace.c | 32 +- contrib/dialog/treeview.c | 38 +- contrib/dialog/ttysize.c | 8 +- contrib/dialog/ui_getc.c | 67 +- contrib/dialog/util.c | 514 +- contrib/dialog/yesno.c | 36 +- 233 files changed, 20681 insertions(+), 16543 deletions(-) diff --cc contrib/dialog/README index b2c9b8595dbc,000000000000..1bad4311dd40 mode 100644,000000..100644 --- a/contrib/dialog/README +++ b/contrib/dialog/README @@@ -1,61 -1,0 +1,61 @@@ +-(1999-12-25)------------------------------------------------------------------- +This version of dialog, formerly known as cdialog is based on the Debian +package for dialog 0.9a (see CHANGES for recent modifications) +- T.Dickey + +-(1996-01-15)------------------------------------------------------------------- +I have uploaded cdialog-0.9a.tar.gz to sunsite. It should be moved +to pub/Linux/utils/shell, I think. + +Starting point for cdialog v.0.9a was dialog-0.6c. Many new features +like as Resolution-independence, Auto-sizing, Maximizing, more widget +on the same screen (multi-widget), etc. were added. New widget are +tailbox and tailbox-in-background. Here are the options: + + Usage: dialog + { --and-widget } + + Common options: + [--backtitle ] [--sleep ] [--beep] [--beep-after] + [--clear] [--begin ] [--aspect ] [--print-size] + [--print-maxsize] [--size-err] [--separate-output] [--cr-wrap] + [--tab-len ] [--tab-correct] [--print-version] [--no-kill] + [--title ] + + Global options: [--shadow] [--no-shadow] [--separate-widget "<str>"] + +At the moment, mouse support with libgpm can't be added because it +does't implement the wtimeout() function of ncurses. Wtimeout() is +needed to have more widgets (es.tailbox) cooperating on the same +screen... I don't know if with newer versions of libgpm it's possible. + +I have no more time to write docs for this new version...Is there +anyone, that looking at the code, can do it??? Ouch! :-) +Don't flame me! + +For the future, if any volunteer want, the way to evolve cdialog is to +1) make a daemon for a better support of multi-tasking or implementing + multithreading. +2) add an option that could permit to read commands (--options) from a + file, like as in a normal programming language, but maintaining - compatiblity with older version of dialog. ++ compatibility with older version of dialog. + +I no longer could maintain cdialog... +Executable and library name of cdialog are the same of dialog, for - compatiblity. ++compatibility. + +I think that only one directive should be follow: don't use a resource +like stdin, stdout when you'll write new options for cdialog; these +resources have to be shared from all widgets on the command line. +Guage uses stdin :-/ so that can't be mixed for example with an inputbox, +but it was made before of multi-widget. However this is not a big problem! + +THERE ARE NO *KNOWN* BUGS. If anyone has much time and can find the way +to add wtimeout() support to libgpm, also mouse could be supported. + +Please use ncurses-1.9.4 or newer. + +| __ | demarco_p@abramo.it:~$ make Linux | more > UserFriendly; +| /__) | /~~ _ _ _ _ /~\ _ / . _ | +|/ ako | (___ (_) | ) ) (-' (__/ | ) /__ | | ) (_| >< . coordinator. + diff --cc contrib/dialog/dlg_internals.h index 000000000000,4c6fb9e09615..4c6fb9e09615 mode 000000,100644..100644 --- a/contrib/dialog/dlg_internals.h +++ b/contrib/dialog/dlg_internals.h diff --cc contrib/dialog/package/freebsd/Makefile index 6f6d652eed1d,000000000000..88a6a5d48194 mode 100644,000000..100644 --- a/contrib/dialog/package/freebsd/Makefile +++ b/contrib/dialog/package/freebsd/Makefile @@@ -1,48 -1,0 +1,48 @@@ +# New ports collection makefile for: ncdialog +# Date created: 2003-01-11 +# Whom: AlanE <alane@freebsd.org> +# +# $Carpetsmoker: ports/cdialog/Makefile,v 1.4 2007/04/22 11:30:53 carpetsmoker Exp $ +# $FreeBSD$ +# + +PORTNAME= cdialog - PORTVERSION= 1.3.20180621 ++PORTVERSION= 1.3.20210117 +PORTEPOCH= 1 +CATEGORIES= devel +MASTER_SITES= ftp://ftp.invisible-island.net/${PORTNAME:S|^c||}/ +DISTNAME= ${PORTNAME:S|^c||}-${PORTVERSION:R}-${PORTVERSION:E} +EXTRACT_SUFX= .tgz + +MAINTAINER= sylvio@FreeBSD.org +COMMENT= An enhanced version of 'dialog' to work with ncurses + +LICENSE= LGPL21 + +USE_AUTOTOOLS= libtool +GNU_CONFIGURE= yes +USE_LDCONFIG= yes +CONFIGURE_ARGS= --enable-widec \ + --includedir=${PREFIX}/include/${PORTNAME} \ + --with-libtool \ + --with-ncursesw \ + --with-package=${PORTNAME} +MAKEFILE= makefile + +MAN1= cdialog.1 +MAN3= cdialog.3 +MANCOMPRESSED= no + +INSTALL_TARGET= install-strip install-man install-lib + +.if !defined(NOPORTEXAMPLES) +post-patch: + @${FIND} ${WRKSRC}/samples/ -type f -exec ${REINPLACE_CMD} -i "" "s|dialog|cdialog|g" {} \; + +post-install: + @${MKDIR} ${EXAMPLESDIR} + cd ${WRKSRC}/samples && ${FIND} . | \ + ${CPIO} -pdm -L -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR} +.endif + +.include <bsd.port.mk> diff --cc contrib/dialog/po/ast.po index 000000000000,29f8d3440297..29f8d3440297 mode 000000,100644..100644 --- a/contrib/dialog/po/ast.po +++ b/contrib/dialog/po/ast.po diff --cc contrib/dialog/samples/buildlist4 index 000000000000,6bfa98708017..6bfa98708017 mode 000000,100755..100755 --- a/contrib/dialog/samples/buildlist4 +++ b/contrib/dialog/samples/buildlist4 diff --cc contrib/dialog/samples/programbox3 index 000000000000,1dc020c3d222..1dc020c3d222 mode 000000,100755..100755 --- a/contrib/dialog/samples/programbox3 +++ b/contrib/dialog/samples/programbox3 diff --cc contrib/dialog/samples/testdata-8bit index f09021dc19db,f09021dc19db..f09021dc19db mode 100755,100644..100644 --- a/contrib/dialog/samples/testdata-8bit +++ b/contrib/dialog/samples/testdata-8bit diff --cc contrib/dialog/samples/treeview4 index 000000000000,4b1f65eef457..4b1f65eef457 mode 000000,100755..100755 --- a/contrib/dialog/samples/treeview4 +++ b/contrib/dialog/samples/treeview4 From owner-dev-commits-src-main@freebsd.org Fri Feb 26 09:17:30 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C894555B3CA; Fri, 26 Feb 2021 09:17: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dn3vt5Ld7z3HWb; Fri, 26 Feb 2021 09:17: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 AA80F32; Fri, 26 Feb 2021 09:17: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 11Q9HU02061199; Fri, 26 Feb 2021 09:17:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11Q9HUnx061198; Fri, 26 Feb 2021 09:17:30 GMT (envelope-from git) Date: Fri, 26 Feb 2021 09:17:30 GMT Message-Id: <202102260917.11Q9HUnx061198@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin <bapt@FreeBSD.org> Subject: git: ec74116ace52 - main - dialog: finish update to 1.3-20210117 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ec74116ace52591cf121623e2010ae5efab5524a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 09:17:30 -0000 The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=ec74116ace52591cf121623e2010ae5efab5524a commit ec74116ace52591cf121623e2010ae5efab5524a Author: Baptiste Daroussin <bapt@FreeBSD.org> AuthorDate: 2021-02-26 09:13:13 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2021-02-26 09:17:19 +0000 dialog: finish update to 1.3-20210117 patch dialog.c which requires stddef for the usage of offsetof catchup on the config header --- contrib/dialog/dialog.c | 1 + gnu/lib/libdialog/Makefile | 2 +- gnu/lib/libdialog/dlg_config.h | 15 ++++++++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/contrib/dialog/dialog.c b/contrib/dialog/dialog.c index 510baeb97add..f59c9dc03c13 100644 --- a/contrib/dialog/dialog.c +++ b/contrib/dialog/dialog.c @@ -26,6 +26,7 @@ #include <dialog.h> +#include <stddef.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> diff --git a/gnu/lib/libdialog/Makefile b/gnu/lib/libdialog/Makefile index e4f1b62121d9..8c6b84b64f90 100644 --- a/gnu/lib/libdialog/Makefile +++ b/gnu/lib/libdialog/Makefile @@ -15,7 +15,7 @@ MAN= dialog.3 LIBADD= ncursesw m -CFLAGS+= -I${.CURDIR} -I${DIALOG} -D_XOPEN_SOURCE_EXTENDED -DGCC_UNUSED=__unused +CFLAGS+= -I${.CURDIR} -I${DIALOG} -D_XOPEN_SOURCE_EXTENDED -Wno-macro-redefined .PATH: ${DIALOG} WARNS?= 1 diff --git a/gnu/lib/libdialog/dlg_config.h b/gnu/lib/libdialog/dlg_config.h index ee1d3f9ad3cb..1bd45183f509 100644 --- a/gnu/lib/libdialog/dlg_config.h +++ b/gnu/lib/libdialog/dlg_config.h @@ -6,8 +6,15 @@ */ #define CURSES_WACS_ARRAY _nc_wacs -#define DIALOG_PATCHDATE 20180621 +#define CURSES_WACS_SYMBOLS 1 +#define DIALOG_PATCHDATE 20210117 #define DIALOG_VERSION "1.3" +#define GCC_NORETURN __attribute__((noreturn)) +#define GCC_PRINTF 1 +#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) +#define GCC_SCANF 1 +#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var))) +#define GCC_UNUSED __attribute__((unused)) #define HAVE_ALLOCA 1 #define HAVE_BTOWC 1 #define HAVE_COLOR 1 @@ -58,6 +65,7 @@ #define HAVE_NL_TYPES_H 1 #define HAVE_PUTENV 1 #define HAVE_RC_FILE 1 +#define HAVE_RC_FILE2 1 #define HAVE_SEARCH_H 1 #define HAVE_SETENV 1 #define HAVE_SETLOCALE 1 @@ -93,11 +101,11 @@ #define HAVE_WCTOMB 1 #define HAVE_WCURSYNCUP 1 #define HAVE_WGETPARENT 1 +#define HAVE_WGET_WCH 1 #define HAVE_WHIPTAIL 1 #define HAVE_WSYNCUP 1 #define HAVE_XDIALOG 1 #define HAVE_XDIALOG2 1 -#define HAVE__NC_FREE_AND_EXIT 1 #define ICONV_CONST #define MIXEDCASE_FILENAMES 1 #define NCURSES 1 @@ -105,7 +113,8 @@ #define PACKAGE "dialog" #define RETSIGTYPE void #define STDC_HEADERS 1 -#define SYSTEM_NAME "freebsd12.0" +#define SYSTEM_NAME "FreeBSD" #define TIME_WITH_SYS_TIME 1 #define TYPE_CHTYPE_IS_SCALAR 1 #define USE_WIDE_CURSES 1 +#define WIDEC_CURSES 1 From owner-dev-commits-src-main@freebsd.org Fri Feb 26 10:14:12 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7C1AB55C6A2; Fri, 26 Feb 2021 10:14: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dn59J2yCXz3M0K; Fri, 26 Feb 2021 10:14: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 583ADBBF; Fri, 26 Feb 2021 10:14: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 11QAEC1M040107; Fri, 26 Feb 2021 10:14:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11QAECun040106; Fri, 26 Feb 2021 10:14:12 GMT (envelope-from git) Date: Fri, 26 Feb 2021 10:14:12 GMT Message-Id: <202102261014.11QAECun040106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin <bapt@FreeBSD.org> Subject: git: 172f2fc11cc5 - main - dialog: guard macros definition to avoid redifinition MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 172f2fc11cc560bbd3d3b29260a8ae21df6a541b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 10:14:12 -0000 The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=172f2fc11cc560bbd3d3b29260a8ae21df6a541b commit 172f2fc11cc560bbd3d3b29260a8ae21df6a541b Author: Baptiste Daroussin <bapt@FreeBSD.org> AuthorDate: 2021-02-26 10:13:43 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2021-02-26 10:13:43 +0000 dialog: guard macros definition to avoid redifinition This unbreaks building libdpv --- gnu/lib/libdialog/dlg_config.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gnu/lib/libdialog/dlg_config.h b/gnu/lib/libdialog/dlg_config.h index 1bd45183f509..30df29f877c6 100644 --- a/gnu/lib/libdialog/dlg_config.h +++ b/gnu/lib/libdialog/dlg_config.h @@ -9,12 +9,20 @@ #define CURSES_WACS_SYMBOLS 1 #define DIALOG_PATCHDATE 20210117 #define DIALOG_VERSION "1.3" +#ifndef GCC_NORETURN #define GCC_NORETURN __attribute__((noreturn)) +#endif #define GCC_PRINTF 1 +#ifndef GCC_PRINTFLIKE #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) +#endif #define GCC_SCANF 1 +#ifndef GCC_SCANFLIKE #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var))) +#endif +#ifndef GCC_UNUSED #define GCC_UNUSED __attribute__((unused)) +#endif #define HAVE_ALLOCA 1 #define HAVE_BTOWC 1 #define HAVE_COLOR 1 From owner-dev-commits-src-main@freebsd.org Fri Feb 26 13:11:03 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9F6E3560D74; Fri, 26 Feb 2021 13:11: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dn95M3sbcz3n3c; Fri, 26 Feb 2021 13:11: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 77CA32FC8; Fri, 26 Feb 2021 13:11: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 11QDB3fW075521; Fri, 26 Feb 2021 13:11:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11QDB3M6075520; Fri, 26 Feb 2021 13:11:03 GMT (envelope-from git) Date: Fri, 26 Feb 2021 13:11:03 GMT Message-Id: <202102261311.11QDB3M6075520@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Daniel Ebdrup Jensen <debdrup@FreeBSD.org> Subject: git: 1bf86687c2eb - main - etc/shells: Add a reference to the ftpd manpage MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: debdrup X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1bf86687c2eb744497b6d9fd02b80e9821b1f4d6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 13:11:03 -0000 The branch main has been updated by debdrup (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=1bf86687c2eb744497b6d9fd02b80e9821b1f4d6 commit 1bf86687c2eb744497b6d9fd02b80e9821b1f4d6 Author: ceri <ceri@submonkey.net> AuthorDate: 2021-02-25 17:24:19 +0000 Commit: Daniel Ebdrup Jensen <debdrup@FreeBSD.org> CommitDate: 2021-02-26 13:09:19 +0000 etc/shells: Add a reference to the ftpd manpage While here, also fix incorrect capitalizaiton --- etc/shells | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/shells b/etc/shells index fe1e0294a010..a3107faec4c2 100644 --- a/etc/shells +++ b/etc/shells @@ -1,7 +1,7 @@ # $FreeBSD$ # # List of acceptable shells for chpass(1). -# Ftpd will not allow users to connect who are not using +# ftpd(8) will not allow users to connect who are not using # one of these shells. /bin/sh From owner-dev-commits-src-main@freebsd.org Fri Feb 26 14:20:25 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9E7905626E1; Fri, 26 Feb 2021 14:20:25 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DnBdN2B7Pz3rV2; Fri, 26 Feb 2021 14:20:24 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id Fdyel6RVqnRGtFdyflZHzs; Fri, 26 Feb 2021 07:20:22 -0700 X-Authority-Analysis: v=2.4 cv=cagXElPM c=1 sm=1 tr=0 ts=603903a6 a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=qa6Q16uM49sA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=zGi-gAaqaAkRpWm3KXMA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 37E9181B; Fri, 26 Feb 2021 06:20:19 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 11QEKJoX006569; Fri, 26 Feb 2021 06:20:19 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202102261420.11QEKJoX006569@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert <Cy.Schubert@cschubert.com> From: Cy Schubert <Cy.Schubert@cschubert.com> X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Baptiste Daroussin <bapt@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database In-reply-to: <202102251327.11PDR4eC083842@gitrepo.freebsd.org> References: <202102251327.11PDR4eC083842@gitrepo.freebsd.org> Comments: In-reply-to Baptiste Daroussin <bapt@FreeBSD.org> message dated "Thu, 25 Feb 2021 13:27:04 +0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 26 Feb 2021 06:20:19 -0800 X-CMAE-Envelope: MS4xfFXHLCGTlJFjTrXCEAnOuJ4490RrxWA0qD6d19vgjah0DKtY9SwPx4MeOLoUMMgXabZX/rX07kdc81ozzfFyUX3jQ0BUDU9XF8CsGTmIM5/CJ76UE+Kr VVEeRG+DweJ5Qux/PJIw3Xy05Ef3lqbKRlTem3t/AhQGnWn3NejqhQZEnqwfLN46afOmbkje71Ayf0QoHt8v2EnMbWzcjTqgcvk0xPzjFAc3aWQ1lginDkh2 k/tdzmRZ9dgue7ZoibGSwnfDGIYJbteyy91xXNP+uNH7kn9wq9UuKdC8xELF4xUq/rf4FMwo6TSjYPvVyhdIs7rLk/P51xtNEa8dU8VC7i4= X-Rspamd-Queue-Id: 4DnBdN2B7Pz3rV2 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.136.139) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-1.70 / 15.00]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RECEIVED_SPAMHAUS_PBL(0.00)[70.67.229.168:received]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MIME_TRACE(0.00)[0:+]; RCVD_IN_DNSWL_LOW(-0.10)[64.59.136.139:from]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; REPLYTO_EQ_FROM(0.00)[]; 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)[cschubert.com: no valid DMARC record]; AUTH_NA(1.00)[]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RWL_MAILSPIKE_VERYGOOD(0.00)[64.59.136.139:from]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 14:20:25 -0000 In message <202102251327.11PDR4eC083842@gitrepo.freebsd.org>, Baptiste Daroussi n writes: > The branch main has been updated by bapt: > > URL: https://cgit.FreeBSD.org/src/commit/?id=2a50a9de8340f08bd876e9e5993332ae > 14376f80 > > commit 2a50a9de8340f08bd876e9e5993332ae14376f80 > Author: Baptiste Daroussin <bapt@FreeBSD.org> > AuthorDate: 2021-02-23 16:17:32 +0000 > Commit: Baptiste Daroussin <bapt@FreeBSD.org> > CommitDate: 2021-02-25 13:25:32 +0000 > > terminfo: add terminfo database > > Tested by: manu, jbeich > --- > share/Makefile | 1 + > share/terminfo/Makefile | 34 ++++++++++++++++++++++++++++++++++ > 2 files changed, 35 insertions(+) > > diff --git a/share/Makefile b/share/Makefile > index c4e12b05f7db..d6854b230ae5 100644 > --- a/share/Makefile > +++ b/share/Makefile > @@ -26,6 +26,7 @@ SUBDIR= ${_colldef} \ > ${_syscons} \ > tabset \ > termcap \ > + terminfo \ > ${_timedef} \ > ${_vt} \ > ${_zoneinfo} > diff --git a/share/terminfo/Makefile b/share/terminfo/Makefile > new file mode 100644 > index 000000000000..7bb11f3fdf24 > --- /dev/null > +++ b/share/terminfo/Makefile > @@ -0,0 +1,34 @@ > +PACKAGE= runtime > + > +.PATH: ${SRCTOP}/contrib/ncurses/misc > +TINFOBUILDDIR= ${.OBJDIR}/builddir > +CLEANDIRS+= builddir > + > +.include <src.tools.mk> > + > +.if !defined(_SKIP_BUILD) > +all: terminfo > +.endif > +META_TARGETS+= terminfo install-terminfo > + > +terminfo: terminfo.src > + mkdir -p ${TINFOBUILDDIR} > + ${TIC_CMD} -x -o ${TINFOBUILDDIR} ${.ALLSRC} > + > +.if make(*install*) > +TINFOS!= cd ${TINFOBUILDDIR} && find * -type f | LC_ALL=C sort > +TINFOSDIRS= ${TINFOS:C/(.).*/\1/g:O:u} > +.endif > + > +beforeinstall: install-terminfo > +install-terminfo: > + mkdir -p ${DESTDIR}/usr/share/terminfo > + cd ${DESTDIR}/usr/share/terminfo; mkdir -p ${TINFOSDIRS} > +.for f in ${TINFOS} > + ${INSTALL} ${TAG_ARGS} \ > + -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > + ${TINFOBUILDDIR}/${f} ${DESTDIR}/usr/share/terminfo/${f} > +.endfor > + > +.include <bsd.prog.mk> > + > I think this had some unintended consequences, a POLA violation that should be documented. Our termcap didn't support alternate screen buffers while terminfo does. Termcap did through t_te and t_ti but we didn't use them. Terminfo as delivered from the ncurses factory does supply rmcup and smcup; our fullscreen apps such as nvi and top see them and use the alternate screen buffer. The use of the alternate screen buffer is one of the things I hate about Linux. After running vi or top I expect the output to remain on the screen so I can use some bit of information in my next command. We now have this behaviour too. The alternate screen buffer was added to xterm an ice age ago. Most modern terminal emulators support it. As much as I feel the need to yank out rmcup an smcup from our terminfo database, we are using a feature, as distasteful as it may feel. This change probably needs a relnotes=yes and an UPDATING entry advising users that they can either change $TERM to xterm1, vt100, or some other terminal definition that doesn't support rmcup and smcup, or learn to like it. OTOH, maybe this is something we as a community don't really want and we remove the rmcup and smcup definitions from our terminfo database. Personally, I believe this is progress -- progress I'm not particularly enamoured with but progress nonetheless. But I think we need to discuss, come to some sort of decision and document it. Thoughts? -- Cheers, Cy Schubert <Cy.Schubert@cschubert.com> FreeBSD UNIX: <cy@FreeBSD.org> Web: https://FreeBSD.org NTP: <cy@nwtime.org> Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-dev-commits-src-main@freebsd.org Fri Feb 26 14:37:17 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C9F7D56309A; Fri, 26 Feb 2021 14:37:17 +0000 (UTC) (envelope-from bapt@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DnC0s592hz3sMs; Fri, 26 Feb 2021 14:37:17 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from aniel.nours.eu (ns393929.ip-176-31-115.eu [176.31.115.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 7CEFE18F5; Fri, 26 Feb 2021 14:37:17 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id 2817735DEE; Fri, 26 Feb 2021 15:37:14 +0100 (CET) Date: Fri, 26 Feb 2021 15:37:14 +0100 From: Baptiste Daroussin <bapt@FreeBSD.org> To: Cy Schubert <Cy.Schubert@cschubert.com> Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database Message-ID: <20210226143714.k24aacsrjnnhkktc@aniel.nours.eu> References: <202102251327.11PDR4eC083842@gitrepo.freebsd.org> <202102261420.11QEKJoX006569@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dqdw63fwvislrgvy" Content-Disposition: inline In-Reply-To: <202102261420.11QEKJoX006569@slippy.cwsent.com> X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 14:37:17 -0000 --dqdw63fwvislrgvy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 26, 2021 at 06:20:19AM -0800, Cy Schubert wrote: > In message <202102251327.11PDR4eC083842@gitrepo.freebsd.org>, Baptiste=20 > Daroussi > n writes: > > The branch main has been updated by bapt: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D2a50a9de8340f08bd876e9e5= 993332ae > > 14376f80 > > > > commit 2a50a9de8340f08bd876e9e5993332ae14376f80 > > Author: Baptiste Daroussin <bapt@FreeBSD.org> > > AuthorDate: 2021-02-23 16:17:32 +0000 > > Commit: Baptiste Daroussin <bapt@FreeBSD.org> > > CommitDate: 2021-02-25 13:25:32 +0000 > > > > terminfo: add terminfo database > > =20 > > Tested by: manu, jbeich > > --- > > share/Makefile | 1 + > > share/terminfo/Makefile | 34 ++++++++++++++++++++++++++++++++++ > > 2 files changed, 35 insertions(+) > > > > diff --git a/share/Makefile b/share/Makefile > > index c4e12b05f7db..d6854b230ae5 100644 > > --- a/share/Makefile > > +++ b/share/Makefile > > @@ -26,6 +26,7 @@ SUBDIR=3D ${_colldef} \ > > ${_syscons} \ > > tabset \ > > termcap \ > > + terminfo \ > > ${_timedef} \ > > ${_vt} \ > > ${_zoneinfo} > > diff --git a/share/terminfo/Makefile b/share/terminfo/Makefile > > new file mode 100644 > > index 000000000000..7bb11f3fdf24 > > --- /dev/null > > +++ b/share/terminfo/Makefile > > @@ -0,0 +1,34 @@ > > +PACKAGE=3D runtime > > + > > +.PATH: ${SRCTOP}/contrib/ncurses/misc > > +TINFOBUILDDIR=3D ${.OBJDIR}/builddir > > +CLEANDIRS+=3D builddir > > + > > +.include <src.tools.mk> > > + > > +.if !defined(_SKIP_BUILD) > > +all: terminfo > > +.endif > > +META_TARGETS+=3D terminfo install-terminfo > > + > > +terminfo: terminfo.src > > + mkdir -p ${TINFOBUILDDIR} > > + ${TIC_CMD} -x -o ${TINFOBUILDDIR} ${.ALLSRC} > > + > > +.if make(*install*) > > +TINFOS!=3D cd ${TINFOBUILDDIR} && find * -type f | LC_ALL=3DC sort > > +TINFOSDIRS=3D ${TINFOS:C/(.).*/\1/g:O:u} > > +.endif > > + > > +beforeinstall: install-terminfo > > +install-terminfo: > > + mkdir -p ${DESTDIR}/usr/share/terminfo > > + cd ${DESTDIR}/usr/share/terminfo; mkdir -p ${TINFOSDIRS} > > +.for f in ${TINFOS} > > + ${INSTALL} ${TAG_ARGS} \ > > + -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > > + ${TINFOBUILDDIR}/${f} ${DESTDIR}/usr/share/terminfo/${f} > > +.endfor > > + > > +.include <bsd.prog.mk> > > + > > >=20 > I think this had some unintended consequences, a POLA violation that shou= ld=20 > be documented. Our termcap didn't support alternate screen buffers while= =20 > terminfo does. Termcap did through t_te and t_ti but we didn't use them.= =20 > Terminfo as delivered from the ncurses factory does supply rmcup and smcu= p;=20 > our fullscreen apps such as nvi and top see them and use the alternate=20 > screen buffer. >=20 > The use of the alternate screen buffer is one of the things I hate about= =20 > Linux. After running vi or top I expect the output to remain on the scree= n=20 > so I can use some bit of information in my next command. We now have this= =20 > behaviour too. >=20 > The alternate screen buffer was added to xterm an ice age ago. Most moder= n=20 > terminal emulators support it. As much as I feel the need to yank out rmc= up=20 > an smcup from our terminfo database, we are using a feature, as distastef= ul=20 > as it may feel. This change probably needs a relnotes=3Dyes and an UPDATI= NG=20 > entry advising users that they can either change $TERM to xterm1, vt100, = or=20 > some other terminal definition that doesn't support rmcup and smcup, or= =20 > learn to like it. >=20 > OTOH, maybe this is something we as a community don't really want and we= =20 > remove the rmcup and smcup definitions from our terminfo database.=20 > Personally, I believe this is progress -- progress I'm not particularly= =20 > enamoured with but progress nonetheless. But I think we need to discuss,= =20 > come to some sort of decision and document it. >=20 > Thoughts? I agree about UPDATING and RELNOTES. I planned to do it in a couple of days= for UPDATING, as for rmcup/smcup there have been so many people asking for it, = that I didn't think people will hate it, so yes we could/should add en entry in UPDATING. I was planning to MFC it to 13.1, I don't know how much this change is a PO= LA violation or not, imho all the other benefice of terminfo over termcap for = end users are worth the MFC, but if most people vote against, I won't MFC it. Bapt --dqdw63fwvislrgvy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAmA5B5cACgkQY4mL3PG3 PloPoA/7BlnKX+E4HfJihQJNSxGWo7sSsMQSdLrLMYk0QnVyf5vXUa00gr6yn5B1 SOPGe83JfhyOoUJXzDVAqCV0vUQtGsIkBNQJHVJZQnP5Xxm0vg5V1y/lmaBbYKNG AKGVzXdWQhQWRyNAxscKOijcVNZh4+PPpIGjubNnp8ct5xxjJdhDMLFy27D5xjN6 +4wxpDSnycinaS36EtpBU0EX9I/+5aHIxpcprIQEBEocrfFmeIcR+h2TfFpr7N8r YrQ9Mq0yTFeFFJjwJqcvRG8sbyrFf/kuq9pAuMAxyt4Ud17kY0KcgQMWUDSS+oJ/ h41/3hGDgpvTKiJaUbW15b+Z9eqnQLEOmvbDeguv2vz+GrZfp1SMkn+524rBqjEa TetukmkZDSh6mqXhbMXy9hsROwAA+yt530xunYTiMP2+wURGcfsYUifJkro7emsA WfphIOo7l8jo85jdUL92UOQX6l3ja0IMC+cXCRhN2A240SOJztqUMvkwo9XJW15g RsVfirPf3tSbsO5K7Xk8m4GlfUahCtMUqJBnO9Aw7bWFJzTMwcxvgscrlnz8UbNZ EpWPMX0MpzTlgW5mNwJ1SbJ49rt18/ORpHGi+rmDXg8xd7COouteVFObYhrTbKUS ROb4XodI7kTezP072DS/3dTz0yXfXFJxGxWzA1cO1PKaZ3iCIeY= =huCu -----END PGP SIGNATURE----- --dqdw63fwvislrgvy-- From owner-dev-commits-src-main@freebsd.org Fri Feb 26 14:48:22 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 673545631A3; Fri, 26 Feb 2021 14:48:22 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DnCFd73W4z3t3k; Fri, 26 Feb 2021 14:48:21 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id FePilTleYeHr9FePjlULfU; Fri, 26 Feb 2021 07:48:20 -0700 X-Authority-Analysis: v=2.4 cv=Yq/K+6UX c=1 sm=1 tr=0 ts=60390a34 a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=qa6Q16uM49sA:10 a=w16vAm4-AAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=OsFhiFZIi2wW-GAr0TcA:9 a=CjuIK1q_8ugA:10 a=eWus_ag6ds_90y4h1ov8:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id E0E32865; Fri, 26 Feb 2021 06:48:17 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 11QEmHlA006761; Fri, 26 Feb 2021 06:48:17 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202102261448.11QEmHlA006761@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert <Cy.Schubert@cschubert.com> From: Cy Schubert <Cy.Schubert@cschubert.com> X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Baptiste Daroussin <bapt@FreeBSD.org> cc: Cy Schubert <Cy.Schubert@cschubert.com>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database In-reply-to: <20210226143714.k24aacsrjnnhkktc@aniel.nours.eu> References: <202102251327.11PDR4eC083842@gitrepo.freebsd.org> <202102261420.11QEKJoX006569@slippy.cwsent.com> <20210226143714.k24aacsrjnnhkktc@aniel.nours.eu> Comments: In-reply-to Baptiste Daroussin <bapt@FreeBSD.org> message dated "Fri, 26 Feb 2021 15:37:14 +0100." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 26 Feb 2021 06:48:17 -0800 X-CMAE-Envelope: MS4xfPPHhN0YLQ9Ta3tcsQl2puuxDrG7WsHgE4AX3oUDosIqteOHdUmLLyhZblhENWEUlZqySPdYl4dBwKDaTwsVBVkmsdXshmcSiQ2au2D8iyiFD0r8B+OG pp8Ph+cGKR822lROMyd7hZjPN3o4AJKGsiszu3QSPlzPyHNtfUfjYA1/jl0UQcBzJ6ErX40Hqtdmy+/qHY48DhzlQSnYlbvBT3Jms4Ksugg4TVVKyeAAs+lH gv86I40HSMUEQWzIsfPLMfR/yiLfuiKZ8tWU5hVHwJLaa5RCVvzZhh+7uOUMhY+xQABXnX8ice9/wr0Y6+dpuMoAT8hMyNSnG/P6x6UvLYQ= X-Rspamd-Queue-Id: 4DnCFd73W4z3t3k 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 14:48:22 -0000 In message <20210226143714.k24aacsrjnnhkktc@aniel.nours.eu>, Baptiste Daroussin writes: > > --dqdw63fwvislrgvy > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > Content-Transfer-Encoding: quoted-printable > > On Fri, Feb 26, 2021 at 06:20:19AM -0800, Cy Schubert wrote: > > In message <202102251327.11PDR4eC083842@gitrepo.freebsd.org>, Baptiste=20 > > Daroussi > > n writes: > > > The branch main has been updated by bapt: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D2a50a9de8340f08bd876e9e5= > 993332ae > > > 14376f80 > > > > > > commit 2a50a9de8340f08bd876e9e5993332ae14376f80 > > > Author: Baptiste Daroussin <bapt@FreeBSD.org> > > > AuthorDate: 2021-02-23 16:17:32 +0000 > > > Commit: Baptiste Daroussin <bapt@FreeBSD.org> > > > CommitDate: 2021-02-25 13:25:32 +0000 > > > > > > terminfo: add terminfo database > > > =20 > > > Tested by: manu, jbeich > > > --- > > > share/Makefile | 1 + > > > share/terminfo/Makefile | 34 ++++++++++++++++++++++++++++++++++ > > > 2 files changed, 35 insertions(+) > > > > > > diff --git a/share/Makefile b/share/Makefile > > > index c4e12b05f7db..d6854b230ae5 100644 > > > --- a/share/Makefile > > > +++ b/share/Makefile > > > @@ -26,6 +26,7 @@ SUBDIR=3D ${_colldef} \ > > > ${_syscons} \ > > > tabset \ > > > termcap \ > > > + terminfo \ > > > ${_timedef} \ > > > ${_vt} \ > > > ${_zoneinfo} > > > diff --git a/share/terminfo/Makefile b/share/terminfo/Makefile > > > new file mode 100644 > > > index 000000000000..7bb11f3fdf24 > > > --- /dev/null > > > +++ b/share/terminfo/Makefile > > > @@ -0,0 +1,34 @@ > > > +PACKAGE=3D runtime > > > + > > > +.PATH: ${SRCTOP}/contrib/ncurses/misc > > > +TINFOBUILDDIR=3D ${.OBJDIR}/builddir > > > +CLEANDIRS+=3D builddir > > > + > > > +.include <src.tools.mk> > > > + > > > +.if !defined(_SKIP_BUILD) > > > +all: terminfo > > > +.endif > > > +META_TARGETS+=3D terminfo install-terminfo > > > + > > > +terminfo: terminfo.src > > > + mkdir -p ${TINFOBUILDDIR} > > > + ${TIC_CMD} -x -o ${TINFOBUILDDIR} ${.ALLSRC} > > > + > > > +.if make(*install*) > > > +TINFOS!=3D cd ${TINFOBUILDDIR} && find * -type f | LC_ALL=3DC sor > t > > > +TINFOSDIRS=3D ${TINFOS:C/(.).*/\1/g:O:u} > > > +.endif > > > + > > > +beforeinstall: install-terminfo > > > +install-terminfo: > > > + mkdir -p ${DESTDIR}/usr/share/terminfo > > > + cd ${DESTDIR}/usr/share/terminfo; mkdir -p ${TINFOSDIRS} > > > +.for f in ${TINFOS} > > > + ${INSTALL} ${TAG_ARGS} \ > > > + -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > > > + ${TINFOBUILDDIR}/${f} ${DESTDIR}/usr/share/terminfo/${f} > > > +.endfor > > > + > > > +.include <bsd.prog.mk> > > > + > > > > >=20 > > I think this had some unintended consequences, a POLA violation that shou= > ld=20 > > be documented. Our termcap didn't support alternate screen buffers while= > =20 > > terminfo does. Termcap did through t_te and t_ti but we didn't use them.= > =20 > > Terminfo as delivered from the ncurses factory does supply rmcup and smcu= > p;=20 > > our fullscreen apps such as nvi and top see them and use the alternate=20 > > screen buffer. > >=20 > > The use of the alternate screen buffer is one of the things I hate about= > =20 > > Linux. After running vi or top I expect the output to remain on the scree= > n=20 > > so I can use some bit of information in my next command. We now have this= > =20 > > behaviour too. > >=20 > > The alternate screen buffer was added to xterm an ice age ago. Most moder= > n=20 > > terminal emulators support it. As much as I feel the need to yank out rmc= > up=20 > > an smcup from our terminfo database, we are using a feature, as distastef= > ul=20 > > as it may feel. This change probably needs a relnotes=3Dyes and an UPDATI= > NG=20 > > entry advising users that they can either change $TERM to xterm1, vt100, = > or=20 > > some other terminal definition that doesn't support rmcup and smcup, or= > =20 > > learn to like it. > >=20 > > OTOH, maybe this is something we as a community don't really want and we= > =20 > > remove the rmcup and smcup definitions from our terminfo database.=20 > > Personally, I believe this is progress -- progress I'm not particularly= > =20 > > enamoured with but progress nonetheless. But I think we need to discuss,= > =20 > > come to some sort of decision and document it. > >=20 > > Thoughts? > > I agree about UPDATING and RELNOTES. I planned to do it in a couple of days= > for > UPDATING, as for rmcup/smcup there have been so many people asking for it, = > that > I didn't think people will hate it, so yes we could/should add en entry in > UPDATING. UPDATING, yes, but also handbook documentation. Setting $TERM to xterm1 or vt100 reverts to the old behaviour but at the cost of any new functionality the current xterm or xterm-256color provides. I do think this needs a handbook page that discusses the old behaviour and how to get it back. Maybe how to set up one's own terminfo using $TERMINFO or one of the other environment variables. I say maybe because people setting up their own will screw themselves resulting in more PRs. I view this as an exercise of reducing PRs and tickets. Useless tickets waste everyone's time. > > I was planning to MFC it to 13.1, I don't know how much this change is a PO= > LA > violation or not, imho all the other benefice of terminfo over termcap for = > end > users are worth the MFC, but if most people vote against, I won't MFC it. I think this is big enough not to MFC to 13.1. -- Cheers, Cy Schubert <Cy.Schubert@cschubert.com> FreeBSD UNIX: <cy@FreeBSD.org> Web: https://FreeBSD.org NTP: <cy@nwtime.org> Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-dev-commits-src-main@freebsd.org Fri Feb 26 15:06:54 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C872C563899; Fri, 26 Feb 2021 15:06: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DnCg25LLDz3tvn; Fri, 26 Feb 2021 15:06: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 AA57F4D07; Fri, 26 Feb 2021 15:06: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 11QF6sD9022975; Fri, 26 Feb 2021 15:06:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11QF6ssk022974; Fri, 26 Feb 2021 15:06:54 GMT (envelope-from git) Date: Fri, 26 Feb 2021 15:06:54 GMT Message-Id: <202102261506.11QF6ssk022974@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers <asomers@FreeBSD.org> Subject: git: 60a632f047cd - main - fortune: add a tip about gstat 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: 60a632f047cdb6e5314711f593a4d3b1f1d8dde9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 15:06:54 -0000 The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=60a632f047cdb6e5314711f593a4d3b1f1d8dde9 commit 60a632f047cdb6e5314711f593a4d3b1f1d8dde9 Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2021-02-26 15:06:07 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2021-02-26 15:06:07 +0000 fortune: add a tip about gstat MFC after: 3 weeks --- usr.bin/fortune/datfiles/freebsd-tips | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usr.bin/fortune/datfiles/freebsd-tips b/usr.bin/fortune/datfiles/freebsd-tips index 3325fdce090f..46f5ec31f8d6 100644 --- a/usr.bin/fortune/datfiles/freebsd-tips +++ b/usr.bin/fortune/datfiles/freebsd-tips @@ -799,3 +799,9 @@ always have space left this way. -- Benedict Reuschling <bcr@FreeBSD.org> % +Sometimes a single slow HDD can cripple the performance of your entire system. You can spot one like this: + +# gstat -I5s | sort -rn -k9 | head + + -- Alan Somers <asomers@FreeBSD.org> +% From owner-dev-commits-src-main@freebsd.org Fri Feb 26 15:33:36 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3278956446B; Fri, 26 Feb 2021 15:33: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DnDFr0xjnz4R16; Fri, 26 Feb 2021 15:33: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 13793503E; Fri, 26 Feb 2021 15:33: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 11QFXZo4061707; Fri, 26 Feb 2021 15:33:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11QFXZwu061706; Fri, 26 Feb 2021 15:33:35 GMT (envelope-from git) Date: Fri, 26 Feb 2021 15:33:35 GMT Message-Id: <202102261533.11QFXZwu061706@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin <bapt@FreeBSD.org> Subject: git: 888ae5725257 - main - nvi: fix catalog generation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 888ae5725257c251319f14f31c2e941717b675f2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 15:33:36 -0000 The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=888ae5725257c251319f14f31c2e941717b675f2 commit 888ae5725257c251319f14f31c2e941717b675f2 Author: dankm <dan.mcgregor@usask.ca> AuthorDate: 2021-02-26 15:32:01 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2021-02-26 15:32:01 +0000 nvi: fix catalog generation Upstream broke catalog generation with some over-eagre style cleanups. This brings in my pull request. Obtained from: https://github.com/lichray/nvi2/pull/88 Differential Revision: https://reviews.freebsd.org/D28594 --- contrib/nvi/catalog/dump.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/nvi/catalog/dump.c b/contrib/nvi/catalog/dump.c index 8390e5022841..74ab53b2f12c 100644 --- a/contrib/nvi/catalog/dump.c +++ b/contrib/nvi/catalog/dump.c @@ -36,24 +36,24 @@ parse(FILE *fp) { int ch, s1, s2, s3; -#define TESTD(s) do { \ +#define TESTD(s) { \ if ((s = getc(fp)) == EOF) \ return; \ if (!isdigit(s)) \ continue; \ -} while (0) -#define TESTP do { \ +} +#define TESTP { \ if ((ch = getc(fp)) == EOF) \ return; \ if (ch != '|') \ continue; \ -} while (0) -#define MOVEC(t) do { \ +} +#define MOVEC(t) { \ do { \ if ((ch = getc(fp)) == EOF) \ return; \ } while (ch != (t)); \ -} while (0) +} for (;;) { MOVEC('"'); TESTD(s1); From owner-dev-commits-src-main@freebsd.org Fri Feb 26 16:04:05 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B4354565492; Fri, 26 Feb 2021 16:04:05 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) (using TLSv1.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 4DnDx101N7z4TDn; Fri, 26 Feb 2021 16:04:04 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 07C28580681; Fri, 26 Feb 2021 11:04:04 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 26 Feb 2021 11:04:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.dev; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=p jWy5zhXhg868uXzaGIkMYNeziBKcxOt0ewqMXal5Zs=; b=tihQ+qVkSKiR5X6uQ 6wL8YccBaLesCWZsWa0DkfkaPOKVN5DurGSxHCAJRxXaEajwcDyjZsUj1q8hSrCn Cp5n1kK3BMv4c45beRGnHmi5JB9QLTwtHWmamn25+LqKhL9z7jwvGtrDY078RNx3 z8tPi3ggU7pWv8M+M1yAZNVrO4IKI8mIeOk0p2bNos2OUDzCpMPKIKKPLEqHV3uT JFvNlvRBG8w6to2eLeLmRg8SKQFZELiY4urGxi6kjqSwQJBKMv6mBDi9J+MT+w7l w7UHcGTZ0D8PUjh4gJ0Z3N3b4AqjiHgO1VAKtcdQo3goNAXeNg2jIVdcAHb5cg5J 84JLw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=pjWy5zhXhg868uXzaGIkMYNeziBKcxOt0ewqMXal5 Zs=; b=MeJI7qYgWn6UaWDVUTheO195ddDCX0BWCT+uwiAKgnQ2xHTOaNfqvOtxb IeRutuSljTG8vaN1XXMr77dASZzC6h6fCYGIot5XfhRNB+j4sxB0QQ9OSxmiMYtp j1JVWoqGG1Vhrb3Wn6/Y6LgcAxaPeIyBPbNKHitIYVpbr89xXGqs7AcwDtYmW19w Ai5xtxhOungfjb2bggsEoN84kVqpDnBOZSQC/yE96z+AwurCkg/1a3H6Pm1qmG4F oouwhSU1+Vz2Pw4tHwxfgtOuGI5Ek07uhzXqvWi2vmacWepahsMVmXFzwAWp1pgI ZUp+gUe+xoSc2VIOECqoiO1vMBO8Q== X-ME-Sender: <xms:8hs5YBtEA68UyfWosJhiOsytNtb0kwVOazMVbagnrBMBtSh7kIpy8A> <xme:8hs5YB45Slh5lNK9xnQ-VLxZ1S1tEENlMKjzJZzvUKufBGTg6UuXNCU919s7WZaRc g-4B0QXUESfk-_nfiM> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrledugdekhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpegjuhhrihcu rfgrnhhkohhvuceohihurhhiphhvseihuhhrihhpvhdruggvvheqnecuggftrfgrthhtvg hrnhepveetudeuteegteeileduieetgfelvdehtdekteejveejjefhudeffeeuleetledv necuffhomhgrihhnpehfrhgvvggsshgurdhorhhgpdhprhhoghdrmhhknecukfhppeelud drvdegtddruddvgedrudefjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpeihuhhrihhpvheshihurhhiphhvrdguvghv X-ME-Proxy: <xmx:8hs5YCJOESd-h5-pDkOWZHWaFjveYKyhgJr2LgtJ2go7VVfRkxyoag> <xmx:8hs5YB5Us5rWjsMnQQRTRuP6zADTG6j7UGu_CK5qDGwRXhQzaBFfBg> <xmx:8hs5YFxA9_VaL_ed_iDjhgwb9958HMEPLlQDwsSYEQE36qNQbJIABA> <xmx:8xs5YD4BdD4iWSpgExlQLnUgNsDqBRUUiBJ6nBDyTNm_s9TiyxZFQw> Received: from [192.168.1.6] (unknown [91.240.124.137]) by mail.messagingengine.com (Postfix) with ESMTPA id EC6E1240064; Fri, 26 Feb 2021 11:04:01 -0500 (EST) Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database To: Cy Schubert <Cy.Schubert@cschubert.com>, Baptiste Daroussin <bapt@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202102251327.11PDR4eC083842@gitrepo.freebsd.org> <202102261420.11QEKJoX006569@slippy.cwsent.com> From: Yuri Pankov <yuripv@yuripv.dev> Message-ID: <68cc80bb-04fe-ef23-6f5a-2bc77db54feb@yuripv.dev> Date: Fri, 26 Feb 2021 19:04:00 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <202102261420.11QEKJoX006569@slippy.cwsent.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DnDx101N7z4TDn X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yuripv.dev header.s=fm1 header.b=tihQ+qVk; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=MeJI7qYg; dmarc=none; spf=pass (mx1.freebsd.org: domain of yuripv@yuripv.dev designates 66.111.4.221 as permitted sender) smtp.mailfrom=yuripv@yuripv.dev X-Spamd-Result: default: False [-3.60 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.221]; RWL_MAILSPIKE_GOOD(0.00)[66.111.4.221:from]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[yuripv.dev:+,messagingengine.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[66.111.4.221:from]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[66.111.4.221:from]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[yuripv.dev:s=fm1,messagingengine.com:s=fm2]; FREEFALL_USER(0.00)[yuripv]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[yuripv.dev]; SPAMHAUS_ZRD(0.00)[66.111.4.221:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 16:04:05 -0000 Cy Schubert wrote: > In message <202102251327.11PDR4eC083842@gitrepo.freebsd.org>, Baptiste > Daroussi > n writes: >> The branch main has been updated by bapt: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=2a50a9de8340f08bd876e9e5993332ae >> 14376f80 >> >> commit 2a50a9de8340f08bd876e9e5993332ae14376f80 >> Author: Baptiste Daroussin <bapt@FreeBSD.org> >> AuthorDate: 2021-02-23 16:17:32 +0000 >> Commit: Baptiste Daroussin <bapt@FreeBSD.org> >> CommitDate: 2021-02-25 13:25:32 +0000 >> >> terminfo: add terminfo database >> >> Tested by: manu, jbeich >> --- >> share/Makefile | 1 + >> share/terminfo/Makefile | 34 ++++++++++++++++++++++++++++++++++ >> 2 files changed, 35 insertions(+) >> >> diff --git a/share/Makefile b/share/Makefile >> index c4e12b05f7db..d6854b230ae5 100644 >> --- a/share/Makefile >> +++ b/share/Makefile >> @@ -26,6 +26,7 @@ SUBDIR= ${_colldef} \ >> ${_syscons} \ >> tabset \ >> termcap \ >> + terminfo \ >> ${_timedef} \ >> ${_vt} \ >> ${_zoneinfo} >> diff --git a/share/terminfo/Makefile b/share/terminfo/Makefile >> new file mode 100644 >> index 000000000000..7bb11f3fdf24 >> --- /dev/null >> +++ b/share/terminfo/Makefile >> @@ -0,0 +1,34 @@ >> +PACKAGE= runtime >> + >> +.PATH: ${SRCTOP}/contrib/ncurses/misc >> +TINFOBUILDDIR= ${.OBJDIR}/builddir >> +CLEANDIRS+= builddir >> + >> +.include <src.tools.mk> >> + >> +.if !defined(_SKIP_BUILD) >> +all: terminfo >> +.endif >> +META_TARGETS+= terminfo install-terminfo >> + >> +terminfo: terminfo.src >> + mkdir -p ${TINFOBUILDDIR} >> + ${TIC_CMD} -x -o ${TINFOBUILDDIR} ${.ALLSRC} >> + >> +.if make(*install*) >> +TINFOS!= cd ${TINFOBUILDDIR} && find * -type f | LC_ALL=C sort >> +TINFOSDIRS= ${TINFOS:C/(.).*/\1/g:O:u} >> +.endif >> + >> +beforeinstall: install-terminfo >> +install-terminfo: >> + mkdir -p ${DESTDIR}/usr/share/terminfo >> + cd ${DESTDIR}/usr/share/terminfo; mkdir -p ${TINFOSDIRS} >> +.for f in ${TINFOS} >> + ${INSTALL} ${TAG_ARGS} \ >> + -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ >> + ${TINFOBUILDDIR}/${f} ${DESTDIR}/usr/share/terminfo/${f} >> +.endfor >> + >> +.include <bsd.prog.mk> >> + >> > > I think this had some unintended consequences, a POLA violation that should > be documented. Our termcap didn't support alternate screen buffers while > terminfo does. Termcap did through t_te and t_ti but we didn't use them. > Terminfo as delivered from the ncurses factory does supply rmcup and smcup; > our fullscreen apps such as nvi and top see them and use the alternate > screen buffer. I don't think this is correct, it's 'ti' and 'te' for termcap and we use those a lot in our database, e.g. xterm-clear or even default screen and tmux entries, so it's always there for me being tmux user. > The use of the alternate screen buffer is one of the things I hate about > Linux. After running vi or top I expect the output to remain on the screen > so I can use some bit of information in my next command. We now have this > behaviour too. It's matter of taste, yes, and I like it. > The alternate screen buffer was added to xterm an ice age ago. Most modern > terminal emulators support it. As much as I feel the need to yank out rmcup > an smcup from our terminfo database, we are using a feature, as distasteful > as it may feel. This change probably needs a relnotes=yes and an UPDATING > entry advising users that they can either change $TERM to xterm1, vt100, or > some other terminal definition that doesn't support rmcup and smcup, or > learn to like it. > > OTOH, maybe this is something we as a community don't really want and we > remove the rmcup and smcup definitions from our terminfo database. > Personally, I believe this is progress -- progress I'm not particularly > enamoured with but progress nonetheless. But I think we need to discuss, > come to some sort of decision and document it. Removing those entirely will break POLA which started this discussion; to not break POLA we should rather "fix" the xterm entry to exclude smcup/rmcup to be the same as termcap equivalent. From owner-dev-commits-src-main@freebsd.org Fri Feb 26 17:30:49 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7AD8F567D61; Fri, 26 Feb 2021 17:30:49 +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 4DnGs455mpz4bfC; Fri, 26 Feb 2021 17:30:48 +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 11QHUhfi031157; Fri, 26 Feb 2021 09:30:43 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 11QHUh8n031156; Fri, 26 Feb 2021 09:30:43 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net> Message-Id: <202102261730.11QHUh8n031156@gndrsh.dnsmgr.net> Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database In-Reply-To: <202102261420.11QEKJoX006569@slippy.cwsent.com> To: Cy Schubert <Cy.Schubert@cschubert.com> Date: Fri, 26 Feb 2021 09:30:43 -0800 (PST) CC: Baptiste Daroussin <bapt@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: 4DnGs455mpz4bfC X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [1.44 / 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)[]; NEURAL_SPAM_SHORT(0.84)[0.844]; 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]; NEURAL_SPAM_MEDIUM(0.69)[0.694]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[69.59.192.140:from]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 17:30:49 -0000 > In message <202102251327.11PDR4eC083842@gitrepo.freebsd.org>, Baptiste > Daroussi > n writes: > > The branch main has been updated by bapt: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=2a50a9de8340f08bd876e9e5993332ae > > 14376f80 > > > > commit 2a50a9de8340f08bd876e9e5993332ae14376f80 > > Author: Baptiste Daroussin <bapt@FreeBSD.org> > > AuthorDate: 2021-02-23 16:17:32 +0000 > > Commit: Baptiste Daroussin <bapt@FreeBSD.org> > > CommitDate: 2021-02-25 13:25:32 +0000 > > > > terminfo: add terminfo database > > > > Tested by: manu, jbeich > > --- > > share/Makefile | 1 + > > share/terminfo/Makefile | 34 ++++++++++++++++++++++++++++++++++ > > 2 files changed, 35 insertions(+) > > > > diff --git a/share/Makefile b/share/Makefile > > index c4e12b05f7db..d6854b230ae5 100644 > > --- a/share/Makefile > > +++ b/share/Makefile > > @@ -26,6 +26,7 @@ SUBDIR= ${_colldef} \ > > ${_syscons} \ > > tabset \ > > termcap \ > > + terminfo \ > > ${_timedef} \ > > ${_vt} \ > > ${_zoneinfo} > > diff --git a/share/terminfo/Makefile b/share/terminfo/Makefile > > new file mode 100644 > > index 000000000000..7bb11f3fdf24 > > --- /dev/null > > +++ b/share/terminfo/Makefile > > @@ -0,0 +1,34 @@ > > +PACKAGE= runtime > > + > > +.PATH: ${SRCTOP}/contrib/ncurses/misc > > +TINFOBUILDDIR= ${.OBJDIR}/builddir > > +CLEANDIRS+= builddir > > + > > +.include <src.tools.mk> > > + > > +.if !defined(_SKIP_BUILD) > > +all: terminfo > > +.endif > > +META_TARGETS+= terminfo install-terminfo > > + > > +terminfo: terminfo.src > > + mkdir -p ${TINFOBUILDDIR} > > + ${TIC_CMD} -x -o ${TINFOBUILDDIR} ${.ALLSRC} > > + > > +.if make(*install*) > > +TINFOS!= cd ${TINFOBUILDDIR} && find * -type f | LC_ALL=C sort > > +TINFOSDIRS= ${TINFOS:C/(.).*/\1/g:O:u} > > +.endif > > + > > +beforeinstall: install-terminfo > > +install-terminfo: > > + mkdir -p ${DESTDIR}/usr/share/terminfo > > + cd ${DESTDIR}/usr/share/terminfo; mkdir -p ${TINFOSDIRS} > > +.for f in ${TINFOS} > > + ${INSTALL} ${TAG_ARGS} \ > > + -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > > + ${TINFOBUILDDIR}/${f} ${DESTDIR}/usr/share/terminfo/${f} > > +.endfor > > + > > +.include <bsd.prog.mk> > > + > > > > I think this had some unintended consequences, a POLA violation that should > be documented. Our termcap didn't support alternate screen buffers while > terminfo does. Termcap did through t_te and t_ti but we didn't use them. > Terminfo as delivered from the ncurses factory does supply rmcup and smcup; > our fullscreen apps such as nvi and top see them and use the alternate > screen buffer. > > The use of the alternate screen buffer is one of the things I hate about > Linux. After running vi or top I expect the output to remain on the screen > so I can use some bit of information in my next command. We now have this > behaviour too. Oh, I so hate that mis-feature of Linux, please please tell me there is a simple knob to turn this off? I believe LESS also does this kind of stuff, or atleast "man" on linux does, and that pees me off to no end when I quit the man page and what I wanted is no longer on the screen. > The alternate screen buffer was added to xterm an ice age ago. Most modern > terminal emulators support it. As much as I feel the need to yank out rmcup > an smcup from our terminfo database, we are using a feature, as distasteful > as it may feel. This change probably needs a relnotes=yes and an UPDATING > entry advising users that they can either change $TERM to xterm1, vt100, or > some other terminal definition that doesn't support rmcup and smcup, or > learn to like it. > > OTOH, maybe this is something we as a community don't really want and we > remove the rmcup and smcup definitions from our terminfo database. > Personally, I believe this is progress -- progress I'm not particularly > enamoured with but progress nonetheless. But I think we need to discuss, > come to some sort of decision and document it. > > Thoughts? > > > -- > Cheers, > Cy Schubert <Cy.Schubert@cschubert.com> > FreeBSD UNIX: <cy@FreeBSD.org> Web: https://FreeBSD.org > NTP: <cy@nwtime.org> Web: https://nwtime.org > > The need of the many outweighs the greed of the few. > > > -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-main@freebsd.org Fri Feb 26 17:35:07 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45ADE5481F7 for <dev-commits-src-main@mailman.nyi.freebsd.org>; Fri, 26 Feb 2021 17:35:07 +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 4DnGy31NKnz4c30 for <dev-commits-src-main@freebsd.org>; Fri, 26 Feb 2021 17:35:07 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f44.google.com with SMTP id d11so9342216wrj.7 for <dev-commits-src-main@freebsd.org>; Fri, 26 Feb 2021 09:35:07 -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=cay5WnZ2r5olDsmFyRwEJBmZXSAO+cItbrUzoyRlQL8=; b=sC0Odo5aW9ws3arHZ2cQpLBSa8/D2nU6W2b9clmGCa0m/lIZyWd6sSPG3cKcMyOJ4/ WwftPx++CnmikqOsd4KSXF5uoDTp8zHpOtiZhTfXUXQmxvcXYWfKAEwe0gTIDVb65Wa/ xVfkbPLPVYV+1Fw8RXk5KUmLDf1EhAVD3w5sbi5Iu+6k+98RmR/QUDkBsHIUda5qazE6 70H5OUbDxKrtNBnjnK51/fX6PmX90pvc1Vg7fXSzOIZqDxGFogclBAJSKmxCJbIAJfzp trMdGe83VwqN4utKWg4kfyj1byylDcDBvb+EiLuSWlq7K2FpK7azg/b9sTg7OBA6J7GS YQ7Q== X-Gm-Message-State: AOAM533Zfxv91M3kH/EoT8Z7agzwDuJSgmbsoFzyGLTmjdbMD7YXpj68 6NZSVGK+om5dy9PZV4NCaMLvKQ== X-Google-Smtp-Source: ABdhPJw+xMLb9hX/iP4KDwac3KhkVXdjb9n6es6YmmQ8thiMUWnNPvDqX8rMeFFKtrBt95otHHmd2w== X-Received: by 2002:a5d:620d:: with SMTP id y13mr4336055wru.88.1614360903870; Fri, 26 Feb 2021 09:35:03 -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 a14sm16215317wrg.84.2021.02.26.09.35.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Feb 2021 09:35:03 -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: 2a50a9de8340 - main - terminfo: add terminfo database From: Jessica Clarke <jrtc27@freebsd.org> In-Reply-To: <202102261730.11QHUh8n031156@gndrsh.dnsmgr.net> Date: Fri, 26 Feb 2021 17:35:02 +0000 Cc: Cy Schubert <Cy.Schubert@cschubert.com>, Baptiste Daroussin <bapt@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <21D85CEB-44CC-4BC6-BBD3-358383681109@freebsd.org> References: <202102261730.11QHUh8n031156@gndrsh.dnsmgr.net> To: rgrimes@freebsd.org X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4DnGy31NKnz4c30 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 17:35:07 -0000 > On 26 Feb 2021, at 17:30, Rodney W. Grimes <freebsd@gndrsh.dnsmgr.net> = wrote: >=20 >> In message <202102251327.11PDR4eC083842@gitrepo.freebsd.org>, = Baptiste=20 >> Daroussi >> n writes: >>> The branch main has been updated by bapt: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D2a50a9de8340f08bd876e9e5993332ae= >>> 14376f80 >>>=20 >>> commit 2a50a9de8340f08bd876e9e5993332ae14376f80 >>> Author: Baptiste Daroussin <bapt@FreeBSD.org> >>> AuthorDate: 2021-02-23 16:17:32 +0000 >>> Commit: Baptiste Daroussin <bapt@FreeBSD.org> >>> CommitDate: 2021-02-25 13:25:32 +0000 >>>=20 >>> terminfo: add terminfo database >>>=20 >>> Tested by: manu, jbeich >>> --- >>> share/Makefile | 1 + >>> share/terminfo/Makefile | 34 ++++++++++++++++++++++++++++++++++ >>> 2 files changed, 35 insertions(+) >>>=20 >>> diff --git a/share/Makefile b/share/Makefile >>> index c4e12b05f7db..d6854b230ae5 100644 >>> --- a/share/Makefile >>> +++ b/share/Makefile >>> @@ -26,6 +26,7 @@ SUBDIR=3D ${_colldef} \ >>> ${_syscons} \ >>> tabset \ >>> termcap \ >>> + terminfo \ >>> ${_timedef} \ >>> ${_vt} \ >>> ${_zoneinfo} >>> diff --git a/share/terminfo/Makefile b/share/terminfo/Makefile >>> new file mode 100644 >>> index 000000000000..7bb11f3fdf24 >>> --- /dev/null >>> +++ b/share/terminfo/Makefile >>> @@ -0,0 +1,34 @@ >>> +PACKAGE=3D runtime >>> + >>> +.PATH: ${SRCTOP}/contrib/ncurses/misc >>> +TINFOBUILDDIR=3D ${.OBJDIR}/builddir >>> +CLEANDIRS+=3D builddir >>> + >>> +.include <src.tools.mk> >>> + >>> +.if !defined(_SKIP_BUILD) >>> +all: terminfo >>> +.endif >>> +META_TARGETS+=3D terminfo install-terminfo >>> + >>> +terminfo: terminfo.src >>> + mkdir -p ${TINFOBUILDDIR} >>> + ${TIC_CMD} -x -o ${TINFOBUILDDIR} ${.ALLSRC} >>> + >>> +.if make(*install*) >>> +TINFOS!=3D cd ${TINFOBUILDDIR} && find * -type f | LC_ALL=3DC sort >>> +TINFOSDIRS=3D ${TINFOS:C/(.).*/\1/g:O:u} >>> +.endif >>> + >>> +beforeinstall: install-terminfo >>> +install-terminfo: >>> + mkdir -p ${DESTDIR}/usr/share/terminfo >>> + cd ${DESTDIR}/usr/share/terminfo; mkdir -p ${TINFOSDIRS} >>> +.for f in ${TINFOS} >>> + ${INSTALL} ${TAG_ARGS} \ >>> + -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ >>> + ${TINFOBUILDDIR}/${f} ${DESTDIR}/usr/share/terminfo/${f} >>> +.endfor >>> + >>> +.include <bsd.prog.mk> >>> + >>>=20 >>=20 >> I think this had some unintended consequences, a POLA violation that = should=20 >> be documented. Our termcap didn't support alternate screen buffers = while=20 >> terminfo does. Termcap did through t_te and t_ti but we didn't use = them.=20 >> Terminfo as delivered from the ncurses factory does supply rmcup and = smcup;=20 >> our fullscreen apps such as nvi and top see them and use the = alternate=20 >> screen buffer. >>=20 >> The use of the alternate screen buffer is one of the things I hate = about=20 >> Linux. After running vi or top I expect the output to remain on the = screen=20 >> so I can use some bit of information in my next command. We now have = this=20 >> behaviour too. >=20 > Oh, I so hate that mis-feature of Linux, please please tell me there = is > a simple knob to turn this off? I believe LESS also does this kind > of stuff, or atleast "man" on linux does, and that pees me off to no > end when I quit the man page and what I wanted is no longer on the = screen. less -X may be what you want (or LESS=3D"-X"). Jess From owner-dev-commits-src-main@freebsd.org Fri Feb 26 17:36:31 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 66BA65482EC; Fri, 26 Feb 2021 17:36:31 +0000 (UTC) (envelope-from bapt@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DnGzg2TB4z4cH7; Fri, 26 Feb 2021 17:36:31 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from aniel.nours.eu (ns393929.ip-176-31-115.eu [176.31.115.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 2E1012CF3; Fri, 26 Feb 2021 17:36:31 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id D196B36215; Fri, 26 Feb 2021 18:36:29 +0100 (CET) Date: Fri, 26 Feb 2021 18:36:29 +0100 From: Baptiste Daroussin <bapt@FreeBSD.org> To: rgrimes@freebsd.org Cc: Cy Schubert <Cy.Schubert@cschubert.com>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database Message-ID: <20210226173629.2sc6wlaasxjep3le@aniel.nours.eu> References: <202102261420.11QEKJoX006569@slippy.cwsent.com> <202102261730.11QHUh8n031156@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="v42fwzf6tezfxlhv" Content-Disposition: inline In-Reply-To: <202102261730.11QHUh8n031156@gndrsh.dnsmgr.net> X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 17:36:31 -0000 --v42fwzf6tezfxlhv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 26, 2021 at 09:30:43AM -0800, Rodney W. Grimes wrote: > > In message <202102251327.11PDR4eC083842@gitrepo.freebsd.org>, Baptiste= =20 > > Daroussi > > n writes: > > > The branch main has been updated by bapt: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D2a50a9de8340f08bd876e9= e5993332ae > > > 14376f80 > > > > > > commit 2a50a9de8340f08bd876e9e5993332ae14376f80 > > > Author: Baptiste Daroussin <bapt@FreeBSD.org> > > > AuthorDate: 2021-02-23 16:17:32 +0000 > > > Commit: Baptiste Daroussin <bapt@FreeBSD.org> > > > CommitDate: 2021-02-25 13:25:32 +0000 > > > > > > terminfo: add terminfo database > > > =20 > > > Tested by: manu, jbeich > > > --- > > > share/Makefile | 1 + > > > share/terminfo/Makefile | 34 ++++++++++++++++++++++++++++++++++ > > > 2 files changed, 35 insertions(+) > > > > > > diff --git a/share/Makefile b/share/Makefile > > > index c4e12b05f7db..d6854b230ae5 100644 > > > --- a/share/Makefile > > > +++ b/share/Makefile > > > @@ -26,6 +26,7 @@ SUBDIR=3D ${_colldef} \ > > > ${_syscons} \ > > > tabset \ > > > termcap \ > > > + terminfo \ > > > ${_timedef} \ > > > ${_vt} \ > > > ${_zoneinfo} > > > diff --git a/share/terminfo/Makefile b/share/terminfo/Makefile > > > new file mode 100644 > > > index 000000000000..7bb11f3fdf24 > > > --- /dev/null > > > +++ b/share/terminfo/Makefile > > > @@ -0,0 +1,34 @@ > > > +PACKAGE=3D runtime > > > + > > > +.PATH: ${SRCTOP}/contrib/ncurses/misc > > > +TINFOBUILDDIR=3D ${.OBJDIR}/builddir > > > +CLEANDIRS+=3D builddir > > > + > > > +.include <src.tools.mk> > > > + > > > +.if !defined(_SKIP_BUILD) > > > +all: terminfo > > > +.endif > > > +META_TARGETS+=3D terminfo install-terminfo > > > + > > > +terminfo: terminfo.src > > > + mkdir -p ${TINFOBUILDDIR} > > > + ${TIC_CMD} -x -o ${TINFOBUILDDIR} ${.ALLSRC} > > > + > > > +.if make(*install*) > > > +TINFOS!=3D cd ${TINFOBUILDDIR} && find * -type f | LC_ALL=3DC sort > > > +TINFOSDIRS=3D ${TINFOS:C/(.).*/\1/g:O:u} > > > +.endif > > > + > > > +beforeinstall: install-terminfo > > > +install-terminfo: > > > + mkdir -p ${DESTDIR}/usr/share/terminfo > > > + cd ${DESTDIR}/usr/share/terminfo; mkdir -p ${TINFOSDIRS} > > > +.for f in ${TINFOS} > > > + ${INSTALL} ${TAG_ARGS} \ > > > + -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > > > + ${TINFOBUILDDIR}/${f} ${DESTDIR}/usr/share/terminfo/${f} > > > +.endfor > > > + > > > +.include <bsd.prog.mk> > > > + > > > > >=20 > > I think this had some unintended consequences, a POLA violation that sh= ould=20 > > be documented. Our termcap didn't support alternate screen buffers whil= e=20 > > terminfo does. Termcap did through t_te and t_ti but we didn't use them= =2E=20 > > Terminfo as delivered from the ncurses factory does supply rmcup and sm= cup;=20 > > our fullscreen apps such as nvi and top see them and use the alternate= =20 > > screen buffer. > >=20 > > The use of the alternate screen buffer is one of the things I hate abou= t=20 > > Linux. After running vi or top I expect the output to remain on the scr= een=20 > > so I can use some bit of information in my next command. We now have th= is=20 > > behaviour too. >=20 > Oh, I so hate that mis-feature of Linux, please please tell me there is > a simple knob to turn this off? I believe LESS also does this kind > of stuff, or atleast "man" on linux does, and that pees me off to no > end when I quit the man page and what I wanted is no longer on the screen. >=20 >=20 No this is not and I clear have 0 intention to have a complex patch on top = of the linux terminfo which would prefer easy sync in the futur. We can document how to use a definition which does not have the feature you= do not like. Best, Bapt --v42fwzf6tezfxlhv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAmA5MZsACgkQY4mL3PG3 Plrr+w//US1Iz8ryM3dOvMqDjb4xXrdPKq/UvzherByX6OvMzZam6/4/cqv8jCdo XACalXcJ+Bfbp88TiQu7pYUt0fVCSN1yBPQfj1XU1bKnvxWhX175TVAMfGvZSfvD k5Z6a59j9nW3GTGU1qTKoIBL5gm0uGkX8d8ZzueJdJUXC0fWnNb/In9FXvA/Kr2a FvMOOfLqP2ipYklzGg9imaet11WlhAugA7bYJ7uaT5NJO4N6ja9g8ZQm7kB5UhQD UTQBbdydb5hY/rhiPwTQdgpCdSJNdrYYHceZ44RoDu1QMhyTczKt6i1zd87kO73i pluKtu1t0fuSGoP7CknT0E8TGHRNCEO6juuAIn9Xq62rq/bn+eQCyWGkd8r9iIBq F01aKQc/80h7lFWwCM1AAR1ywp5c7oiyGKaKH6q9xGs/Kvrguxzioux8jrJuQWJb qcS74Axxt4QHxfK5iduD2nZXG0Hpoz6BhX7xzTiUJXnzjO7CeKZZ0gtuFw8jY23x jXaF7EPZJe5YXwnSWdL8KsC78U/bguSOhXvHTMBOmFuOQVGOxsbL9TAeicHC35x9 AtOT53xx/1rBxfhG1bR8v6zMiEdQWH/eIsTL/5MfP/Yy3otzHvFsy5g8pbE84Jhg 99uF451n+f5/ERFR/h916xOlMsM6j5m2yOk/JtrNdMxcXCb+3lE= =HChF -----END PGP SIGNATURE----- --v42fwzf6tezfxlhv-- From owner-dev-commits-src-main@freebsd.org Fri Feb 26 17:55:43 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 00A5A548F8F; Fri, 26 Feb 2021 17:55:43 +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 4DnHPp6bGcz4dH1; Fri, 26 Feb 2021 17:55:42 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1614362142; 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=Xf7ZjCMram3IEK7OcBMw6tPAclIW3zzCiW6inD/II3E=; b=wTba8ThDMEx2iuw5vTYsoZnvQ7c5peJ8IkR8iiDpdYMbZYM18zcjhBoLDIvNo4d1Cs0JyT KHF7S9TYEG/OdfwNSE5ieYoxIluZLmUYCecaHXe4tB2H7ZttxWZfX6lC4KkTUFhYdvar/n rHJB9knOChioVU6LNytLhbaOKjlpNJ8GN2daLsIc5bOPu5omH8qzTX49DL2WQql6lJS7ZL h25OP1uRZ7oyaJ5A0s6/ddJzuE+Cs9sd/R4BOXSapDfjztptxW9uehIejjCCFYNjezQvYz 7rL8zA1t4xbkoA+jfXmU/XktWhAufWvJwh6oG7pOy5WFPfxpQJeaQmkfap3K+w== Received: by freefall.freebsd.org (Postfix, from userid 1033) id CF9D3134FC; Fri, 26 Feb 2021 17:55:42 +0000 (UTC) Date: Fri, 26 Feb 2021 17:55:42 +0000 From: Alexey Dokuchaev <danfe@freebsd.org> To: Cy Schubert <Cy.Schubert@cschubert.com> Cc: Baptiste Daroussin <bapt@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database Message-ID: <20210226175542.GA85424@FreeBSD.org> References: <202102251327.11PDR4eC083842@gitrepo.freebsd.org> <202102261420.11QEKJoX006569@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202102261420.11QEKJoX006569@slippy.cwsent.com> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1614362142; 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=Xf7ZjCMram3IEK7OcBMw6tPAclIW3zzCiW6inD/II3E=; b=uqffdSfJx4m2tQYRFqCUXKZJTWK2YI0p9Fg1346XHbmnaN0vEy7jVHIg5AvUHfJzamzvmk ems3Qr14p3KdgrWrDbbh5xa7jCgZ1qAGyQoc1WounnZMDg3iNR12R96L6DK/udlKo16LFN YmwKTZVmyPyYb8kC/oTW8Br4eiwlXgmJbnt/Y+XjUsrZP/eml3FtpJ4xHN7HB+vEjgSX3f OEjsNHB1wSHi/s43lnITxooOOge071D6ArvT/pNFabUL0vB4rsYmMdkJU7Vj6dz9qjo4Df HuaiokqBQja2hWFsspDQ44qopFZ+6MU7HuTHjKpiPW3oG+2fbBXqzP9SNOhwBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1614362142; a=rsa-sha256; cv=none; b=s8JRUq8BbWbSvw+khk+LNbYeL+MMAC8XjDcqD3xpFu+suLHT2kk8gs8YQ6nog/dP/tBbP6 +V/4S4DOwrnscENNuwpHRBhhs+79YUkES+tzQsbv4i9ODBxNgo01t6YbO0jet5uWFLs/Sc vdrWqDdAjbVQVK6ySV4wj+jIVb+gPWDUoMmK4v6sP8+4UsLfAJ4FHs3CIni5yn1cBJPQfP r5HF06kJh3QIvMS/Fr0ErVWcETHMQkUGvhjOzo9cuopc3X9TkO+bgYnKGJYfOFcoUm34l1 5t7JnATiEDDyCIiAJf/3aLkegTqekQKEQmB3YcGfEb0pEQZaNnO/tKLSFLBa9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 17:55:43 -0000 On Fri, Feb 26, 2021 at 06:20:19AM -0800, Cy Schubert wrote: > ... > The use of the alternate screen buffer is one of the things I hate about > Linux. After running vi or top I expect the output to remain on the screen > so I can use some bit of information in my next command. We now have this > behaviour too. Huge +1. On GNU/Linux, I have to suppress this shit so it won't mess with my xterm(1) screen buffer; screen(1) is particularly annoying until you put "termcapinfo xterm ti@:te@" line in your ~/.screenrc. I'm quite surprised to see this checked in, admittedly. ./danfe From owner-dev-commits-src-main@freebsd.org Fri Feb 26 17:59:00 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3902D548EEE; Fri, 26 Feb 2021 17:59:00 +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 4DnHTc1BWpz4dr3; Fri, 26 Feb 2021 17:59:00 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1614362340; 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=xCYLiExJq4JPbwy2AfJeC1ThkYA5Ll1/GTDy7hWHn1g=; b=tFar9gQWBNVklBkuhgs8vmjEZUYZJuceDM4MHReVpwnpSxSRCTXR37E06lfnkNWT62fj3s mn+WgoFRwRdVAnZ0mVSIJFSv8H5UEsmXGwtIrrGTZR6w5HLxNxF+hy/ByczCoaYL3ow1aI gSPddSIlWzdUYiV1q4btNPDxqKcuMTgnxXEfZgRg8kq9Q02bdhp+pqKLGLjpS7aY3cVivv LDMeM4txuUgYzza694h88w7YQezOdfoazOE2QLzeA/4OJjn37fBGGjQkEkKXUmXdqjmULt 4fM8KHvcQPmkDq1taAuCRCuIsm7L7DVUNFl0CX0K7V29qO+gwEycvNrj5FWuxw== Received: by freefall.freebsd.org (Postfix, from userid 1033) id 1680E13A1F; Fri, 26 Feb 2021 17:59:00 +0000 (UTC) Date: Fri, 26 Feb 2021 17:58:59 +0000 From: Alexey Dokuchaev <danfe@freebsd.org> To: rgrimes@freebsd.org Cc: Cy Schubert <Cy.Schubert@cschubert.com>, Baptiste Daroussin <bapt@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database Message-ID: <20210226175859.GB85424@FreeBSD.org> References: <202102261420.11QEKJoX006569@slippy.cwsent.com> <202102261730.11QHUh8n031156@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202102261730.11QHUh8n031156@gndrsh.dnsmgr.net> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1614362340; 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=xCYLiExJq4JPbwy2AfJeC1ThkYA5Ll1/GTDy7hWHn1g=; b=kBigF0f4xL77pV5grMRNgrSWiiSOaa/1ZYUFlGcBZVSFiyaBlUeBgHn7/gPYEWlgixCSMx Zb/ys0W0u0JmGxIJpxkZyz06392xr8B0E19HGaI8Zhan39sRP9LR0yW3CbCZCBcyRocG5t zQh44QdqJjca4EXEwryCV6wXBeoJqTmOk59inIwWee3KXBjkvdZmiHtvk4jTvQOWYaY+Fc nKFQjhNSd+A3Bx+iKAqFGBYAaiQZ9OPVEJQQmnzrl9OE7o07s6Yi20rS9wiGq2ioYoMVgS ivA/NsvBorkgG1O5ovgnAHw7+E2lnjCcriHR6lEmP8oj9bVG6UhQ/xZbQAR1gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1614362340; a=rsa-sha256; cv=none; b=Y2icfOBlh+2dzuywWVKlyxEtttLevPUL4pUCj94jgwByYOsC7i/+6/aWeuo+LBggYqk0co 4IN62i7PLnY+7yxyM6FK1mYgbee0UnI4OqPw8VxLD5m6OyfELXcZsCL2xeF9ROjp5PAnG3 c0Juo7BIdtwd3RUFM3ypfllFwjXeb0gVjccQ97VWXPGcKeo6LhgK6UyPBcCtb0b/LvHyVI c5LlSMOe24EfFT5CjdlocwAKlYpKAAjVQszcnstT4kMeealgHpBbO5RwCIE3ILQLVxpEym GYznqBleZFwhBfqgrlHd4DCcx06Ax9DBER+Hr0EHeRmm8j7/SmhrkuKjtObAjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 17:59:00 -0000 On Fri, Feb 26, 2021 at 09:30:43AM -0800, Rodney W. Grimes wrote: > ... > Oh, I so hate that mis-feature of Linux, please please tell me there is > a simple knob to turn this off? I believe LESS also does this kind > of stuff, or atleast "man" on linux does, and that pees me off to no > end when I quit the man page and what I wanted is no longer on the screen. Everyone I know hates it; GNU/Linux folks apparently not pissed by this just because they haven't seen a better OS (e.g., FreeBSD). ./danfe From owner-dev-commits-src-main@freebsd.org Fri Feb 26 18:02:43 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B2E63549336 for <dev-commits-src-main@mailman.nyi.freebsd.org>; Fri, 26 Feb 2021 18:02:43 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.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 4DnHYt70T7z4fBb for <dev-commits-src-main@freebsd.org>; Fri, 26 Feb 2021 18:02:42 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f45.google.com with SMTP id h98so9401877wrh.11 for <dev-commits-src-main@freebsd.org>; Fri, 26 Feb 2021 10:02:42 -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=SRTXI5/l8rYFNIC6TnwRnpEmaTHRCsyfun5GG2DGOgs=; b=d1FxP4Qyx7mnA1qIjzNYVRGP8vw7Kk3HcCtRqv+PCHNkwLawS9/Bs5OQZTtFJMJmIx uE51ezHe+D7Pt5gCFIHJlF0DpP+i6V7xpRRpGYhoV3NiJWYf0+Jh10V9V7ERraYEmWyX rNqGFRBP2Y0L3d9L9l0P1d7Hs/Rs7eOz75tqpO2ONFBVBcqCWGWmYEUCkPJWlLK54zMA iNGpigS0DBADacX1aFn1/TL2QcTs+EK/DD+i5hILAMnaz+BVpL9lBtd9TeGNOmAQOwaV Fy1i3vs+kSTfG3dcivWMhEbo3oPf0Y0CovM+P7NZie376J3AbUk96CQp15RkIlW4znZy evdg== X-Gm-Message-State: AOAM530hfeu+jT477Dr+3+h2QuYQ63aytufu/Y5/qZw6pBAagojGOpmk VPahn2BfM7g9TeuooNkiOp5q3w== X-Google-Smtp-Source: ABdhPJzYPqL9QX2FfCzOaP4XqWBEmWAg8C+ydtOFeIoIWxa0s6TFLTZmO2eYMy8aY1WpjDBovMJtGA== X-Received: by 2002:a5d:404d:: with SMTP id w13mr4436922wrp.230.1614362561484; Fri, 26 Feb 2021 10:02:41 -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 d17sm14621435wrv.93.2021.02.26.10.02.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Feb 2021 10:02:41 -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: 2a50a9de8340 - main - terminfo: add terminfo database From: Jessica Clarke <jrtc27@freebsd.org> In-Reply-To: <20210226175859.GB85424@FreeBSD.org> Date: Fri, 26 Feb 2021 18:02:40 +0000 Cc: rgrimes@freebsd.org, Cy Schubert <Cy.Schubert@cschubert.com>, Baptiste Daroussin <bapt@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <94EAE14D-19E2-417B-ACC6-17745E77A683@freebsd.org> References: <202102261420.11QEKJoX006569@slippy.cwsent.com> <202102261730.11QHUh8n031156@gndrsh.dnsmgr.net> <20210226175859.GB85424@FreeBSD.org> To: Alexey Dokuchaev <danfe@freebsd.org> X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4DnHYt70T7z4fBb X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.221.45 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com X-Spamd-Result: default: False [-2.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_SHORT(-1.00)[-0.998]; RCPT_COUNT_SEVEN(0.00)[7]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.221.45:from]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEFALL_USER(0.00)[jrtc27]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; SPAMHAUS_ZRD(0.00)[209.85.221.45:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.45:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.45:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 18:02:43 -0000 On 26 Feb 2021, at 17:58, Alexey Dokuchaev <danfe@freebsd.org> wrote: > > On Fri, Feb 26, 2021 at 09:30:43AM -0800, Rodney W. Grimes wrote: >> ... >> Oh, I so hate that mis-feature of Linux, please please tell me there is >> a simple knob to turn this off? I believe LESS also does this kind >> of stuff, or atleast "man" on linux does, and that pees me off to no >> end when I quit the man page and what I wanted is no longer on the screen. > > Everyone I know hates it; GNU/Linux folks apparently not pissed by this > just because they haven't seen a better OS (e.g., FreeBSD). I use both, I don't hate it. The only time I dislike it is when my SSH connection drops whilst the alternate buffer is still in use, as that can get confusing, but most of the time I'm grateful that my scroll back isn't a mess of stuff I've since closed. Please don't spread ill-founded absolutisms; that or you need to be aware of people outside your circle of like-minded individuals. Jess From owner-dev-commits-src-main@freebsd.org Fri Feb 26 18:07:22 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 93BF9549259; Fri, 26 Feb 2021 18:07:22 +0000 (UTC) (envelope-from pstef@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 4DnHgG3sJTz4fPg; Fri, 26 Feb 2021 18:07:22 +0000 (UTC) (envelope-from pstef@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1614362842; 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=sPlIuJprJUkslGXwd0QbVX7VCI9Y+PYB6R03/Fmda/w=; b=J7P4g2evu4fyp4YUi6mSmXF7dcVzSty7SA0EmwCd29MJ50F2AtVTs3uXZYU4BHUhIzbU10 85IuZ+9HVE7N8hnpKZWu0pHeNalT05T2B2k28HKwa1i8PXPNP6B6Tnoq6ls3c9dtp5PDLK IqHOg52CGuxYO2RegA4gfqC2abxSThfOk0dUwHrXCXX8oaSdnhp9+ncv/unRsB9GYy/rQy nMeRUG21OIn5Mr7E+2EX8uQklU4pnl++/ADip4Ife+6eFGebStjnLfT5d204pXlMKAqlI2 VecQnfFurmDo3nUt21qc10qO8rl+k1gqdNUZyRm3j8HQ/easTOACySGqdwLbuA== Received: by freefall.freebsd.org (Postfix, from userid 1403) id 6C53513F82; Fri, 26 Feb 2021 18:07:22 +0000 (UTC) Date: Fri, 26 Feb 2021 19:07:22 +0100 From: "Piotr P. Stefaniak" <pstef@freebsd.org> To: Alexey Dokuchaev <danfe@freebsd.org> Cc: rgrimes@freebsd.org, Cy Schubert <Cy.Schubert@cschubert.com>, Baptiste Daroussin <bapt@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database Message-ID: <20210226180722.GA29488@freefall.freebsd.org> References: <202102261420.11QEKJoX006569@slippy.cwsent.com> <202102261730.11QHUh8n031156@gndrsh.dnsmgr.net> <20210226175859.GB85424@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20210226175859.GB85424@FreeBSD.org> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1614362842; 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=sPlIuJprJUkslGXwd0QbVX7VCI9Y+PYB6R03/Fmda/w=; b=XX4yx5CUAZNvGQynTpN3fpdQjXTzm2RYduzmY/a8m9JzZLCOG5S5sJ1HzMXu6O5UdAbcH2 R6ASlAhd8rhJG4q3TZf0ltPWAveFnA73p1fdWX5FHFJmYL0JiSyQMZS+GBiOlsPySSZxGu wEmZAh0WGYpkhBMSDWS8wK8BRgJbZSmseYXJzlojhFwm6JOcp+gcZIC3EaiD702EW088V3 6kvhordBy4VgN/IMOBXPikTL5jPYRTrUAiov13MI4EhqjQ+f3knJDpEFoDQWJvPNki/5Ze h3gK2zia6k+ngVseMqjcF8nkcLWQvAmyRkc2YE+u0flH+4ca6E0PBSoAy9LiVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1614362842; a=rsa-sha256; cv=none; b=dtPG4si39wPIUZfTELMp0oG6RnP0EGBUBs2i2AuU9YAjN/1wFFqm5TJ7VysI/ENytc3xPf 2qpN1EczFlABJ9HnbqTDBuQQ8GWatOOb9BFr/lOwVV3g+Z5mEc9Rj8ZVhIK+II1IRnDJqE QxbVmw+E+WbZqOjcfEl8vQqvt/F31KgprS/Rt5Pq9Fb5n0BruA/KA5alil/7yH4+HC1Zbx rDammx4XUUhmByyFghgudxZmaHxaTxw2JvX2CJiaqgEWs3afyexjHh430yygfYXy/Vvo7Z R83CIt7S3su6v51E1C5kG7+5gOmyuDWzZ0w0dmdbnu7T7SHVTyKfheheVYKt4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 18:07:22 -0000 On 2021-02-26 17:58:59, Alexey Dokuchaev wrote: >On Fri, Feb 26, 2021 at 09:30:43AM -0800, Rodney W. Grimes wrote: >> ... >> Oh, I so hate that mis-feature of Linux, please please tell me there is >> a simple knob to turn this off? I believe LESS also does this kind >> of stuff, or atleast "man" on linux does, and that pees me off to no >> end when I quit the man page and what I wanted is no longer on the screen. > >Everyone I know hates it; GNU/Linux folks apparently not pissed by this >just because they haven't seen a better OS (e.g., FreeBSD). I prefer one or the other, depending on what I'm doing. Surely this is easy to improve with some machine learning. From owner-dev-commits-src-main@freebsd.org Fri Feb 26 18:16:51 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 32381549FA4; Fri, 26 Feb 2021 18:16:51 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DnHtB3G3vz4gRd; Fri, 26 Feb 2021 18:16:50 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1614363402; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M2ln7IYckZctsz4NLtTcC+4Cd7IhLlnOSkqivYBxxwI=; b=beYrIpYF02dKgnZCmBPCRf/aV5+4t9EqL+I2sVWAl+ZiNVcK6ytngwY9dLpHPngLQV2qoB MwHCXOGvDOaWLFaD6rZLYEOCL6cjSMCqT/43VDF5XjO2WeRhMB1cIkxJN8OVcbHKAZ3qNf U6XOSxPi3HImdp3o06cOdyfN4jgGK6s= Received: from skull.home.blih.net (lfbn-idf2-1-644-4.w86-247.abo.wanadoo.fr [86.247.100.4]) by mx.blih.net (OpenSMTPD) with ESMTPSA id e2bd1665 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 26 Feb 2021 18:16:42 +0000 (UTC) Date: Fri, 26 Feb 2021 19:16:38 +0100 From: Emmanuel Vadot <manu@bidouilliste.com> To: Baptiste Daroussin <bapt@FreeBSD.org> Cc: rgrimes@freebsd.org, Cy Schubert <Cy.Schubert@cschubert.com>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database Message-Id: <20210226191638.84c83ef81207217de2359a96@bidouilliste.com> In-Reply-To: <20210226173629.2sc6wlaasxjep3le@aniel.nours.eu> References: <202102261420.11QEKJoX006569@slippy.cwsent.com> <202102261730.11QHUh8n031156@gndrsh.dnsmgr.net> <20210226173629.2sc6wlaasxjep3le@aniel.nours.eu> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DnHtB3G3vz4gRd 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 18:16:51 -0000 On Fri, 26 Feb 2021 18:36:29 +0100 Baptiste Daroussin <bapt@FreeBSD.org> wrote: > On Fri, Feb 26, 2021 at 09:30:43AM -0800, Rodney W. Grimes wrote: > > > In message <202102251327.11PDR4eC083842@gitrepo.freebsd.org>, Baptiste > > > Daroussi > > > n writes: > > > > The branch main has been updated by bapt: > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=2a50a9de8340f08bd876e9e5993332ae > > > > 14376f80 > > > > > > > > commit 2a50a9de8340f08bd876e9e5993332ae14376f80 > > > > Author: Baptiste Daroussin <bapt@FreeBSD.org> > > > > AuthorDate: 2021-02-23 16:17:32 +0000 > > > > Commit: Baptiste Daroussin <bapt@FreeBSD.org> > > > > CommitDate: 2021-02-25 13:25:32 +0000 > > > > > > > > terminfo: add terminfo database > > > > > > > > Tested by: manu, jbeich > > > > --- > > > > share/Makefile | 1 + > > > > share/terminfo/Makefile | 34 ++++++++++++++++++++++++++++++++++ > > > > 2 files changed, 35 insertions(+) > > > > > > > > diff --git a/share/Makefile b/share/Makefile > > > > index c4e12b05f7db..d6854b230ae5 100644 > > > > --- a/share/Makefile > > > > +++ b/share/Makefile > > > > @@ -26,6 +26,7 @@ SUBDIR= ${_colldef} \ > > > > ${_syscons} \ > > > > tabset \ > > > > termcap \ > > > > + terminfo \ > > > > ${_timedef} \ > > > > ${_vt} \ > > > > ${_zoneinfo} > > > > diff --git a/share/terminfo/Makefile b/share/terminfo/Makefile > > > > new file mode 100644 > > > > index 000000000000..7bb11f3fdf24 > > > > --- /dev/null > > > > +++ b/share/terminfo/Makefile > > > > @@ -0,0 +1,34 @@ > > > > +PACKAGE= runtime > > > > + > > > > +.PATH: ${SRCTOP}/contrib/ncurses/misc > > > > +TINFOBUILDDIR= ${.OBJDIR}/builddir > > > > +CLEANDIRS+= builddir > > > > + > > > > +.include <src.tools.mk> > > > > + > > > > +.if !defined(_SKIP_BUILD) > > > > +all: terminfo > > > > +.endif > > > > +META_TARGETS+= terminfo install-terminfo > > > > + > > > > +terminfo: terminfo.src > > > > + mkdir -p ${TINFOBUILDDIR} > > > > + ${TIC_CMD} -x -o ${TINFOBUILDDIR} ${.ALLSRC} > > > > + > > > > +.if make(*install*) > > > > +TINFOS!= cd ${TINFOBUILDDIR} && find * -type f | LC_ALL=C sort > > > > +TINFOSDIRS= ${TINFOS:C/(.).*/\1/g:O:u} > > > > +.endif > > > > + > > > > +beforeinstall: install-terminfo > > > > +install-terminfo: > > > > + mkdir -p ${DESTDIR}/usr/share/terminfo > > > > + cd ${DESTDIR}/usr/share/terminfo; mkdir -p ${TINFOSDIRS} > > > > +.for f in ${TINFOS} > > > > + ${INSTALL} ${TAG_ARGS} \ > > > > + -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > > > > + ${TINFOBUILDDIR}/${f} ${DESTDIR}/usr/share/terminfo/${f} > > > > +.endfor > > > > + > > > > +.include <bsd.prog.mk> > > > > + > > > > > > > > > > I think this had some unintended consequences, a POLA violation that should > > > be documented. Our termcap didn't support alternate screen buffers while > > > terminfo does. Termcap did through t_te and t_ti but we didn't use them. > > > Terminfo as delivered from the ncurses factory does supply rmcup and smcup; > > > our fullscreen apps such as nvi and top see them and use the alternate > > > screen buffer. > > > > > > The use of the alternate screen buffer is one of the things I hate about > > > Linux. After running vi or top I expect the output to remain on the screen > > > so I can use some bit of information in my next command. We now have this > > > behaviour too. > > > > Oh, I so hate that mis-feature of Linux, please please tell me there is > > a simple knob to turn this off? I believe LESS also does this kind > > of stuff, or atleast "man" on linux does, and that pees me off to no > > end when I quit the man page and what I wanted is no longer on the screen. > > > > > No this is not and I clear have 0 intention to have a complex patch on top of > the linux terminfo which would prefer easy sync in the futur. > > We can document how to use a definition which does not have the feature you do > not like. > > Best, > Bapt Tips from jbeich@ via irc/gitter : xterm: Set XTerm.VT100.titeInhibit: true screen: altscreen off tmux: et -g alternate-screen off generic ncurses: export TERMCAP="${TERM}:ti@:te@:tc=${TERM}" Feel free to add this to any documentation part you feel it belongs too (even if it is, I'm almost sure, documented in each programs man/help pages). -- Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org> From owner-dev-commits-src-main@freebsd.org Fri Feb 26 18:22:11 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7D9CE54A35C; Fri, 26 Feb 2021 18:22:11 +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 4DnJ0M2kN9z4hGL; Fri, 26 Feb 2021 18:22:11 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1614363731; 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=8q4riCMk4qXnH0U+YwFu7XCEeBjK6u9PyWCerp+96tw=; b=F+nvkXxRv3M2xUXH2gn6csSDVc3oEw59+wz4j/pQ+Pi7XF/5MntQzScoDQSqUng3ZUlGa5 y0OEoXqJbUR1Abttlnpf92iEhNqELXY86F+XZBAj4TtJ7HQQYVRZjbEgHMJCoG4NE8ZSy+ pwS8xv6r3ZZ00qyoy86GHWriaoxYUfZ6MWAIZX649GP5PXXdwGaexLOa+gciYitlAAA5HG WiEQAmxC+YOCigCF9cdmVU+d1uGM9sMKJvfKGXEawmYcKcthAm7u7A/q9NpAPeDthNvY6d iophBsfOgOnVW6ElsAaFABqg++WXXlAg+tGvphhURUtqXtx+5SjrN1I7m/DvaA== Received: by freefall.freebsd.org (Postfix, from userid 1033) id 50BC91435B; Fri, 26 Feb 2021 18:22:11 +0000 (UTC) Date: Fri, 26 Feb 2021 18:22:11 +0000 From: Alexey Dokuchaev <danfe@freebsd.org> To: Emmanuel Vadot <manu@bidouilliste.com> Cc: Baptiste Daroussin <bapt@freebsd.org>, rgrimes@freebsd.org, Cy Schubert <Cy.Schubert@cschubert.com>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database Message-ID: <20210226182211.GA18415@FreeBSD.org> References: <202102261420.11QEKJoX006569@slippy.cwsent.com> <202102261730.11QHUh8n031156@gndrsh.dnsmgr.net> <20210226173629.2sc6wlaasxjep3le@aniel.nours.eu> <20210226191638.84c83ef81207217de2359a96@bidouilliste.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210226191638.84c83ef81207217de2359a96@bidouilliste.com> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1614363731; 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=8q4riCMk4qXnH0U+YwFu7XCEeBjK6u9PyWCerp+96tw=; b=CqaUnRrQ8LxzDtQa/ByrAHeqWakiqLN0GveAQwGXGTnefwsY5pkjYNfzaZAL8em1NXjzXc jWglNLjZ/f8IOSELJh62pBhFqdLrHR9mxkqhZzX7EHW2kCOXIgzKvoL0DayOehfkLEjvXO 90ohmN8KdQNoQmFsHp4kawh5+VVYeSMQhYseH5Nc9mZV16t18CYPeP2B98blKcYgloKo5c BmQxXgfkBaXEVj8kz9bpOYNydCTOJ8qvN+JoyRbAcAstfhv78N6oV32Ikr3mirsyaR6keL sInRd6jfPcw3pDpnsirqX9ju9K2H1Z7TQO3TA77MkLb3krhEzX19e61SbnFD+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1614363731; a=rsa-sha256; cv=none; b=hKW5SFmpkd3i8H7ka86kmmXrmKGJR35HZEPFF8x/VXQyC6wm4DzlyUQQv1rtl0d3pEq6lR ftGOoAN9O1KqeAcKNRWgpLSSTOco4ZUfUx5ED8o2ojLjNH7LXA998mRPhj75IcykmluYIN +qYI5pgSbGFdLnAzxdAJkOT87mRzq1zxPouQaUN7ZyW10Y5dojxWLC7cHvuRlfYB+vLCaY OtKEGGQ1sLqI7NqLPIqgDxPFSbMeNqRLDSuQFvsP339ABnR/oESMuOdu4QIW2ejLIdMG1K bRDbzqnWWAV/8FY08j0MZLjXxd09vpHXhzzETbOAqKfuezU1txka5qMqZrnKxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 18:22:11 -0000 On Fri, Feb 26, 2021 at 07:16:38PM +0100, Emmanuel Vadot wrote: > ... > xterm: Set XTerm.VT100.titeInhibit: true > screen: altscreen off > tmux: et -g alternate-screen off > generic ncurses: export TERMCAP="${TERM}:ti@:te@:tc=${TERM}" > > Feel free to add this to any documentation part you feel it belongs > too (even if it is, I'm almost sure, documented in each programs > man/help pages). I have a better idea: how about we simply disable alternate screen buffer by default and document how to enable it instead of having to configure it on per-program basis? ./danfe From owner-dev-commits-src-main@freebsd.org Fri Feb 26 18:47:20 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C3DE654A8CD; Fri, 26 Feb 2021 18: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DnJYN4ytBz4jS1; Fri, 26 Feb 2021 18: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 9915F79B6; Fri, 26 Feb 2021 18: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 11QIlKI5011917; Fri, 26 Feb 2021 18: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 11QIlKgm011916; Fri, 26 Feb 2021 18:47:20 GMT (envelope-from git) Date: Fri, 26 Feb 2021 18:47:20 GMT Message-Id: <202102261847.11QIlKgm011916@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 34d6961108bd - main - cam: add new ASC and ASCQ values related to drive depopulation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 34d6961108bd47243236d086551459c52adabf49 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 18:47:20 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=34d6961108bd47243236d086551459c52adabf49 commit 34d6961108bd47243236d086551459c52adabf49 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2021-02-26 18:43:35 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2021-02-26 18:45:06 +0000 cam: add new ASC and ASCQ values related to drive depopulation Add 04/25 Depopulation restoration in progress, 31/04 Depopulation failed, and 31/05 Depopulation restoration failed. These are defined in SPC-6r2 (though 31/4 was added in an earlier draft). They relate to different aspects of in-progress or failed depopulation removal and restoration commands. --- sys/cam/scsi/scsi_all.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c index 1d9b74e4fe0c..1b60003a4ac7 100644 --- a/sys/cam/scsi/scsi_all.c +++ b/sys/cam/scsi/scsi_all.c @@ -1191,6 +1191,9 @@ static struct asc_table_entry asc_table[] = { /* D */ { SST(0x04, 0x24, SS_FATAL | EBUSY, "Depopulation in progress") }, + /* D */ + { SST(0x04, 0x25, SS_FATAL | EBUSY, + "Depopulation restoration in progress") }, /* DTL WROMAEBKVF */ { SST(0x05, 0x00, SS_RDEF, "Logical unit does not respond to selection") }, @@ -2072,6 +2075,12 @@ static struct asc_table_entry asc_table[] = { /* D B */ { SST(0x31, 0x03, SS_FATAL | EIO, "SANITIZE command failed") }, + /* D */ + { SST(0x31, 0x04, SS_FATAL | EIO, + "Depopulation failed") }, + /* D */ + { SST(0x31, 0x05, SS_FATAL | EIO, + "Depopulation restoration failed") }, /* D W O BK */ { SST(0x32, 0x00, SS_RDEF, "No defect spare location available") }, From owner-dev-commits-src-main@freebsd.org Fri Feb 26 19:07:24 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8C13454B578; Fri, 26 Feb 2021 19: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DnK0X3XBRz4l22; Fri, 26 Feb 2021 19: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 6BA047F4C; Fri, 26 Feb 2021 19: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 11QJ7OKp039196; Fri, 26 Feb 2021 19:07:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11QJ7Oaq039195; Fri, 26 Feb 2021 19:07:24 GMT (envelope-from git) Date: Fri, 26 Feb 2021 19:07:24 GMT Message-Id: <202102261907.11QJ7Oaq039195@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Daniel Ebdrup Jensen <debdrup@FreeBSD.org> Subject: git: bc3bba70d834 - main - inetd: Add examples from manual page and other sources MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: debdrup X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bc3bba70d834c169475302334b192bc90c17521e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 19:07:24 -0000 The branch main has been updated by debdrup (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=bc3bba70d834c169475302334b192bc90c17521e commit bc3bba70d834c169475302334b192bc90c17521e Author: Daniel Ebdrup Jensen <debdrup@FreeBSD.org> AuthorDate: 2021-02-26 19:05:46 +0000 Commit: Daniel Ebdrup Jensen <debdrup@FreeBSD.org> CommitDate: 2021-02-26 19:07:03 +0000 inetd: Add examples from manual page and other sources The manual page lists a bunch of examples, some of which already exist in this file. Since it's both easier to remember when all examples are listed in the same location, move examples so they get installed into /etc/inetd.conf This also means users won't have to copy-paste, but can simply uncomment one or more services to use them. As such, it also becomes necessary to remove the examples from the manual page, so instead add a note explaining where the previous examples as well as others may be found. Cross-references, including to ports, have also been added where applicable. The rsync example has lived in the bug tracker for too long, considering how useful it can situationally be, for example when backup jobs on client devices are run through periodic(8) weekly. The microsoft-ds entry is necessary for Windows 10 compatibility (this can be confirmed with packet capturing, as it is not readily documented at time of writing). While here, remove two examples for which compatible daemons could not be found in ports. Submitted by: David Yeske <dyeske at gmail.com> (in part, prev ver) PR: 122037 Reviewed by: kevans, brueffer, lwhsu, yuripv Differential Revision: https://reviews.freebsd.org/D28882 --- usr.sbin/inetd/inetd.8 | 88 +++++++++++++++++++++++++++++------------------ usr.sbin/inetd/inetd.conf | 42 ++++++++++++++++------ 2 files changed, 87 insertions(+), 43 deletions(-) diff --git a/usr.sbin/inetd/inetd.8 b/usr.sbin/inetd/inetd.8 index ed784564ace7..864ca2374a14 100644 --- a/usr.sbin/inetd/inetd.8 +++ b/usr.sbin/inetd/inetd.8 @@ -28,7 +28,7 @@ .\" from: @(#)inetd.8 8.3 (Berkeley) 4/13/94 .\" $FreeBSD$ .\" -.Dd May 14, 2020 +.Dd February 24, 2021 .Dt INETD 8 .Os .Sh NAME @@ -791,36 +791,46 @@ the pid of the currently running .Nm .El .Sh "EXAMPLES" -Here are several example service entries for the various types of services: -.Bd -literal -# The first four launch the relevant daemon when a connection on a port -# as defined by /etc/services is opened. -ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l -ntalk dgram udp wait root /usr/libexec/ntalkd ntalkd -telnet stream tcp6 nowait root /usr/libexec/telnetd telnetd -shell stream tcp46 nowait root /usr/libexec/rshd rshd - -# Let the system respond to date requests via tcpmux -tcpmux/+date stream tcp nowait guest /bin/date date - -# Let people access the system phonebook via tcpmux -tcpmux/phonebook stream tcp nowait guest /usr/local/bin/phonebook phonebook - -# Make kernel statistics accessible -rstatd/1-3 dgram rpc/udp wait root /usr/libexec/rpc.rstatd rpc.rstatd - -# Use netcat as a one-shot HTTP proxy with nc (from freebsd-tips fortune) -http stream tcp nowait nobody /usr/bin/nc nc -N dest-ip 80 - -# Set up a unix socket at /var/run/echo that echo's back whatever is written -# to it. -/var/run/echo stream unix nowait root internal - -# Run chargen for IPsec Authentication Headers -#@ ipsec ah/require -chargen stream tcp nowait root internal -#@ -.Ed +Examples for a variety of services are available in +.Pa /etc/inetd.conf . +.Pp +It includes examples for +.Nm bootpd , +.Nm comsat , +.Nm cvs , +.Nm date, +.Nm fingerd , +.Nm ftpd , +.Nm imapd , +.Nm nc , +.Nm nmbd , +.Nm nntpd , +.Nm rlogind , +.Nm rpc.rquotad , +.Nm rpc.rusersd , +.Nm rpc.rwalld , +.Nm rpc.statd , +.Nm rpc.sprayd , +.Nm rshd , +.Nm prometheus_sysctl_exporter , +.Nm smtpd , +.Nm smbd , +.Nm swat +.Nm talkd , +.Nm telnetd , +.Nm tftpd , +.Nm uucpd . +.Pp +The internal services provided by +.Nm +for daytime, time, echo, discard and chargen are also +included, as well as chargen for +.Nm ipsec +Authentication Headers +.Pp +Examples for handling auth requests via +.Nm identd , +are similarily included. .Sh "ERROR MESSAGES" The .Nm @@ -930,8 +940,11 @@ in the database. .El .Sh SEE ALSO +.Xr cvs 1 Pq Pa ports/devel/opencvs , +.Xr date 1 , .Xr nc 1 , .Xr ipsec_set_policy 3 , +.Xr ipsec 4 , .Xr hosts_access 5 , .Xr hosts_options 5 , .Xr login.conf 5 , @@ -939,15 +952,24 @@ database. .Xr passwd 5 , .Xr rpc 5 , .Xr services 5 , +.Xr bootpd 8 , .Xr comsat 8 , .Xr fingerd 8 , .Xr ftpd 8 , +.Xr imapd 8 Pq Pa ports/mail/courier-imap , +.Xr nmbd 8 Pq Pa ports/net/samba412 , .Xr rlogind 8 , -.Xr rpcbind 8 , +.Xr rpc.rquotad 8 , +.Xr rpc.rusersd 8 , +.Xr rpc.rwalld 8 , +.Xr rpc.statd 8 , .Xr rshd 8 , +.Xr prometheus_sysctl_exporter 8 , +.Xr smbd 8 Pq Pa ports/net/samba412 , .Xr talkd 8 , .Xr telnetd 8 , -.Xr tftpd 8 +.Xr tftpd 8 , +.Xr uucpd 8 Pq Pa ports/net/freebsd-uucp .Rs .%A Michael C. St. Johns .%T Identification Protocol diff --git a/usr.sbin/inetd/inetd.conf b/usr.sbin/inetd/inetd.conf index 65a3507a6dc2..7f5f6783a038 100644 --- a/usr.sbin/inetd/inetd.conf +++ b/usr.sbin/inetd/inetd.conf @@ -66,15 +66,10 @@ #rstatd/1-3 dgram rpc/udp wait root /usr/libexec/rpc.rstatd rpc.rstatd #rusersd/1-2 dgram rpc/udp wait root /usr/libexec/rpc.rusersd rpc.rusersd #walld/1 dgram rpc/udp wait root /usr/libexec/rpc.rwalld rpc.rwalld -#pcnfsd/1-2 dgram rpc/udp wait root /usr/local/libexec/rpc.pcnfsd rpc.pcnfsd #rquotad/1 dgram rpc/udp wait root /usr/libexec/rpc.rquotad rpc.rquotad #rquotad/1 dgram rpc/udp6 wait root /usr/libexec/rpc.rquotad rpc.rquotad #sprayd/1 dgram rpc/udp wait root /usr/libexec/rpc.sprayd rpc.sprayd # -# example entry for the optional pop3 server -# -#pop3 stream tcp nowait root /usr/local/libexec/popper popper -# # example entry for the optional imap4 server # #imap4 stream tcp nowait root /usr/local/libexec/imapd imapd @@ -110,14 +105,41 @@ # #smtp stream tcp nowait qmaild /var/qmail/bin/tcp-env tcp-env /var/qmail/bin/qmail-smtpd # -# Enable the following two entries to enable samba startup from inetd -# (from the Samba documentation). Enable the third entry to enable the swat -# samba configuration tool. +# Example entry for Samba sharing for the SMB protocol # -#netbios-ssn stream tcp nowait root /usr/local/sbin/smbd smbd -#netbios-ns dgram udp wait root /usr/local/sbin/nmbd nmbd +# Enable the first two entries to enable Samba startup from inetd (according to +# the Samba documentation). Enable the third entry only if you have other +# NetBIOS daemons listening on your network. Enable the fourth entry to use +# the swat Samba configuration tool. +#netbios-ssn stream tcp nowait root /usr/local/sbin/smbd smbd +#microsoft-ds stream tcp nowait root /usr/local/sbin/smbd smbd +#netbios-ns dgram udp wait root /usr/local/sbin/nmbd nmbd #swat stream tcp nowait/400 root /usr/local/sbin/swat swat # # Example entry for the Prometheus sysctl metrics exporter # #prom-sysctl stream tcp nowait nobody /usr/sbin/prometheus_sysctl_exporter prometheus_sysctl_exporter -dgh +# +# Example entry for insecure rsync server +# This is best combined with a VTI like if_ipsec(4) or wg(4) +#rsync stream tcp nowait root /usr/local/bin/rsyncd rsyncd --daemon +# +# Let the system respond to date requests via tcpmux +#tcpmux/+date stream tcp nowait guest /bin/date date +# +# Let people access the system phonebook via tcpmux +#tcpmux/phonebook stream tcp nowait guest /usr/local/bin/phonebook phonebook +# +# Make kernel statistics accessible +#rstatd/1-3 dgram rpc/udp wait root /usr/libexec/rpc.rstatd rpc.rstatd +# +# Use netcat as a one-shot HTTP proxy with nc (from freebsd-tips fortune) +#http stream tcp nowait nobody /usr/bin/nc nc -N dest-ip 80 +# +# Set up a unix socket at /var/run/echo that echo's back whatever is written to it. +#/var/run/echo stream unix nowait root internal +# +# Run chargen for IPsec Authentication Headers +#@ ipsec ah/require +#chargen stream tcp nowait root internal +#@ From owner-dev-commits-src-main@freebsd.org Fri Feb 26 19:23:57 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0128954C141; Fri, 26 Feb 2021 19:23:56 +0000 (UTC) (envelope-from bapt@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DnKMc50Lxz4lpp; Fri, 26 Feb 2021 19:23:56 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from aniel.nours.eu (ns393929.ip-176-31-115.eu [176.31.115.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 7FF2A3E94; Fri, 26 Feb 2021 19:23:56 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from [127.0.0.1] (156.106.204.77.rev.sfr.net [77.204.106.156]) (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 aniel.nours.eu (Postfix) with ESMTPSA id 040223605C; Fri, 26 Feb 2021 20:23:53 +0100 (CET) Date: Fri, 26 Feb 2021 19:23:48 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: rgrimes@freebsd.org Cc: Cy Schubert <Cy.Schubert@cschubert.com>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Message-ID: <d0c4f575-9aba-4b04-a0f4-17e1c0fbedfb@FreeBSD.org> In-Reply-To: <20210226173629.2sc6wlaasxjep3le@aniel.nours.eu> References: <202102261420.11QEKJoX006569@slippy.cwsent.com> <202102261730.11QHUh8n031156@gndrsh.dnsmgr.net> <20210226173629.2sc6wlaasxjep3le@aniel.nours.eu> Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Correlation-ID: <d0c4f575-9aba-4b04-a0f4-17e1c0fbedfb@FreeBSD.org> X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 19:23:57 -0000 26 f=C3=A9vr. 2021 18:36:40 Baptiste Daroussin <bapt@FreeBSD.org>: > On Fri, Feb 26, 2021 at 09:30:43AM -0800, Rodney W. Grimes wrote: >>> In message <202102251327.11PDR4eC083842@gitrepo.freebsd.org>, Baptiste >>> Daroussi >>> n writes: >>>> The branch main has been updated by bapt: >>>> >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=3D2a50a9de8340f08bd876e9e= 5993332ae >>>> 14376f80 >>>> >>>> commit 2a50a9de8340f08bd876e9e5993332ae14376f80 >>>> Author:=C2=A0=C2=A0=C2=A0=C2=A0 Baptiste Daroussin <bapt@FreeBSD.org> >>>> AuthorDate: 2021-02-23 16:17:32 +0000 >>>> Commit:=C2=A0=C2=A0=C2=A0=C2=A0 Baptiste Daroussin <bapt@FreeBSD.org> >>>> CommitDate: 2021-02-25 13:25:32 +0000 >>>> >>>> =C2=A0=C2=A0=C2=A0 terminfo: add terminfo database >>>> =C2=A0=C2=A0=C2=A0 >>>> =C2=A0=C2=A0=C2=A0 Tested by:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 manu, jbei= ch >>>> --- >>>> share/Makefile=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |= =C2=A0 1 + >>>> share/terminfo/Makefile | 34 ++++++++++++++++++++++++++++++++++ >>>> 2 files changed, 35 insertions(+) >>>> >>>> diff --git a/share/Makefile b/share/Makefile >>>> index c4e12b05f7db..d6854b230ae5 100644 >>>> --- a/share/Makefile >>>> +++ b/share/Makefile >>>> @@ -26,6 +26,7 @@ SUBDIR=3D ${_colldef} \ >>>> =C2=A0 ${_syscons} \ >>>> =C2=A0 tabset \ >>>> =C2=A0 termcap \ >>>> + terminfo \ >>>> =C2=A0 ${_timedef} \ >>>> =C2=A0 ${_vt} \ >>>> =C2=A0 ${_zoneinfo} >>>> diff --git a/share/terminfo/Makefile b/share/terminfo/Makefile >>>> new file mode 100644 >>>> index 000000000000..7bb11f3fdf24 >>>> --- /dev/null >>>> +++ b/share/terminfo/Makefile >>>> @@ -0,0 +1,34 @@ >>>> +PACKAGE=3D runtime >>>> + >>>> +.PATH: ${SRCTOP}/contrib/ncurses/misc >>>> +TINFOBUILDDIR=3D ${.OBJDIR}/builddir >>>> +CLEANDIRS+=3D=C2=A0 builddir >>>> + >>>> +.include <src.tools.mk> >>>> + >>>> +.if !defined(_SKIP_BUILD) >>>> +all: terminfo >>>> +.endif >>>> +META_TARGETS+=3D terminfo install-terminfo >>>> + >>>> +terminfo: terminfo.src >>>> + mkdir -p ${TINFOBUILDDIR} >>>> + ${TIC_CMD} -x -o ${TINFOBUILDDIR} ${.ALLSRC} >>>> + >>>> +.if make(*install*) >>>> +TINFOS!=3D=C2=A0 cd ${TINFOBUILDDIR} && find * -type f | LC_ALL=3DC s= ort >>>> +TINFOSDIRS=3D=C2=A0 ${TINFOS:C/(.).*/\1/g:O:u} >>>> +.endif >>>> + >>>> +beforeinstall: install-terminfo >>>> +install-terminfo: >>>> + mkdir -p ${DESTDIR}/usr/share/terminfo >>>> + cd ${DESTDIR}/usr/share/terminfo; mkdir -p ${TINFOSDIRS} >>>> +.for f in ${TINFOS} >>>> + ${INSTALL} ${TAG_ARGS} \ >>>> +=C2=A0=C2=A0=C2=A0=C2=A0 -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ >>>> +=C2=A0=C2=A0=C2=A0=C2=A0 ${TINFOBUILDDIR}/${f} ${DESTDIR}/usr/share/t= erminfo/${f} >>>> +.endfor >>>> + >>>> +.include <bsd.prog.mk> >>>> + >>>> >>> >>> I think this had some unintended consequences, a POLA violation that sh= ould >>> be documented. Our termcap didn't support alternate screen buffers whil= e >>> terminfo does. Termcap did through t_te and t_ti but we didn't use them= . >>> Terminfo as delivered from the ncurses factory does supply rmcup and sm= cup; >>> our fullscreen apps such as nvi and top see them and use the alternate >>> screen buffer. >>> >>> The use of the alternate screen buffer is one of the things I hate abou= t >>> Linux. After running vi or top I expect the output to remain on the scr= een >>> so I can use some bit of information in my next command. We now have th= is >>> behaviour too. >> >> Oh, I so hate that mis-feature of Linux, please please tell me there is >> a simple knob to turn this off?=C2=A0 I believe LESS also does this kind >> of stuff, or atleast "man" on linux does, and that pees me off to no >> end when I quit the man page and what I wanted is no longer on the scree= n. >> >> > No this is not and I clear have 0 intention to have a complex patch on to= p of > the linux terminfo which would prefer easy sync in the futur. > > We can document how to use a definition which does not have the feature y= ou do > not like. > > Best, > Bapt Wow I think that is one of the most terrible mail I have ever written! Let me rephrase it. I won t patch ncurses terminfo as that would make the m= aintenance a huge pain. Ncurses is already not an easy beast to maintain ( = should be a bit easier now). The solution is to document how to workaround for the people who dislike th= e new behaviour Bapt From owner-dev-commits-src-main@freebsd.org Fri Feb 26 19:35:43 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0394254CC24; Fri, 26 Feb 2021 19:35:43 +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 4DnKdB6lKxz4nVm; Fri, 26 Feb 2021 19:35:42 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1614368142; 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=qv58JrF5elCmSj71ykqBBEqIM0QSW1Dv/D45aSzH83Y=; b=N9JdK3dC3U5nxm3Z9XMKp21hivNoUeym0a2RFmczpgsNSRN04kb7hSwIqFRe1ejTIyqKvA GZSv8k5odUNoy8bcaktwjLA2crc4zsKhbcH9h5lAp5JhTDzETaUkUUQU4ykNKnj2QaX6PW jhFnwWZhctItFZ/pPx8Y+MBlmAmPdgeYxbbmwecTzXXf9Or0AjKvUoCEwtnCvQpN8O06iB z5xhSQm2NDLSjU3V4vJsYbq61LrZN+pixHyoXGi7qMMCRfi+2OFpyRpNA6Kk0TRzhgZxGd jaCKpURtmqyFfCoahk4RGfFe2K+kqKC4p6F0PlUsx8npu7A/JlpCxvnFGfeQLA== Received: by freefall.freebsd.org (Postfix, from userid 1033) id C971215B29; Fri, 26 Feb 2021 19:35:42 +0000 (UTC) Date: Fri, 26 Feb 2021 19:35:42 +0000 From: Alexey Dokuchaev <danfe@freebsd.org> To: Baptiste Daroussin <bapt@freebsd.org> Cc: rgrimes@freebsd.org, Cy Schubert <Cy.Schubert@cschubert.com>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database Message-ID: <20210226193542.GA89099@FreeBSD.org> References: <202102261420.11QEKJoX006569@slippy.cwsent.com> <202102261730.11QHUh8n031156@gndrsh.dnsmgr.net> <20210226173629.2sc6wlaasxjep3le@aniel.nours.eu> <d0c4f575-9aba-4b04-a0f4-17e1c0fbedfb@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <d0c4f575-9aba-4b04-a0f4-17e1c0fbedfb@FreeBSD.org> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1614368142; 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=qv58JrF5elCmSj71ykqBBEqIM0QSW1Dv/D45aSzH83Y=; b=eFRIJpraJHsv+brdtVvtkampv75Du4ggE9f8Z41idOWfpOXw6aqsSDfS3XqbjNtee4fhAd QfloQr55fQQ54ed5xo9VjeyOyIvjPa5XTz+fjxhScwWLJbMmUfzoo1qDxav1sleWRbn9/G Qa4SYapvYiLi2MdQC7ApZaGEqWDjrkDbEqO8bpS3GjaKcPR6uRjfdcAvcM3IhX6SqWqKe/ h+oIzopIF3ZLT51IQhjs8Z/IIxZLoB78kNUR7YA3bTSviuf4uxOnkZHNyYnrzVLiNp3tUp u5s6xUbqwpYvGDsvEb8trSmWyVJDfCy6l1G77mmZj/xIKTvaYwmenpMUR0lsig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1614368142; a=rsa-sha256; cv=none; b=xGatKwroQa62nBat1YFVTif/onjeGu28Tx47CP7uXL5BgL+uVqCEjXXjUwkNFo/x2LUnNS 7+1Y5xut3hcbRYYipnrxiu89se5AB1HM5GwpI3bfUXDhp4oL2xOH8fLHn0j6XVOxzt+h6Y qAB+J/Hh2L7tcTJT+fZ3U0KoxeAHbj9fdH4OQe/Zb3XfOzwSa5HvTQNJzCJs8vlJJ//Sow XEgs1YUDa+sfRohjVvKtBO/7VmH4M6rs1ERZ+zWuq/GCeYgaQsf8bwNLya+IdpT2ff3Kjt /QQ7c084tmeVIPHkYcnKw8Peojz83e4mRMrGA3qNo+JJmsJx+ZgEjWiQ9+fO+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 19:35:43 -0000 On Fri, Feb 26, 2021 at 07:23:48PM +0000, Baptiste Daroussin wrote: > ... > Let me rephrase it. I won't patch ncurses terminfo as that would make > the maintenance a huge pain. How disabling one single mis-feature makes it huge pain to maintain? How big is the patch? We had been doing these things for contributed software since our dawn times, so our users won't have to circumvent upstream's stupidity. When did this change? > The solution is to document how to workaround for the people who dislike > the new behaviour. This is just wrong on so many different levels; I honestly don't understand what the fuck is going on here. :-( ./danfe From owner-dev-commits-src-main@freebsd.org Fri Feb 26 20:19:39 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DE02054D5FC; Fri, 26 Feb 2021 20:19:39 +0000 (UTC) (envelope-from jbeich@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 4DnLbv61czz4qZZ; Fri, 26 Feb 2021 20:19:39 +0000 (UTC) (envelope-from jbeich@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1614370779; 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: references:references; bh=K0GJit3WDkTNhEMSiYPZgUSISQkrJGkHsac8sSayKW8=; b=IxmVHDKpEXSfeCs5Dx0/0DmQGTmhls1iZOukrcGhZZqByNqXkILsK6RP8/JL2U44aSErEK 8+WsNBR3qAkYFwMv3Q2asMj7COq+WG55qsUGwYzpbnBhgFp5L2z1HS44C0Ag32Kqan2EFv 3sj8+dRarMhcJf+uD6ohq3BYvAlDrGH4R/0s6SNUmar2UFCRi7Or8lRx0rTPyGkWDqm+VQ BGhzrxAKYDzgRhfsLXHBFUirbGP/WZO0/osGsdHRRVGtOoDRvdfxvdgan3q16DUswSSRbO 6hqx5vDutByjhxiDJ6WwjU6Exhh4/IMmRbCXpvDKjG8Hreh4MV7WNQIXzNh6iA== Received: by freefall.freebsd.org (Postfix, from userid 1354) id C091316482; Fri, 26 Feb 2021 20:19:39 +0000 (UTC) From: Jan Beich <jbeich@FreeBSD.org> To: Cy Schubert <Cy.Schubert@cschubert.com> Cc: Baptiste Daroussin <bapt@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database References: <202102251327.11PDR4eC083842@gitrepo.freebsd.org> <202102261420.11QEKJoX006569@slippy.cwsent.com> <20210226143714.k24aacsrjnnhkktc@aniel.nours.eu> <202102261448.11QEmHlA006761@slippy.cwsent.com> Date: Fri, 26 Feb 2021 21:19:35 +0100 Message-ID: <blc6-fup4-wny@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1614370779; 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: references:references; bh=K0GJit3WDkTNhEMSiYPZgUSISQkrJGkHsac8sSayKW8=; b=Sk4qLYz1RdaV9B7VF1nG1dLoILloWDoIwlKO/haotkXpzylB8FVAc2FqKCDEmQOYb/XCeb e0WzP+EU06CQDRic/hOQwfGNZDQ0wiWaaUWfSeMQGgCeQg+ez2kEkiY0uIzHn17OuOcOaD Na1IN6Miq3ZZYc2BthCGsGOrV+FV9sH8Ibc7cN5o3BmtJIvTEIO5duMzUvfMcNxxkKpWCn BehCFz6ThlbUwW4UqJyZUd+VbVvCUAsIGqmlhWnOrRkYYP9Ef2oeHLrwXQK5yjR0mV/Wl9 d+qi+Aao2voQiCrUEeIRSV9RcJ9KKFMJ5ecas+el8BJD3kvZewTtWGs3hgAWvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1614370779; a=rsa-sha256; cv=none; b=JcUdpwMbbkRIaqx6rM+d57XRNHiNyguQSNrdRErsw8FytVNU9kGzwqJNBXu++mi5iUJxvG S74RX3r2gL15ODPNYZ4M1Bi+jkXr0u8cve74mA5DDVLygxR5bn8zphAS5aWvyz6TsEVno9 gJlpYQ1QxV6gZipE7hgGeMUsrV3E97WEwe6SyiE6kBT5gPPs3fcyYaJoQoLPpKRwRYdK0x G6ZPLPcvYepxT7TktC6Q1Ii3HqF9u9wOKXdMoUGlRnIXWSI32dF9MRex3nWjMQ4esc3EQi vgQ+sAPe7xPc1AqW8VUtTmUJNdPXma2sBG5XRzhNG1lI+jljuzQ4kgsMvj1pyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 20:19:39 -0000 Cy Schubert writes: > Baptiste Daroussin writes: >> I was planning to MFC it to 13.1, I don't know how much this change >> is a POLA violation or not, imho all the other benefice of terminfo >> over termcap for end users are worth the MFC, but if most people >> vote against, I won't MFC it. > > I think this is big enough not to MFC to 13.1. To keep POLA on 13.1 ncurses needs to look into termcap and if it can't find a match there look into terminfo. Old entries like xterm would keep working like before (ti/te disabled) while new entries like xterm-direct2, alacritty, etc. will behave like upstream intended (smcup/rmcup enabled). However, I haven't looked into ncurses source how easy it'd be to implement. >From ports/ perspective having terminfo as fallback would be enough. termcap -> terminfo conversion is often lossy and requires writing outside of /usr/local (aka PREFIX). For example, many modern terminals source xterm-256color but it's not maintained (e.g., bug 247447) From owner-dev-commits-src-main@freebsd.org Fri Feb 26 20:20:32 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 431E654D976 for <dev-commits-src-main@mailman.nyi.freebsd.org>; Fri, 26 Feb 2021 20:20:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) (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 4DnLcv32dqz4qlv for <dev-commits-src-main@freebsd.org>; Fri, 26 Feb 2021 20:20:31 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x729.google.com with SMTP id x124so10451132qkc.1 for <dev-commits-src-main@freebsd.org>; Fri, 26 Feb 2021 12:20:31 -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=ZdSPJ1s5JUSGyo0hxZEdRTThiCCk/3M5sE96jkvY3qs=; b=AOtzOvgKKANBgJlTZCGwjrVrY+R+UzIB9afE1pR33USw9H+OUgD2KsvT9X7uBAkczk ZTFmiDGgNze2n3WFN6kVsCDbq46HJ7H9IDnMBKR0VqopypFx0NFKlmRtermohckDALcQ 2+ZwarWk8/meJFiYlA69I/MNjNrpjI/1+ok2GAr3CzrlfAFkgu729avir/TRJTeQ2wIy m0zNhJ+Attufz1taROcz/3h6abJiEQ2C4DgfLpI5+r5WVu1AYZCNBHCB447wRrzUw45g RA/rVLrABEsVlt5yhoQmGJhvWA+UEMhCkdUJZfs5qoDhuhWbyOKmkPQLL8vEGqUgClaP UBaQ== 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=ZdSPJ1s5JUSGyo0hxZEdRTThiCCk/3M5sE96jkvY3qs=; b=bK5i+gR1b+XO65bXYUbZLPDb0ZddSba/kQWtKgQE7bFfnbtY0rDDX+cHBxxigxT2re 3HootPXyfT2WC/M1DsT/vffX9L/9Tsq1ZqXjywUuZL+OISBIdirMz/Fw3ILM1ISf8Mnu Hskm9SnZLyhiFvJ2TIxNpTvf12OLWv3ZqJodLlm1WTxqPYXPueB9bBIpJzxy47jvk4U2 F9gNMBaAiAwj9Y4BcmmYgEpAO9oGu6w54Ln2E9C3+sTVt4u2dNxS2Hwtmul4qCgkYhvL pt28rrheRBU+GNtAhDjBJjL6HZBylx+jibFV0O0jXx7qruv1GAJWdqKc3Slli9M5TXY7 R6XA== X-Gm-Message-State: AOAM531svvAMDmdZie4H5neI1nc3lRAqepZ3qWLauDX3Is+O9yxzT5CT 2gSTfn/zJtU0+vA/s6qyrqBwgw7lpbXRLfOh8KUdvw== X-Google-Smtp-Source: ABdhPJx2lU7070Wxi1ri84xB/9voAZs9V1E2lIiM0S9It3OH4KYv7CPXuWtxrzpCxocYiFa2mUXvdhLNj57cLRSjZ+U= X-Received: by 2002:a37:a151:: with SMTP id k78mr4332875qke.359.1614370830382; Fri, 26 Feb 2021 12:20:30 -0800 (PST) MIME-Version: 1.0 References: <202102261420.11QEKJoX006569@slippy.cwsent.com> <202102261730.11QHUh8n031156@gndrsh.dnsmgr.net> <20210226173629.2sc6wlaasxjep3le@aniel.nours.eu> <d0c4f575-9aba-4b04-a0f4-17e1c0fbedfb@FreeBSD.org> <20210226193542.GA89099@FreeBSD.org> In-Reply-To: <20210226193542.GA89099@FreeBSD.org> From: Warner Losh <imp@bsdimp.com> Date: Fri, 26 Feb 2021 13:20:19 -0700 Message-ID: <CANCZdfp82HJ71zd9LdbYJMFbujQy5_L7KQCJhbj1CtNXGWZPPA@mail.gmail.com> Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database To: Alexey Dokuchaev <danfe@freebsd.org> Cc: Baptiste Daroussin <bapt@freebsd.org>, "Rodney W. Grimes" <rgrimes@freebsd.org>, Cy Schubert <Cy.Schubert@cschubert.com>, src-committers <src-committers@freebsd.org>, "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>, dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4DnLcv32dqz4qlv X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=AOtzOvgK; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::729) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_TLS_ALL(0.00)[]; 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-main@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::729: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]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::729: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::729:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[dev-commits-src-main]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 20:20:32 -0000 On Fri, Feb 26, 2021 at 12:35 PM Alexey Dokuchaev <danfe@freebsd.org> wrote: > On Fri, Feb 26, 2021 at 07:23:48PM +0000, Baptiste Daroussin wrote: > > ... > > Let me rephrase it. I won't patch ncurses terminfo as that would make > > the maintenance a huge pain. > > How disabling one single mis-feature makes it huge pain to maintain? > How big is the patch? We had been doing these things for contributed > software since our dawn times, so our users won't have to circumvent > upstream's stupidity. When did this change? > There's not a clear and compelling agreement that this is stupid. Some love it, some hate it, some conditionally do both. As has been stated, the workaround generally is a one liner: export TERMCAP="${TERM}:ti@:te@:tc=${TERM}" in your init file. Other programs have more selective workaround should you desire to disable this on some, but not all, programs. This is quite a bit less work than whatever effort it would be to hack something together, and then keep re-hacking it each time we update. > > The solution is to document how to workaround for the people who dislike > > the new behaviour. > > This is just wrong on so many different levels; I honestly don't understand > what the fuck is going on here. :-( > This is crossing the line from advocacy and discussion into hostility and attack. Please avoid that in the future. Warner From owner-dev-commits-src-main@freebsd.org Fri Feb 26 20:20:50 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B1E2054DBA1; Fri, 26 Feb 2021 20:20:50 +0000 (UTC) (envelope-from jbeich@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 4DnLdG460gz4qjJ; Fri, 26 Feb 2021 20:20:50 +0000 (UTC) (envelope-from jbeich@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1614370850; 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=OZEJbXvXSlV4mX3iA77UJIIXo5T7Wl4jR+PhDTTSC9M=; b=B8iYYtFy45OyG5TDguR84cKZSK9TB8RP+mPiIbQujP2tzjVxYd6x7leCGNuJ7XLgZjEYHA fLVUIz/24ZqMjGNJatze5boC/ckaEx5MeCCPzb4DC4xUifCaOrwkyvW9KK1R3vMULx0Qiu 1JmCQsVkGLCS2Q2cdtecsopKjrtjAR7Bhzs+SS3i8MffbKaY0lKdKLKSUeofOHmsbxq0Xi XaOhJTkJn65CzTeDSsv2VQLExPOiYNU7AFhoC5BQiub97GvyuM73JgJJc+0MJla7BO7QRO 7j37MOWTq2EL5tBYIwUaaxByZ0MepIofhhyk2l9qI9jFr7mC5Ioj5/Sc0tIBZw== Received: by freefall.freebsd.org (Postfix, from userid 1354) id D80C7163F1; Fri, 26 Feb 2021 20:20:49 +0000 (UTC) From: Jan Beich <jbeich@FreeBSD.org> To: Cy Schubert <Cy.Schubert@cschubert.com> Cc: Baptiste Daroussin <bapt@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database References: <202102251327.11PDR4eC083842@gitrepo.freebsd.org> <202102261420.11QEKJoX006569@slippy.cwsent.com> <20210226143714.k24aacsrjnnhkktc@aniel.nours.eu> <202102261448.11QEmHlA006761@slippy.cwsent.com> <blc6-fup4-wny@FreeBSD.org> Date: Fri, 26 Feb 2021 21:20:45 +0100 In-Reply-To: <blc6-fup4-wny@FreeBSD.org> (Jan Beich's message of "Fri, 26 Feb 2021 21:19:35 +0100") Message-ID: <y2fa-eg2q-wny@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1614370850; 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=OZEJbXvXSlV4mX3iA77UJIIXo5T7Wl4jR+PhDTTSC9M=; b=COwIvfEuLfj7h/DTjujie9IFBXOXrBezCgTjJRuvX6nr1+/zF5B3DdMa3+or/Kd5VRu2rN G1TaHgKaLUg0TsykNykwUN+Xv7/S+wpEAC7YIRgfmMcASSL+5vCy3pwQnFT0O638/CcZkK 9ENF1q8L0s/txCqmaozFBnCK9T2+XhamZPXHq2ZnJ+S+neJASgBmPIm9rqP2HZabGxhkY0 QhFHnek2pcKEae/TWQOJGMCSTkG4z3x/X2PQifMK55Kv16Y+l9mxZN74ZjFU1xH5E+/cu7 tNuV8Y/f/ontPlJ+7OE7yNUoJJayNKaTX/XBg3n1f7BsvH8HLPJSSaOVF2yLrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1614370850; a=rsa-sha256; cv=none; b=UZ1C/UmzwukwGAs6lk9Q81d4aSROmEmTOGaDj+NduYacXmhsJCoAan9qn9K8CqcgiVomY/ XwIfYamooG8YveTDlbo3lKAcgEl/w2Mm6W/XFxvRw+REfCT4naurHOLeq1zTlpZJgWqRGx hXDaBrszSBXWZMge18gOycJrisa4w8KeWavA0Cx+c2YT/3dPRs2sjk22RzoUy7at6BK4dJ oEOH8sCkSsq2NYJNhqdPu1p/aWUjvmjYPOkiTYNWnAunzM/85V+E/7SVWSw2j4gQFDuQJn uSFged4wqWjrbC99UZCkZ2/AwJ5YkCjiTBz764nf04Z5lsfpjHykCcKafoqBtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 20:20:50 -0000 Jan Beich <jbeich@FreeBSD.org> writes: > From ports/ perspective having terminfo as fallback would be enough. > termcap -> terminfo conversion is often lossy and requires writing Typo: "termcap -> terminfo" should be "terminfo -> termcap" From owner-dev-commits-src-main@freebsd.org Fri Feb 26 20:26:03 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B358A54DCB5; Fri, 26 Feb 2021 20:26:03 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DnLlH0mWxz4r8v; Fri, 26 Feb 2021 20:26:02 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id FjgVlmLtyHmS3FjgWlzqk5; Fri, 26 Feb 2021 13:26:01 -0700 X-Authority-Analysis: v=2.4 cv=MaypB7zf c=1 sm=1 tr=0 ts=60395959 a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=8nJEP1OIZ-IA:10 a=qa6Q16uM49sA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=1X5WsqQov_YCb2dtGS4A:9 a=wPNLvfGTeEIA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 5162F317; Fri, 26 Feb 2021 12:25:58 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 11QKPwCe003888; Fri, 26 Feb 2021 12:25:58 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202102262025.11QKPwCe003888@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert <Cy.Schubert@cschubert.com> From: Cy Schubert <Cy.Schubert@cschubert.com> X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Baptiste Daroussin <bapt@FreeBSD.org> cc: rgrimes@freebsd.org, Cy Schubert <Cy.Schubert@cschubert.com>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database In-reply-to: <d0c4f575-9aba-4b04-a0f4-17e1c0fbedfb@FreeBSD.org> References: <202102261420.11QEKJoX006569@slippy.cwsent.com> <202102261730.11QHUh8n031156@gndrsh.dnsmgr.net> <20210226173629.2sc6wlaasxjep3le@aniel.nours.eu> <d0c4f575-9aba-4b04-a0f4-17e1c0fbedfb@FreeBSD.org> Comments: In-reply-to Baptiste Daroussin <bapt@FreeBSD.org> message dated "Fri, 26 Feb 2021 19:23:48 +0000." Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Fri, 26 Feb 2021 12:25:58 -0800 X-CMAE-Envelope: MS4xfJX2gfGwQHXj+XaGdH08Oz1FhoQmIUmtYcumBWM/lb2Q32fwAQj5gyXU8/ptTBbBZxa9HoQ0xTdVqjsAOIsj5mFBWiq66ZgLCFPer/rt5Aa7GoBYyTIP DwztzYFiU6zqzySCY1/UuxYs/BFqpKjzVIOAqLb06JX5ZcYqU1LBn5MoSmLZSKJEFDYsTg8iz25H/zTfEYrsPMT3z4+hvfYTE1xLM68uJxx/juT2fgAg3gZZ 7W9+A4RYIKLPNEyOFyLHwbEE96kHSRm98rwdiQnP2c6ivsbxfIpsUa0zbyYZNMM7cVyh6vAtka5Du1iYmAbFiYE613pkTweNv1Fa/TvqScEhYNXTl7vAcZlA TGM9hVka X-Rspamd-Queue-Id: 4DnLlH0mWxz4r8v 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 20:26:03 -0000 In message <d0c4f575-9aba-4b04-a0f4-17e1c0fbedfb@FreeBSD.org>, Baptiste Darouss in writes: > > > 26 févr. 2021 18:36:40 Baptiste Daroussin <bapt@FreeBSD.org>: > > > On Fri, Feb 26, 2021 at 09:30:43AM -0800, Rodney W. Grimes wrote: > >>> In message <202102251327.11PDR4eC083842@gitrepo.freebsd.org>, Baptiste > >>> Daroussi > >>> n writes: > >>>> The branch main has been updated by bapt: > >>>> > >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=2a50a9de8340f08bd876e9e5993 > 332ae > >>>> 14376f80 > >>>> > >>>> commit 2a50a9de8340f08bd876e9e5993332ae14376f80 > >>>> Author:     Baptiste Daroussin <bapt@FreeBSD.org> > >>>> AuthorDate: 2021-02-23 16:17:32 +0000 > >>>> Commit:     Baptiste Daroussin <bapt@FreeBSD.org> > >>>> CommitDate: 2021-02-25 13:25:32 +0000 > >>>> > >>>>     terminfo: add terminfo database > >>>>     > >>>>     Tested by:      manu, jbeich > >>>> --- > >>>> share/Makefile          |  1 + > >>>> share/terminfo/Makefile | 34 ++++++++++++++++++++++++++++++++++ > >>>> 2 files changed, 35 insertions(+) > >>>> > >>>> diff --git a/share/Makefile b/share/Makefile > >>>> index c4e12b05f7db..d6854b230ae5 100644 > >>>> --- a/share/Makefile > >>>> +++ b/share/Makefile > >>>> @@ -26,6 +26,7 @@ SUBDIR= ${_colldef} \ > >>>>   ${_syscons} \ > >>>>   tabset \ > >>>>   termcap \ > >>>> + terminfo \ > >>>>   ${_timedef} \ > >>>>   ${_vt} \ > >>>>   ${_zoneinfo} > >>>> diff --git a/share/terminfo/Makefile b/share/terminfo/Makefile > >>>> new file mode 100644 > >>>> index 000000000000..7bb11f3fdf24 > >>>> --- /dev/null > >>>> +++ b/share/terminfo/Makefile > >>>> @@ -0,0 +1,34 @@ > >>>> +PACKAGE= runtime > >>>> + > >>>> +.PATH: ${SRCTOP}/contrib/ncurses/misc > >>>> +TINFOBUILDDIR= ${.OBJDIR}/builddir > >>>> +CLEANDIRS+=  builddir > >>>> + > >>>> +.include <src.tools.mk> > >>>> + > >>>> +.if !defined(_SKIP_BUILD) > >>>> +all: terminfo > >>>> +.endif > >>>> +META_TARGETS+= terminfo install-terminfo > >>>> + > >>>> +terminfo: terminfo.src > >>>> + mkdir -p ${TINFOBUILDDIR} > >>>> + ${TIC_CMD} -x -o ${TINFOBUILDDIR} ${.ALLSRC} > >>>> + > >>>> +.if make(*install*) > >>>> +TINFOS!=  cd ${TINFOBUILDDIR} && find * -type f | LC_ALL=C sort > >>>> +TINFOSDIRS=  ${TINFOS:C/(.).*/\1/g:O:u} > >>>> +.endif > >>>> + > >>>> +beforeinstall: install-terminfo > >>>> +install-terminfo: > >>>> + mkdir -p ${DESTDIR}/usr/share/terminfo > >>>> + cd ${DESTDIR}/usr/share/terminfo; mkdir -p ${TINFOSDIRS} > >>>> +.for f in ${TINFOS} > >>>> + ${INSTALL} ${TAG_ARGS} \ > >>>> +     -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > >>>> +     ${TINFOBUILDDIR}/${f} ${DESTDIR}/usr/share/terminfo/${f} > >>>> +.endfor > >>>> + > >>>> +.include <bsd.prog.mk> > >>>> + > >>>> > >>> > >>> I think this had some unintended consequences, a POLA violation that shou > ld > >>> be documented. Our termcap didn't support alternate screen buffers while > >>> terminfo does. Termcap did through t_te and t_ti but we didn't use them. > >>> Terminfo as delivered from the ncurses factory does supply rmcup and smcu > p; > >>> our fullscreen apps such as nvi and top see them and use the alternate > >>> screen buffer. > >>> > >>> The use of the alternate screen buffer is one of the things I hate about > >>> Linux. After running vi or top I expect the output to remain on the scree > n > >>> so I can use some bit of information in my next command. We now have this > >>> behaviour too. > >> > >> Oh, I so hate that mis-feature of Linux, please please tell me there is > >> a simple knob to turn this off?  I believe LESS also does this kind > >> of stuff, or atleast "man" on linux does, and that pees me off to no > >> end when I quit the man page and what I wanted is no longer on the screen. > >> > >> > > No this is not and I clear have 0 intention to have a complex patch on top > of > > the linux terminfo which would prefer easy sync in the futur. > > > > We can document how to use a definition which does not have the feature you > do > > not like. > > > > Best, > > Bapt > > Wow I think that is one of the most terrible mail I have ever written! > > Let me rephrase it. I won t patch ncurses terminfo as that would make the mai > ntenance a huge pain. Ncurses is already not an easy beast to maintain ( shou > ld be a bit easier now). > > The solution is to document how to workaround for the people who dislike the > new behaviour I think this is the best solution. TERM=xterm1 or TERM=vt100. If we absolutely have to, we could document how people can create their own terminfo databases. Simply change rmcup= and smcup= to rmcup@ and smcup@. This is what xterm1 does. xterm1 is already in the upstream and we have it. Having unpacked the RH SRPM, I don't see where Red Hat actually removes xterm1, it's in the tarball within the SRPM but it doesn't appear in their terminfo database. Simply change your TERM to xterm1. Having said this, one would need to add tset -Q -s -m xterm1:xterm to your Red Hat and Fedora machines to make sure your FreeBSD TERM=xterm1 doesn't cause any grief. Much of the problem is that the various Linux distros have created incompatibilities which affect the traditional UNIX world (I put us in the traditional UNIX space) requiring the rest of us to either follow suit or break. I can think other changes coming down the turnpike which will affect us but that is better left for a freebsd-arch thread. Documenting how people can create their own terminfo database in say, ~/.terminfo and point $TERMINFO to it would go a long way. I will try it myself over the next week or two when I get some free time. -- Cheers, Cy Schubert <Cy.Schubert@cschubert.com> FreeBSD UNIX: <cy@FreeBSD.org> Web: https://FreeBSD.org NTP: <cy@nwtime.org> Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-dev-commits-src-main@freebsd.org Fri Feb 26 21:41:35 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 428A954F7EC; Fri, 26 Feb 2021 21:41:35 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) (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 4DnNQQ3pbJz3Bvc; Fri, 26 Feb 2021 21:41:34 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg1-x535.google.com with SMTP id t25so7007478pga.2; Fri, 26 Feb 2021 13:41:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=mcP6dCGYOroNSDeweZaKp0HRVh29zwk3V3hZZOrCwl4=; b=e5EwYPbGDmZSpn9JjgLNDr7siKgJgfP5bZ6MNvYkAmA7pIi7/eLMiIlVld7lHi3VB1 bKIAhTwRTux6lYUSh2G+n88pLMsuQqKeUqYI91p8mEfyECAj4XiaXOGqCjo96e5hMt0H atcwbRuHT6XoFaZ7PQsURJ1G3ks8S5EOGWyj7kpj/eoDuI2izr7ho8RfhDaipqp54lzg yRrCinsvZkuI+iv5vr2iURW+oOnVZ5AVzAYPQCljtYBzT88Y71RGVxGS4OkyVjJD6x4n bFkSa1lVsBlmzHhcA18Z76sU5vpU7GTXiD/7pkyN4yJMOeNo8xtOyyJML1bur62qggxg BV9Q== 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=mcP6dCGYOroNSDeweZaKp0HRVh29zwk3V3hZZOrCwl4=; b=b7zn+WWJbzrde/lUO8ANehcXknmU8N0H7yn+NAHF1e7UTs4XK2s/w7Bc/KQuXlPaeo ket3Vpg0ow+rDhdxe1wSsawh5I6eSqtY55hiWwaGb5qHIPLoeXUxDe6x7tFxSn9wMrUO 8C59IcIe1sePI9GPP9t9XhgJaXpP96bkL+a1/s+3WQta3uyDE1poADk4AW8s1uOOKO/8 522UqgkCpS1sdmtnckYAbH8ajCyD4+6rMavQHmI5JA2b6cv6lvz0nk5442jER69UkQUS TC+ZmZsNdPHMsXK/WNHENYcjJecj4fT84APTvM5qoHwnBjSvfdS+rJQN2Xpzhwcb9a13 GDsQ== X-Gm-Message-State: AOAM531gqGyOHk8P4ia+OFbsuSW+FVbjpHpq3CYcqaURru3xtSyPmXWD HXyqb2h71qJiD0DSG1vrNQCoA4cYsvVcgw== X-Google-Smtp-Source: ABdhPJzykDo1Y4YhymLdn5Z72xCv+7rLTkDTEJ5LLMHHruEJUEY5Mbvur0p1B4uhSLu3NG8ecv/mBw== X-Received: by 2002:a63:d506:: with SMTP id c6mr4601943pgg.77.1614375692526; Fri, 26 Feb 2021 13:41:32 -0800 (PST) Received: from [192.168.20.29] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id y9sm10986013pff.104.2021.02.26.13.41.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Feb 2021 13:41:32 -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: 2a50a9de8340 - main - terminfo: add terminfo database From: Enji Cooper <yaneurabeya@gmail.com> In-Reply-To: <202102251327.11PDR4eC083842@gitrepo.freebsd.org> Date: Fri, 26 Feb 2021 13:41:31 -0800 Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Content-Transfer-Encoding: quoted-printable Message-Id: <E1CBDB73-8A27-49D5-9B1A-7F33CA323528@gmail.com> References: <202102251327.11PDR4eC083842@gitrepo.freebsd.org> To: Baptiste Daroussin <bapt@FreeBSD.org> X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4DnNQQ3pbJz3Bvc X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=e5EwYPbG; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::535 as permitted sender) smtp.mailfrom=yaneurabeya@gmail.com X-Spamd-Result: default: False [-3.50 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RECEIVED_SPAMHAUS_PBL(0.00)[73.19.52.228:received]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::535:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; 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]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::535:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::535:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 21:41:35 -0000 > On Feb 25, 2021, at 5:27 AM, Baptiste Daroussin <bapt@FreeBSD.org> = wrote: >=20 > The branch main has been updated by bapt: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D2a50a9de8340f08bd876e9e5993332ae= 14376f80 >=20 > commit 2a50a9de8340f08bd876e9e5993332ae14376f80 > Author: Baptiste Daroussin <bapt@FreeBSD.org> > AuthorDate: 2021-02-23 16:17:32 +0000 > Commit: Baptiste Daroussin <bapt@FreeBSD.org> > CommitDate: 2021-02-25 13:25:32 +0000 >=20 > terminfo: add terminfo database >=20 > Tested by: manu, jbeich Hi Baptiste, A question and a comment: 1. Was this reviewed in Phabricator? 2. The details on why the terminfo database is being added are a = bit lean too to non-Unix users. It would be nice if the motivation for = the change was documented in the commit message. Thanks! -Enji= From owner-dev-commits-src-main@freebsd.org Fri Feb 26 21:48:17 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 54DE155061E; Fri, 26 Feb 2021 21:48:17 +0000 (UTC) (envelope-from bapt@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DnNZ91y5Fz3CQR; Fri, 26 Feb 2021 21:48:17 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from aniel.nours.eu (unknown [IPv6:2001:41d0:8:3a4d::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 1BDB347DA; Fri, 26 Feb 2021 21:48:17 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from [127.0.0.1] (10.246.39.62.rev.sfr.net [62.39.246.10]) (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 aniel.nours.eu (Postfix) with ESMTPSA id 043C13643D; Fri, 26 Feb 2021 22:48:14 +0100 (CET) Date: Fri, 26 Feb 2021 21:48:09 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: Enji Cooper <yaneurabeya@gmail.com> Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Message-ID: <44c9cd7b-e032-4613-81be-6214f37d2fbe@FreeBSD.org> In-Reply-To: <E1CBDB73-8A27-49D5-9B1A-7F33CA323528@gmail.com> References: <202102251327.11PDR4eC083842@gitrepo.freebsd.org> <E1CBDB73-8A27-49D5-9B1A-7F33CA323528@gmail.com> Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Correlation-ID: <44c9cd7b-e032-4613-81be-6214f37d2fbe@FreeBSD.org> X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 21:48:17 -0000 26 f=C3=A9vr. 2021 22:41:37 Enji Cooper <yaneurabeya@gmail.com>: > >> On Feb 25, 2021, at 5:27 AM, Baptiste Daroussin <bapt@FreeBSD.org> wrote= : >> >> The branch main has been updated by bapt: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=3D2a50a9de8340f08bd876e9e59= 93332ae14376f80 >> >> commit 2a50a9de8340f08bd876e9e5993332ae14376f80 >> Author:=C2=A0=C2=A0=C2=A0=C2=A0 Baptiste Daroussin <bapt@FreeBSD.org> >> AuthorDate: 2021-02-23 16:17:32 +0000 >> Commit:=C2=A0=C2=A0=C2=A0=C2=A0 Baptiste Daroussin <bapt@FreeBSD.org> >> CommitDate: 2021-02-25 13:25:32 +0000 >> >> =C2=A0=C2=A0 terminfo: add terminfo database >> >> =C2=A0=C2=A0 Tested by:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 manu, jbeich > > Hi Baptiste, > =C2=A0 A question and a comment: > =C2=A0 1. Was this reviewed in Phabricator? > =C2=A0 2. The details on why the terminfo database is being added are a b= it lean too to non-Unix users. It would be nice if the motivation for the c= hange was documented in the commit message. > Thanks! > -Enji No it was not reviewed in phabricator as it does not really bring any code,= but it was discussed on the mailing lists with a heads up on the plan and = the motivation, and all the reaction were in favor of this change. Note thay while it could have been better written this commit is the third = of a serie, where the first one explain a bit more things. Bapt From owner-dev-commits-src-main@freebsd.org Fri Feb 26 21:53:07 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0BC00550571 for <dev-commits-src-main@mailman.nyi.freebsd.org>; Fri, 26 Feb 2021 21:53:07 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) (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 4DnNgk0RnWz3CgV; Fri, 26 Feb 2021 21:53:05 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pl1-x636.google.com with SMTP id u11so5983318plg.13; Fri, 26 Feb 2021 13:53:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Ni+ufMMvq29sfeZdPxbHvWKi2t/+hbs7dsg1gDL0T8c=; b=EoSdD24myiZ4n/RycmzRwv5lyxIjbHBfh3/dotcREMA81W4kpr8zuuuDh6/s1BgI5b +aogACmjEgMkdmreCOyZH8AU7ejqz01ZyfeLu+YnhcgFMKrOtKLRFFBweHqJk1y4N2Zn zr3FsfpzCpXMZOkI3AQYDsl1Td2Y55/Rrft4afJ10yAc4nWS0OYsvk3FCn2Yobvi1+5Q RzKDLz4q9B2pqXNZqhos3dhAQ/Bg4a08CBlM0FptqzQYrgAst9zpmv6SPzF9z8wdUgOm iwc4Ybm2ez05I64Up0L0C+cYKMXGQ+OehHlul5YiS+PiGJfd47GJBZeJOk45w9s7j7jS 06EQ== 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=Ni+ufMMvq29sfeZdPxbHvWKi2t/+hbs7dsg1gDL0T8c=; b=FMaYFY83fZo3cTY9M3cLtbpywjyj9lhTH9BLTlevA/gsK97oJ3UwNgv4zNvjVUCq/P c69vpEneD9LY2jU08513J9Q0A93m7XgzoDf8ESGqTdGWGzOovYb27rknMfAeNZbftoa8 YhbmwFBegdAb1AU9MS1sfST7k8kfxzpiytLSVQTixn67UOSUJmXfJgUb/noeKN2sM5mB yiLIJDm54Sns2QAfPTbAVWy27UQ3FzshSxIddF1l6GW1IXVlkPHrzoaM0gIHebzzBzQG t45ioOZYSViM3YktNmRnZ8W6PR5pxlzRZDoKUxkTFIiB9wkTxxo1LAYCGvmZDbidcZXz wx4Q== X-Gm-Message-State: AOAM533I9YmBh5/txh5SnsI791qlHgelmSdlXQ2JfFZOIWV2QVOtPi4G Ln1h/6Ydy7Zhn+/0ftdl6adVwYSUaScDPw== X-Google-Smtp-Source: ABdhPJz3CqBTc6UKgN93fNUb9qjImjoaiUcv2jQMgrcpVCmSYixn2TpdhE250PNE0MrIHLxhmhc0Pw== X-Received: by 2002:a17:902:8687:b029:e1:601e:bd29 with SMTP id g7-20020a1709028687b02900e1601ebd29mr4858188plo.47.1614376383904; Fri, 26 Feb 2021 13:53:03 -0800 (PST) Received: from [192.168.20.29] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id o4sm10118351pfg.107.2021.02.26.13.53.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Feb 2021 13:53:03 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: git: 3775ddcf5a12 - main - tests/sys/netgraph: Tell kyua that perl is required From: Enji Cooper <yaneurabeya@gmail.com> In-Reply-To: <202102231744.11NHi08p021198@gitrepo.freebsd.org> Date: Fri, 26 Feb 2021 13:53:02 -0800 Cc: Kristof Provost <kp@freebsd.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Content-Transfer-Encoding: quoted-printable Message-Id: <53DA1EDF-3C9B-4573-AB30-EE3F581471AD@gmail.com> References: <202102231744.11NHi08p021198@gitrepo.freebsd.org> To: Alex Richardson <arichardson@FreeBSD.org> X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4DnNgk0RnWz3CgV X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=EoSdD24m; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::636 as permitted sender) smtp.mailfrom=yaneurabeya@gmail.com X-Spamd-Result: default: False [-3.50 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::636:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RECEIVED_SPAMHAUS_PBL(0.00)[73.19.52.228:received]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::636:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::636:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 21:53:07 -0000 > On Feb 23, 2021, at 9:44 AM, Alex Richardson <arichardson@FreeBSD.org> = wrote: >=20 > The branch main has been updated by arichardson: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D3775ddcf5a12c8e23970e94b7b165bf2= 3c92aeba >=20 > commit 3775ddcf5a12c8e23970e94b7b165bf23c92aeba > Author: Alex Richardson <arichardson@FreeBSD.org> > AuthorDate: 2021-02-23 17:02:31 +0000 > Commit: Alex Richardson <arichardson@FreeBSD.org> > CommitDate: 2021-02-23 17:43:31 +0000 >=20 > tests/sys/netgraph: Tell kyua that perl is required >=20 > Otherwise these tests fail with incomprehensible error messages. >=20 > Reviewed By: kp > Differential Revision: https://reviews.freebsd.org/D28894 It might be a good idea to rely on ${TAP_PERL_INTERPRETER} = instead, in the code, however=E2=80=A6 is there a reason why the = one-liners are written in perl instead of awk? Cheers, -Enji From owner-dev-commits-src-main@freebsd.org Fri Feb 26 22:00:46 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CEAD6550C04; Fri, 26 Feb 2021 22:00: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DnNrZ5MxWz3DF1; Fri, 26 Feb 2021 22:00: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 AB34A124D7; Fri, 26 Feb 2021 22:00: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 11QM0knr071318; Fri, 26 Feb 2021 22:00:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11QM0kMA071317; Fri, 26 Feb 2021 22:00:46 GMT (envelope-from git) Date: Fri, 26 Feb 2021 22:00:46 GMT Message-Id: <202102262200.11QM0kMA071317@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger <rscheff@FreeBSD.org> Subject: git: 9e83a6a556ed - main - Include new data sent in PRR calculation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e83a6a556ed8d9a2821de5d5f5c7d4b1292c694 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 22:00:46 -0000 The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=9e83a6a556ed8d9a2821de5d5f5c7d4b1292c694 commit 9e83a6a556ed8d9a2821de5d5f5c7d4b1292c694 Author: Richard Scheffenegger <rscheff@FreeBSD.org> AuthorDate: 2021-02-26 21:30:33 +0000 Commit: Richard Scheffenegger <rscheff@FreeBSD.org> CommitDate: 2021-02-26 21:31:58 +0000 Include new data sent in PRR calculation Reviewed By: #transport, kbowling MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28941 --- sys/netinet/tcp_input.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 6338b7491a7f..7b0987eed358 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2595,7 +2595,8 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, imax(1, tp->snd_nxt - tp->snd_una); snd_cnt = howmany((long)tp->sackhint.prr_delivered * tp->snd_ssthresh, tp->sackhint.recover_fs) - - tp->sackhint.sack_bytes_rexmit; + (tp->sackhint.sack_bytes_rexmit + + (tp->snd_nxt - tp->snd_recover)); } else { if (V_tcp_do_prr_conservative) limit = tp->sackhint.prr_delivered - @@ -3969,7 +3970,8 @@ tcp_prr_partialack(struct tcpcb *tp, struct tcphdr *th) imax(1, tp->snd_nxt - tp->snd_una); snd_cnt = howmany((long)tp->sackhint.prr_delivered * tp->snd_ssthresh, tp->sackhint.recover_fs) - - tp->sackhint.sack_bytes_rexmit; + (tp->sackhint.sack_bytes_rexmit + + (tp->snd_nxt - tp->snd_recover)); } else { if (V_tcp_do_prr_conservative) limit = tp->sackhint.prr_delivered - From owner-dev-commits-src-main@freebsd.org Fri Feb 26 22:03:31 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 492D3550AB0; Fri, 26 Feb 2021 22:03:31 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DnNvk5H2gz3DN2; Fri, 26 Feb 2021 22:03:30 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1614377008; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5U12U8nzFxuYascZBGCfUWusxowOinHCTkGa8SrO/kw=; b=f4+OAdGgLdwVe60AxwnWX7QYfLhy4cApIlxuSuKtN9KYG22Oy1oxFtW4vBVf2KGF46Jvoy QVDvhDBZCpEsRXfwSOmws2YDJ+aXlUp7C10TQd88s96XgyciJgdsRXptzu1IkliDxGvQkR lKgOxPJ5asYHduBTKeOvA+WOb9m5pOY= Received: from amy (lfbn-idf2-1-644-4.w86-247.abo.wanadoo.fr [86.247.100.4]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 8ae885c9 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 26 Feb 2021 22:03:28 +0000 (UTC) Date: Fri, 26 Feb 2021 23:03:27 +0100 From: Emmanuel Vadot <manu@bidouilliste.com> To: Enji Cooper <yaneurabeya@gmail.com> Cc: Baptiste Daroussin <bapt@FreeBSD.org>, "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database Message-Id: <20210226230327.2741e72fe3aef2918cc210d6@bidouilliste.com> In-Reply-To: <E1CBDB73-8A27-49D5-9B1A-7F33CA323528@gmail.com> References: <202102251327.11PDR4eC083842@gitrepo.freebsd.org> <E1CBDB73-8A27-49D5-9B1A-7F33CA323528@gmail.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DnNvk5H2gz3DN2 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 22:03:31 -0000 On Fri, 26 Feb 2021 13:41:31 -0800 Enji Cooper <yaneurabeya@gmail.com> wrote: > > > On Feb 25, 2021, at 5:27 AM, Baptiste Daroussin <bapt@FreeBSD.org> wrote: > > > > The branch main has been updated by bapt: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=2a50a9de8340f08bd876e9e5993332ae14376f80 > > > > commit 2a50a9de8340f08bd876e9e5993332ae14376f80 > > Author: Baptiste Daroussin <bapt@FreeBSD.org> > > AuthorDate: 2021-02-23 16:17:32 +0000 > > Commit: Baptiste Daroussin <bapt@FreeBSD.org> > > CommitDate: 2021-02-25 13:25:32 +0000 > > > > terminfo: add terminfo database > > > > Tested by: manu, jbeich > > Hi Baptiste, > A question and a comment: > 1. Was this reviewed in Phabricator? > 2. The details on why the terminfo database is being added are a bit lean too to non-Unix users. Are you aware that we are developing a unix-like system ? > It would be nice if the motivation for the change was documented in the commit message. > Thanks! > -Enji -- Emmanuel Vadot <manu@bidouilliste.com> <manu@FreeBSD.org> From owner-dev-commits-src-main@freebsd.org Fri Feb 26 22:57:23 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 61224551F86; Fri, 26 Feb 2021 22:57:23 +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 4DnQ5v10TDz3H0x; Fri, 26 Feb 2021 22:57:22 +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 11QMvJ0u032240; Fri, 26 Feb 2021 14:57:19 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 11QMvJsL032239; Fri, 26 Feb 2021 14:57:19 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net> Message-Id: <202102262257.11QMvJsL032239@gndrsh.dnsmgr.net> Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database In-Reply-To: <44c9cd7b-e032-4613-81be-6214f37d2fbe@FreeBSD.org> To: Baptiste Daroussin <bapt@freebsd.org> Date: Fri, 26 Feb 2021 14:57:19 -0800 (PST) CC: Enji Cooper <yaneurabeya@gmail.com>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@freebsd.org>, "dev-commits-src-main@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: 4DnQ5v10TDz3H0x 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 22:57:23 -0000 > > 26 f?vr. 2021 22:41:37 Enji Cooper <yaneurabeya@gmail.com>: > > > > >> On Feb 25, 2021, at 5:27 AM, Baptiste Daroussin <bapt@FreeBSD.org> wrote: > >> > >> The branch main has been updated by bapt: > >> > >> URL: https://cgit.FreeBSD.org/src/commit/?id=2a50a9de8340f08bd876e9e5993332ae14376f80 > >> > >> commit 2a50a9de8340f08bd876e9e5993332ae14376f80 > >> Author:???? Baptiste Daroussin <bapt@FreeBSD.org> > >> AuthorDate: 2021-02-23 16:17:32 +0000 > >> Commit:???? Baptiste Daroussin <bapt@FreeBSD.org> > >> CommitDate: 2021-02-25 13:25:32 +0000 > >> > >> ?? terminfo: add terminfo database > >> > >> ?? Tested by:????? manu, jbeich > > > > Hi Baptiste, > > ? A question and a comment: > > ? 1. Was this reviewed in Phabricator? > > ? 2. The details on why the terminfo database is being added are a bit lean too to non-Unix users. It would be nice if the motivation for the change was documented in the commit message. > > Thanks! > > -Enji > > No it was not reviewed in phabricator as it does not really bring any code, but it was discussed on the mailing lists with a heads up on the plan and the motivation, and all the reaction were in favor of this change. On what mailing list as I do not recall such a thread, which means I probably need to add yet another list. > Note thay while it could have been better written this commit is the third of a serie, where the first one explain a bit more things. > > Bapt -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-main@freebsd.org Fri Feb 26 23:06:11 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 70BB6552291; Fri, 26 Feb 2021 23:06: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DnQJ32nclz3HbS; Fri, 26 Feb 2021 23:06: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 527C213273; Fri, 26 Feb 2021 23:06: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 11QN6BDQ054649; Fri, 26 Feb 2021 23:06:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11QN6Bk5054646; Fri, 26 Feb 2021 23:06:11 GMT (envelope-from git) Date: Fri, 26 Feb 2021 23:06:11 GMT Message-Id: <202102262306.11QN6Bk5054646@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska <mm@FreeBSD.org> Subject: git: c170aa9f37e4 - main - zfs: add missing checks for unsupported features MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c170aa9f37e4ce9338a0f26e3e983f7123ea8c1a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 23:06:11 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=c170aa9f37e4ce9338a0f26e3e983f7123ea8c1a commit c170aa9f37e4ce9338a0f26e3e983f7123ea8c1a Author: Martin Matuska <mm@FreeBSD.org> AuthorDate: 2021-02-26 21:52:41 +0000 Commit: Martin Matuska <mm@FreeBSD.org> CommitDate: 2021-02-26 23:05:50 +0000 zfs: add missing checks for unsupported features After the merge of OpenZFS master-9312e0fd1 it has become possible to import ZFS pools witn an active org.illumos:edonr feature on FreeBSD, leading to a panic. In addition, "zpool status" reported all pools without edonr as upgradable and "zpool upgrade -v" lists edonr in the list of upgradable features. This is an accepted but not yet included bugfix by upstream. Obtained from: https://github.com/openzfs/zfs/pull/11653 Differential Revision: https://reviews.freebsd.org/D28935 Reported by: garga (on freebsd-current@) Reviewed by: freqlabs X-MFC-with: ba27dd8be821792e15bdabfac69fd6cab0cf9dd3 --- sys/contrib/openzfs/cmd/zpool/zpool_main.c | 2 ++ sys/contrib/openzfs/cmd/ztest/ztest.c | 3 +++ sys/contrib/openzfs/lib/libzfs/libzfs_status.c | 2 ++ sys/contrib/openzfs/module/zcommon/zfeature_common.c | 2 ++ 4 files changed, 9 insertions(+) diff --git a/sys/contrib/openzfs/cmd/zpool/zpool_main.c b/sys/contrib/openzfs/cmd/zpool/zpool_main.c index 29252e6a24f4..e89eb3bea770 100644 --- a/sys/contrib/openzfs/cmd/zpool/zpool_main.c +++ b/sys/contrib/openzfs/cmd/zpool/zpool_main.c @@ -9030,6 +9030,8 @@ zpool_do_upgrade(int argc, char **argv) "---------------\n"); for (i = 0; i < SPA_FEATURES; i++) { zfeature_info_t *fi = &spa_feature_table[i]; + if (!fi->fi_zfs_mod_supported) + continue; const char *ro = (fi->fi_flags & ZFEATURE_FLAG_READONLY_COMPAT) ? " (read-only compatible)" : ""; diff --git a/sys/contrib/openzfs/cmd/ztest/ztest.c b/sys/contrib/openzfs/cmd/ztest/ztest.c index cfa1290d78d1..1a030280704a 100644 --- a/sys/contrib/openzfs/cmd/ztest/ztest.c +++ b/sys/contrib/openzfs/cmd/ztest/ztest.c @@ -7592,6 +7592,9 @@ ztest_init(ztest_shared_t *zs) for (i = 0; i < SPA_FEATURES; i++) { char *buf; + if (!spa_feature_table[i].fi_zfs_mod_supported) + continue; + /* * 75% chance of using the log space map feature. We want ztest * to exercise both the code paths that use the log space map diff --git a/sys/contrib/openzfs/lib/libzfs/libzfs_status.c b/sys/contrib/openzfs/lib/libzfs/libzfs_status.c index fadae9388ac1..5e5cb5f5d440 100644 --- a/sys/contrib/openzfs/lib/libzfs/libzfs_status.c +++ b/sys/contrib/openzfs/lib/libzfs/libzfs_status.c @@ -482,6 +482,8 @@ check_status(nvlist_t *config, boolean_t isimport, return (ZPOOL_STATUS_COMPATIBILITY_ERR); for (i = 0; i < SPA_FEATURES; i++) { zfeature_info_t *fi = &spa_feature_table[i]; + if (!fi->fi_zfs_mod_supported) + continue; if (pool_features[i] && !nvlist_exists(feat, fi->fi_guid)) return (ZPOOL_STATUS_FEAT_DISABLED); diff --git a/sys/contrib/openzfs/module/zcommon/zfeature_common.c b/sys/contrib/openzfs/module/zcommon/zfeature_common.c index e95a85e89ba2..fc0e09605eef 100644 --- a/sys/contrib/openzfs/module/zcommon/zfeature_common.c +++ b/sys/contrib/openzfs/module/zcommon/zfeature_common.c @@ -100,6 +100,8 @@ zfeature_is_supported(const char *guid) for (spa_feature_t i = 0; i < SPA_FEATURES; i++) { zfeature_info_t *feature = &spa_feature_table[i]; + if (!feature->fi_zfs_mod_supported) + continue; if (strcmp(guid, feature->fi_guid) == 0) return (B_TRUE); } From owner-dev-commits-src-main@freebsd.org Fri Feb 26 23:09:06 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E205D5521E5; Fri, 26 Feb 2021 23:09:06 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.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 4DnQMQ14lQz3Hd2; Fri, 26 Feb 2021 23:09:05 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: by sdaoden.eu (Postfix, from userid 1000) id 922D116057; Sat, 27 Feb 2021 00:08:58 +0100 (CET) Date: Sat, 27 Feb 2021 00:08:58 +0100 From: Steffen Nurpmeso <steffen@sdaoden.eu> To: "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net> Cc: Baptiste Daroussin <bapt@freebsd.org>, Enji Cooper <yaneurabeya@gmail.com>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@freebsd.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@freebsd.org> Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database Message-ID: <20210226230858.Zvbdf%steffen@sdaoden.eu> In-Reply-To: <202102262257.11QMvJsL032239@gndrsh.dnsmgr.net> References: <202102262257.11QMvJsL032239@gndrsh.dnsmgr.net> User-Agent: s-nail v14.9.21-105-g4b55359c OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. X-Rspamd-Queue-Id: 4DnQMQ14lQz3Hd2 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of steffen@sdaoden.eu designates 217.144.132.164 as permitted sender) smtp.mailfrom=steffen@sdaoden.eu X-Spamd-Result: default: False [-0.36 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[217.144.132.164:from]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sdaoden.eu]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; RCPT_COUNT_FIVE(0.00)[6]; SPAMHAUS_ZRD(0.00)[217.144.132.164:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.94)[0.938]; MID_CONTAINS_FROM(1.00)[]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15987, ipnet:217.144.128.0/20, country:DE]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 23:09:06 -0000 Rodney W. Grimes wrote in <202102262257.11QMvJsL032239@gndrsh.dnsmgr.net>: |On what mailing list as I do not recall such a thread, which means \ |I probably need to add yet another list. May i suggest https://www.youtube.com/watch?v=ozSLrhGZCDY (It is not about Daft Punk. ;-) It is very british indeed.) --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From owner-dev-commits-src-main@freebsd.org Fri Feb 26 23:19:33 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 783EC552783; Fri, 26 Feb 2021 23:19:33 +0000 (UTC) (envelope-from rob.fx907@gmail.com) Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) 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 4DnQbT2dV4z3JV0; Fri, 26 Feb 2021 23:19:33 +0000 (UTC) (envelope-from rob.fx907@gmail.com) Received: by mail-oi1-x236.google.com with SMTP id w69so11507366oif.1; Fri, 26 Feb 2021 15:19:33 -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=gNnHD7XPIvyewMjzJrnUt38hlLiAP69hPszkvWiCbk4=; b=tjgLS9nLrK3junVo3o/864GHm28XM88UWCiSRzMafmEIn0SzlWgsJkWqMHVkCtBXht VfWldm3wJQnx8GyR0UsyMGhBDJoSu4hGI/niUput3VYe6dQxbUdUuTBodkIH7AY/5o3H T05s+KMX2IcwcKUlEYgzU2UH1no2dbAJnXMgPCEEfRGErQFHI1p9+Kmni3faQpxsHlMz J+alYd5o/d4S7PxGpDxevQavdUKV8lHwM+QIV+93U4sbMSLT4moTf9K7pqiTGtxS0bnT uv86Lyk6cpB6seyHXXoMqyfmthfe/rjdvl8fefXGVSr/gssZh9mMYi6E82nKijFgGUEC qDcg== 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=gNnHD7XPIvyewMjzJrnUt38hlLiAP69hPszkvWiCbk4=; b=BroL6jxnir/ZyCiESFVvC7/TafP9e5X30/UAcpc88xIyLoLv8Ce0F8+ESqjYeJ9N5c pobo4b87XdBeDyxYiCPjdGAB/MkMecE5jp4bGSetKvACv8AR9qvcUngPiKFMsfESQAx+ br2ZRMsw6w0FMIZwh0RUV/DbzBsUFXiO8kFjnHQ+l73Xt5gm5xJFvv1CvMFZZQfV/2HE bxT26im/lhT6eAmjncNOqKJj8OGwzCjJ7zz3GoGGM30AeRJpzeouqJ+RwtbwGrMLIo+f VTIY4S56/Tqw7rWGXd/9YLCrZ0Hy6D1TBE+ncoBbpztbzMXun7iedSNK+FmozpTLngsi m5aA== X-Gm-Message-State: AOAM533M7GFwoPAFISZS9OywbK2A+m8eighEiqaOgvDt9R2eP7Q6c3yy 3O0kMeCOWvbNSZjlF42RKS0ouTkaFUjpbTRoSf8= X-Google-Smtp-Source: ABdhPJxD2Mq5iZIx/jpCjJ8kbFPF8N+V3SLIvlQHAOuuSJGdBDGTHMSJ0emjYxaKuoUipIwWWmyFmDh8zx+GJnxViD4= X-Received: by 2002:aca:ed85:: with SMTP id l127mr3865309oih.152.1614381571436; Fri, 26 Feb 2021 15:19:31 -0800 (PST) MIME-Version: 1.0 References: <202102262257.11QMvJsL032239@gndrsh.dnsmgr.net> <20210226230858.Zvbdf%steffen@sdaoden.eu> In-Reply-To: <20210226230858.Zvbdf%steffen@sdaoden.eu> From: Rob Wing <rob.fx907@gmail.com> Date: Fri, 26 Feb 2021 14:18:49 -0900 Message-ID: <CAF3+n_e1CyHVX8bwjnahdqCceAyg08aiE6Yn+i4Jq_Mzd2EueA@mail.gmail.com> Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database To: Steffen Nurpmeso <steffen@sdaoden.eu> Cc: "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net>, Baptiste Daroussin <bapt@freebsd.org>, Enji Cooper <yaneurabeya@gmail.com>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@freebsd.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@freebsd.org> X-Rspamd-Queue-Id: 4DnQbT2dV4z3JV0 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_FROM(0.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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 26 Feb 2021 23:19:33 -0000 Rod, https://lists.freebsd.org/pipermail/freebsd-current/2020-May/076047.html not sure if that's the one Bapt was referencing...because you commented in that same thread as well, linked below. https://lists.freebsd.org/pipermail/freebsd-current/2020-May/076051.html -Rob On Fri, Feb 26, 2021 at 2:09 PM Steffen Nurpmeso <steffen@sdaoden.eu> wrote: > Rodney W. Grimes wrote in > <202102262257.11QMvJsL032239@gndrsh.dnsmgr.net>: > |On what mailing list as I do not recall such a thread, which means \ > |I probably need to add yet another list. > > May i suggest > > https://www.youtube.com/watch?v=ozSLrhGZCDY > > (It is not about Daft Punk. ;-) It is very british indeed.) > > --steffen > | > |Der Kragenbaer, The moon bear, > |der holt sich munter he cheerfully and one by one > |einen nach dem anderen runter wa.ks himself off > |(By Robert Gernhardt) > From owner-dev-commits-src-main@freebsd.org Sat Feb 27 02:36:35 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E754E558A1A; Sat, 27 Feb 2021 02:36:35 +0000 (UTC) (envelope-from lwhsu@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DnVyq69pbz3mbg; Sat, 27 Feb 2021 02:36:35 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: from mail-yb1-f178.google.com (mail-yb1-f178.google.com [209.85.219.178]) (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: lwhsu/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id C08FA70A2; Sat, 27 Feb 2021 02:36:35 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: by mail-yb1-f178.google.com with SMTP id l8so10822396ybe.12; Fri, 26 Feb 2021 18:36:35 -0800 (PST) X-Gm-Message-State: AOAM532OuPCoulEAlMr8iFmaAs9hIlLslHMwNdSuf03aIUt0JArtfAQg 9C6qmRr2bhtufiNxWZ0VPInqyaCALi2zXWJr51I= X-Google-Smtp-Source: ABdhPJw1XcFW/nBF8811SgJzbI3kjT0wiPTcMdLKeRdnzcYxDcHWIpm0Rq3+0E+UdiBV15N5iZXo3uaDU0Nfu6/jHCk= X-Received: by 2002:a25:34d5:: with SMTP id b204mr8334370yba.497.1614393395250; Fri, 26 Feb 2021 18:36:35 -0800 (PST) MIME-Version: 1.0 References: <202102261907.11QJ7Oaq039195@gitrepo.freebsd.org> In-Reply-To: <202102261907.11QJ7Oaq039195@gitrepo.freebsd.org> From: Li-Wen Hsu <lwhsu@freebsd.org> Date: Sat, 27 Feb 2021 10:36:23 +0800 X-Gmail-Original-Message-ID: <CAKBkRUyPK9oPdHmkHsekFeLWnyZ4dLd=Foep7zsCwsQ0q95g9g@mail.gmail.com> Message-ID: <CAKBkRUyPK9oPdHmkHsekFeLWnyZ4dLd=Foep7zsCwsQ0q95g9g@mail.gmail.com> Subject: Re: git: bc3bba70d834 - main - inetd: Add examples from manual page and other sources To: Daniel Ebdrup Jensen <debdrup@freebsd.org> Cc: src-committers <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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 02:36:36 -0000 On Sat, Feb 27, 2021 at 3:07 AM Daniel Ebdrup Jensen <debdrup@freebsd.org> wrote: > > The branch main has been updated by debdrup (doc committer): > > URL: https://cgit.FreeBSD.org/src/commit/?id=bc3bba70d834c169475302334b192bc90c17521e > > commit bc3bba70d834c169475302334b192bc90c17521e > Author: Daniel Ebdrup Jensen <debdrup@FreeBSD.org> > AuthorDate: 2021-02-26 19:05:46 +0000 > Commit: Daniel Ebdrup Jensen <debdrup@FreeBSD.org> > CommitDate: 2021-02-26 19:07:03 +0000 > > inetd: Add examples from manual page and other sources ... > Reviewed by: kevans, brueffer, lwhsu, yuripv This is very minor, but for the record, I didn't click "accept" so I am a bit hesitant to be listed in the "Reviewed by" line because I think it implies I have reviewed everything and meet my standard to commit myself. I was just commenting on some very tiny stuff and help. I support the changes but I don't think my contribution is sufficient as a reviewer. I don't even list myself in the reviewers field in the differential. > Differential Revision: https://reviews.freebsd.org/D28882 ... > diff --git a/usr.sbin/inetd/inetd.conf b/usr.sbin/inetd/inetd.conf > index 65a3507a6dc2..7f5f6783a038 100644 > --- a/usr.sbin/inetd/inetd.conf > +++ b/usr.sbin/inetd/inetd.conf ... > +# Example entry for insecure rsync server > +# This is best combined with a VTI like if_ipsec(4) or wg(4) As we discussed in the differential, we can put if_wg(4) here, and they can be MFC'd together. BTW, still thanks very much for you to work on this! Best, Li-Wen From owner-dev-commits-src-main@freebsd.org Sat Feb 27 02:53:23 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0161559056; Sat, 27 Feb 2021 02:53:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) (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 4DnWLC4K2Vz3nbg; Sat, 27 Feb 2021 02:53:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf1-x42f.google.com with SMTP id b145so7515591pfb.4; Fri, 26 Feb 2021 18:53:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=lv/u85Mq3jrT+0t4jeH0fcu6/qJksJzgWPoDib13ucs=; b=T5BhygvKPuYjscyrxrogf+NGvfONtanEguEtvswF9aTb93xz/HE+meq/DsBTXt2gns l9O9oZ9AryXnjDypJyQVuSVZ2ChYP5kMjFypMnsIrCmrPuwSqMU2cCz0/7XfvrHouc4A w7ix9fhuzJZUltyR2l/9XvajyRaGSGBINc8rO/JnghrpCoVuK2NiVzwEt12yS3IGlj3q q3RbPV+7lQJGZyYK4afTQVYFuUVM0jaU5/bKgkZwFiP5AjjpzzneNoMcVsNLneeC+yrJ XtMIyL4GL+wn41nZyFm8ZZDN30rvLSHhctLQoYaR+cGQpw7ALwgdFMicpkdOe7H1q1SZ GpBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=lv/u85Mq3jrT+0t4jeH0fcu6/qJksJzgWPoDib13ucs=; b=Tc8sr5mpZC9bafE9jCSPxZmbDVV+8kq1wlqqH4YWRG5tt4Le12uhd+Hlq76Se2Bd+h eoofYMpm5W7uGyYwNHvq74aXILpPGp3ZvPMb4CalbN3W9ZzXWIspQKprgfCjJO6v62E8 U1OYRFgN1oXnUlVhnfRJ6qlwRjAV/QminHRdQNt35fZN58DpUrRtFGy0KF2Q9pyQG5sV EueA+yRCLkc75mApVtrnchLCKSzdSJ5s+9FUDaqooFXPcux0rq7Ui+fr6ycRbaXGKgZk NIu+x9uMt3lT7jnM5Ktb6EREnXpHC2WmViJFl7RYH5twah6OLfP7Q6tJm5Gv8svLM351 0pSg== X-Gm-Message-State: AOAM532brLtvyTiuw/xOjQbWeKv76cSRw8dUPSwEsTF2VTnIHXxR25/S 0i/pl+kYG6YCvKnGfxvoa+YrLs8JwsLmTg== X-Google-Smtp-Source: ABdhPJxS+5uK4mTbk6q4ievv1gOFGPNt9VvA2obYsG5JdXdvL1ZU66QVbpb15QXWEnR4iXpDPic7Dw== X-Received: by 2002:aa7:8ad2:0:b029:1ee:16f0:7c70 with SMTP id b18-20020aa78ad20000b02901ee16f07c70mr6053456pfd.58.1614394401713; Fri, 26 Feb 2021 18:53:21 -0800 (PST) Received: from [192.168.20.29] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id e8sm7036336pfl.101.2021.02.26.18.53.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Feb 2021 18:53:20 -0800 (PST) From: Enji Cooper <yaneurabeya@gmail.com> Message-Id: <305BED81-416F-4A7F-B334-29A8B5DFA01D@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database Date: Fri, 26 Feb 2021 18:53:20 -0800 In-Reply-To: <20210226230327.2741e72fe3aef2918cc210d6@bidouilliste.com> Cc: Baptiste Daroussin <bapt@FreeBSD.org>, "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> To: Emmanuel Vadot <manu@bidouilliste.com> References: <202102251327.11PDR4eC083842@gitrepo.freebsd.org> <E1CBDB73-8A27-49D5-9B1A-7F33CA323528@gmail.com> <20210226230327.2741e72fe3aef2918cc210d6@bidouilliste.com> X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4DnWLC4K2Vz3nbg 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 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 02:53:23 -0000 > On Feb 26, 2021, at 2:03 PM, Emmanuel Vadot <manu@bidouilliste.com> = wrote: >=20 > On Fri, 26 Feb 2021 13:41:31 -0800 > Enji Cooper <yaneurabeya@gmail.com <mailto:yaneurabeya@gmail.com>> = wrote: >=20 >>=20 >>> On Feb 25, 2021, at 5:27 AM, Baptiste Daroussin <bapt@FreeBSD.org> = wrote: >>>=20 >>> The branch main has been updated by bapt: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D2a50a9de8340f08bd876e9e5993332ae= 14376f80 >>>=20 >>> commit 2a50a9de8340f08bd876e9e5993332ae14376f80 >>> Author: Baptiste Daroussin <bapt@FreeBSD.org> >>> AuthorDate: 2021-02-23 16:17:32 +0000 >>> Commit: Baptiste Daroussin <bapt@FreeBSD.org> >>> CommitDate: 2021-02-25 13:25:32 +0000 >>>=20 >>> terminfo: add terminfo database >>>=20 >>> Tested by: manu, jbeich >>=20 >> Hi Baptiste, >> A question and a comment: >> 1. Was this reviewed in Phabricator? >> 2. The details on why the terminfo database is being added are a = bit lean too to non-Unix users. >=20 > Are you aware that we are developing a unix-like system ? =E2=80=9Cnon-Unix=E2=80=9D was poor wording. What I was trying to imply = was the fact that the commit message described what was done, but not = what or what could be gained after the commit. If I tried explaining this information to someone who had no idea what = terminfo was, they would be puzzled about what was gained through this = commit. Put differently: if I had to explain to my non-technical friends what I = was doing with this commit message alone, I would probably receive very = puzzled looks from them. Cheers, -Enji= From owner-dev-commits-src-main@freebsd.org Sat Feb 27 02:55:04 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 90DFC55949E; Sat, 27 Feb 2021 02:55:04 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) (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 4DnWN751JLz3nys; Sat, 27 Feb 2021 02:55:03 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pl1-x632.google.com with SMTP id p5so6291401plo.4; Fri, 26 Feb 2021 18:55:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=b1m9FrJChKUJ9gWFp7O/6SyuPyDBO09lyqK6ut7v4Tc=; b=e3S2BP+HcdvXg4N/MK99Zr4WC+seSmhKIGSgGp/whYagdhCTz7RQIXQfM3I47v/cFK uV+76hrjjqwJ4tZkzxH1hE99CVWliBiWOKIEjabfvMmaM9AyySA6p48oRrjgBckj+POg n1YaRLrKCHn0CreqQyBvZXak0hntF1FU4ILWI5tYcSGDRpe0mgu2bKzUN3Dnzafr3Kvb RCNBx3pK4t4SZJmsWfhshgHVYb6zP5h9tMi8fDJKJBiLQ6B+19XS/R1I3nHZM3ce+1gN oerTvJuk1A8cKKBEnmQXOhiu+s5c0+LK1X4EZDKlkQ3SbInY2ZXY+YloKIYZG5BwXr2r 5c5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=b1m9FrJChKUJ9gWFp7O/6SyuPyDBO09lyqK6ut7v4Tc=; b=IjF3NJhBVZkmbYGpoWmGiJpRI+I+XslUTPA5yRrkAhYNtDI4kuhY3NiYUA/wC024o0 2xTD7GNe6eq3Exgda65Y8NombBJbousuRs3zy4hgtpYBHHHXPT6jGisZeJdzalADwK+r EklAITCzVmcpOMEDZTNj58h246Zyb9mJ6qBavdFYnW0e11j1y4U+5FCR69qOuKZ9/Bwm Cj7gwT69/MN+cActZveCr4YHvfNjbhd4KNgyuYSr5v22J+7GwRCpV9Myxb+h44JtgB2X yWcS910qpVYFAeJ6FxqWJ6a7d/d0Gk0MNB9jHjsHHwnzAM3mjDiu/ljxhDYNt1tOPkW2 VoMg== X-Gm-Message-State: AOAM531cjhkJvkBlpTYVwxDX+nSigw/6yQVEdN2K3010rEMU2cdIySU+ 3QxT2N9mKCXae7WTW9y12DQ= X-Google-Smtp-Source: ABdhPJz82rqbIQ1eXH9avVYOEUXD5A7il/yAC3oWPreJbR5RlTNn14MO3k2RnbZlLWEKwyOATKIdPQ== X-Received: by 2002:a17:90a:2ac7:: with SMTP id i7mr6170268pjg.82.1614394502105; Fri, 26 Feb 2021 18:55:02 -0800 (PST) Received: from [192.168.20.29] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id s13sm9893996pjm.1.2021.02.26.18.55.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Feb 2021 18:55:01 -0800 (PST) From: Enji Cooper <yaneurabeya@gmail.com> Message-Id: <C584AE80-55A4-4B7E-9896-8648A430D18D@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database Date: Fri, 26 Feb 2021 18:55:00 -0800 In-Reply-To: <305BED81-416F-4A7F-B334-29A8B5DFA01D@gmail.com> Cc: Baptiste Daroussin <bapt@FreeBSD.org>, "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> To: Emmanuel Vadot <manu@bidouilliste.com> References: <202102251327.11PDR4eC083842@gitrepo.freebsd.org> <E1CBDB73-8A27-49D5-9B1A-7F33CA323528@gmail.com> <20210226230327.2741e72fe3aef2918cc210d6@bidouilliste.com> <305BED81-416F-4A7F-B334-29A8B5DFA01D@gmail.com> X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4DnWN751JLz3nys X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=e3S2BP+H; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::632 as permitted sender) smtp.mailfrom=yaneurabeya@gmail.com X-Spamd-Result: default: False [-1.50 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RECEIVED_SPAMHAUS_PBL(0.00)[73.19.52.228:received]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::632:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; NEURAL_SPAM_SHORT(1.00)[1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::632:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::632:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 02:55:04 -0000 > On Feb 26, 2021, at 6:53 PM, Enji Cooper <yaneurabeya@gmail.com> = wrote: >=20 >>=20 >> On Feb 26, 2021, at 2:03 PM, Emmanuel Vadot <manu@bidouilliste.com = <mailto:manu@bidouilliste.com>> wrote: >>=20 >> On Fri, 26 Feb 2021 13:41:31 -0800 >> Enji Cooper <yaneurabeya@gmail.com <mailto:yaneurabeya@gmail.com>> = wrote: >>=20 >>>=20 >>>> On Feb 25, 2021, at 5:27 AM, Baptiste Daroussin <bapt@FreeBSD.org = <mailto:bapt@FreeBSD.org>> wrote: >>>>=20 >>>> The branch main has been updated by bapt: >>>>=20 >>>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D2a50a9de8340f08bd876e9e5993332ae= 14376f80 = <https://cgit.freebsd.org/src/commit/?id=3D2a50a9de8340f08bd876e9e5993332a= e14376f80> >>>>=20 >>>> commit 2a50a9de8340f08bd876e9e5993332ae14376f80 >>>> Author: Baptiste Daroussin <bapt@FreeBSD.org = <mailto:bapt@FreeBSD.org>> >>>> AuthorDate: 2021-02-23 16:17:32 +0000 >>>> Commit: Baptiste Daroussin <bapt@FreeBSD.org = <mailto:bapt@FreeBSD.org>> >>>> CommitDate: 2021-02-25 13:25:32 +0000 >>>>=20 >>>> terminfo: add terminfo database >>>>=20 >>>> Tested by: manu, jbeich >>>=20 >>> Hi Baptiste, >>> A question and a comment: >>> 1. Was this reviewed in Phabricator? >>> 2. The details on why the terminfo database is being added are a = bit lean too to non-Unix users. >>=20 >> Are you aware that we are developing a unix-like system ? (Obviously it=E2=80=99s Friday night and I need to proofread before I = hit send) > =E2=80=9Cnon-Unix=E2=80=9D was poor wording. What I was trying to = imply was the fact that the commit message described what was done, but = not what or what could be gained after the commit. but not what or what -> but not why or what (that=E2=80=99s what I meant to say..) -Enji= From owner-dev-commits-src-main@freebsd.org Sat Feb 27 06:57:13 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5A4BA55D8E4; Sat, 27 Feb 2021 06:57:13 +0000 (UTC) (envelope-from bapt@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DnclY24YYz4VdZ; Sat, 27 Feb 2021 06:57:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from aniel.nours.eu (ns393929.ip-176-31-115.eu [176.31.115.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 208AC972C; Sat, 27 Feb 2021 06:57:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from [127.0.0.1] (10.246.39.62.rev.sfr.net [62.39.246.10]) (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 aniel.nours.eu (Postfix) with ESMTPSA id 4FC0436B35; Sat, 27 Feb 2021 07:57:11 +0100 (CET) Date: Sat, 27 Feb 2021 06:57:07 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: "Rodney W. Grimes" <rgrimes@freebsd.org> Cc: Enji Cooper <yaneurabeya@gmail.com>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@freebsd.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@freebsd.org> Message-ID: <f60418c3-aa57-4eb2-9d29-3e1af86cc3c2@FreeBSD.org> In-Reply-To: <202102262257.11QMvJsL032239@gndrsh.dnsmgr.net> References: <202102262257.11QMvJsL032239@gndrsh.dnsmgr.net> Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Correlation-ID: <f60418c3-aa57-4eb2-9d29-3e1af86cc3c2@FreeBSD.org> X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 06:57:13 -0000 26 f=C3=A9vr. 2021 23:57:25 Rodney W. Grimes <freebsd@gndrsh.dnsmgr.net>: >> >> 26 f?vr. 2021 22:41:37 Enji Cooper <yaneurabeya@gmail.com>: >> >>> >>>> On Feb 25, 2021, at 5:27 AM, Baptiste Daroussin <bapt@FreeBSD.org> wro= te: >>>> >>>> The branch main has been updated by bapt: >>>> >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=3D2a50a9de8340f08bd876e9e= 5993332ae14376f80 >>>> >>>> commit 2a50a9de8340f08bd876e9e5993332ae14376f80 >>>> Author:???? Baptiste Daroussin <bapt@FreeBSD.org> >>>> AuthorDate: 2021-02-23 16:17:32 +0000 >>>> Commit:???? Baptiste Daroussin <bapt@FreeBSD.org> >>>> CommitDate: 2021-02-25 13:25:32 +0000 >>>> >>>> ?? terminfo: add terminfo database >>>> >>>> ?? Tested by:????? manu, jbeich >>> >>> Hi Baptiste, >>> ? A question and a comment: >>> ? 1. Was this reviewed in Phabricator? >>> ? 2. The details on why the terminfo database is being added are a bit = lean too to non-Unix users. It would be nice if the motivation for the chan= ge was documented in the commit message. >>> Thanks! >>> -Enji >> >> No it was not reviewed in phabricator as it does not really bring any co= de, but it was discussed on the mailing lists with a heads up on the plan a= nd the motivation, and all the reaction were in favor of this change. > > On what mailing list as I do not recall such a thread, which means I prob= ably need to add yet another list.=C2=A0 > >> Note thay while it could have been better written this commit is the thi= rd of a serie, where the first one explain a bit more things. >> >> Bapt > > -- > Rod Grimes=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= rgrimes@freebsd.org https://lists.freebsd.org/pipermail/freebsd-current/2020-May/076051.html From owner-dev-commits-src-main@freebsd.org Sat Feb 27 08:23:17 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 317D655FEB4; Sat, 27 Feb 2021 08:23: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dnffs0gf3z4Znr; Sat, 27 Feb 2021 08:23: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 09F5B1A4ED; Sat, 27 Feb 2021 08:23: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 11R8NGRN093853; Sat, 27 Feb 2021 08:23:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11R8NG8b093852; Sat, 27 Feb 2021 08:23:16 GMT (envelope-from git) Date: Sat, 27 Feb 2021 08:23:16 GMT Message-Id: <202102270823.11R8NG8b093852@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: c01da939b099 - main - cardbus: Be sure to acquire Giant when calling into newbus MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c01da939b0998f8de068a23c9016c377e761255e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 08:23:17 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c01da939b0998f8de068a23c9016c377e761255e commit c01da939b0998f8de068a23c9016c377e761255e Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2021-02-27 07:00:52 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2021-02-27 08:23:09 +0000 cardbus: Be sure to acquire Giant when calling into newbus Acquire Giant in cardbus_detach_card. This used to be done above us, but no more. Tested by: kargl@ MFC After: 3 days --- sys/dev/cardbus/cardbus.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/cardbus/cardbus.c b/sys/dev/cardbus/cardbus.c index 391267944ec4..50a21dfc0b82 100644 --- a/sys/dev/cardbus/cardbus.c +++ b/sys/dev/cardbus/cardbus.c @@ -256,10 +256,11 @@ cardbus_detach_card(device_t cbdev) { int err = 0; + mtx_lock(&Giant); err = bus_generic_detach(cbdev); - if (err) - return (err); - err = device_delete_children(cbdev); + if (err == 0) + err = device_delete_children(cbdev); + mtx_unlock(&Giant); if (err) return (err); From owner-dev-commits-src-main@freebsd.org Sat Feb 27 09:27:47 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DDDD45614CF; Sat, 27 Feb 2021 09:27:47 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dnh5H5zXSz4dqv; Sat, 27 Feb 2021 09:27:47 +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 BFF371B788; Sat, 27 Feb 2021 09:27: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 11R9RlIX073704; Sat, 27 Feb 2021 09:27:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11R9Rl5I073703; Sat, 27 Feb 2021 09:27:47 GMT (envelope-from git) Date: Sat, 27 Feb 2021 09:27:47 GMT Message-Id: <202102270927.11R9Rl5I073703@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome <tsoome@FreeBSD.org> Subject: git: becaac3972f1 - main - loader: use display pixel density for font autoselection 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: becaac3972f1fde4e3c44516399468ba5ca65c9b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 09:27:47 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=becaac3972f1fde4e3c44516399468ba5ca65c9b commit becaac3972f1fde4e3c44516399468ba5ca65c9b Author: Toomas Soome <tsoome@FreeBSD.org> AuthorDate: 2021-02-20 08:51:28 +0000 Commit: Toomas Soome <tsoome@FreeBSD.org> CommitDate: 2021-02-27 09:26:02 +0000 loader: use display pixel density for font autoselection Calculate font size from 16 density independent pixels (dp) by using: size = 16 * ppi/160 * display_factor We are specifying font size 16dp, and assuming 1dp = 160ppi. Also apply scaling factor 2 (display_factor). MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28849 --- stand/common/gfx_fb.c | 110 +++++++++++++++++++++++++++++++++++++++++ stand/common/gfx_fb.h | 2 + stand/efi/libefi/efi_console.c | 23 ++++++--- stand/efi/loader/framebuffer.c | 96 +++++++++++++++++++++++++++++++++-- stand/i386/libi386/vbe.c | 25 ++++++---- 5 files changed, 237 insertions(+), 19 deletions(-) diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c index 02a0a3d2be22..77cf1d39854f 100644 --- a/stand/common/gfx_fb.c +++ b/stand/common/gfx_fb.c @@ -1863,6 +1863,113 @@ reset_font_flags(void) } } +/* Return w^2 + h^2 or 0, if the dimensions are unknown */ +static unsigned +edid_diagonal_squared(void) +{ + unsigned w, h; + + if (edid_info == NULL) + return (0); + + w = edid_info->display.max_horizontal_image_size; + h = edid_info->display.max_vertical_image_size; + + /* If either one is 0, we have aspect ratio, not size */ + if (w == 0 || h == 0) + return (0); + + /* + * some monitors encode the aspect ratio instead of the physical size. + */ + if ((w == 16 && h == 9) || (w == 16 && h == 10) || + (w == 4 && h == 3) || (w == 5 && h == 4)) + return (0); + + /* + * translate cm to inch, note we scale by 100 here. + */ + w = w * 100 / 254; + h = h * 100 / 254; + + /* Return w^2 + h^2 */ + return (w * w + h * h); +} + +/* + * calculate pixels per inch. + */ +static unsigned +gfx_get_ppi(void) +{ + unsigned dp, di; + + di = edid_diagonal_squared(); + if (di == 0) + return (0); + + dp = gfx_state.tg_fb.fb_width * + gfx_state.tg_fb.fb_width + + gfx_state.tg_fb.fb_height * + gfx_state.tg_fb.fb_height; + + return (isqrt(dp / di)); +} + +/* + * Calculate font size from density independent pixels (dp): + * ((16dp * ppi) / 160) * display_factor. + * Here we are using fixed constants: 1dp == 160 ppi and + * display_factor 2. + * + * We are rounding font size up and are searching for font which is + * not smaller than calculated size value. + */ +static vt_font_bitmap_data_t * +gfx_get_font(void) +{ + unsigned ppi, size; + vt_font_bitmap_data_t *font = NULL; + struct fontlist *fl, *next; + + /* Text mode is not supported here. */ + if (gfx_state.tg_fb_type == FB_TEXT) + return (NULL); + + ppi = gfx_get_ppi(); + if (ppi == 0) + return (NULL); + + /* + * We will search for 16dp font. + * We are using scale up by 10 for roundup. + */ + size = (16 * ppi * 10) / 160; + /* Apply display factor 2. */ + size = roundup(size * 2, 10) / 10; + + STAILQ_FOREACH(fl, &fonts, font_next) { + next = STAILQ_NEXT(fl, font_next); + + /* + * If this is last font or, if next font is smaller, + * we have our font. Make sure, it actually is loaded. + */ + if (next == NULL || next->font_data->vfbd_height < size) { + font = fl->font_data; + if (font->vfbd_font == NULL || + fl->font_flags == FONT_RELOAD) { + if (fl->font_load != NULL && + fl->font_name != NULL) + font = fl->font_load(fl->font_name); + } + break; + } + } + + return (font); +} + static vt_font_bitmap_data_t * set_font(teken_unit_t *rows, teken_unit_t *cols, teken_unit_t h, teken_unit_t w) { @@ -1887,6 +1994,9 @@ set_font(teken_unit_t *rows, teken_unit_t *cols, teken_unit_t h, teken_unit_t w) } } + if (font == NULL) + font = gfx_get_font(); + if (font != NULL) { *rows = height / font->vfbd_height; *cols = width / font->vfbd_width; diff --git a/stand/common/gfx_fb.h b/stand/common/gfx_fb.h index 04076a2c6d38..ac63d7939cef 100644 --- a/stand/common/gfx_fb.h +++ b/stand/common/gfx_fb.h @@ -109,6 +109,8 @@ struct vesa_edid_info { uint8_t checksum; } __packed; +extern struct vesa_edid_info *edid_info; + #define STD_TIMINGS 8 #define DET_TIMINGS 4 diff --git a/stand/efi/libefi/efi_console.c b/stand/efi/libefi/efi_console.c index 3cbd121c41da..0c40b362f276 100644 --- a/stand/efi/libefi/efi_console.c +++ b/stand/efi/libefi/efi_console.c @@ -952,13 +952,24 @@ cons_update_mode(bool use_gfx_mode) /* * setup_font() can adjust terminal size. - * Note, we do use UEFI terminal dimensions first, - * this is because the font selection will attempt - * to achieve at least this terminal dimension and - * we do not end up with too small font. + * We can see two kind of bad happening. + * We either can get too small console font - requested + * terminal size is large, display resolution is + * large, and we get very small font. + * Or, we can get too large font - requested + * terminal size is small and this will cause large + * font to be selected. + * Now, the setup_font() is updated to consider + * display density and this should give us mostly + * acceptable font. However, the catch is, not all + * display devices will give us display density. + * Still, we do hope, external monitors do - this is + * where the display size will matter the most. + * And for laptop screens, we should still get good + * results by requesting 80x25 terminal. */ - gfx_state.tg_tp.tp_row = rows; - gfx_state.tg_tp.tp_col = cols; + gfx_state.tg_tp.tp_row = 25; + gfx_state.tg_tp.tp_col = 80; setup_font(&gfx_state, fb_height, fb_width); rows = gfx_state.tg_tp.tp_row; cols = gfx_state.tg_tp.tp_col; diff --git a/stand/efi/loader/framebuffer.c b/stand/efi/loader/framebuffer.c index 509c41844dcb..adb9dfb62cee 100644 --- a/stand/efi/loader/framebuffer.c +++ b/stand/efi/loader/framebuffer.c @@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$"); #include <efilib.h> #include <efiuga.h> #include <efipciio.h> +#include <Protocol/EdidActive.h> +#include <Protocol/EdidDiscovered.h> #include <machine/metadata.h> #include "bootstrap.h" @@ -47,6 +49,12 @@ static EFI_GUID conout_guid = EFI_CONSOLE_OUT_DEVICE_GUID; EFI_GUID gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; static EFI_GUID pciio_guid = EFI_PCI_IO_PROTOCOL_GUID; static EFI_GUID uga_guid = EFI_UGA_DRAW_PROTOCOL_GUID; +static EFI_GUID active_edid_guid = EFI_EDID_ACTIVE_PROTOCOL_GUID; +static EFI_GUID discovered_edid_guid = EFI_EDID_DISCOVERED_PROTOCOL_GUID; +static EFI_HANDLE gop_handle; + +/* Cached EDID. */ +struct vesa_edid_info *edid_info = NULL; static EFI_GRAPHICS_OUTPUT *gop; static EFI_UGA_DRAW_PROTOCOL *uga; @@ -467,10 +475,71 @@ efifb_from_uga(struct efi_fb *efifb) return (0); } +/* + * Fetch EDID info. Caller must free the buffer. + */ +static struct vesa_edid_info * +efifb_gop_get_edid(EFI_HANDLE h) +{ + const uint8_t magic[] = EDID_MAGIC; + EFI_EDID_ACTIVE_PROTOCOL *edid; + struct vesa_edid_info *edid_infop; + EFI_GUID *guid; + EFI_STATUS status; + size_t size; + + guid = &active_edid_guid; + status = BS->OpenProtocol(h, guid, (void **)&edid, IH, NULL, + EFI_OPEN_PROTOCOL_GET_PROTOCOL); + if (status != EFI_SUCCESS || + edid->SizeOfEdid == 0) { + guid = &discovered_edid_guid; + status = BS->OpenProtocol(h, guid, (void **)&edid, IH, NULL, + EFI_OPEN_PROTOCOL_GET_PROTOCOL); + if (status != EFI_SUCCESS || + edid->SizeOfEdid == 0) + return (NULL); + } + + size = MAX(sizeof(*edid_infop), edid->SizeOfEdid); + + edid_infop = calloc(1, size); + if (edid_infop == NULL) + return (NULL); + + memcpy(edid_infop, edid->Edid, edid->SizeOfEdid); + + /* Validate EDID */ + if (memcmp(edid_infop, magic, sizeof (magic)) != 0) + goto error; + + if (edid_infop->header.version != 1) + goto error; + + return (edid_infop); +error: + free(edid_infop); + return (NULL); +} + +static bool +efifb_get_edid(edid_res_list_t *res) +{ + bool rv = false; + + if (edid_info == NULL) + edid_info = efifb_gop_get_edid(gop_handle); + + if (edid_info != NULL) + rv = gfx_get_edid_resolution(edid_info, res); + + return (rv); +} + int efi_find_framebuffer(teken_gfx_t *gfx_state) { - EFI_HANDLE h, *hlist; + EFI_HANDLE *hlist; UINTN nhandles, i, hsize; struct efi_fb efifb; EFI_STATUS status; @@ -498,23 +567,25 @@ efi_find_framebuffer(teken_gfx_t *gfx_state) /* * Search for ConOut protocol, if not found, use first handle. */ - h = *hlist; + gop_handle = *hlist; for (i = 0; i < nhandles; i++) { void *dummy = NULL; status = OpenProtocolByHandle(hlist[i], &conout_guid, &dummy); if (status == EFI_SUCCESS) { - h = hlist[i]; + gop_handle = hlist[i]; break; } } - status = OpenProtocolByHandle(h, &gop_guid, (void **)&gop); + status = OpenProtocolByHandle(gop_handle, &gop_guid, (void **)&gop); free(hlist); if (status == EFI_SUCCESS) { gfx_state->tg_fb_type = FB_GOP; gfx_state->tg_private = gop; + if (edid_info == NULL) + edid_info = efifb_gop_get_edid(gop_handle); } else { status = BS->LocateProtocol(&uga_guid, NULL, (VOID **)&uga); if (status == EFI_SUCCESS) { @@ -767,9 +838,25 @@ command_gop(int argc, char *argv[]) } else if (strcmp(argv[1], "off") == 0) { (void) cons_update_mode(false); } else if (strcmp(argv[1], "get") == 0) { + edid_res_list_t res; + if (argc != 2) goto usage; + TAILQ_INIT(&res); efifb_from_gop(&efifb, gop->Mode, gop->Mode->Info); + if (efifb_get_edid(&res)) { + struct resolution *rp; + + printf("EDID"); + while ((rp = TAILQ_FIRST(&res)) != NULL) { + printf(" %dx%d", rp->width, rp->height); + TAILQ_REMOVE(&res, rp, next); + free(rp); + } + printf("\n"); + } else { + printf("no EDID information\n"); + } print_efifb(gop->Mode->Mode, &efifb, 1); printf("\n"); } else if (!strcmp(argv[1], "list")) { @@ -778,6 +865,7 @@ command_gop(int argc, char *argv[]) if (argc != 2) goto usage; + pager_open(); for (mode = 0; mode < gop->Mode->MaxMode; mode++) { status = gop->QueryMode(gop, mode, &infosz, &info); diff --git a/stand/i386/libi386/vbe.c b/stand/i386/libi386/vbe.c index 0e9f6929ac05..ef4daffa8380 100644 --- a/stand/i386/libi386/vbe.c +++ b/stand/i386/libi386/vbe.c @@ -51,6 +51,7 @@ static struct modeinfoblock *vbe_mode; static uint16_t *vbe_mode_list; static size_t vbe_mode_list_size; +struct vesa_edid_info *edid_info = NULL; /* The default VGA color palette format is 6 bits per primary color. */ int palette_format = 6; @@ -836,34 +837,40 @@ vbe_dump_mode(int modenum, struct modeinfoblock *mi) static bool vbe_get_edid(edid_res_list_t *res) { - struct vesa_edid_info *edid_info; + struct vesa_edid_info *edidp; const uint8_t magic[] = EDID_MAGIC; int ddc_caps; bool ret = false; + if (edid_info != NULL) + return (gfx_get_edid_resolution(edid_info, res)); + ddc_caps = biosvbe_ddc_caps(); if (ddc_caps == 0) { return (ret); } - edid_info = bio_alloc(sizeof (*edid_info)); - if (edid_info == NULL) + edidp = bio_alloc(sizeof(*edidp)); + if (edidp == NULL) return (ret); - memset(edid_info, 0, sizeof (*edid_info)); + memset(edidp, 0, sizeof(*edidp)); - if (VBE_ERROR(biosvbe_ddc_read_edid(0, edid_info))) + if (VBE_ERROR(biosvbe_ddc_read_edid(0, edidp))) goto done; - if (memcmp(edid_info, magic, sizeof (magic)) != 0) + if (memcmp(edidp, magic, sizeof(magic)) != 0) goto done; /* Unknown EDID version. */ - if (edid_info->header.version != 1) + if (edidp->header.version != 1) goto done; - ret = gfx_get_edid_resolution(edid_info, res); + ret = gfx_get_edid_resolution(edidp, res); + edid_info = malloc(sizeof(*edid_info)); + if (edid_info != NULL) + memcpy(edid_info, edidp, sizeof (*edid_info)); done: - bio_free(edid_info, sizeof (*edid_info)); + bio_free(edidp, sizeof(*edidp)); return (ret); } From owner-dev-commits-src-main@freebsd.org Sat Feb 27 14:26:25 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6F7B854811B; Sat, 27 Feb 2021 14:26:25 +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 4Dnpjs0C7wz4vPP; Sat, 27 Feb 2021 14:26:24 +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 11REQMOK035063; Sat, 27 Feb 2021 06:26:22 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 11REQMfl035062; Sat, 27 Feb 2021 06:26:22 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net> Message-Id: <202102271426.11REQMfl035062@gndrsh.dnsmgr.net> Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database In-Reply-To: <f60418c3-aa57-4eb2-9d29-3e1af86cc3c2@FreeBSD.org> To: Baptiste Daroussin <bapt@freebsd.org> Date: Sat, 27 Feb 2021 06:26:22 -0800 (PST) CC: "Rodney W. Grimes" <rgrimes@freebsd.org>, Enji Cooper <yaneurabeya@gmail.com>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@freebsd.org>, "dev-commits-src-main@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: 4Dnpjs0C7wz4vPP 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 14:26:25 -0000 > 26 f?vr. 2021 23:57:25 Rodney W. Grimes <freebsd@gndrsh.dnsmgr.net>: > > >> > >> 26 f?vr. 2021 22:41:37 Enji Cooper <yaneurabeya@gmail.com>: > >> > >>> > >>>> On Feb 25, 2021, at 5:27 AM, Baptiste Daroussin <bapt@FreeBSD.org> wrote: > >>>> > >>>> The branch main has been updated by bapt: > >>>> > >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=2a50a9de8340f08bd876e9e5993332ae14376f80 > >>>> > >>>> commit 2a50a9de8340f08bd876e9e5993332ae14376f80 > >>>> Author:???? Baptiste Daroussin <bapt@FreeBSD.org> > >>>> AuthorDate: 2021-02-23 16:17:32 +0000 > >>>> Commit:???? Baptiste Daroussin <bapt@FreeBSD.org> > >>>> CommitDate: 2021-02-25 13:25:32 +0000 > >>>> > >>>> ?? terminfo: add terminfo database > >>>> > >>>> ?? Tested by:????? manu, jbeich > >>> > >>> Hi Baptiste, > >>> ? A question and a comment: > >>> ? 1. Was this reviewed in Phabricator? > >>> ? 2. The details on why the terminfo database is being added are a bit lean too to non-Unix users. It would be nice if the motivation for the change was documented in the commit message. > >>> Thanks! > >>> -Enji > >> > >> No it was not reviewed in phabricator as it does not really bring any code, but it was discussed on the mailing lists with a heads up on the plan and the motivation, and all the reaction were in favor of this change. > > > > On what mailing list as I do not recall such a thread, which means I probably need to add yet another list.? > > > >> Note thay while it could have been better written this commit is the third of a serie, where the first one explain a bit more things. > >> > >> Bapt > > > > -- > > Rod Grimes???????????????????????????????????????????????? rgrimes@freebsd.org > > https://lists.freebsd.org/pipermail/freebsd-current/2020-May/076051.html A discssion indeed, which I even participated in, but it DID not in anyway discuss the impact, it didnt even imply there would be any change to base system behavior, and that should always be discussed before such visible UI behavior changes occur. I can promise you there well be feedback, probably in both directions from the userbase on this "yet another default behavior change." My understanding is that those who have been using the port of terminfo have being doing so for some time, and it does not alter the base system behavior when installed, I expected that this was what you had proposed to do, basically eliminate the port and provide the functionality that it does in the base system without altering the base system behavior. -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-main@freebsd.org Sat Feb 27 15:40:30 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2823054A2D7; Sat, 27 Feb 2021 15:40: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DnrML0fFPz3Gl8; Sat, 27 Feb 2021 15:40: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 049742040A; Sat, 27 Feb 2021 15:40: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 11RFeTYw068094; Sat, 27 Feb 2021 15:40:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11RFeTN6068093; Sat, 27 Feb 2021 15:40:29 GMT (envelope-from git) Date: Sat, 27 Feb 2021 15:40:29 GMT Message-Id: <202102271540.11RFeTN6068093@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin <mav@FreeBSD.org> Subject: git: 9d9fd8b79f0e - main - Micro-optimize OOA queue processing. 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: 9d9fd8b79f0ebe59f791c8225fa01ab59858b7b5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 15:40:30 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=9d9fd8b79f0ebe59f791c8225fa01ab59858b7b5 commit 9d9fd8b79f0ebe59f791c8225fa01ab59858b7b5 Author: Alexander Motin <mav@FreeBSD.org> AuthorDate: 2021-02-27 15:14:05 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2021-02-27 15:40:24 +0000 Micro-optimize OOA queue processing. - Move ctl_get_cmd_entry() calls from every OOA traversal to when the requests first inserted, storing seridx in struct ctl_scsiio. - Move some checks out of the loop in ctl_check_ooa(). - Replace checks for errors that can not happen with asserts. - Transpose ctl_serialize_table, so that any OOA traversal accessed only one row (cache line). Compact it from enum to uint8_t. - Optimize static branch predictions in hottest places. Due to O(n) nature on deep LUN queues this can be the hottest code path in CTL, and additional 20% of IOPS I see in some 4KB I/O tests are good to have in reserve. About 50% of CPU time here according to the profiles is now spent in two memory accesses per traversed request in OOA. Sponsored by: iXsystems, Inc. MFC after: 2 weeks --- sys/cam/ctl/ctl.c | 238 ++++++++++++++++++++------------------------ sys/cam/ctl/ctl_io.h | 2 +- sys/cam/ctl/ctl_private.h | 18 ++-- sys/cam/ctl/ctl_ser_table.c | 41 ++++---- 4 files changed, 135 insertions(+), 164 deletions(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 18a82ca72d76..cae6dd4aa101 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -500,9 +500,10 @@ static int ctl_inquiry_std(struct ctl_scsiio *ctsio); static int ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint64_t *len); static ctl_action ctl_extent_check(union ctl_io *io1, union ctl_io *io2, bool seq); -static ctl_action ctl_extent_check_seq(union ctl_io *io1, union ctl_io *io2); +static ctl_action ctl_seq_check(union ctl_io *io1, union ctl_io *io2); static ctl_action ctl_check_for_blockage(struct ctl_lun *lun, - union ctl_io *pending_io, union ctl_io *ooa_io); + union ctl_io *pending_io, const uint8_t *serialize_row, + union ctl_io *ooa_io); static ctl_action ctl_check_ooa(struct ctl_lun *lun, union ctl_io *pending_io, union ctl_io **starting_io); static void ctl_try_unblock_io(struct ctl_lun *lun, union ctl_io *io, @@ -2313,6 +2314,7 @@ ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio) } entry = ctl_get_cmd_entry(ctsio, NULL); + ctsio->seridx = entry->seridx; if (ctl_scsiio_lun_check(lun, entry, ctsio) != 0) { mtx_unlock(&lun->lun_lock); goto badjuju; @@ -2333,12 +2335,6 @@ ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio) bio = (union ctl_io *)LIST_NEXT(&ctsio->io_hdr, ooa_links); switch (ctl_check_ooa(lun, (union ctl_io *)ctsio, &bio)) { - case CTL_ACTION_BLOCK: - ctsio->io_hdr.blocker = bio; - TAILQ_INSERT_TAIL(&bio->io_hdr.blocked_queue, &ctsio->io_hdr, - blocked_links); - mtx_unlock(&lun->lun_lock); - break; case CTL_ACTION_PASS: case CTL_ACTION_SKIP: if (softc->ha_mode == CTL_HA_MODE_XFER) { @@ -2357,6 +2353,12 @@ ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio) sizeof(msg_info.hdr), M_WAITOK); } break; + case CTL_ACTION_BLOCK: + ctsio->io_hdr.blocker = bio; + TAILQ_INSERT_TAIL(&bio->io_hdr.blocked_queue, &ctsio->io_hdr, + blocked_links); + mtx_unlock(&lun->lun_lock); + break; case CTL_ACTION_OVERLAP: LIST_REMOVE(&ctsio->io_hdr, ooa_links); mtx_unlock(&lun->lun_lock); @@ -2366,14 +2368,6 @@ ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio) LIST_REMOVE(&ctsio->io_hdr, ooa_links); mtx_unlock(&lun->lun_lock); ctl_set_overlapped_tag(ctsio, ctsio->tag_num); - goto badjuju; - case CTL_ACTION_ERROR: - default: - LIST_REMOVE(&ctsio->io_hdr, ooa_links); - mtx_unlock(&lun->lun_lock); - - ctl_set_internal_failure(ctsio, /*sks_valid*/ 0, - /*retry_count*/ 0); badjuju: ctl_copy_sense_data_back((union ctl_io *)ctsio, &msg_info); msg_info.hdr.original_sc = ctsio->io_hdr.remote_io; @@ -2383,6 +2377,8 @@ badjuju: sizeof(msg_info.scsi), M_WAITOK); ctl_free_io((union ctl_io *)ctsio); break; + default: + __assert_unreachable(); } } @@ -10819,8 +10815,9 @@ ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint64_t *len) break; } default: + *lba = 0; + *len = UINT64_MAX; return (1); - break; /* NOTREACHED */ } return (0); @@ -10854,7 +10851,7 @@ ctl_extent_check_unmap(union ctl_io *io, uint64_t lba2, uint64_t len2) /* If not UNMAP -- go other way. */ if (io->scsiio.cdb[0] != UNMAP) - return (CTL_ACTION_ERROR); + return (CTL_ACTION_SKIP); /* If UNMAP without data -- block and wait for data. */ ptrlen = (struct ctl_ptr_len_flags *) @@ -10882,33 +10879,34 @@ ctl_extent_check(union ctl_io *io1, union ctl_io *io2, bool seq) uint64_t len1, len2; int retval; - if (ctl_get_lba_len(io2, &lba2, &len2) != 0) - return (CTL_ACTION_ERROR); + retval = ctl_get_lba_len(io2, &lba2, &len2); + KASSERT(retval == 0, ("ctl_get_lba_len() error")); retval = ctl_extent_check_unmap(io1, lba2, len2); - if (retval != CTL_ACTION_ERROR) + if (retval != CTL_ACTION_SKIP) return (retval); - if (ctl_get_lba_len(io1, &lba1, &len1) != 0) - return (CTL_ACTION_ERROR); + retval = ctl_get_lba_len(io1, &lba1, &len1); + KASSERT(retval == 0, ("ctl_get_lba_len() error")); - if (io1->io_hdr.flags & CTL_FLAG_SERSEQ_DONE) + if (seq && (io1->io_hdr.flags & CTL_FLAG_SERSEQ_DONE)) seq = FALSE; return (ctl_extent_check_lba(lba1, len1, lba2, len2, seq)); } static ctl_action -ctl_extent_check_seq(union ctl_io *io1, union ctl_io *io2) +ctl_seq_check(union ctl_io *io1, union ctl_io *io2) { uint64_t lba1, lba2; uint64_t len1, len2; + int retval; if (io1->io_hdr.flags & CTL_FLAG_SERSEQ_DONE) return (CTL_ACTION_PASS); - if (ctl_get_lba_len(io1, &lba1, &len1) != 0) - return (CTL_ACTION_ERROR); - if (ctl_get_lba_len(io2, &lba2, &len2) != 0) - return (CTL_ACTION_ERROR); + retval = ctl_get_lba_len(io1, &lba1, &len1); + KASSERT(retval == 0, ("ctl_get_lba_len() error")); + retval = ctl_get_lba_len(io2, &lba2, &len2); + KASSERT(retval == 0, ("ctl_get_lba_len() error")); if (lba1 + len1 == lba2) return (CTL_ACTION_BLOCK); @@ -10917,25 +10915,15 @@ ctl_extent_check_seq(union ctl_io *io1, union ctl_io *io2) static ctl_action ctl_check_for_blockage(struct ctl_lun *lun, union ctl_io *pending_io, - union ctl_io *ooa_io) + const uint8_t *serialize_row, union ctl_io *ooa_io) { - const struct ctl_cmd_entry *pending_entry, *ooa_entry; - const ctl_serialize_action *serialize_row; - - /* - * Aborted commands are not going to be executed and may even - * not report completion, so we don't care about their order. - * Let them complete ASAP to clean the OOA queue. - */ - if (pending_io->io_hdr.flags & CTL_FLAG_ABORT) - return (CTL_ACTION_SKIP); /* * The initiator attempted multiple untagged commands at the same * time. Can't do that. */ - if ((pending_io->scsiio.tag_type == CTL_TAG_UNTAGGED) - && (ooa_io->scsiio.tag_type == CTL_TAG_UNTAGGED) + if (__predict_false(pending_io->scsiio.tag_type == CTL_TAG_UNTAGGED) + && __predict_false(ooa_io->scsiio.tag_type == CTL_TAG_UNTAGGED) && ((pending_io->io_hdr.nexus.targ_port == ooa_io->io_hdr.nexus.targ_port) && (pending_io->io_hdr.nexus.initid == @@ -10955,9 +10943,9 @@ ctl_check_for_blockage(struct ctl_lun *lun, union ctl_io *pending_io, * command with the same tag number as long as the previous * instance of this tag number has been aborted somehow. */ - if ((pending_io->scsiio.tag_type != CTL_TAG_UNTAGGED) - && (ooa_io->scsiio.tag_type != CTL_TAG_UNTAGGED) - && (pending_io->scsiio.tag_num == ooa_io->scsiio.tag_num) + if (__predict_true(pending_io->scsiio.tag_type != CTL_TAG_UNTAGGED) + && __predict_true(ooa_io->scsiio.tag_type != CTL_TAG_UNTAGGED) + && __predict_false(pending_io->scsiio.tag_num == ooa_io->scsiio.tag_num) && ((pending_io->io_hdr.nexus.targ_port == ooa_io->io_hdr.nexus.targ_port) && (pending_io->io_hdr.nexus.initid == @@ -10980,75 +10968,47 @@ ctl_check_for_blockage(struct ctl_lun *lun, union ctl_io *pending_io, * * XXX KDM check for other types of blockage first?? */ - if (pending_io->scsiio.tag_type == CTL_TAG_HEAD_OF_QUEUE) + if (__predict_false(pending_io->scsiio.tag_type == CTL_TAG_HEAD_OF_QUEUE)) return (CTL_ACTION_PASS); - /* - * Ordered tags have to block until all items ahead of them - * have completed. If we get called with an ordered tag, we always - * block, if something else is ahead of us in the queue. - */ - if (pending_io->scsiio.tag_type == CTL_TAG_ORDERED) - return (CTL_ACTION_BLOCK); - /* * Simple tags get blocked until all head of queue and ordered tags * ahead of them have completed. I'm lumping untagged commands in * with simple tags here. XXX KDM is that the right thing to do? */ - if (((pending_io->scsiio.tag_type == CTL_TAG_UNTAGGED) - || (pending_io->scsiio.tag_type == CTL_TAG_SIMPLE)) - && ((ooa_io->scsiio.tag_type == CTL_TAG_HEAD_OF_QUEUE) - || (ooa_io->scsiio.tag_type == CTL_TAG_ORDERED))) + if (__predict_false(ooa_io->scsiio.tag_type == CTL_TAG_ORDERED) || + __predict_false(ooa_io->scsiio.tag_type == CTL_TAG_HEAD_OF_QUEUE)) return (CTL_ACTION_BLOCK); - pending_entry = ctl_get_cmd_entry(&pending_io->scsiio, NULL); - KASSERT(pending_entry->seridx < CTL_SERIDX_COUNT, - ("%s: Invalid seridx %d for pending CDB %02x %02x @ %p", - __func__, pending_entry->seridx, pending_io->scsiio.cdb[0], - pending_io->scsiio.cdb[1], pending_io)); - ooa_entry = ctl_get_cmd_entry(&ooa_io->scsiio, NULL); - if (ooa_entry->seridx == CTL_SERIDX_INVLD) - return (CTL_ACTION_PASS); /* Unsupported command in OOA queue */ - KASSERT(ooa_entry->seridx < CTL_SERIDX_COUNT, - ("%s: Invalid seridx %d for ooa CDB %02x %02x @ %p", - __func__, ooa_entry->seridx, ooa_io->scsiio.cdb[0], - ooa_io->scsiio.cdb[1], ooa_io)); - - serialize_row = ctl_serialize_table[ooa_entry->seridx]; - - switch (serialize_row[pending_entry->seridx]) { - case CTL_SER_BLOCK: - return (CTL_ACTION_BLOCK); - case CTL_SER_EXTENT: - return (ctl_extent_check(ooa_io, pending_io, - (lun->be_lun->serseq == CTL_LUN_SERSEQ_ON))); - case CTL_SER_EXTENTOPT: - if ((lun->MODE_CTRL.queue_flags & SCP_QUEUE_ALG_MASK) != - SCP_QUEUE_ALG_UNRESTRICTED) - return (ctl_extent_check(ooa_io, pending_io, - (lun->be_lun->serseq == CTL_LUN_SERSEQ_ON))); + /* Unsupported command in OOA queue. */ + if (__predict_false(ooa_io->scsiio.seridx == CTL_SERIDX_INVLD)) return (CTL_ACTION_PASS); - case CTL_SER_EXTENTSEQ: + + switch (serialize_row[ooa_io->scsiio.seridx]) { + case CTL_SER_SEQ: if (lun->be_lun->serseq != CTL_LUN_SERSEQ_OFF) - return (ctl_extent_check_seq(ooa_io, pending_io)); - return (CTL_ACTION_PASS); + return (ctl_seq_check(ooa_io, pending_io)); + /* FALLTHROUGH */ case CTL_SER_PASS: return (CTL_ACTION_PASS); + case CTL_SER_EXTENTOPT: + if ((lun->MODE_CTRL.queue_flags & SCP_QUEUE_ALG_MASK) == + SCP_QUEUE_ALG_UNRESTRICTED) + return (CTL_ACTION_PASS); + /* FALLTHROUGH */ + case CTL_SER_EXTENT: + return (ctl_extent_check(ooa_io, pending_io, + (lun->be_lun->serseq == CTL_LUN_SERSEQ_ON))); case CTL_SER_BLOCKOPT: - if ((lun->MODE_CTRL.queue_flags & SCP_QUEUE_ALG_MASK) != + if ((lun->MODE_CTRL.queue_flags & SCP_QUEUE_ALG_MASK) == SCP_QUEUE_ALG_UNRESTRICTED) - return (CTL_ACTION_BLOCK); - return (CTL_ACTION_PASS); - case CTL_SER_SKIP: - return (CTL_ACTION_SKIP); + return (CTL_ACTION_PASS); + /* FALLTHROUGH */ + case CTL_SER_BLOCK: + return (CTL_ACTION_BLOCK); default: - panic("%s: Invalid serialization value %d for %d => %d", - __func__, serialize_row[pending_entry->seridx], - pending_entry->seridx, ooa_entry->seridx); + __assert_unreachable(); } - - return (CTL_ACTION_ERROR); } /* @@ -11061,20 +11021,41 @@ static ctl_action ctl_check_ooa(struct ctl_lun *lun, union ctl_io *pending_io, union ctl_io **starting_io) { - union ctl_io *ooa_io; + union ctl_io *ooa_io = *starting_io; + const uint8_t *serialize_row; ctl_action action; mtx_assert(&lun->lun_lock, MA_OWNED); + /* + * Aborted commands are not going to be executed and may even + * not report completion, so we don't care about their order. + * Let them complete ASAP to clean the OOA queue. + */ + if (__predict_false(pending_io->io_hdr.flags & CTL_FLAG_ABORT)) + return (CTL_ACTION_SKIP); + + /* + * Ordered tags have to block until all items ahead of them have + * completed. If we get called with an ordered tag, we always + * block, if something else is ahead of us in the queue. + */ + if ((pending_io->scsiio.tag_type == CTL_TAG_ORDERED) && + (ooa_io != NULL)) + return (CTL_ACTION_BLOCK); + + serialize_row = ctl_serialize_table[pending_io->scsiio.seridx]; + /* * Run back along the OOA queue, starting with the current * blocked I/O and going through every I/O before it on the * queue. If starting_io is NULL, we'll just end up returning * CTL_ACTION_PASS. */ - for (ooa_io = *starting_io; ooa_io != NULL; + for (; ooa_io != NULL; ooa_io = (union ctl_io *)LIST_NEXT(&ooa_io->io_hdr, ooa_links)) { - action = ctl_check_for_blockage(lun, pending_io, ooa_io); + action = ctl_check_for_blockage(lun, pending_io, serialize_row, + ooa_io); if (action != CTL_ACTION_PASS) { *starting_io = ooa_io; return (action); @@ -11127,13 +11108,6 @@ ctl_try_unblock_io(struct ctl_lun *lun, union ctl_io *io, bool skip) io->io_hdr.blocker = NULL; switch (action) { - case CTL_ACTION_OVERLAP: - ctl_set_overlapped_cmd(&io->scsiio); - goto error; - case CTL_ACTION_OVERLAP_TAG: - ctl_set_overlapped_tag(&io->scsiio, - io->scsiio.tag_num & 0xff); - goto error; case CTL_ACTION_PASS: case CTL_ACTION_SKIP: @@ -11163,12 +11137,14 @@ ctl_try_unblock_io(struct ctl_lun *lun, union ctl_io *io, bool skip) io->io_hdr.flags |= CTL_FLAG_IS_WAS_ON_RTR; ctl_enqueue_rtr(io); break; - case CTL_ACTION_ERROR: default: - ctl_set_internal_failure(&io->scsiio, - /*sks_valid*/ 0, - /*retry_count*/ 0); - + __assert_unreachable(); + case CTL_ACTION_OVERLAP: + ctl_set_overlapped_cmd(&io->scsiio); + goto error; + case CTL_ACTION_OVERLAP_TAG: + ctl_set_overlapped_tag(&io->scsiio, + io->scsiio.tag_num & 0xff); error: /* Serializing commands from the other SC are done here. */ if ((io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) && @@ -11380,8 +11356,8 @@ ctl_failover_lun(union ctl_io *rio) /* We are master */ if (io->flags & CTL_FLAG_FROM_OTHER_SC) { if (io->flags & CTL_FLAG_IO_ACTIVE) { - io->flags |= CTL_FLAG_ABORT; - io->flags |= CTL_FLAG_FAILOVER; + io->flags |= CTL_FLAG_ABORT | + CTL_FLAG_FAILOVER; ctl_try_unblock_io(lun, (union ctl_io *)io, FALSE); } else { /* This can be only due to DATAMOVE */ @@ -11615,18 +11591,18 @@ ctl_scsiio_precheck(struct ctl_scsiio *ctsio) bio = (union ctl_io *)LIST_NEXT(&ctsio->io_hdr, ooa_links); switch (ctl_check_ooa(lun, (union ctl_io *)ctsio, &bio)) { - case CTL_ACTION_BLOCK: - ctsio->io_hdr.blocker = bio; - TAILQ_INSERT_TAIL(&bio->io_hdr.blocked_queue, &ctsio->io_hdr, - blocked_links); - mtx_unlock(&lun->lun_lock); - break; case CTL_ACTION_PASS: case CTL_ACTION_SKIP: ctsio->io_hdr.flags |= CTL_FLAG_IS_WAS_ON_RTR; mtx_unlock(&lun->lun_lock); ctl_enqueue_rtr((union ctl_io *)ctsio); break; + case CTL_ACTION_BLOCK: + ctsio->io_hdr.blocker = bio; + TAILQ_INSERT_TAIL(&bio->io_hdr.blocked_queue, &ctsio->io_hdr, + blocked_links); + mtx_unlock(&lun->lun_lock); + break; case CTL_ACTION_OVERLAP: mtx_unlock(&lun->lun_lock); ctl_set_overlapped_cmd(ctsio); @@ -11637,14 +11613,8 @@ ctl_scsiio_precheck(struct ctl_scsiio *ctsio) ctl_set_overlapped_tag(ctsio, ctsio->tag_num & 0xff); ctl_done((union ctl_io *)ctsio); break; - case CTL_ACTION_ERROR: default: - mtx_unlock(&lun->lun_lock); - ctl_set_internal_failure(ctsio, - /*sks_valid*/ 0, - /*retry_count*/ 0); - ctl_done((union ctl_io *)ctsio); - break; + __assert_unreachable(); } } @@ -11673,6 +11643,7 @@ ctl_validate_command(struct ctl_scsiio *ctsio) uint8_t diff; entry = ctl_get_cmd_entry(ctsio, &sa); + ctsio->seridx = entry->seridx; if (entry->execute == NULL) { if (sa) ctl_set_invalid_field(ctsio, @@ -13303,10 +13274,15 @@ ctl_serseq_done(union ctl_io *io) if (lun->be_lun->serseq == CTL_LUN_SERSEQ_OFF) return; - mtx_lock(&lun->lun_lock); - io->io_hdr.flags |= CTL_FLAG_SERSEQ_DONE; - ctl_try_unblock_others(lun, io, FALSE); - mtx_unlock(&lun->lun_lock); + + /* This is racy, but should not be a problem. */ + if (!TAILQ_EMPTY(&io->io_hdr.blocked_queue)) { + mtx_lock(&lun->lun_lock); + io->io_hdr.flags |= CTL_FLAG_SERSEQ_DONE; + ctl_try_unblock_others(lun, io, FALSE); + mtx_unlock(&lun->lun_lock); + } else + io->io_hdr.flags |= CTL_FLAG_SERSEQ_DONE; } void diff --git a/sys/cam/ctl/ctl_io.h b/sys/cam/ctl/ctl_io.h index 349cb02820d9..de312608da8e 100644 --- a/sys/cam/ctl/ctl_io.h +++ b/sys/cam/ctl/ctl_io.h @@ -326,7 +326,7 @@ struct ctl_scsiio { struct scsi_sense_data sense_data; /* sense data */ uint8_t sense_len; /* Returned sense length */ uint8_t scsi_status; /* SCSI status byte */ - uint8_t sense_residual; /* Unused. */ + uint8_t seridx; /* Serialization index. */ uint8_t priority; /* Command priority */ uint32_t residual; /* Unused */ uint32_t tag_num; /* tag number */ diff --git a/sys/cam/ctl/ctl_private.h b/sys/cam/ctl/ctl_private.h index 8940babd4904..a891041e8f50 100644 --- a/sys/cam/ctl/ctl_private.h +++ b/sys/cam/ctl/ctl_private.h @@ -65,22 +65,20 @@ struct ctl_io_pool { }; typedef enum { - CTL_SER_BLOCK, - CTL_SER_BLOCKOPT, - CTL_SER_EXTENT, - CTL_SER_EXTENTOPT, - CTL_SER_EXTENTSEQ, + CTL_SER_SEQ, CTL_SER_PASS, - CTL_SER_SKIP + CTL_SER_EXTENTOPT, + CTL_SER_EXTENT, + CTL_SER_BLOCKOPT, + CTL_SER_BLOCK, } ctl_serialize_action; typedef enum { - CTL_ACTION_BLOCK, - CTL_ACTION_OVERLAP, - CTL_ACTION_OVERLAP_TAG, CTL_ACTION_PASS, CTL_ACTION_SKIP, - CTL_ACTION_ERROR + CTL_ACTION_BLOCK, + CTL_ACTION_OVERLAP, + CTL_ACTION_OVERLAP_TAG } ctl_action; /* diff --git a/sys/cam/ctl/ctl_ser_table.c b/sys/cam/ctl/ctl_ser_table.c index 5499e63534fa..be9ca6b34631 100644 --- a/sys/cam/ctl/ctl_ser_table.c +++ b/sys/cam/ctl/ctl_ser_table.c @@ -43,11 +43,8 @@ /* TABLE ctlSerTbl */ /* */ /* The matrix which drives the serialization algorithm. The major index */ -/* (the first) into this table is the command being checked and the minor */ -/* index is the command against which the first command is being checked. */ -/* i.e., the major index (row) command is ahead of the minor index command */ -/* (column) in the queue. This allows the code to optimize by capturing */ -/* the result of the first indexing operation into a pointer. */ +/* (the first, row) into this table is the new command. The minor index */ +/* (column) is the older, possibly already running, command. */ /* */ /* Whenever a new value is added to the IDX_T type, this matrix must be */ /* expanded by one row AND one column -- Because of this, some effort */ @@ -55,29 +52,29 @@ /* */ /****************************************************************************/ -#define sK CTL_SER_SKIP /* Skip */ #define pS CTL_SER_PASS /* Pass */ #define bK CTL_SER_BLOCK /* Blocked */ #define bO CTL_SER_BLOCKOPT /* Optional block */ #define xT CTL_SER_EXTENT /* Extent check */ #define xO CTL_SER_EXTENTOPT /* Optional extent check */ -#define xS CTL_SER_EXTENTSEQ /* Sequential extent check */ +#define xS CTL_SER_SEQ /* Sequential check */ -const static ctl_serialize_action +const static uint8_t ctl_serialize_table[CTL_SERIDX_COUNT][CTL_SERIDX_COUNT] = { /**>IDX_ :: 2nd:TUR RD WRT UNM SYN MDSN MDSL RQSN INQ RDCP RES LSNS FMT STR*/ -/*TUR */{ pS, pS, pS, pS, pS, bK, bK, bK, pS, pS, bK, pS, bK, bK}, -/*READ */{ pS, xS, xT, bO, pS, bK, bK, bK, pS, pS, bK, pS, bK, bK}, -/*WRITE */{ pS, xT, xT, bO, bO, bK, bK, bK, pS, pS, bK, pS, bK, bK}, -/*UNMAP */{ pS, xO, xO, pS, pS, bK, bK, bK, pS, pS, bK, pS, bK, bK}, -/*SYNC */{ pS, pS, pS, pS, pS, bK, bK, bK, pS, pS, bK, pS, bK, bK}, -/*MD_SNS */{ bK, bK, bK, bK, bK, pS, bK, bK, pS, pS, bK, pS, bK, bK}, -/*MD_SEL */{ bK, bK, bK, bK, bK, bK, bK, bK, pS, pS, bK, pS, bK, bK}, -/*RQ_SNS */{ pS, pS, pS, pS, pS, pS, pS, bK, pS, pS, bK, pS, bK, bK}, -/*INQ */{ pS, pS, pS, pS, pS, pS, pS, bK, pS, pS, pS, pS, bK, bK}, -/*RD_CAP */{ pS, pS, pS, pS, pS, pS, pS, bK, pS, pS, pS, pS, bK, pS}, -/*RES */{ bK, bK, bK, bK, bK, bK, bK, bK, pS, bK, bK, bK, bK, bK}, -/*LOG_SNS */{ pS, pS, pS, pS, pS, pS, bK, bK, pS, pS, bK, pS, bK, bK}, -/*FORMAT */{ pS, bK, bK, bK, bK, bK, bK, pS, pS, bK, bK, bK, bK, bK}, -/*START */{ bK, bK, bK, bK, bK, bK, bK, bK, pS, bK, bK, bK, bK, bK}, +/*TUR */{ pS, pS, pS, pS, pS, bK, bK, pS, pS, pS, bK, pS, pS, bK}, +/*READ */{ pS, xS, xT, xO, pS, bK, bK, pS, pS, pS, bK, pS, bK, bK}, +/*WRITE */{ pS, xT, xT, xO, pS, bK, bK, pS, pS, pS, bK, pS, bK, bK}, +/*UNMAP */{ pS, bO, bO, pS, pS, bK, bK, pS, pS, pS, bK, pS, bK, bK}, +/*SYNC */{ pS, pS, bO, pS, pS, bK, bK, pS, pS, pS, bK, pS, bK, bK}, +/*MD_SNS */{ bK, bK, bK, bK, bK, pS, bK, pS, pS, pS, bK, pS, bK, bK}, +/*MD_SEL */{ bK, bK, bK, bK, bK, bK, bK, pS, pS, pS, bK, bK, bK, bK}, +/*RQ_SNS */{ bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, pS, bK}, +/*INQ */{ pS, pS, pS, pS, pS, pS, pS, pS, pS, pS, pS, pS, pS, pS}, +/*RD_CAP */{ pS, pS, pS, pS, pS, pS, pS, pS, pS, pS, bK, pS, bK, bK}, +/*RES */{ bK, bK, bK, bK, bK, bK, bK, bK, pS, pS, bK, bK, bK, bK}, +/*LOG_SNS */{ pS, pS, pS, pS, pS, pS, pS, pS, pS, pS, bK, pS, bK, bK}, +/*FORMAT */{ bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK}, +/*START */{ bK, bK, bK, bK, bK, bK, bK, bK, bK, pS, bK, bK, bK, bK}, }; + From owner-dev-commits-src-main@freebsd.org Sat Feb 27 16:25:42 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CDEA454B5D4; Sat, 27 Feb 2021 16:25: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DnsMV5SwQz3Kqc; Sat, 27 Feb 2021 16:25: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 AEA4320DAE; Sat, 27 Feb 2021 16:25: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 11RGPgU0025993; Sat, 27 Feb 2021 16:25:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11RGPgoF025992; Sat, 27 Feb 2021 16:25:42 GMT (envelope-from git) Date: Sat, 27 Feb 2021 16:25:42 GMT Message-Id: <202102271625.11RGPgoF025992@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Watson <rwatson@FreeBSD.org> Subject: git: a92c6b24c0e9 - main - Add a comment on why the call to mac_vnode_relabel() might be in the wrong place -- in the VOP rather than vn_setexttr() -- and that it is for historic reasons. We might wish to relocate it in due course, but this way at least we document the asymmetry. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rwatson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a92c6b24c0e92607661a16295f4b04cde08c9230 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 16:25:42 -0000 The branch main has been updated by rwatson: URL: https://cgit.FreeBSD.org/src/commit/?id=a92c6b24c0e92607661a16295f4b04cde08c9230 commit a92c6b24c0e92607661a16295f4b04cde08c9230 Author: Robert Watson <rwatson@FreeBSD.org> AuthorDate: 2021-02-27 16:22:26 +0000 Commit: Robert Watson <rwatson@FreeBSD.org> CommitDate: 2021-02-27 16:25:26 +0000 Add a comment on why the call to mac_vnode_relabel() might be in the wrong place -- in the VOP rather than vn_setexttr() -- and that it is for historic reasons. We might wish to relocate it in due course, but this way at least we document the asymmetry. --- sys/security/mac/mac_vfs.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/security/mac/mac_vfs.c b/sys/security/mac/mac_vfs.c index 323d693387bb..3d2185fbc3c6 100644 --- a/sys/security/mac/mac_vfs.c +++ b/sys/security/mac/mac_vfs.c @@ -1021,6 +1021,10 @@ vop_stdsetlabel_ea(struct vop_setlabel_args *ap) if (error) return (error); + /* + * XXXRW: See the comment below in vn_setlabel() as to why this might + * be the wrong place to call mac_vnode_relabel(). + */ mac_vnode_relabel(ap->a_cred, vp, intlabel); return (0); @@ -1045,9 +1049,6 @@ vn_setlabel(struct vnode *vp, struct label *intlabel, struct ucred *cred) * Multi-phase commit. First check the policies to confirm the * change is OK. Then commit via the filesystem. Finally, update * the actual vnode label. - * - * Question: maybe the filesystem should update the vnode at the end - * as part of VOP_SETLABEL()? */ error = mac_vnode_check_relabel(cred, vp, intlabel); if (error) @@ -1068,6 +1069,14 @@ vn_setlabel(struct vnode *vp, struct label *intlabel, struct ucred *cred) if (error) return (error); + /* + * It would be more symmetric if mac_vnode_relabel() was called here + * rather than in VOP_SETLABEL(), but we don't for historical reasons. + * We should think about moving it so that the filesystem is + * responsible only for persistence in VOP_SETLABEL(), not the vnode + * label update itself. + */ + return (0); } From owner-dev-commits-src-main@freebsd.org Sat Feb 27 16:52:01 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5B15454C94B; Sat, 27 Feb 2021 16:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dnsxs29Tlz3MQ8; Sat, 27 Feb 2021 16:52: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 3D55521387; Sat, 27 Feb 2021 16:52: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 11RGq1ct064518; Sat, 27 Feb 2021 16:52:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11RGq1YX064517; Sat, 27 Feb 2021 16:52:01 GMT (envelope-from git) Date: Sat, 27 Feb 2021 16:52:01 GMT Message-Id: <202102271652.11RGq1YX064517@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Watson <rwatson@FreeBSD.org> Subject: git: 7bfd84444e6f - main - Provide a man page for VOP_SETLABEL(9). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rwatson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7bfd84444e6ff182abac2e08d6efcd2dc9ddc944 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 16:52:01 -0000 The branch main has been updated by rwatson: URL: https://cgit.FreeBSD.org/src/commit/?id=7bfd84444e6ff182abac2e08d6efcd2dc9ddc944 commit 7bfd84444e6ff182abac2e08d6efcd2dc9ddc944 Author: Robert Watson <rwatson@FreeBSD.org> AuthorDate: 2021-02-27 16:51:00 +0000 Commit: Robert Watson <rwatson@FreeBSD.org> CommitDate: 2021-02-27 16:51:13 +0000 Provide a man page for VOP_SETLABEL(9). MFC after: 3 days --- share/man/man9/VOP_SETLABEL.9 | 128 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/share/man/man9/VOP_SETLABEL.9 b/share/man/man9/VOP_SETLABEL.9 new file mode 100644 index 000000000000..8b7e54e515cc --- /dev/null +++ b/share/man/man9/VOP_SETLABEL.9 @@ -0,0 +1,128 @@ +.\"- +.\" Copyright (c) 2021 Robert N. M. Watson +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd February 27, 2021 +.Dt VOP_SETLABEL 9 +.Os +.Sh NAME +.Nm VOP_SETLABEL +.Nd persistently store an updated MAC label on a vnode +.Sh SYNOPSIS +.In sys/param.h +.In sys/vnode.h +.In security/mac.h +.Ft int +.Fn VOP_SETLABEL "struct vnode *vp" "label *label" +.Sh DESCRIPTION +This vnode call is made by +.Xr mac 9 +file relabeling operation has been authorized, and the filesystem must now be +updated. +.Ss Single-Label vs. Multi-Label Filesystems +Filesystems that do not implement per-file labels -- known as single-label +filesystems -- can simply leave the +.Xr vnode 9 +operation undefined. +These filesystems must not set the +.Dv MNT_MULTLABEL +flag in their +.Vt struct mount . +.Pp +Filesystems that do implement per-vnode label storage -- known as multi-label +filesystems -- will set the +.Dv MNT_MULTILABEL +flag in their +.Vt struct mount . +The UFS filesystem uses a superblock flag to persisently configure whether a +specific filesystem implements a label for each +.Xr vnode 9 , +and then keys various behaviors on whether that flag is set. +.Ss Extended Attributes +If the filesystem implements extended attributes, then the MAC Framework's +.Fn vop_stdsetlabel_ea +function can be used, and maps operations into a series of +.Xr VOP_OPENEXTATTR 9 , +.Xr VOP_WRITEEXTATTR 9 , +and +.Xr VOP_CLOSEEXTATTR 9 . +.Pp +Filesystems will also need to call +.Fn mac_vnode_create_extattr +when a new filesystem object is created, so that suitable extended attributes +can be written out, and +.Fn mac_vnode_associate_extattr +when a +.Xr vnode 9 +is associated with a filesystem object for the first time. +These utility functions use +.Xr VOP_OPENEXTATTR 9 , +.Xr VOP_READEXTATTR 9 , +.Xr VOP_WRITEEXTATTR 9 , +and +.Xr VOP_CLOSEEXTATTR 9 +as required. +.Pp +.Ss Locking and Crash Safety +In all cases, it is important that exclusive +.Xr vnode 9 +locks be held to prevent concurrent access when a MAC label may not yet be +initialized. +It is also important that operations are ordered so that a system crash does +not leave a file improperly labeled. +For example, the extended attribute for a newly created file must be written +to disk before the file is linked by its parent directory, so that there is +no opportunity for a crash to lead to an unlabeled file. +.Sh LOCKS +The vnode will be locked on entry and should remain locked on return. +.Sh RETURN VALUES +If the MAC label is successfully set, then zero is returned. +Otherwise, an appropriate error code is returned. +.Sh ERRORS +.Bl -tag -width Er +.It Bq Er EOPNOTSUPP +The file system does not support +.Fn VOP_SETLABEL . +.It Bq Er ENOSPC +The file system is out of space. +.It Bq Er EROFS +The file system is read-only. +.El +.Pp +Depending on the underlying implementation of +.Fn VOP_SETLABEL , +other errors may also be possible. +.Sh SEE ALSO +.Xr VOP_CLOSEEXTATTR 9 , +.Xr VOP_OPENEXTATTR 9 , +.Xr VOP_READEXTATTR 9 , +.Xr VOP_WRITEXTATTR 9 , +.Xr mac 9 , +.Xr mount 9 , +.Xr vnode 9 , +.Sh AUTHORS +This manual page was written by +.An Robert Watson . From owner-dev-commits-src-main@freebsd.org Sat Feb 27 16:54:22 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8818654C7F1; Sat, 27 Feb 2021 16:54: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dnt0Z3QMYz3N40; Sat, 27 Feb 2021 16:54: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 682B5211AB; Sat, 27 Feb 2021 16:54: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 11RGsMRf064970; Sat, 27 Feb 2021 16:54:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11RGsMKL064969; Sat, 27 Feb 2021 16:54:22 GMT (envelope-from git) Date: Sat, 27 Feb 2021 16:54:22 GMT Message-Id: <202102271654.11RGsMKL064969@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Watson <rwatson@FreeBSD.org> Subject: git: a9f11355038c - main - Add Xrefs to the new VOP_SETLABEL(9) from mac(9) and vnode(9). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rwatson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a9f11355038cd7d2942d925e85795ed9d13f1bfe Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 16:54:22 -0000 The branch main has been updated by rwatson: URL: https://cgit.FreeBSD.org/src/commit/?id=a9f11355038cd7d2942d925e85795ed9d13f1bfe commit a9f11355038cd7d2942d925e85795ed9d13f1bfe Author: Robert Watson <rwatson@FreeBSD.org> AuthorDate: 2021-02-27 16:53:53 +0000 Commit: Robert Watson <rwatson@FreeBSD.org> CommitDate: 2021-02-27 16:53:53 +0000 Add Xrefs to the new VOP_SETLABEL(9) from mac(9) and vnode(9). MFC after: 3 days --- share/man/man9/mac.9 | 5 +++-- share/man/man9/vnode.9 | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/share/man/man9/mac.9 b/share/man/man9/mac.9 index 58c2f7a2484e..89238d28b61c 100644 --- a/share/man/man9/mac.9 +++ b/share/man/man9/mac.9 @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 25, 2015 +.Dd February 27, 2021 .Dt MAC 9 .Os .Sh NAME @@ -162,7 +162,8 @@ for information on the MAC Framework APIs. .Xr ucred 9 , .Xr vaccess 9 , .Xr vaccess_acl_posix1e 9 , -.Xr VFS 9 +.Xr VFS 9 , +.Xr VOP_SETLABEL 9 . .Rs .%T "The FreeBSD Architecture Handbook" .%U "https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/arch-handbook/" diff --git a/share/man/man9/vnode.9 b/share/man/man9/vnode.9 index 91360a755fbc..5ff45d7a1364 100644 --- a/share/man/man9/vnode.9 +++ b/share/man/man9/vnode.9 @@ -189,6 +189,7 @@ intertwining of VM Objects and Vnodes. .Xr VOP_REVOKE 9 , .Xr VOP_SETACL 9 , .Xr VOP_SETEXTATTR 9 , +.Xr VOP_SETLABEL 9 , .Xr VOP_STRATEGY 9 , .Xr VOP_VPTOCNP 9 , .Xr VOP_VPTOFH 9 From owner-dev-commits-src-main@freebsd.org Sat Feb 27 16:55:23 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3CE2654C97E for <dev-commits-src-main@mailman.nyi.freebsd.org>; Sat, 27 Feb 2021 16:55:23 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.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 4Dnt1l14PMz3N7b for <dev-commits-src-main@freebsd.org>; Sat, 27 Feb 2021 16:55:23 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wm1-f51.google.com with SMTP id o16so10434301wmh.0 for <dev-commits-src-main@freebsd.org>; Sat, 27 Feb 2021 08:55: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:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=tntcvwDbCSfgZE18WutJJ+L+peLh6DlmenprQbGIUbM=; b=pEOjDDVNIoVSLZIJba4hW8kHUGBlPlQDvlOLvlUSNZx7bkvag/Z3VGnNYEDOYFxVc4 DDQR5It2FodiK5F44iYArV+l1sw2PkiC1eI2ek3LEKfKfo3+slhtgZWfRHS3jYNJlLO4 6Ik4YFrLkxZaRFACZa+MdIFcYEyRTNi472eom3IM/Zqz2Wdzn+7IOTjBFMprd4nTpNHZ b6YHk9xhrDYBDZHdYcL2XjIu2NFjZLhu0zO9Mqrsw/4N4/nXCvg7pZAZ6c267zbbN0rP /VgDjcGyia/m9hAl8XN8AgA7HdL7gKTHO0MHKZ5YpmWn8aFt78s3rpL8KDPZ0fXyHIC6 XHRQ== X-Gm-Message-State: AOAM532ogKTyEPJ/LfHbUGcY3HTSy7m965eyf/PM4tRnyfWDA5YZTuc8 cQyd8ySiLRPBl8hx4qaic0Z6ug== X-Google-Smtp-Source: ABdhPJyuIVSpsd0qJJ4SOUa5yNghdwDo/0n0n1GuWwpXSaXe1QFGSjLB4JZZrDDW2TCuDypxGxE9CA== X-Received: by 2002:a7b:c305:: with SMTP id k5mr7876437wmj.57.1614444921652; Sat, 27 Feb 2021 08:55:21 -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 k15sm21901900wrn.0.2021.02.27.08.55.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Feb 2021 08:55:21 -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: 7bfd84444e6f - main - Provide a man page for VOP_SETLABEL(9). From: Jessica Clarke <jrtc27@freebsd.org> In-Reply-To: <202102271652.11RGq1YX064517@gitrepo.freebsd.org> Date: Sat, 27 Feb 2021 16:55:20 +0000 Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Content-Transfer-Encoding: quoted-printable Message-Id: <7AAF0AD3-F975-4149-A4E0-DDE3CA0717EF@freebsd.org> References: <202102271652.11RGq1YX064517@gitrepo.freebsd.org> To: Robert Watson <rwatson@FreeBSD.org> X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4Dnt1l14PMz3N7b 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 16:55:23 -0000 On 27 Feb 2021, at 16:52, Robert Watson <rwatson@FreeBSD.org> wrote: >=20 > The branch main has been updated by rwatson: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D7bfd84444e6ff182abac2e08d6efcd2d= c9ddc944 >=20 > commit 7bfd84444e6ff182abac2e08d6efcd2dc9ddc944 > Author: Robert Watson <rwatson@FreeBSD.org> > AuthorDate: 2021-02-27 16:51:00 +0000 > Commit: Robert Watson <rwatson@FreeBSD.org> > CommitDate: 2021-02-27 16:51:13 +0000 >=20 > Provide a man page for VOP_SETLABEL(9). >=20 > MFC after: 3 days > --- > share/man/man9/VOP_SETLABEL.9 | 128 = ++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 128 insertions(+) >=20 > diff --git a/share/man/man9/VOP_SETLABEL.9 = b/share/man/man9/VOP_SETLABEL.9 > new file mode 100644 > index 000000000000..8b7e54e515cc > --- /dev/null > +++ b/share/man/man9/VOP_SETLABEL.9 > @@ -0,0 +1,128 @@ > +.\"- > +.\" Copyright (c) 2021 Robert N. M. Watson > +.\" All rights reserved. > +.\" > +.\" Redistribution and use in source and binary forms, with or = without > +.\" modification, are permitted provided that the following = conditions > +.\" are met: > +.\" 1. Redistributions of source code must retain the above copyright > +.\" notice, this list of conditions and the following disclaimer. > +.\" 2. Redistributions in binary form must reproduce the above = copyright > +.\" notice, this list of conditions and the following disclaimer = in the > +.\" documentation and/or other materials provided with the = distribution. > +.\" > +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS = IS'' AND > +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, = THE > +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A = PARTICULAR PURPOSE > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE = LIABLE > +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR = CONSEQUENTIAL > +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS > +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS = INTERRUPTION) > +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN = CONTRACT, STRICT > +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN = ANY WAY > +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE = POSSIBILITY OF > +.\" SUCH DAMAGE. > +.\" > +.\" $FreeBSD$ > +.\" > +.Dd February 27, 2021 > +.Dt VOP_SETLABEL 9 > +.Os > +.Sh NAME > +.Nm VOP_SETLABEL > +.Nd persistently store an updated MAC label on a vnode > +.Sh SYNOPSIS > +.In sys/param.h > +.In sys/vnode.h > +.In security/mac.h > +.Ft int > +.Fn VOP_SETLABEL "struct vnode *vp" "label *label" > +.Sh DESCRIPTION > +This vnode call is made by > +.Xr mac 9 > +file relabeling operation has been authorized, and the filesystem = must now be I think you're missing some words at the start of this line? Jess From owner-dev-commits-src-main@freebsd.org Sat Feb 27 16:59:17 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC47A54CEFE; Sat, 27 Feb 2021 16:59:17 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [204.107.128.30]) by mx1.freebsd.org (Postfix) with ESMTP id 4Dnt6F6HDJz3NPf; Sat, 27 Feb 2021 16:59:17 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [198.74.231.63]) by cyrus.watson.org (Postfix) with ESMTPS id E573A60107; Sat, 27 Feb 2021 16:59:16 +0000 (UTC) Date: Sat, 27 Feb 2021 16:59:16 +0000 (GMT) From: Robert Watson <rwatson@FreeBSD.org> To: Jessica Clarke <jrtc27@freebsd.org> cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Subject: Re: git: 7bfd84444e6f - main - Provide a man page for VOP_SETLABEL(9). In-Reply-To: <7AAF0AD3-F975-4149-A4E0-DDE3CA0717EF@freebsd.org> Message-ID: <2fc6bb6-3118-27bc-4860-b6454e6a4647@fledge.watson.org> References: <202102271652.11RGq1YX064517@gitrepo.freebsd.org> <7AAF0AD3-F975-4149-A4E0-DDE3CA0717EF@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Rspamd-Queue-Id: 4Dnt6F6HDJz3NPf 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 16:59:18 -0000 On Sat, 27 Feb 2021, Jessica Clarke wrote: >> +This vnode call is made by >> +.Xr mac 9 >> +file relabeling operation has been authorized, and the filesystem must now >> be > > I think you're missing some words at the start of this line? Indeed - the word "once". I'll pause a few minutes before fixing it in case you spot anything else :-). Robert From owner-dev-commits-src-main@freebsd.org Sat Feb 27 17:00:28 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2517154CE74 for <dev-commits-src-main@mailman.nyi.freebsd.org>; Sat, 27 Feb 2021 17:00:28 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.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 4Dnt7c086lz3Nc6 for <dev-commits-src-main@freebsd.org>; Sat, 27 Feb 2021 17:00:27 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f51.google.com with SMTP id e10so11392609wro.12 for <dev-commits-src-main@freebsd.org>; Sat, 27 Feb 2021 09:00: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=mLbCilNzxz0S2Wh5MEVxnnatAGN3VmxmKPpYWkDsFyI=; b=PP3Wdrl2UdEcF3TVf8v5OJQJoodtkuQjWxqZvpY8P4C+M5RrNSmhUP9GwSqpqGGl+F HpIrar/62BkDkdwSaI/LfvLMQfPq5T6O1BcZExikQbYSQzl+jSOIbD7e2U73r4oXKAM+ AH5zn7WzaZcbDlhH9//zIPePxYhSLIA6yuWgNkkmz1zaW0qsZXmxxzBYKV78Jc+TkQCZ noT8h3fGpZwpgnRyZXyYmv0qC+kFg2Xh1IBRfFjYZG7vZe78y0s8BAhI78aAk+019HJm PuAA8DzRMWyEzykCJI1TdtByD7NqQX91DkwUsADwoJwDzvgdsS07axQsHJGkYIYUcMBO Vmgw== X-Gm-Message-State: AOAM5311F9pcGtAMGIQ41CRSugM61h0kPkSY3MnmlOKm9MLBp7wvIvYf +tntP/0gMgwhVXCVgHrTJ5/vQQ== X-Google-Smtp-Source: ABdhPJzOKz2tdkIpJGP/b5OQcXVWd2DJ3+MntYLJi5Xrg/gFpwSioE7ed6mlZSon0rlQCZJ3AOzvjg== X-Received: by 2002:a5d:6181:: with SMTP id j1mr8564244wru.11.1614445226502; Sat, 27 Feb 2021 09:00: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 z21sm16490065wma.29.2021.02.27.09.00.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Feb 2021 09:00: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: 7bfd84444e6f - main - Provide a man page for VOP_SETLABEL(9). From: Jessica Clarke <jrtc27@freebsd.org> In-Reply-To: <2fc6bb6-3118-27bc-4860-b6454e6a4647@fledge.watson.org> Date: Sat, 27 Feb 2021 17:00:25 +0000 Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Content-Transfer-Encoding: quoted-printable Message-Id: <0C7641B1-34BA-40BB-A767-73055349DB93@freebsd.org> References: <202102271652.11RGq1YX064517@gitrepo.freebsd.org> <7AAF0AD3-F975-4149-A4E0-DDE3CA0717EF@freebsd.org> <2fc6bb6-3118-27bc-4860-b6454e6a4647@fledge.watson.org> To: Robert Watson <rwatson@FreeBSD.org> X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4Dnt7c086lz3Nc6 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 17:00:28 -0000 On 27 Feb 2021, at 16:59, Robert Watson <rwatson@FreeBSD.org> wrote: >=20 > On Sat, 27 Feb 2021, Jessica Clarke wrote: >=20 >>> +This vnode call is made by >>> +.Xr mac 9 >>> +file relabeling operation has been authorized, and the filesystem = must now be >>=20 >> I think you're missing some words at the start of this line? >=20 > Indeed - the word "once". I'll pause a few minutes before fixing it = in case you spot anything else :-). Well, that and an indefinite article? Jess From owner-dev-commits-src-main@freebsd.org Sat Feb 27 21:45:43 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD0B1554F84; Sat, 27 Feb 2021 21:45: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dp0Sl5KL5z4Qpb; Sat, 27 Feb 2021 21:45: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 A93BD24F1F; Sat, 27 Feb 2021 21:45: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 11RLjhCA047344; Sat, 27 Feb 2021 21:45:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11RLjh2U047343; Sat, 27 Feb 2021 21:45:43 GMT (envelope-from git) Date: Sat, 27 Feb 2021 21:45:43 GMT Message-Id: <202102272145.11RLjh2U047343@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing <rew@FreeBSD.org> Subject: git: b7fd9c4e5ebc - main - bhyve/snapshot: rename checkpoint_opcodes to be more generic MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7fd9c4e5ebc69934205980d9f628ef8f21fb288 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 21:45:43 -0000 The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=b7fd9c4e5ebc69934205980d9f628ef8f21fb288 commit b7fd9c4e5ebc69934205980d9f628ef8f21fb288 Author: Robert Wing <rew@FreeBSD.org> AuthorDate: 2021-02-27 21:03:03 +0000 Commit: Robert Wing <rew@FreeBSD.org> CommitDate: 2021-02-27 21:03:03 +0000 bhyve/snapshot: rename checkpoint_opcodes to be more generic Generalize the naming here since the domain socket that uses these codes might be used for purposes other than the save/restore feature. - rename checkpoint_opcodes to ipc_opcode Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D28877 --- usr.sbin/bhyve/snapshot.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/snapshot.h b/usr.sbin/bhyve/snapshot.h index caa7256ffbfa..62b2083b9830 100644 --- a/usr.sbin/bhyve/snapshot.h +++ b/usr.sbin/bhyve/snapshot.h @@ -60,9 +60,9 @@ struct restore_state { ucl_object_t *meta_root_obj; }; -enum checkpoint_opcodes { - START_CHECKPOINT = 0, - START_SUSPEND = 1, +enum ipc_opcode { + START_CHECKPOINT, + START_SUSPEND, }; struct checkpoint_op { From owner-dev-commits-src-main@freebsd.org Sat Feb 27 21:45:47 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5E743554F8B; Sat, 27 Feb 2021 21:45:47 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dp0Sp2d2lz3wY4; Sat, 27 Feb 2021 21:45: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 D9FDE24CB9; Sat, 27 Feb 2021 21:45: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 11RLjjSM047386; Sat, 27 Feb 2021 21:45:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11RLjjdF047385; Sat, 27 Feb 2021 21:45:45 GMT (envelope-from git) Date: Sat, 27 Feb 2021 21:45:45 GMT Message-Id: <202102272145.11RLjjdF047385@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing <rew@FreeBSD.org> Subject: git: d656ce199d72 - main - bhyve/snapshot: rename and bump size of MAX_SNAPSHOT_VMNAME MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d656ce199d72f1aeeef1b2e28b4a284c968a8d03 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 21:45:47 -0000 The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=d656ce199d72f1aeeef1b2e28b4a284c968a8d03 commit d656ce199d72f1aeeef1b2e28b4a284c968a8d03 Author: Robert Wing <rew@FreeBSD.org> AuthorDate: 2021-02-27 21:07:35 +0000 Commit: Robert Wing <rew@FreeBSD.org> CommitDate: 2021-02-27 21:07:35 +0000 bhyve/snapshot: rename and bump size of MAX_SNAPSHOT_VMNAME MAX_SNAPSHOT_VMNAME is a macro used to set the size of a character buffer that stores a filename or the path to a file - this file is used by the save/restore feature. Since the file doesn't have anything to do with a vm name, rename MAX_SNAPSHOT_VMNAME to MAX_SNAPSHOT_FILENAME. Bump the size to PATH_MAX while here. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D28879 --- usr.sbin/bhyve/snapshot.h | 4 ++-- usr.sbin/bhyvectl/bhyvectl.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/snapshot.h b/usr.sbin/bhyve/snapshot.h index 62b2083b9830..8a6ee67ef19d 100644 --- a/usr.sbin/bhyve/snapshot.h +++ b/usr.sbin/bhyve/snapshot.h @@ -43,7 +43,7 @@ #include <ucl.h> #define BHYVE_RUN_DIR "/var/run/bhyve/" -#define MAX_SNAPSHOT_VMNAME 100 +#define MAX_SNAPSHOT_FILENAME PATH_MAX struct vmctx; @@ -67,7 +67,7 @@ enum ipc_opcode { struct checkpoint_op { unsigned int op; - char snapshot_filename[MAX_SNAPSHOT_VMNAME]; + char snapshot_filename[MAX_SNAPSHOT_FILENAME]; }; struct checkpoint_thread_info { diff --git a/usr.sbin/bhyvectl/bhyvectl.c b/usr.sbin/bhyvectl/bhyvectl.c index f9a790f5402e..68cc958e66ec 100644 --- a/usr.sbin/bhyvectl/bhyvectl.c +++ b/usr.sbin/bhyvectl/bhyvectl.c @@ -1739,7 +1739,7 @@ snapshot_request(struct vmctx *ctx, const char *file, enum ipc_opcode code) struct checkpoint_op op; op.op = code; - strlcpy(op.snapshot_filename, file, MAX_SNAPSHOT_VMNAME); + strlcpy(op.snapshot_filename, file, MAX_SNAPSHOT_FILENAME); return (send_checkpoint_op_req(ctx, &op)); } From owner-dev-commits-src-main@freebsd.org Sat Feb 27 21:45:45 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 256605547EE; Sat, 27 Feb 2021 21:45: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dp0Sm6RrJz4Qn1; Sat, 27 Feb 2021 21:45: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 A8B9824D4C; Sat, 27 Feb 2021 21:45: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 11RLji1G047364; Sat, 27 Feb 2021 21:45:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11RLjikV047363; Sat, 27 Feb 2021 21:45:44 GMT (envelope-from git) Date: Sat, 27 Feb 2021 21:45:44 GMT Message-Id: <202102272145.11RLjikV047363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing <rew@FreeBSD.org> Subject: git: da9713917eb2 - main - bhyvectl: reduce code duplication MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da9713917eb26b67bafc740384ccd44f7dff09f2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 21:45:45 -0000 The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=da9713917eb26b67bafc740384ccd44f7dff09f2 commit da9713917eb26b67bafc740384ccd44f7dff09f2 Author: Robert Wing <rew@FreeBSD.org> AuthorDate: 2021-02-27 21:05:52 +0000 Commit: Robert Wing <rew@FreeBSD.org> CommitDate: 2021-02-27 21:05:52 +0000 bhyvectl: reduce code duplication Combine send_start_checkpoint() and send_start_suspend() into a single function named snapshot_request(). snapshot_request() is equivalent to send_start_checkpoint() and send_start_suspend() except that it takes an additional argument. The additional argument, enum ipc_opcode, is used to determine the type of snapshot request being performed. Also, switch to using strlcpy instead of strncpy. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D28878 --- usr.sbin/bhyvectl/bhyvectl.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/usr.sbin/bhyvectl/bhyvectl.c b/usr.sbin/bhyvectl/bhyvectl.c index 7b3a73cc3668..f9a790f5402e 100644 --- a/usr.sbin/bhyvectl/bhyvectl.c +++ b/usr.sbin/bhyvectl/bhyvectl.c @@ -1734,25 +1734,12 @@ done: } static int -send_start_checkpoint(struct vmctx *ctx, const char *checkpoint_file) +snapshot_request(struct vmctx *ctx, const char *file, enum ipc_opcode code) { struct checkpoint_op op; - op.op = START_CHECKPOINT; - strncpy(op.snapshot_filename, checkpoint_file, MAX_SNAPSHOT_VMNAME); - op.snapshot_filename[MAX_SNAPSHOT_VMNAME - 1] = 0; - - return (send_checkpoint_op_req(ctx, &op)); -} - -static int -send_start_suspend(struct vmctx *ctx, const char *suspend_file) -{ - struct checkpoint_op op; - - op.op = START_SUSPEND; - strncpy(op.snapshot_filename, suspend_file, MAX_SNAPSHOT_VMNAME); - op.snapshot_filename[MAX_SNAPSHOT_VMNAME - 1] = 0; + op.op = code; + strlcpy(op.snapshot_filename, file, MAX_SNAPSHOT_VMNAME); return (send_checkpoint_op_req(ctx, &op)); } @@ -2416,10 +2403,10 @@ main(int argc, char *argv[]) #ifdef BHYVE_SNAPSHOT if (!error && vm_checkpoint_opt) - error = send_start_checkpoint(ctx, checkpoint_file); + error = snapshot_request(ctx, checkpoint_file, START_CHECKPOINT); if (!error && vm_suspend_opt) - error = send_start_suspend(ctx, suspend_file); + error = snapshot_request(ctx, suspend_file, START_SUSPEND); #endif free (opts); From owner-dev-commits-src-main@freebsd.org Sat Feb 27 22:28:57 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5BC32556353; Sat, 27 Feb 2021 22:28: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dp1Qd0CxFz4T0r; Sat, 27 Feb 2021 22:28: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 C15C0254FF; Sat, 27 Feb 2021 22:28: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 11RMSucZ000885; Sat, 27 Feb 2021 22:28:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11RMSu79000884; Sat, 27 Feb 2021 22:28:56 GMT (envelope-from git) Date: Sat, 27 Feb 2021 22:28:56 GMT Message-Id: <202102272228.11RMSu79000884@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen <tuexen@FreeBSD.org> Subject: git: 70e95f0b6917 - main - sctp: avoid integer overflow when starting the HB timer MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 70e95f0b6917a8b8cd4a2a5f883f3e9753fc86d8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 22:28:57 -0000 The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=70e95f0b6917a8b8cd4a2a5f883f3e9753fc86d8 commit 70e95f0b6917a8b8cd4a2a5f883f3e9753fc86d8 Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2021-02-27 22:27:30 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2021-02-27 22:27:30 +0000 sctp: avoid integer overflow when starting the HB timer MFC after: 3 days Reported by: syzbot+14b9d7c3c64208fae62f@syzkaller.appspotmail.com --- sys/netinet/sctputil.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 319344842d5f..7ddb4c3710df 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -2277,14 +2277,19 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb, } rndval = sctp_select_initial_TSN(&inp->sctp_ep); jitter = rndval % to_ticks; - if (jitter >= (to_ticks >> 1)) { - to_ticks = to_ticks + (jitter - (to_ticks >> 1)); + to_ticks >>= 1; + if (jitter < (UINT32_MAX - to_ticks)) { + to_ticks += jitter; } else { - to_ticks = to_ticks - jitter; + to_ticks = UINT32_MAX; } if (!(net->dest_state & SCTP_ADDR_UNCONFIRMED) && !(net->dest_state & SCTP_ADDR_PF)) { - to_ticks += net->heart_beat_delay; + if (net->heart_beat_delay < (UINT32_MAX - to_ticks)) { + to_ticks += net->heart_beat_delay; + } else { + to_ticks = UINT32_MAX; + } } /* * Now we must convert the to_ticks that are now in ms to From owner-dev-commits-src-main@freebsd.org Sat Feb 27 22:29:55 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F7C255651B; Sat, 27 Feb 2021 22:29: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dp1Rl1stJz4TCd; Sat, 27 Feb 2021 22:29: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 3386C253CD; Sat, 27 Feb 2021 22:29: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 11RMTt6Q001148; Sat, 27 Feb 2021 22:29:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11RMTtmP001147; Sat, 27 Feb 2021 22:29:55 GMT (envelope-from git) Date: Sat, 27 Feb 2021 22:29:55 GMT Message-Id: <202102272229.11RMTtmP001147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik <mjg@FreeBSD.org> Subject: git: 1239a722214c - main - cache: temporarily drop the assert that dvp != vp when adding an entry 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: 1239a722214c245e642733fdea2b1348101598af Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 22:29:55 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=1239a722214c245e642733fdea2b1348101598af commit 1239a722214c245e642733fdea2b1348101598af Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2021-02-27 22:23:23 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2021-02-27 22:29:50 +0000 cache: temporarily drop the assert that dvp != vp when adding an entry Historically it was allowed for any names, but arguably should never be even attempted. Allow it again since there is a release pending and allowing it is bug-compatible with previous behavior. Reported by: otis --- sys/kern/vfs_cache.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index fef1e31d197b..8cae0260cbf0 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -2266,7 +2266,12 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, struct componentname *cnp, KASSERT(cnp->cn_namelen <= NAME_MAX, ("%s: passed len %ld exceeds NAME_MAX (%d)", __func__, cnp->cn_namelen, NAME_MAX)); +#ifdef notyet + /* + * Not everything doing this is weeded out yet. + */ VNPASS(dvp != vp, dvp); +#endif VNPASS(!VN_IS_DOOMED(dvp), dvp); VNPASS(dvp->v_type != VNON, dvp); if (vp != NULL) { From owner-dev-commits-src-main@freebsd.org Sat Feb 27 22:29:56 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 723ED55624C; Sat, 27 Feb 2021 22:29: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dp1Rm2sNvz4TN5; Sat, 27 Feb 2021 22:29: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 53FA9252F8; Sat, 27 Feb 2021 22:29: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 11RMTuJG001171; Sat, 27 Feb 2021 22:29:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11RMTuFO001170; Sat, 27 Feb 2021 22:29:56 GMT (envelope-from git) Date: Sat, 27 Feb 2021 22:29:56 GMT Message-Id: <202102272229.11RMTuFO001170@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik <mjg@FreeBSD.org> Subject: git: 1d8510c1a64d - main - zfs: add missing seqc write begin/end around zfs_acl_chown_setattr 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: 1d8510c1a64d61a85c74c8b02fb12e6f31ede5a1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 22:29:56 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=1d8510c1a64d61a85c74c8b02fb12e6f31ede5a1 commit 1d8510c1a64d61a85c74c8b02fb12e6f31ede5a1 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2021-02-27 22:26:20 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2021-02-27 22:29:50 +0000 zfs: add missing seqc write begin/end around zfs_acl_chown_setattr It happens to trip over an assert but does not matter for correctness at this time. However, do it for future proofing. Reported by: avg --- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c index d5f0da9ecd4b..8172916c4329 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c @@ -2756,7 +2756,9 @@ zfs_setattr(znode_t *zp, vattr_t *vap, int flags, cred_t *cr) err = zfs_acl_chown_setattr(zp); ASSERT(err == 0); if (attrzp) { + vn_seqc_write_begin(ZTOV(attrzp)); err = zfs_acl_chown_setattr(attrzp); + vn_seqc_write_end(ZTOV(attrzp)); ASSERT(err == 0); } } From owner-dev-commits-src-main@freebsd.org Sat Feb 27 23:15:35 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CBF945574C1; Sat, 27 Feb 2021 23:15: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dp2SR5GDMz4WnV; Sat, 27 Feb 2021 23:15: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 A793726153; Sat, 27 Feb 2021 23:15: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 11RNFZBa066959; Sat, 27 Feb 2021 23:15:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11RNFZSm066958; Sat, 27 Feb 2021 23:15:35 GMT (envelope-from git) Date: Sat, 27 Feb 2021 23:15:35 GMT Message-Id: <202102272315.11RNFZSm066958@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Moeller <freqlabs@FreeBSD.org> Subject: git: 1d9ba697f99a - main - libifconfig: Set error in ifconfig_get_groups MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: freqlabs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d9ba697f99a88b321a7d8b96fa142ea774cd3be Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 23:15:35 -0000 The branch main has been updated by freqlabs: URL: https://cgit.FreeBSD.org/src/commit/?id=1d9ba697f99a88b321a7d8b96fa142ea774cd3be commit 1d9ba697f99a88b321a7d8b96fa142ea774cd3be Author: Ryan Moeller <freqlabs@FreeBSD.org> AuthorDate: 2021-02-27 08:07:21 +0000 Commit: Ryan Moeller <freqlabs@FreeBSD.org> CommitDate: 2021-02-27 23:12:23 +0000 libifconfig: Set error in ifconfig_get_groups This should return -1 with OTHER/ENOMEM set in the handle when malloc fails, like everywhere else in libifconfig. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28964 --- lib/libifconfig/libifconfig.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/libifconfig/libifconfig.c b/lib/libifconfig/libifconfig.c index e67c4e4de04e..1733239132a0 100644 --- a/lib/libifconfig/libifconfig.c +++ b/lib/libifconfig/libifconfig.c @@ -511,7 +511,9 @@ ifconfig_get_groups(ifconfig_handle_t *h, const char *name, len = ifgr->ifgr_len; ifgr->ifgr_groups = (struct ifg_req *)malloc(len); if (ifgr->ifgr_groups == NULL) { - return (1); + h->error.errtype = OTHER; + h->error.errcode = ENOMEM; + return (-1); } bzero(ifgr->ifgr_groups, len); if (ifconfig_ioctlwrap(h, AF_LOCAL, SIOCGIFGROUP, ifgr) == -1) { From owner-dev-commits-src-main@freebsd.org Sat Feb 27 23:27:49 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B48BF5576E0; Sat, 27 Feb 2021 23:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dp2kY4j7lz4XBv; Sat, 27 Feb 2021 23:27:49 +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 9419F25DDC; Sat, 27 Feb 2021 23:27:49 +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 11RNRn4A080192; Sat, 27 Feb 2021 23:27:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11RNRnmU080191; Sat, 27 Feb 2021 23:27:49 GMT (envelope-from git) Date: Sat, 27 Feb 2021 23:27:49 GMT Message-Id: <202102272327.11RNRnmU080191@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov <kib@FreeBSD.org> Subject: git: b5449c92b489 - main - Use atomic_interrupt_fence() instead of bare __compiler_membar() 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: b5449c92b489445635c7962875ce73b2c9211bba Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 27 Feb 2021 23:27:49 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b5449c92b489445635c7962875ce73b2c9211bba commit b5449c92b489445635c7962875ce73b2c9211bba Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-02-26 23:54:17 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-02-27 23:27:29 +0000 Use atomic_interrupt_fence() instead of bare __compiler_membar() for the which which definitely use membar to sync with interrupt handlers. libc and rtld uses of __compiler_membar() seems to want compiler barriers proper. The barrier in sched_unpin_lite() after td_pinned decrement seems to be not needed and removed, instead of convertion. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28956 --- sys/kern/kern_rmlock.c | 32 +++++++++++++++----------------- sys/sys/kpilite.h | 5 ++--- sys/sys/mount.h | 4 ++-- sys/sys/sched.h | 4 ++-- sys/sys/systm.h | 6 +++--- 5 files changed, 24 insertions(+), 27 deletions(-) diff --git a/sys/kern/kern_rmlock.c b/sys/kern/kern_rmlock.c index 9135709d88cf..f661e209b633 100644 --- a/sys/kern/kern_rmlock.c +++ b/sys/kern/kern_rmlock.c @@ -366,7 +366,7 @@ _rm_rlock_hard(struct rmlock *rm, struct rm_priotracker *tracker, int trylock) * Check to see if the IPI granted us the lock after all. The load of * rmp_flags must happen after the tracker is removed from the list. */ - __compiler_membar(); + atomic_interrupt_fence(); if (tracker->rmp_flags) { /* Just add back tracker - we hold the lock. */ rm_tracker_add(pc, tracker); @@ -448,7 +448,7 @@ _rm_rlock(struct rmlock *rm, struct rm_priotracker *tracker, int trylock) td->td_critnest++; /* critical_enter(); */ - __compiler_membar(); + atomic_interrupt_fence(); pc = cpuid_to_pcpu[td->td_oncpu]; /* pcpu_find(td->td_oncpu); */ @@ -456,7 +456,7 @@ _rm_rlock(struct rmlock *rm, struct rm_priotracker *tracker, int trylock) sched_pin(); - __compiler_membar(); + atomic_interrupt_fence(); td->td_critnest--; @@ -873,17 +873,15 @@ db_show_rm(const struct lock_object *lock) * Concurrent writers take turns taking the lock while going off cpu. If this is * of concern for your usecase, this is not the right primitive. * - * Neither rms_rlock nor rms_runlock use fences. Instead compiler barriers are - * inserted to prevert reordering of generated code. Execution ordering is - * provided with the use of an IPI handler. + * Neither rms_rlock nor rms_runlock use thread fences. Instead interrupt + * fences are inserted to ensure ordering with the code executed in the IPI + * handler. * * No attempt is made to track which CPUs read locked at least once, * consequently write locking sends IPIs to all of them. This will become a * problem at some point. The easiest way to lessen it is to provide a bitmap. */ -#define rms_int_membar() __compiler_membar() - #define RMS_NOOWNER ((void *)0x1) #define RMS_TRANSIENT ((void *)0x2) #define RMS_FLAGMASK 0xf @@ -1030,14 +1028,14 @@ rms_rlock(struct rmslock *rms) critical_enter(); pcpu = rms_int_pcpu(rms); rms_int_influx_enter(rms, pcpu); - rms_int_membar(); + atomic_interrupt_fence(); if (__predict_false(rms->writers > 0)) { rms_rlock_fallback(rms); return; } - rms_int_membar(); + atomic_interrupt_fence(); rms_int_readers_inc(rms, pcpu); - rms_int_membar(); + atomic_interrupt_fence(); rms_int_influx_exit(rms, pcpu); critical_exit(); } @@ -1052,15 +1050,15 @@ rms_try_rlock(struct rmslock *rms) critical_enter(); pcpu = rms_int_pcpu(rms); rms_int_influx_enter(rms, pcpu); - rms_int_membar(); + atomic_interrupt_fence(); if (__predict_false(rms->writers > 0)) { rms_int_influx_exit(rms, pcpu); critical_exit(); return (0); } - rms_int_membar(); + atomic_interrupt_fence(); rms_int_readers_inc(rms, pcpu); - rms_int_membar(); + atomic_interrupt_fence(); rms_int_influx_exit(rms, pcpu); critical_exit(); return (1); @@ -1092,14 +1090,14 @@ rms_runlock(struct rmslock *rms) critical_enter(); pcpu = rms_int_pcpu(rms); rms_int_influx_enter(rms, pcpu); - rms_int_membar(); + atomic_interrupt_fence(); if (__predict_false(rms->writers > 0)) { rms_runlock_fallback(rms); return; } - rms_int_membar(); + atomic_interrupt_fence(); rms_int_readers_dec(rms, pcpu); - rms_int_membar(); + atomic_interrupt_fence(); rms_int_influx_exit(rms, pcpu); critical_exit(); } diff --git a/sys/sys/kpilite.h b/sys/sys/kpilite.h index 8742ef5cfbe8..2a7e9743f799 100644 --- a/sys/sys/kpilite.h +++ b/sys/sys/kpilite.h @@ -38,7 +38,7 @@ sched_pin_lite(struct thread_lite *td) KASSERT((struct thread *)td == curthread, ("sched_pin called on non curthread")); td->td_pinned++; - __compiler_membar(); + atomic_interrupt_fence(); } static __inline void @@ -47,9 +47,8 @@ sched_unpin_lite(struct thread_lite *td) KASSERT((struct thread *)td == curthread, ("sched_unpin called on non curthread")); KASSERT(td->td_pinned > 0, ("sched_unpin called on non pinned thread")); - __compiler_membar(); + atomic_interrupt_fence(); td->td_pinned--; - __compiler_membar(); } #endif #endif diff --git a/sys/sys/mount.h b/sys/sys/mount.h index ca3261a22e62..630cd521fbd0 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -1091,7 +1091,7 @@ void resume_all_fs(void); _mpcpu = vfs_mount_pcpu(mp); \ MPASS(mpcpu->mntp_thread_in_ops == 0); \ _mpcpu->mntp_thread_in_ops = 1; \ - __compiler_membar(); \ + atomic_interrupt_fence(); \ if (__predict_false(mp->mnt_vfs_ops > 0)) { \ vfs_op_thread_exit_crit(mp, _mpcpu); \ _retval_crit = false; \ @@ -1111,7 +1111,7 @@ void resume_all_fs(void); #define vfs_op_thread_exit_crit(mp, _mpcpu) do { \ MPASS(_mpcpu == vfs_mount_pcpu(mp)); \ MPASS(_mpcpu->mntp_thread_in_ops == 1); \ - __compiler_membar(); \ + atomic_interrupt_fence(); \ _mpcpu->mntp_thread_in_ops = 0; \ } while (0) diff --git a/sys/sys/sched.h b/sys/sys/sched.h index d734ec61266e..64651ffa9c90 100644 --- a/sys/sys/sched.h +++ b/sys/sys/sched.h @@ -173,13 +173,13 @@ static __inline void sched_pin(void) { curthread->td_pinned++; - __compiler_membar(); + atomic_interrupt_fence(); } static __inline void sched_unpin(void) { - __compiler_membar(); + atomic_interrupt_fence(); curthread->td_pinned--; } diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 5de12e5bc1e5..72a10c401af9 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -284,7 +284,7 @@ critical_enter(void) td = (struct thread_lite *)curthread; td->td_critnest++; - __compiler_membar(); + atomic_interrupt_fence(); } static __inline void @@ -295,9 +295,9 @@ critical_exit(void) td = (struct thread_lite *)curthread; KASSERT(td->td_critnest != 0, ("critical_exit: td_critnest == 0")); - __compiler_membar(); + atomic_interrupt_fence(); td->td_critnest--; - __compiler_membar(); + atomic_interrupt_fence(); if (__predict_false(td->td_owepreempt)) critical_exit_preempt(); From owner-dev-commits-src-main@freebsd.org Sun Feb 28 01:10:30 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B6D5355B4D7; Sun, 28 Feb 2021 01:10:30 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dp5124XMwz4dkf; Sun, 28 Feb 2021 01:10:30 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (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 8451622043; Sun, 28 Feb 2021 01:10:30 +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 033D827C0054; Sat, 27 Feb 2021 20:10:29 -0500 (EST) Received: from imap38 ([10.202.2.88]) by compute3.internal (MEProxy); Sat, 27 Feb 2021 20:10:30 -0500 X-ME-Sender: <xms:he06YD4eJhWmp_6T9Zi_l1lO4L5LiuWfyqDJn8KMqvLtf2teAOUpIA> <xme:he06YI6whC2pAackeLHhBnqqeqjVVQH4bmJ9aJzAlJgmKstrP6G8dxXjl2GkfG--p FvDnyAwawvU1Msd> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrleeggdefudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculddutddmnecujfgurhepofgfggfkjghffffhvffutgesthdtredtreer jeenucfhrhhomhepfdeurhgrnhguohhnuceuvghrghhrvghnfdcuoegsughrrghgohhnse fhrhgvvgeuufffrdhorhhgqeenucggtffrrghtthgvrhhnpeejhfeftddutdelgeekgedt geejkeffvdejtddthefggfevuefggfefledvgefhgfenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsughrrghgohhnodhmvghsmhhtphgruhht hhhpvghrshhonhgrlhhithihqddutdegvdefheekieegqddukedutdekheduqdgsughrrg hgohhnpeephfhrvggvuefuffdrohhrghesihhmrghprdgttg X-ME-Proxy: <xmx:he06YKcYZ3Y1O-W-iXeQEu0NNDy3o88xOZxdK0LuYD5VoOXhkYGjNw> <xmx:he06YEL14tpd6UvUnGBjOvqh6K1WM1CZWzbPu-9MlgR2YZVsT6XB_w> <xmx:he06YHJ9F6zEwInL6Wxr3NrqksIkXn2j2wzHMVkjdlcoBn210OLEHw> <xmx:he06YP22TSsuba0DfOiw8B0m46n4jyz2-QBiD45aczc_GNYWwU5q5w> Received: by mailuser.nyi.internal (Postfix, from userid 501) id 415BECA005D; Sat, 27 Feb 2021 20:10:29 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-141-gf094924a34-fm-20210210.001-gf094924a Mime-Version: 1.0 Message-Id: <743fd126-2077-49b1-9c85-7ccc61616b98@www.fastmail.com> In-Reply-To: <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <01000177d0e7f033-389acb59-2004-4040-ba7c-762878ef86b4-000000@email.amazonses.com> <dba58a1f-5eb0-da87-7d18-d930aa5d422a@freebsd.org> <CANCZdfoL3QFg9NvpkPW8pfVrNvUK-cTPD2ZGbBr2xxh-0dv=eA@mail.gmail.com> <dc61048c-2cfa-0ff5-0470-e93aa5233aae@freebsd.org> <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> Date: Sat, 27 Feb 2021 19:10:08 -0600 From: "Brandon Bergren" <bdragon@FreeBSD.org> To: "Nathan Whitehorn" <nwhitehorn@freebsd.org>, "Warner Losh" <imp@bsdimp.com> Cc: "Colin Percival" <cperciva@tarsnap.com>, src-committers <src-committers@freebsd.org>, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: =?UTF-8?Q?Re:_git:_0b7472b3d8d2_-_main_-_Mount_the_EFI_system_partition_?= =?UTF-8?Q?(ESP)_on_newly-installed_systems.?= Content-Type: text/plain X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 01:10:30 -0000 This is mistakenly detecting pseries powerpc64* as an EFI platform and causing install to error out. Please add back the uname checks so this code doesn't run on powerpc*. -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-main@freebsd.org Sun Feb 28 01:22:24 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 967A155C2D8; Sun, 28 Feb 2021 01:22: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dp5Gm3cBSz4ft3; Sun, 28 Feb 2021 01:22:24 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (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 6789E222B9; Sun, 28 Feb 2021 01:22:24 +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 55A7227C0054; Sat, 27 Feb 2021 20:22:24 -0500 (EST) Received: from imap38 ([10.202.2.88]) by compute3.internal (MEProxy); Sat, 27 Feb 2021 20:22:24 -0500 X-ME-Sender: <xms:UPA6YISDlT85bbGcyO5qQrxvxKcQ5e_TJDKsHsXFsrFBRZIQQQM35Q> <xme:UPA6YFyzd2RpWU3n5LlDtsvZlRSBA1rAedz5R5iZypWjB1NmHzL96vl67tjENfy9_ Rxb6FEX-a8k0SCa> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrleeggdeffecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculddutddmnecujfgurhepofgfggfkjghffffhvffutgesthdtredtreer jeenucfhrhhomhepfdeurhgrnhguohhnuceuvghrghhrvghnfdcuoegsughrrghgohhnse fhrhgvvgeuufffrdhorhhgqeenucggtffrrghtthgvrhhnpeejhfeftddutdelgeekgedt geejkeffvdejtddthefggfevuefggfefledvgefhgfenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsughrrghgohhnodhmvghsmhhtphgruhht hhhpvghrshhonhgrlhhithihqddutdegvdefheekieegqddukedutdekheduqdgsughrrg hgohhnpeephfhrvggvuefuffdrohhrghesihhmrghprdgttg X-ME-Proxy: <xmx:UPA6YF1eTGqRfpucxEGC5TZI8_0mhPon4Jc9kbYTfNX8MDdfLYesgA> <xmx:UPA6YMAn68dKfE_tzTDGeDwSTqRH6CV5o8oXoxjcmRZZnTaBeHZVtg> <xmx:UPA6YBgxGsbEVZkOdGdKToKuFnnnk4mjd5clh8hf0CTeLbwSX3aCTA> <xmx:UPA6YBcPpDnRWB9iGkWZFyFVmiXQVb5VpDV6gjFVsVrx9JxDQ1BJow> Received: by mailuser.nyi.internal (Postfix, from userid 501) id 04286CA005D; Sat, 27 Feb 2021 20:22:23 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-141-gf094924a34-fm-20210210.001-gf094924a Mime-Version: 1.0 Message-Id: <460ceb98-e0c1-42b3-8e3c-2587c5ce8398@www.fastmail.com> In-Reply-To: <743fd126-2077-49b1-9c85-7ccc61616b98@www.fastmail.com> References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <01000177d0e7f033-389acb59-2004-4040-ba7c-762878ef86b4-000000@email.amazonses.com> <dba58a1f-5eb0-da87-7d18-d930aa5d422a@freebsd.org> <CANCZdfoL3QFg9NvpkPW8pfVrNvUK-cTPD2ZGbBr2xxh-0dv=eA@mail.gmail.com> <dc61048c-2cfa-0ff5-0470-e93aa5233aae@freebsd.org> <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> <743fd126-2077-49b1-9c85-7ccc61616b98@www.fastmail.com> Date: Sat, 27 Feb 2021 19:22:02 -0600 From: "Brandon Bergren" <bdragon@FreeBSD.org> To: "Brandon Bergren" <bdragon@FreeBSD.org>, "Nathan Whitehorn" <nwhitehorn@freebsd.org>, "Warner Losh" <imp@bsdimp.com> Cc: "Colin Percival" <cperciva@tarsnap.com>, src-committers <src-committers@freebsd.org>, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: =?UTF-8?Q?Re:_git:_0b7472b3d8d2_-_main_-_Mount_the_EFI_system_partition_?= =?UTF-8?Q?(ESP)_on_newly-installed_systems.?= Content-Type: text/plain X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 01:22:24 -0000 On Sat, Feb 27, 2021, at 7:10 PM, Brandon Bergren wrote: > This is mistakenly detecting pseries powerpc64* as an EFI platform and > causing install to error out. Please add back the uname checks so this > code doesn't run on powerpc*. Specifically, the /boot/efi stuff in usr.sbin/bsdinstall/scripts/bootconfig should not run on mips / 32 bit ARM / powerpc* systems. I believe /boot/efi is always created so it can't be used to infer existence of EFI. -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-main@freebsd.org Sun Feb 28 01:25:47 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B4D6755C5DE for <dev-commits-src-main@mailman.nyi.freebsd.org>; Sun, 28 Feb 2021 01:25:47 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (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 4Dp5Lg4J1Tz4gSq for <dev-commits-src-main@freebsd.org>; Sun, 28 Feb 2021 01:25:47 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f49.google.com with SMTP id v15so12355280wrx.4 for <dev-commits-src-main@freebsd.org>; Sat, 27 Feb 2021 17:25:47 -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=fzt51C3bax2YGOmouoWbdGfRiCppMoD8eqe3rHoQCfg=; b=iKulHJdCnejfhv+n0W0eQgkttOtm9lVR6qb9e+LM/VRH4Pxb3UafQlC4EGu5NDAwaV rWQI2OWMFPY4DuzLjqIKIw8lMpqR9E9ajgqm0ncp/ayUS/eyE8qyNp9AZoZT3BpOEYuC JoQ2Z5r5oDELD9w4PzBq8WOwZD7HLC2V5rIfbEmXCcMqrLYEIPSTvZQSgQOQCox7iZid 6NE5I4B3qN1eGXRCJCo8UGCFBK19tVOu8UHYydOFV3SJfK8tY3y6GT/oBJ8OrW+PnM7U DzHA3Dv+gBJWMfL8xikwC/MR4at4NlNyXDpjw9UkaHItIXia2JSDiGpYC26wl6FOqysf i1RQ== X-Gm-Message-State: AOAM532nHOJDXLdgV2MdRq58ZPs7+rlqhGydVrbvd5T27FmevMYLA77L TwmJaki/1YR81NBNvuJwLuMmIw== X-Google-Smtp-Source: ABdhPJwRRX3MKjgS911Lb9eCzVJOXZPri1yX9aNY2jOu6bBtyuNN339MYFTDkCWU/rj+KoRfbQpbGA== X-Received: by 2002:a5d:62d1:: with SMTP id o17mr10234107wrv.111.1614475546183; Sat, 27 Feb 2021 17:25:46 -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 d204sm9714414wmc.17.2021.02.27.17.25.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Feb 2021 17:25:45 -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: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. From: Jessica Clarke <jrtc27@freebsd.org> In-Reply-To: <460ceb98-e0c1-42b3-8e3c-2587c5ce8398@www.fastmail.com> Date: Sun, 28 Feb 2021 01:25:44 +0000 Cc: Nathan Whitehorn <nwhitehorn@freebsd.org>, Warner Losh <imp@bsdimp.com>, Colin Percival <cperciva@tarsnap.com>, src-committers <src-committers@freebsd.org>, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <F4E1978D-DE96-4082-885F-D6686A5D005C@freebsd.org> References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <01000177d0e7f033-389acb59-2004-4040-ba7c-762878ef86b4-000000@email.amazonses.com> <dba58a1f-5eb0-da87-7d18-d930aa5d422a@freebsd.org> <CANCZdfoL3QFg9NvpkPW8pfVrNvUK-cTPD2ZGbBr2xxh-0dv=eA@mail.gmail.com> <dc61048c-2cfa-0ff5-0470-e93aa5233aae@freebsd.org> <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> <743fd126-2077-49b1-9c85-7ccc61616b98@www.fastmail.com> <460ceb98-e0c1-42b3-8e3c-2587c5ce8398@www.fastmail.com> To: Brandon Bergren <bdragon@FreeBSD.org> X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4Dp5Lg4J1Tz4gSq 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 01:25:47 -0000 On 28 Feb 2021, at 01:22, Brandon Bergren <bdragon@FreeBSD.org> wrote: >=20 > On Sat, Feb 27, 2021, at 7:10 PM, Brandon Bergren wrote: >> This is mistakenly detecting pseries powerpc64* as an EFI platform = and=20 >> causing install to error out. Please add back the uname checks so = this=20 >> code doesn't run on powerpc*. >=20 > Specifically, the /boot/efi stuff in = usr.sbin/bsdinstall/scripts/bootconfig should not run on mips / 32 bit = ARM / powerpc* systems. I believe /boot/efi is always created so it = can't be used to infer existence of EFI. 32-bit Arm can boot via EFI. Just mips* and powerpc*. Jess From owner-dev-commits-src-main@freebsd.org Sun Feb 28 01:56:43 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D351A55CD64; Sun, 28 Feb 2021 01:56: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dp62M5bGQz4hWd; Sun, 28 Feb 2021 01:56: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 B2BFC605; Sun, 28 Feb 2021 01:56: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 11S1uhgi076970; Sun, 28 Feb 2021 01:56:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11S1uhD3076969; Sun, 28 Feb 2021 01:56:43 GMT (envelope-from git) Date: Sun, 28 Feb 2021 01:56:43 GMT Message-Id: <202102280156.11S1uhD3076969@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem <rmacklem@FreeBSD.org> Subject: git: 3fe2c68ba20f - main - nfsclient: fix panic in cache_enter_time() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3fe2c68ba20fb3365ef91e0b85f88237b5369f38 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 01:56:43 -0000 The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=3fe2c68ba20fb3365ef91e0b85f88237b5369f38 commit 3fe2c68ba20fb3365ef91e0b85f88237b5369f38 Author: Rick Macklem <rmacklem@FreeBSD.org> AuthorDate: 2021-02-28 01:54:05 +0000 Commit: Rick Macklem <rmacklem@FreeBSD.org> CommitDate: 2021-02-28 01:54:05 +0000 nfsclient: fix panic in cache_enter_time() Juraj Lutter (otis@) reported a panic "dvp != vp not true" in cache_enter_time() called from the NFS client's nfsrpc_readdirplus() function. This is specific to an NFSv3 mount with the "rdirplus" mount option. Unlike NFSv4, NFSv3 replies to ReaddirPlus includes entries for the current directory. This trivial patch avoids doing a cache_enter_time() call for the current directory to avoid the panic. Reported by: otis Tested by: otis Reviewed by: mjg MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28969 --- sys/fs/nfsclient/nfs_clrpcops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index b4f2d5301d13..c95d4dc58e7a 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -3761,6 +3761,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, ndp->ni_vp = newvp; NFSCNHASH(cnp, HASHINIT); if (cnp->cn_namelen <= NCHNAMLEN && + ndp->ni_dvp != ndp->ni_vp && (newvp->v_type != VDIR || dctime.tv_sec != 0)) { cache_enter_time(ndp->ni_dvp, From owner-dev-commits-src-main@freebsd.org Sun Feb 28 02:20:42 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E05CC55D426; Sun, 28 Feb 2021 02:20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dp6Z262kFz4jLq; Sun, 28 Feb 2021 02:20: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 C291A73B; Sun, 28 Feb 2021 02:20: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 11S2KgLJ012181; Sun, 28 Feb 2021 02:20:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11S2Kgnr012180; Sun, 28 Feb 2021 02:20:42 GMT (envelope-from git) Date: Sun, 28 Feb 2021 02:20:42 GMT Message-Id: <202102280220.11S2Kgnr012180@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Moeller <freqlabs@FreeBSD.org> Subject: git: da393346ac47 - main - sbin/ifconfig: Get carp status with libifconfig MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: freqlabs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da393346ac47b22b5f8af4040a59971faadd2c5c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 02:20:42 -0000 The branch main has been updated by freqlabs: URL: https://cgit.FreeBSD.org/src/commit/?id=da393346ac47b22b5f8af4040a59971faadd2c5c commit da393346ac47b22b5f8af4040a59971faadd2c5c Author: Ryan Moeller <freqlabs@FreeBSD.org> AuthorDate: 2021-02-26 23:40:58 +0000 Commit: Ryan Moeller <freqlabs@FreeBSD.org> CommitDate: 2021-02-28 02:20:38 +0000 sbin/ifconfig: Get carp status with libifconfig A trivial change now that ifconfig is already using libifconfig. Reviewed by: kp (earlier version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28955 --- sbin/ifconfig/carp.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/sbin/ifconfig/carp.c b/sbin/ifconfig/carp.c index dcf966d873ee..d6f8d78ba920 100644 --- a/sbin/ifconfig/carp.c +++ b/sbin/ifconfig/carp.c @@ -50,6 +50,8 @@ #include <err.h> #include <errno.h> +#include <libifconfig.h> + #include "ifconfig.h" static const char *carp_states[] = { CARP_STATES }; @@ -71,16 +73,16 @@ static void carp_status(int s) { struct carpreq carpr[CARP_MAXVHID]; - int i; + ifconfig_handle_t *lifh; - bzero(carpr, sizeof(struct carpreq) * CARP_MAXVHID); - carpr[0].carpr_count = CARP_MAXVHID; - ifr.ifr_data = (caddr_t)&carpr; - - if (ioctl(s, SIOCGVH, (caddr_t)&ifr) == -1) + lifh = ifconfig_open(); + if (lifh == NULL) return; - for (i = 0; i < carpr[0].carpr_count; i++) { + if (ifconfig_carp_get_info(lifh, name, carpr, CARP_MAXVHID) == -1) + goto close; + + for (size_t i = 0; i < carpr[0].carpr_count; i++) { printf("\tcarp: %s vhid %d advbase %d advskew %d", carp_states[carpr[i].carpr_state], carpr[i].carpr_vhid, carpr[i].carpr_advbase, carpr[i].carpr_advskew); @@ -89,6 +91,8 @@ carp_status(int s) else printf("\n"); } +close: + ifconfig_close(lifh); } static void From owner-dev-commits-src-main@freebsd.org Sun Feb 28 02:20:44 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 31C0355D1FB; Sun, 28 Feb 2021 02:20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dp6Z36rhTz4jBy; Sun, 28 Feb 2021 02:20: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 D8FDF906; Sun, 28 Feb 2021 02:20: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 11S2Kh2i012203; Sun, 28 Feb 2021 02:20:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11S2KhHt012202; Sun, 28 Feb 2021 02:20:43 GMT (envelope-from git) Date: Sun, 28 Feb 2021 02:20:43 GMT Message-Id: <202102280220.11S2KhHt012202@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Moeller <freqlabs@FreeBSD.org> Subject: git: a0ebb915045e - main - sbin/ifconfig: Get lagg status with libifconfig MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: freqlabs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a0ebb915045ed0056decec5f001471af4e999f61 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 02:20:44 -0000 The branch main has been updated by freqlabs: URL: https://cgit.FreeBSD.org/src/commit/?id=a0ebb915045ed0056decec5f001471af4e999f61 commit a0ebb915045ed0056decec5f001471af4e999f61 Author: Ryan Moeller <freqlabs@FreeBSD.org> AuthorDate: 2021-02-27 03:05:31 +0000 Commit: Ryan Moeller <freqlabs@FreeBSD.org> CommitDate: 2021-02-28 02:20:38 +0000 sbin/ifconfig: Get lagg status with libifconfig Also trimmed an unused block of code that never prints out LAGG_PROTOS. Reviewed by: kp (earlier version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28961 --- sbin/ifconfig/iflagg.c | 144 ++++++++++++++++++++++++------------------------- 1 file changed, 70 insertions(+), 74 deletions(-) diff --git a/sbin/ifconfig/iflagg.c b/sbin/ifconfig/iflagg.c index 5be8c67cd72a..5e726115662a 100644 --- a/sbin/ifconfig/iflagg.c +++ b/sbin/ifconfig/iflagg.c @@ -28,6 +28,8 @@ static const char rcsid[] = #include <err.h> #include <errno.h> +#include <libifconfig.h> + #include "ifconfig.h" static struct iflaggparam params = { @@ -216,93 +218,87 @@ lacp_format_peer(struct lacp_opreq *req, const char *sep) static void lagg_status(int s) { - struct lagg_protos lpr[] = LAGG_PROTOS; - struct lagg_reqport rpbuf[LAGG_MAX_PORTS]; - struct lagg_reqall ra; - struct lagg_reqopts ro; - struct lagg_reqflags rf; + struct lagg_protos protos[] = LAGG_PROTOS; + ifconfig_handle_t *lifh; + struct ifconfig_lagg_status *lagg; + struct lagg_reqall *ra; + struct lagg_reqflags *rf; + struct lagg_reqopts *ro; + struct lagg_reqport *ports; struct lacp_opreq *lp; - const char *proto = "<unknown>"; - int i; + const char *proto; - bzero(&ra, sizeof(ra)); - bzero(&ro, sizeof(ro)); + lifh = ifconfig_open(); + if (lifh == NULL) + return; - strlcpy(ra.ra_ifname, name, sizeof(ra.ra_ifname)); - ra.ra_size = sizeof(rpbuf); - ra.ra_port = rpbuf; + if (ifconfig_lagg_get_lagg_status(lifh, name, &lagg) == -1) + goto close; - strlcpy(ro.ro_ifname, name, sizeof(ro.ro_ifname)); - ioctl(s, SIOCGLAGGOPTS, &ro); + ra = lagg->ra; + rf = lagg->rf; + ro = lagg->ro; + ports = ra->ra_port; - strlcpy(rf.rf_ifname, name, sizeof(rf.rf_ifname)); - if (ioctl(s, SIOCGLAGGFLAGS, &rf) != 0) - rf.rf_flags = 0; + proto = "<unknown>"; + for (size_t i = 0; i < nitems(protos); ++i) { + if (ra->ra_proto == protos[i].lpr_proto) { + proto = protos[i].lpr_name; + break; + } + } + printf("\tlaggproto %s", proto); - if (ioctl(s, SIOCGLAGG, &ra) == 0) { - lp = (struct lacp_opreq *)&ra.ra_lacpreq; + if (rf->rf_flags & LAGG_F_HASHMASK) { + const char *sep = ""; - for (i = 0; i < nitems(lpr); i++) { - if (ra.ra_proto == lpr[i].lpr_proto) { - proto = lpr[i].lpr_name; - break; - } + printf(" lagghash "); + if (rf->rf_flags & LAGG_F_HASHL2) { + printf("%sl2", sep); + sep = ","; } - - printf("\tlaggproto %s", proto); - if (rf.rf_flags & LAGG_F_HASHMASK) { - const char *sep = ""; - - printf(" lagghash "); - if (rf.rf_flags & LAGG_F_HASHL2) { - printf("%sl2", sep); - sep = ","; - } - if (rf.rf_flags & LAGG_F_HASHL3) { - printf("%sl3", sep); - sep = ","; - } - if (rf.rf_flags & LAGG_F_HASHL4) { - printf("%sl4", sep); - sep = ","; - } + if (rf->rf_flags & LAGG_F_HASHL3) { + printf("%sl3", sep); + sep = ","; } - putchar('\n'); - if (verbose) { - printf("\tlagg options:\n"); - printb("\t\tflags", ro.ro_opts, LAGG_OPT_BITS); - putchar('\n'); - printf("\t\tflowid_shift: %d\n", ro.ro_flowid_shift); - if (ra.ra_proto == LAGG_PROTO_ROUNDROBIN) - printf("\t\trr_limit: %d\n", ro.ro_bkt); - printf("\tlagg statistics:\n"); - printf("\t\tactive ports: %d\n", ro.ro_active); - printf("\t\tflapping: %u\n", ro.ro_flapping); - if (ra.ra_proto == LAGG_PROTO_LACP) { - printf("\tlag id: %s\n", - lacp_format_peer(lp, "\n\t\t ")); - } + if (rf->rf_flags & LAGG_F_HASHL4) { + printf("%sl4", sep); + sep = ","; } - - for (i = 0; i < ra.ra_ports; i++) { - lp = (struct lacp_opreq *)&rpbuf[i].rp_lacpreq; - printf("\tlaggport: %s ", rpbuf[i].rp_portname); - printb("flags", rpbuf[i].rp_flags, LAGG_PORT_BITS); - if (verbose && ra.ra_proto == LAGG_PROTO_LACP) - printb(" state", lp->actor_state, - LACP_STATE_BITS); - putchar('\n'); - if (verbose && ra.ra_proto == LAGG_PROTO_LACP) - printf("\t\t%s\n", - lacp_format_peer(lp, "\n\t\t ")); + } + putchar('\n'); + if (verbose) { + printf("\tlagg options:\n"); + printb("\t\tflags", ro->ro_opts, LAGG_OPT_BITS); + putchar('\n'); + printf("\t\tflowid_shift: %d\n", ro->ro_flowid_shift); + if (ra->ra_proto == LAGG_PROTO_ROUNDROBIN) + printf("\t\trr_limit: %d\n", ro->ro_bkt); + printf("\tlagg statistics:\n"); + printf("\t\tactive ports: %d\n", ro->ro_active); + printf("\t\tflapping: %u\n", ro->ro_flapping); + if (ra->ra_proto == LAGG_PROTO_LACP) { + lp = &ra->ra_lacpreq; + printf("\tlag id: %s\n", + lacp_format_peer(lp, "\n\t\t ")); } + } - if (0 /* XXX */) { - printf("\tsupported aggregation protocols:\n"); - for (i = 0; i < nitems(lpr); i++) - printf("\t\tlaggproto %s\n", lpr[i].lpr_name); - } + for (size_t i = 0; i < ra->ra_ports; ++i) { + lp = &ports[i].rp_lacpreq; + printf("\tlaggport: %s ", ports[i].rp_portname); + printb("flags", ports[i].rp_flags, LAGG_PORT_BITS); + if (verbose && ra->ra_proto == LAGG_PROTO_LACP) + printb(" state", lp->actor_state, LACP_STATE_BITS); + putchar('\n'); + if (verbose && ra->ra_proto == LAGG_PROTO_LACP) + printf("\t\t%s\n", + lacp_format_peer(lp, "\n\t\t ")); } + + ifconfig_lagg_free_lagg_status(lagg); +close: + ifconfig_close(lifh); } static From owner-dev-commits-src-main@freebsd.org Sun Feb 28 02:20:45 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B299155D5E2; Sun, 28 Feb 2021 02:20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dp6Z51mpHz4jC6; Sun, 28 Feb 2021 02:20: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 14BBA907; Sun, 28 Feb 2021 02:20: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 11S2Ki44012221; Sun, 28 Feb 2021 02:20:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11S2KitD012220; Sun, 28 Feb 2021 02:20:44 GMT (envelope-from git) Date: Sun, 28 Feb 2021 02:20:44 GMT Message-Id: <202102280220.11S2KitD012220@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Moeller <freqlabs@FreeBSD.org> Subject: git: 9995455218ff - main - sbin/ifconfig: Drop local name var in sfp_status MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: freqlabs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9995455218ff19df9cf0dcaf0198269dc76eeb2d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 02:20:45 -0000 The branch main has been updated by freqlabs: URL: https://cgit.FreeBSD.org/src/commit/?id=9995455218ff19df9cf0dcaf0198269dc76eeb2d commit 9995455218ff19df9cf0dcaf0198269dc76eeb2d Author: Ryan Moeller <freqlabs@FreeBSD.org> AuthorDate: 2021-02-28 02:15:11 +0000 Commit: Ryan Moeller <freqlabs@FreeBSD.org> CommitDate: 2021-02-28 02:20:38 +0000 sbin/ifconfig: Drop local name var in sfp_status There is already a globally defined name variable. MFC after: 1 week --- sbin/ifconfig/sfp.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sbin/ifconfig/sfp.c b/sbin/ifconfig/sfp.c index b7bdc74d42e8..15ff22639060 100644 --- a/sbin/ifconfig/sfp.c +++ b/sbin/ifconfig/sfp.c @@ -62,15 +62,12 @@ sfp_status(int s, struct ifreq *ifr, int verbose) struct ifconfig_sfp_vendor_info vendor_info; struct ifconfig_sfp_status status; ifconfig_handle_t *lifh; - const char *name; size_t channel_count; lifh = ifconfig_open(); if (lifh == NULL) return; - name = ifr->ifr_name; - if (ifconfig_sfp_get_sfp_info(lifh, name, &info) == -1) goto close; From owner-dev-commits-src-main@freebsd.org Sun Feb 28 02:29:58 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1752155DB16; Sun, 28 Feb 2021 02:29:58 +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 4Dp6mj4z1nz4k2t; Sun, 28 Feb 2021 02:29:57 +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 11S2TnJ4082146 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 28 Feb 2021 04:29:52 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 11S2TnJ4082146 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 11S2TnMf082145; Sun, 28 Feb 2021 04:29:49 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 28 Feb 2021 04:29:49 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Rick Macklem <rmacklem@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3fe2c68ba20f - main - nfsclient: fix panic in cache_enter_time() Message-ID: <YDsAHbgjfd87RHpx@kib.kiev.ua> References: <202102280156.11S1uhD3076969@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202102280156.11S1uhD3076969@gitrepo.freebsd.org> 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: 4Dp6mj4z1nz4k2t 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 02:29:58 -0000 On Sun, Feb 28, 2021 at 01:56:43AM +0000, Rick Macklem wrote: > The branch main has been updated by rmacklem: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3fe2c68ba20fb3365ef91e0b85f88237b5369f38 > > commit 3fe2c68ba20fb3365ef91e0b85f88237b5369f38 > Author: Rick Macklem <rmacklem@FreeBSD.org> > AuthorDate: 2021-02-28 01:54:05 +0000 > Commit: Rick Macklem <rmacklem@FreeBSD.org> > CommitDate: 2021-02-28 01:54:05 +0000 > > nfsclient: fix panic in cache_enter_time() > > Juraj Lutter (otis@) reported a panic "dvp != vp not true" in > cache_enter_time() called from the NFS client's nfsrpc_readdirplus() > function. > This is specific to an NFSv3 mount with the "rdirplus" mount > option. Unlike NFSv4, NFSv3 replies to ReaddirPlus > includes entries for the current directory. Should we check cache_enterXXX() args for other places, like lookup, as well? Malicious or buggy server could return the vp == dvp even for case other than dot. BTW, for some cases, dotdot can result in dvp == vp as well. From owner-dev-commits-src-main@freebsd.org Sun Feb 28 02:33:03 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6347355DDA0; Sun, 28 Feb 2021 02:33:03 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dp6rH24hVz4kYh; Sun, 28 Feb 2021 02:33:03 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (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 389EC22815; Sun, 28 Feb 2021 02:33:03 +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 E610927C0054; Sat, 27 Feb 2021 21:33:02 -0500 (EST) Received: from imap38 ([10.202.2.88]) by compute3.internal (MEProxy); Sat, 27 Feb 2021 21:33:02 -0500 X-ME-Sender: <xms:3gA7YAPwrdKl0kFXgHhQGKW96QcanCV2cSQcC2bAbmqiTq3kXRx0pw> <xme:3gA7YG__ax406Re-HV7BxuyxnbxQFv8Zqdglu3a2AY1rPpm5RatWfknKHLSWb7ML3 LKhpLJ0W0OlwA_M> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrleeggdegjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculddutddmnecujfgurhepofgfggfkjghffffhvffutgesthdtredtreer jeenucfhrhhomhepfdeurhgrnhguohhnuceuvghrghhrvghnfdcuoegsughrrghgohhnse fhrhgvvgeuufffrdhorhhgqeenucggtffrrghtthgvrhhnpeekgfeljeeuudekkefgteeg udelhfduteefhfefkeffjeegkeduveeiveffieejfeenucffohhmrghinhepohhpthhsrd hmkhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegs ughrrghgohhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqddutdegvdefhe ekieegqddukedutdekheduqdgsughrrghgohhnpeephfhrvggvuefuffdrohhrghesihhm rghprdgttg X-ME-Proxy: <xmx:3gA7YHTULa871wuWa467xtAHi41J8VJwZXQLypO70a4Vh6aQdG3Z8Q> <xmx:3gA7YIsZN3tCoLMoNzMpYAo2BOKZjZoxIO4FAgILkgajR8tSfuSnVg> <xmx:3gA7YIeG0EkLCDLQE5jACHkUo0KB97UDASXm_H33nJNI7jxVZJ_zxQ> <xmx:3gA7YH5ZxnUSZYd2LLvJPRmzJDVLuGMr85dHQmc2NXxAI_ByKY2z_A> Received: by mailuser.nyi.internal (Postfix, from userid 501) id 7024ACA005D; Sat, 27 Feb 2021 21:33:02 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-141-gf094924a34-fm-20210210.001-gf094924a Mime-Version: 1.0 Message-Id: <59b0dc6e-24ec-4df3-ab72-4a9c676855b2@www.fastmail.com> In-Reply-To: <F4E1978D-DE96-4082-885F-D6686A5D005C@freebsd.org> References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <01000177d0e7f033-389acb59-2004-4040-ba7c-762878ef86b4-000000@email.amazonses.com> <dba58a1f-5eb0-da87-7d18-d930aa5d422a@freebsd.org> <CANCZdfoL3QFg9NvpkPW8pfVrNvUK-cTPD2ZGbBr2xxh-0dv=eA@mail.gmail.com> <dc61048c-2cfa-0ff5-0470-e93aa5233aae@freebsd.org> <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> <743fd126-2077-49b1-9c85-7ccc61616b98@www.fastmail.com> <460ceb98-e0c1-42b3-8e3c-2587c5ce8398@www.fastmail.com> <F4E1978D-DE96-4082-885F-D6686A5D005C@freebsd.org> Date: Sat, 27 Feb 2021 20:32:42 -0600 From: "Brandon Bergren" <bdragon@FreeBSD.org> To: "Jessica Clarke" <jrtc27@freebsd.org> Cc: "Nathan Whitehorn" <nwhitehorn@freebsd.org>, "Warner Losh" <imp@bsdimp.com>, "Colin Percival" <cperciva@tarsnap.com>, src-committers <src-committers@freebsd.org>, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: =?UTF-8?Q?Re:_git:_0b7472b3d8d2_-_main_-_Mount_the_EFI_system_partition_?= =?UTF-8?Q?(ESP)_on_newly-installed_systems.?= Content-Type: text/plain X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 02:33:03 -0000 On Sat, Feb 27, 2021, at 7:25 PM, Jessica Clarke wrote: > > 32-bit Arm can boot via EFI. Just mips* and powerpc*. > > Jess Ah, thanks. Yeah, that matches with which platforms mark the EFI option as BROKEN in src.opts.mk to prevent the tools from being built. > > -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-main@freebsd.org Sun Feb 28 02:39:38 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9D26B55E008 for <dev-commits-src-main@mailman.nyi.freebsd.org>; Sun, 28 Feb 2021 02:39:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) (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 4Dp6zt3VtBz4kjb for <dev-commits-src-main@freebsd.org>; Sun, 28 Feb 2021 02:39:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf2a.google.com with SMTP id t1so5494226qvj.8 for <dev-commits-src-main@freebsd.org>; Sat, 27 Feb 2021 18:39: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=SZQtdZDkNGyYqENqZH+j0EVHFbfcTFfbcZMQXuAKhvw=; b=NwE1zbikGeFZ3I4RWirhnjsJtsMxMj13OsIXPyBn1ckQP79A9NX/4wgnNMcuVHgSUK 6qUt/Wyk1p5uWAv7eZOp1UVaW7HkGezglckWuFb+y23hqP5oKj5nXz07Iit0df/CL3tz zVYxCTpzJiuEMq3UN5ruZacusxGY/OCAPrjEZMNHyqnFusk/TZw3EDjaoF6JnGHPDull JD7jN8agonrBWFEr9FDyJtulzmkF2rcJhVtHeh8yU4THsfr07ysaQJSHgHND0Cl+xgdX ZCpdA3Yf+zf5Y/ZMGSbTUP+obhwsa1Ov56U0hQfc9p9hzI95g0krPFFT6ymuoekLwYdH abAQ== 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=SZQtdZDkNGyYqENqZH+j0EVHFbfcTFfbcZMQXuAKhvw=; b=VhRcflC6CmylNqH/CEjTv02oAjS24AA81D+d5hRLyNHhkBcxaHLBXFH6gjFxpnft6C t6unnS+XmHBvpbfZdA5xl1Btq8i4HfRjIw0zXsKhYwGKMAR8Gt4feH6owYaekdK746sf uUxEZmLWaYYWrJIMKZlqYyr2hRbRAzMsxyORY/HCFMoiVhF7IW+uehslZCnOnwZTkZKM /cD+s6YhNdorQ7EM/0M2ziblYNPAXMLyYXQZIpx0ZMXdhsGcVqnd1Wcvs2fuNv3IrCJm 4MokwNClYB4FRDiD8sjGcDIZ8xzC7ebdjcb2octx+A+VFOl6+FuNbEF2aAUCWR254qcq omCg== X-Gm-Message-State: AOAM530OceAlwf+x87KlA9KDHCM7EPsieSZGkVuDr954ArATC4093Jyf r1NQm06ADIrQLg7NfpQcXiAmD8fyCK616mSEYvyd+w== X-Google-Smtp-Source: ABdhPJwegWDusaTIB3bPmOpgMiGrD2mYkbQiqs76HoMQ7eqJSNZKw0GMac7Ch1kQSHF0VmZxhwOkDBBHQ5MPFnGAUOQ= X-Received: by 2002:a05:6214:15d1:: with SMTP id p17mr590706qvz.28.1614479977504; Sat, 27 Feb 2021 18:39:37 -0800 (PST) MIME-Version: 1.0 References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <01000177d0e7f033-389acb59-2004-4040-ba7c-762878ef86b4-000000@email.amazonses.com> <dba58a1f-5eb0-da87-7d18-d930aa5d422a@freebsd.org> <CANCZdfoL3QFg9NvpkPW8pfVrNvUK-cTPD2ZGbBr2xxh-0dv=eA@mail.gmail.com> <dc61048c-2cfa-0ff5-0470-e93aa5233aae@freebsd.org> <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> <743fd126-2077-49b1-9c85-7ccc61616b98@www.fastmail.com> <460ceb98-e0c1-42b3-8e3c-2587c5ce8398@www.fastmail.com> <F4E1978D-DE96-4082-885F-D6686A5D005C@freebsd.org> In-Reply-To: <F4E1978D-DE96-4082-885F-D6686A5D005C@freebsd.org> From: Warner Losh <imp@bsdimp.com> Date: Sat, 27 Feb 2021 19:39:25 -0700 Message-ID: <CANCZdfpw1+sjHVPH4zahywMsLHJ1jKWbnd5A3RjGinu=nQFSGA@mail.gmail.com> Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. To: Jessica Clarke <jrtc27@freebsd.org> Cc: Brandon Bergren <bdragon@freebsd.org>, Nathan Whitehorn <nwhitehorn@freebsd.org>, Colin Percival <cperciva@tarsnap.com>, src-committers <src-committers@freebsd.org>, "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>, dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4Dp6zt3VtBz4kjb 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 02:39:38 -0000 On Sat, Feb 27, 2021, 6:25 PM Jessica Clarke <jrtc27@freebsd.org> wrote: > On 28 Feb 2021, at 01:22, Brandon Bergren <bdragon@FreeBSD.org> wrote: > > > > On Sat, Feb 27, 2021, at 7:10 PM, Brandon Bergren wrote: > >> This is mistakenly detecting pseries powerpc64* as an EFI platform and > >> causing install to error out. Please add back the uname checks so this > >> code doesn't run on powerpc*. > > > > Specifically, the /boot/efi stuff in > usr.sbin/bsdinstall/scripts/bootconfig should not run on mips / 32 bit ARM > / powerpc* systems. I believe /boot/efi is always created so it can't be > used to infer existence of EFI. > > 32-bit Arm can boot via EFI. Just mips* and powerpc*. > There was some rumblings of little endian powerpc64 efi, but I don't think it's ready... > Yea, we have long since switched our preferred boot on arm to EFI... though we don't have installer images for 32bit arm, which is this runs... so it's needed for correctness, but not a practical difference... Warner > From owner-dev-commits-src-main@freebsd.org Sun Feb 28 03:01:46 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D03B755E6BD; Sun, 28 Feb 2021 03:01:46 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dp7TQ45kWz4m3G; Sun, 28 Feb 2021 03:01:46 +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 7DD6922A54; Sun, 28 Feb 2021 03:01:46 +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 4E31327C0054; Sat, 27 Feb 2021 22:01:46 -0500 (EST) Received: from imap38 ([10.202.2.88]) by compute3.internal (MEProxy); Sat, 27 Feb 2021 22:01:46 -0500 X-ME-Sender: <xms:mQc7YKywHXtsBtNo5XYskrCwNjABP-Uci4tX3E7qonhra3c8TPasTQ> <xme:mQc7YGTd5GYxY-FLbYEWRIdlllgfXIHziq2uqPHfDIbkioS3dXzi65l0ow5htfEEw yyag_K-_3sVVc8j> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrleeggdehfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculddutddmnecujfgurhepofgfggfkjghffffhvffutgesthdtredtreer jeenucfhrhhomhepfdeurhgrnhguohhnuceuvghrghhrvghnfdcuoegsughrrghgohhnse fhrhgvvgeuufffrdhorhhgqeenucggtffrrghtthgvrhhnpeejhfeftddutdelgeekgedt geejkeffvdejtddthefggfevuefggfefledvgefhgfenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsughrrghgohhnodhmvghsmhhtphgruhht hhhpvghrshhonhgrlhhithihqddutdegvdefheekieegqddukedutdekheduqdgsughrrg hgohhnpeephfhrvggvuefuffdrohhrghesihhmrghprdgttg X-ME-Proxy: <xmx:mQc7YMVz6jUpWDBoGVB296odslAPGZl2DvePvc7GU-A9Hwoi7Taj0A> <xmx:mQc7YAi1VW0-4sxzuZhpvkFXceDMBPazrR0LxlsbSlFyTO365te97Q> <xmx:mQc7YMAIx51HFTq-agAZe-5nk_ExIFp-MEG7aoHW_AgAQRI3s4vvvg> <xmx:mgc7YP-nChOYjpD4lbRB5P2lvSJoWleKvQfRQ5QFXS6zv2hjKpnxNQ> Received: by mailuser.nyi.internal (Postfix, from userid 501) id D566FCA005D; Sat, 27 Feb 2021 22:01:45 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-141-gf094924a34-fm-20210210.001-gf094924a Mime-Version: 1.0 Message-Id: <a30870ef-00b1-40b6-b378-033d8737c7e4@www.fastmail.com> In-Reply-To: <CANCZdfpw1+sjHVPH4zahywMsLHJ1jKWbnd5A3RjGinu=nQFSGA@mail.gmail.com> References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <01000177d0e7f033-389acb59-2004-4040-ba7c-762878ef86b4-000000@email.amazonses.com> <dba58a1f-5eb0-da87-7d18-d930aa5d422a@freebsd.org> <CANCZdfoL3QFg9NvpkPW8pfVrNvUK-cTPD2ZGbBr2xxh-0dv=eA@mail.gmail.com> <dc61048c-2cfa-0ff5-0470-e93aa5233aae@freebsd.org> <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> <743fd126-2077-49b1-9c85-7ccc61616b98@www.fastmail.com> <460ceb98-e0c1-42b3-8e3c-2587c5ce8398@www.fastmail.com> <F4E1978D-DE96-4082-885F-D6686A5D005C@freebsd.org> <CANCZdfpw1+sjHVPH4zahywMsLHJ1jKWbnd5A3RjGinu=nQFSGA@mail.gmail.com> Date: Sat, 27 Feb 2021 21:01:25 -0600 From: "Brandon Bergren" <bdragon@FreeBSD.org> To: "Warner Losh" <imp@bsdimp.com>, "Jessica Clarke" <jrtc27@freebsd.org> Cc: "Nathan Whitehorn" <nwhitehorn@freebsd.org>, "Colin Percival" <cperciva@tarsnap.com>, src-committers <src-committers@freebsd.org>, "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>, dev-commits-src-main@freebsd.org Subject: =?UTF-8?Q?Re:_git:_0b7472b3d8d2_-_main_-_Mount_the_EFI_system_partition_?= =?UTF-8?Q?(ESP)_on_newly-installed_systems.?= Content-Type: text/plain X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 03:01:46 -0000 On Sat, Feb 27, 2021, at 8:39 PM, Warner Losh wrote: > > 32-bit Arm can boot via EFI. Just mips* and powerpc*. > > There was some rumblings of little endian powerpc64 efi, but I don't > think it's ready... I've never heard of such things. PAPR/LoPAPR/LoPAR (pseries) is specified as an OpenFirmware platform, and I don't see that changing in the future given the way it's baked into the spec. And PowerNV is a minimal-runtime-services platform where the runtime abstraction (OPAL) calls don't include any sort of way to access disk devices. Do you mean alternative firmware for PowerNV? I've heard people talking on and off about coreboot, but I don't see that becoming mainstream over the petitboot skiroot payload. I don't see the pseries virtualization requirements changing away from OpenFirmware in the future either, given the OpenFirmware requirement has been a constant all the way back to CHRP. > > Yea, we have long since switched our preferred boot on arm to EFI... > though we don't have installer images for 32bit arm, which is this > runs... so it's needed for correctness, but not a practical > difference... > > Warner -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-main@freebsd.org Sun Feb 28 03:18:19 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AA13355ED00 for <dev-commits-src-main@mailman.nyi.freebsd.org>; Sun, 28 Feb 2021 03:18:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) (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 4Dp7rW40lQz4mkS for <dev-commits-src-main@freebsd.org>; Sun, 28 Feb 2021 03:18:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x735.google.com with SMTP id d20so12315409qkc.2 for <dev-commits-src-main@freebsd.org>; Sat, 27 Feb 2021 19:18:19 -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=Knd7khaN2KOrfgbyUES9FOQR4oDyWLqVdv37o4CoTxM=; b=mOMgh3mYdQ8idOctXvO5MLzVIS6CRUNNugi/MNHAONFXHDkxmLQ1QqDB9AYGHKoqed 7axV15/vxRxhqZqoYgPxPAsO6lvxpKXgjE81iIyMnPVnAu7+TU0H2zo11S/Pv983uCDr XxPEbrxDIMSAqjuju9t61IBCv2d+pG6SsXx9ZaIPAYCUW+lFWwIVm6h4EOvlHGHHiLhL E1eGXlvm9Oy5y0cE9jOIYWw7rd94ACxkO5yQlhObjlLsZv2Zq8tJCpSFQc2IOZh4M0rn 8LcYhX/85MZ2JUePYlC7O3qXlDlrNljyNnSYt74EsWYLT9/+o2yEYKGvf2fISLQ7Eg2c L2Mg== 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=Knd7khaN2KOrfgbyUES9FOQR4oDyWLqVdv37o4CoTxM=; b=pg1eaLk/EDqHkh5ksCik41GCdplYNrNPWGhmozwdI2q9n0zONOEaEqZ3Ev65Eapw6m R1I8DKLUSLadnR55JaObC/76d4FuQGgFkkuGbQcHyUiqOhmGb/BDqZ+5XF8nHZFENkLp 5uqC9j/OQ2j6iBlGesMt2aVVZc5HZR5SnJi4bSBls0W8CFZNs8MGh0VawJtJIY+A2Ieu 62+VBv0t4TbOeCpLeHq2YiF4hGKj+nWP0oX6zduBwO8qY1mqwjzFRTUsNEt6hqUThkRz SFjxO0zmKNLeH2R+EGM0WyyE8Bon4KPRXKqv1R+WiB1VKjFxzA+5d+sCxIzqOUx607lF QolQ== X-Gm-Message-State: AOAM532eEAPgiOlk3HZeM0Gr4LJIrPOKipnrjNs5Kx8QrTpFbfgOY3oV 8xVleFOXqLsQvQM6yv7NBPWivfVBdLgu29vDsr+sNg== X-Google-Smtp-Source: ABdhPJyM8HjwK310YcOfE0uiHUGfkgBkI8nuflOtey9eW4Cf8dsd7AeFeOhpgPdneFCLtbVhU3O24utiAEBptpUGWRM= X-Received: by 2002:a37:7f83:: with SMTP id a125mr1987458qkd.44.1614482298728; Sat, 27 Feb 2021 19:18:18 -0800 (PST) MIME-Version: 1.0 References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <01000177d0e7f033-389acb59-2004-4040-ba7c-762878ef86b4-000000@email.amazonses.com> <dba58a1f-5eb0-da87-7d18-d930aa5d422a@freebsd.org> <CANCZdfoL3QFg9NvpkPW8pfVrNvUK-cTPD2ZGbBr2xxh-0dv=eA@mail.gmail.com> <dc61048c-2cfa-0ff5-0470-e93aa5233aae@freebsd.org> <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> <743fd126-2077-49b1-9c85-7ccc61616b98@www.fastmail.com> <460ceb98-e0c1-42b3-8e3c-2587c5ce8398@www.fastmail.com> <F4E1978D-DE96-4082-885F-D6686A5D005C@freebsd.org> <CANCZdfpw1+sjHVPH4zahywMsLHJ1jKWbnd5A3RjGinu=nQFSGA@mail.gmail.com> <a30870ef-00b1-40b6-b378-033d8737c7e4@www.fastmail.com> In-Reply-To: <a30870ef-00b1-40b6-b378-033d8737c7e4@www.fastmail.com> From: Warner Losh <imp@bsdimp.com> Date: Sat, 27 Feb 2021 20:18:06 -0700 Message-ID: <CANCZdfqPNf-RW=-T9qk5a4o-rX3CWFVGz0H_hTav-CqnW9JJ=Q@mail.gmail.com> Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. To: Brandon Bergren <bdragon@freebsd.org> Cc: Jessica Clarke <jrtc27@freebsd.org>, Nathan Whitehorn <nwhitehorn@freebsd.org>, Colin Percival <cperciva@tarsnap.com>, src-committers <src-committers@freebsd.org>, "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>, dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4Dp7rW40lQz4mkS 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 03:18:19 -0000 On Sat, Feb 27, 2021, 8:01 PM Brandon Bergren <bdragon@freebsd.org> wrote: > On Sat, Feb 27, 2021, at 8:39 PM, Warner Losh wrote: > > > 32-bit Arm can boot via EFI. Just mips* and powerpc*. > > > > There was some rumblings of little endian powerpc64 efi, but I don't > > think it's ready... > > I've never heard of such things. PAPR/LoPAPR/LoPAR (pseries) is specified > as an OpenFirmware platform, and I don't see that changing in the future > given the way it's baked into the spec. And PowerNV is a > minimal-runtime-services platform where the runtime abstraction (OPAL) > calls don't include any sort of way to access disk devices. > > Do you mean alternative firmware for PowerNV? I've heard people talking on > and off about coreboot, but I don't see that becoming mainstream over the > petitboot skiroot payload. > > I don't see the pseries virtualization requirements changing away from > OpenFirmware in the future either, given the OpenFirmware requirement has > been a constant all the way back to CHRP. > There was a working group that was defining powerpc bindings that were being worked on. When I went back to find them again I couldn't, so maybe they came to naught... Warner > > > Yea, we have long since switched our preferred boot on arm to EFI... > > though we don't have installer images for 32bit arm, which is this > > runs... so it's needed for correctness, but not a practical > > difference... > > > > Warner > > -- > Brandon Bergren > bdragon@FreeBSD.org > From owner-dev-commits-src-main@freebsd.org Sun Feb 28 07:22:20 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0298A5623F3 for <dev-commits-src-main@mailman.nyi.freebsd.org>; Sun, 28 Feb 2021 07:22:20 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic303-23.consmr.mail.gq1.yahoo.com (sonic303-23.consmr.mail.gq1.yahoo.com [98.137.64.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DpFG251QSz3FC9 for <dev-commits-src-main@freebsd.org>; Sun, 28 Feb 2021 07:22:18 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1614496936; bh=D/9E/v7U8yLINP5oV1RY5nxrZJOUQ3eMARQ52En70cU=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=Xqx8j2i5ArmrQqa4ivfo3ddo8tCiRAsfEsTzuc+EY1hUHRwd0Q/316p1wGH/UxtmRA398/hJa9Os4zrjv9cI0QOz570b8Afkjh8+aikHcgrFYu9Qy5JreRaoCS6UsCOCcFYDmiC7bS+B7dnvnb9ZgFr02FPXWfmtUS//L/6zFjVIpo1NwSJHFUGJqMmEw4cvxgRgZh8geRivfSpyzk103w60QLALVlnI+klfmByoOlErKJIHNzqoNDy3IVHPcscuu6gt+fX56AKXwj48/xieB0ASaWqz7L04jo/U0eMryfM5AxsFibfb2GKYkwVlfipUfpnJaNC9Z7bt8EbKnuTsCg== X-YMail-OSG: yvb6hqEVM1mrVGZb0VhUGwpRaBoXLGQRMdTHmp6jnJhD8MXDV0D8LrGrjDhkr4R .fzTwzHE79T2pKoXQQx7jG4G9414yruQdXtDziIcxX.5A8ofFUFzdik3LU.sN73EXrn0i4ytsXKP DzhRUci7HteD9z1wQGnSTf2NeOJi1wpQbTG4NfOlWf5AjZM1h4Vy7LSfIFAMwn5yILbg6AMwGbyg vmFNaCXiMsAM6V10UfiRrB67tovrR72jb2mnKAt9M2GAsRZ8yE1zZm..I61O2__PXYf6G9Oaib4Y U1TQEeKNSq83IwqaXb12uq86krXUIqLvMedgsGuJ.TNZ5w73HKUMspTNtJsfbHVC9ZRv8xT6qVwZ AO.LpqbuZowxUq0yfCfhXY5NZi6mAay.5FXHOmAhOJ6KpGLr6DdHSPgs66eVlxl7mQmJGrUV4EcV Tm4z_M3gDvAf6.DkGe8TTaz_8JcUZgpYgWZsz_6tpSSY0zcoibmXjb_Jizw.w3Nt1eG2RW4aU4ij 6ZKLr9qtXD38HlGryr2b6cfjz_ue3COD5WdUsk_YgK267xw2uLn5UGmw5H31UoUpj0RWJ9EmAwXE JVIHEMRXLzV3Ddg3l55COIdRWj5bjzg3tIAanKIp.I6PrU9US6rXGoKfdlj.Bpnbqz_tlR5mcKH_ 7EyVAD5DlNvBeJfQfa2cmdiDipkoduvG_rTQ3MJWVaNj460j35RTDCRGddEZBEqA1nfRHQFx.IUP SHQ5xUPgLSIUfcRgsKo8Gs_X6.2whEbM.JxJLiMOcobM0wWqt1LajrQx9QYPgS59ig8dcZlL3F6E cZR8k2GGVF6J9b6bpS.utWAJp_rchbxY.MHFfAHLy33t6eTPmBdrFzq6jSqpA.IGnB.qQS3KfGGb N9Hs92MT_KTEny6nPGExteLB5DidwmNpSc1omskze9zEXLKcM0ZmIA.jQZ2MFciUSiM_wdZNC7UO j5zo3dUjC0sRglRLz3qpsw3q3FJVGssILP3A7K_gMxZuy5wF3boTcX4iJFYdVBZvkgI62YCRfjXH LXjiENpjyD4G1ORTY.NFAA8cG2ZLs537X7jiZIepbtQvathPL3oV90t1IuMsEsL435hjPP0oNY1S MappNaXdVG0SNQseFRQ9aHVsVJqVm6jcuRo7mUMeAprfgaSYvP_In3jyfvNBtD60E.LGnbrOofMr t0F5pNy7yzRgLUbtTyN26len2UOq6EOGPEJNOQrKnyJwouD3328MYYUfGY.VTVjlcaDEoo2CTIBX uwid6yVtuGU0DaqgKdPDXZwwHNemVRjFkjFokFyPQe6giKlZgtek60WAt2qLjH02pvnxeTHzIWjF fkPMNaFgnYNhtptCIa6NzfPEN7MhZxEc7a_NH1fl.ELmgLWyRmvsF4jUEx6jzHiEiL2jz3FEAu4H VK_tyQN0i0u4qdiJh5t3ozoptuhX2REMMs_isLs5ZCb_rmkoUPN78aoXHB1W57zlq.kGrqGNh.rf OTbv5iab8.DTBnM8VtXq88nzGbmzubVMyp54iWjGN35atXTKBE5gx0HfAJUbGDSLM9f8pJXfzVzh lRqSNDXi9DU4Zc86WvoEQRN1MTvAKdqSfJ1GzaS6vZTnj0PZnk.EM9ktyhRlUsyZt8l8J846rXt7 NgbZmjzNfYgpYwz335ECJYpOvjH5D7_qXAYJXdNbqAjGjMzyNEuVZUOu8pwXFucK9JFvNfBMfTOF OwD9pREuagJP6CFcns_6vfc0_45f2kiZCPRYLGRxrtsDA8XTc.Ud85qc4fxtKh.7v7Ehdo8.zxm9 5ToWKvlk.kpR0kEE6Qa_u5ke9jatjpxecZuepreAnpj.dvtwOyevIgSv4VDtvCYMJcEuWqK3ASda Pm6ySmsXewDwog8IlDV4jjaLziLCy8467.XYpWZlnCWt2AN6PlhMA5nbJpz2uuULmL9phCu_6ZDx vBpJAliWj1U9pxJNvAIFb4i05RBf_yeqPI8D5GF2fCLyQ2snUkrE1JiJ6XNjaG1kII4bKoAwcelk HO_ubz5Njo0ZehCDKXFPFI65AeBQ9qkl5nzjj96d8F0xsnD9w8GCRshjtKsW_NMsEnzQgFa3Tmq7 F2AdP7wIfwwySpvKDiyCEMRxNtjUXCvJEgi8kbMtTChJWxeyPgHoLOt6zZVlFpPF2d05Eix5RqgC xPeAjvtK758I1oyImiLHaTYQ7aDhDfaQkAsiqA2mUJr.aLzVUnDdagDxCIqnKqwTMwJx79LIask5 kmUxnXoEG30UnYohZcPJZBJaf80Njy_Y5qgpKi0XocH2.aiivaaEqUMtmd.XhJIV.28YgTPBYoK9 _urklF38gqCb1nn1Kh6GhqNDKrJ4jBmt_2malZ4gVRpkQqdP3YZ78PB4Co64nFuxrWM6hNP6Qall Oa0XaTu31GFFsDgA1hRl8pvKdoLAifx_81ZnCY2H7S0nyXYhIiPsSKgxqJ.bKCaUkX08NyEjcsUf ZbT6EQUijlNDgAZWCfRI_D8gQpkNHb1sNUsvYAE8WwBXQiyd2bl2L_wZfn9VdkRjnv.YzXcZvxTC N9bAVwe248bKTQLxaGLlBHfdxwAlO4JYKrilrvMZaxAMjuEzbBpfi_Q-- X-Sonic-MF: <marklmi@yahoo.com> Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.gq1.yahoo.com with HTTP; Sun, 28 Feb 2021 07:22:16 +0000 Received: by smtp419.mail.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 82d020527eae6ad08dfdee68284a3909; Sun, 28 Feb 2021 07:22:12 +0000 (UTC) From: Mark Millard <marklmi@yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. Message-Id: <236B48F1-FF66-4DC0-A19A-E4EE4B3091D1@yahoo.com> Date: Sat, 27 Feb 2021 23:22:11 -0800 To: jrtc27@freebsd.org, dev-commits-src-main@freebsd.org X-Mailer: Apple Mail (2.3654.60.0.2.21) References: <236B48F1-FF66-4DC0-A19A-E4EE4B3091D1.ref@yahoo.com> X-Rspamd-Queue-Id: 4DpFG251QSz3FC9 X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.50 / 15.00]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; TO_DN_NONE(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RBL_DBL_DONT_QUERY_IPS(0.00)[98.137.64.204:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[98.137.64.204:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.204:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.204:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 07:22:20 -0000 Jessica Clarke jrtc27 at freebsd.org wrote on Sun Feb 28 01:25:47 UTC 2021 : > On 28 Feb 2021, at 01:22, Brandon Bergren <bdragon at FreeBSD.org> = wrote: > >=20 > > On Sat, Feb 27, 2021, at 7:10 PM, Brandon Bergren wrote: > >> This is mistakenly detecting pseries powerpc64* as an EFI platform = and=20 > >> causing install to error out. Please add back the uname checks so = this=20 > >> code doesn't run on powerpc*. > >=20 > > Specifically, the /boot/efi stuff in = usr.sbin/bsdinstall/scripts/bootconfig should not run on mips / 32 bit = ARM / powerpc* systems. I believe /boot/efi is always created so it = can't be used to infer existence of EFI. >=20 > 32-bit Arm can boot via EFI. Just mips* and powerpc*. So far as I know, those 32-bit arm systems using sysutils/u-boot-* ports that, in turn, are using boot.scr and ublr.bin are not using EFI. Are there problems for any of the following contexts? /usr/ports/sysutils/u-boot-a13-olinuxino/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-bananapi/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-bananapim2/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-beaglebone/pkg-descr: * A boot.scr (U-Boot = scripts ) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-chip/pkg-descr: * A boot.scr (U-Boot script) = that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-cubieboard/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-cubieboard2/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-duovero/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-nanopi-m1plus/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-nanopi-neo-air/pkg-descr: * A boot.scr = (U-Boot script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-nanopi-neo/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-olimex-a20-som-evb/pkg-descr: * A boot.scr = (U-Boot script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-olinuxino-lime/pkg-descr: * A boot.scr = (U-Boot script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-olinuxino-lime2-emmc/pkg-descr: * A boot.scr = (U-Boot script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-olinuxino-lime2/pkg-descr: * A boot.scr = (U-Boot script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-orangepi-one/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-orangepi-pc-plus/pkg-descr: * A boot.scr = (U-Boot script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-orangepi-pc/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-orangepi-plus-2e/pkg-descr: * A boot.scr = (U-Boot script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-orangepi-zero/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-pandaboard/pkg-descr: * A boot.scr (U-Boot = scripts ) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-pcduino3/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-riotboard/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-rpi-0-w/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included /usr/ports/sysutils/u-boot-sinovoip-bpi-m3/pkg-descr: * A boot.scr = (U-Boot script) that loads ubldr.bin and execute it is included =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-dev-commits-src-main@freebsd.org Sun Feb 28 10:13:10 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E917D5669F0 for <dev-commits-src-main@mailman.nyi.freebsd.org>; Sun, 28 Feb 2021 10:13:10 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic303-24.consmr.mail.gq1.yahoo.com (sonic303-24.consmr.mail.gq1.yahoo.com [98.137.64.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DpK395wmZz3PXr for <dev-commits-src-main@freebsd.org>; Sun, 28 Feb 2021 10:13:09 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1614507187; bh=P8n6Nuacf+frC/AtMOq/RcHjPoZcLWBNFYeBVz4IY5m=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=SigbjAeGzMKGQpE6/CZYTd9J8dtffmngUbzN2RblNj5lT84gQTEFH/8I+lNjGI8VCQKGpzY7O/WLFQbgyBOlJnU5/zLCGHDE5pzt8k/GCilzY4YbJeWf/f1Amu0knZXuer1wcBl6X58cmkC0yY58F/T85mffpez2brftOiCZ95traaYbR76dUoX7FbLVgdw87ZoroRzIpQBmtxp2+N8hv+oABgAJoRqQR/z7PcaJRQRT/3sfOp0FX9KRAI0tNtZejm8yaEBEyHdIo+uBqvB76IOWfbmRVyoyYOs+wX6G7XpIhEz9A9QqFTdT7Ww2M3zf91uIEd4dHLhsBfD3LKvH6g== X-YMail-OSG: ra4n2kcVM1kBQbrvFtZH79.Awijly3Z1FD641llDeTzkrRrL0Yd1f5AOEWMjORv 7nseL30C9lQVH41VPYmrDVWjAOuE36uydGEgWFsXVVEA_kTjxWI5Nq9bmm4ejxF.s7GLWmQV2jmH DQ.zJa5gLm1o_bVHSsMMfe4cy_.LkypkNtXLkrN.LIOUSfB64qDx10e6jIco4tPPyxngGNjGMib3 LS7.sA11zKAXg30Lk1tDaQEBxYWYEChmBKBUH_f0_HZeBvQy_VLUp6wz5JghMDnuI_y._eJ5ixxu 0Kb_htRKGkMyvky8UYZm16UzvOAVqDEPKAa2FD3tcPlUU4iuV_ISYrsSnNoNEOvRrpT.Gfhuc_1m F60dhN8s554YIyY9O29nGkcPEfJz5AUsW7.An7kB0m8EIZQByS9WKiziZOou1Uc.1BiCoguJxZKv h3xyv3QPBIW55Rkh5c4i0qAkPa_6HBBVHAhXT5FFsoLj3w9y13hcqYC9cVyQWP0jArxuoE1NdjSz .0w1neMFN1Ia5isTU9TIzO24rkldOrxTh5P0S0lRoWQLYHadtTMAtRyXGstiYDmagkRDNGCEmm21 3fXunTQ..J_fiNPHXfym15YTBwB9shDVM_ZRTi4oOKiHJoTzSd9BolCfDwmMurWy.UBRF_j6fu4J Rbp2AC9K.up3_sMyO_CwjWL84HYQOeGNjUcdNicOfWP3nWBjN7bmwvV6o1OD63BTEYguCfv8.5O4 99YGogp_.agm3thjCojx2MRyB2sPAP8Xm1ZRS.CXiYUgK1gev_cYIY3IP6v23Rg045ksZX3aH7Bf 50MSdsQfcp5zKhp_cOG_lZzhM9GTk_F0GrWoZlS35OtN_NaTKfjDGS4Ft0hmlA._FyF4hcG9JxLI PEF1xocIsuQjwKtvnZyHU6aSaswdnx4Hh5WEJyD2v2fATua3VLyi4RTwKtPmnO517neZV7us9nl5 9XXMPoWMWkWGR5tqWgOBw81wFOG8nBsBLkThIWV_naArhalsPdptrdnnfUp2zAP0r5plYyAaalOH XawJbzN7hJXK5AZsb8peYxmVCpBWUwcsug8ta2ZWF0XzN4i_QPwN7yswnjWK0ZKMTbe3VDHjyBXo uGbtv57XQCsihjPoAKZo_yA4o5dDixYEigRVwQ8q4gSKkNJVFma04wRBtjyVooxamJ8qOFCwbjBY KFnXhhyMg.rqPIhqTMfg3Rj2q5y.BFQaKh.OohaUxRBr6bsVjKzrW12jbiTFfWrxpmh5am3cyvL9 j7fKo41ueHTV_dwdRBA.xwly99XwdH6tvcanOhBwCBOdOT15oqH5HZKFvBGGNvbCCzy8Li.TwQuf Dq5bbpZn5VC6agVP_mzigUh7O8zaTkRHYVRGtcTgU454yMkS3YpzOPg0uypPOULePiEKPcnScZF6 SlONFrKeSEDvdjnENuZ6_9uubUxvsjv_XwDj.Pb_bfu9JUuccxOh1aIwKsIqds33.Ux67hR1GRut dIOTDXl0wpSw3UFAB_9Sy8JWBy7JdcR8DI5xjBfUzeSmzI1pmp_UXdTdOWvkKt7kDLvLyIpF1.92 eZIMGSTZiccydAsTZH5mFciaqGAn5QFGPTqM9kXmqrIiNGtd3LhtedINfP4B8wcGtB6q6zhn8hXK wUey6DJycrMb4ZDPbipDds74_8lmw9hvLDNcFpb6pN6pI5cDjosyNudsdZUN5aqRyd1ApMJAgW35 0Dzu.ZbPMzeTQm_K3J_Jp2xDMsgAMbpryiyIVRt8J10YWSUjXIcjI1rIN5gMLqq.WEqKKnaEail8 uL7VLRe43CMUwRBAGdNcmvDcQYBRv64C7vtuNbi8peLBVnDUC7sjSZlrMefSOSihVO4JANImPQzd K3MZ_Eu5uENAj7vfY2obzu_O2JgzXHMYzySJvy1S8ySq_Bct7AjITNw6alDPtWD.8cS_1aiWyKEq 77SUEx15Duc41kIsrnZvZTxEbQXc1CY2Qao_hb4KQ.W0YN0yfv2XvnnY3MX4XYzfO_JxvkRGLS3b Q9T5409miFpVZp9UrNwzs99HTsbsSJ3DrTdj72_8JnZh9n0SnIugij50KJwkDs1S9HQeAI9ZSsR_ hyGJwLEs_PtkbuePtSnwmWEU.MjA7uZfOOmiNO7UaxAct6gffD9qfrpMhSbfdSfvz2vrNRK5ZHfC .aKPaKWbUVjL2XZzLiN2H3I0FQ792rMc.WyxrzmeaTHhPCXRFFZwTcuuKvXQJJDmBmduJUv5ufwY _JeXTnMQk36l8lwHN5pTqtO81QIMmjKTIdawTfFN1Tb1JEqw12eCJ9blhD3Orzf6aMtTvjCyGL1r 12Rc0fArwr_FlVKJ6Nsqf09Dv3VxRdVIvp0mGSADNIWqVbTzPHYLqKPpudh7ZTEzdj.PG9GNu9Wf pbiRTZHSNm_wK_Q86BDUI3v.8GK4bN4W99YAK2z_nkciY1QF1APgewcL5Wp0YExLgNInJ.A3rlDe fkBcSOgaivxazZZY99bheRh0vrPhjq8ywlT4LUAeX4dwEwhhyicspVHxke3LPaTMtpU_Ln43q_Jc ItAj2q8gKj8z_7pnmczhp1Xx8PL8frFB41qdMvECBfly8AWtk3SKKIw-- X-Sonic-MF: <marklmi@yahoo.com> Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.gq1.yahoo.com with HTTP; Sun, 28 Feb 2021 10:13:07 +0000 Received: by smtp410.mail.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 2d46f0caedd3dabefe3e557f7cfac911; Sun, 28 Feb 2021 10:13:06 +0000 (UTC) From: Mark Millard <marklmi@yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. Date: Sun, 28 Feb 2021 02:13:04 -0800 References: <236B48F1-FF66-4DC0-A19A-E4EE4B3091D1@yahoo.com> To: jrtc27@freebsd.org, dev-commits-src-main@freebsd.org In-Reply-To: <236B48F1-FF66-4DC0-A19A-E4EE4B3091D1@yahoo.com> Message-Id: <9F123188-69F7-4922-8A9A-6047AECF0556@yahoo.com> X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4DpK395wmZz3PXr X-Spamd-Bar: - X-Spamd-Result: default: False [-1.50 / 15.00]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; TO_DN_NONE(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[98.137.64.205:from]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(1.00)[0.999]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[98.137.64.205:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.205:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.205:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 10:13:11 -0000 On 2021-Feb-27, at 23:22, Mark Millard <marklmi at yahoo.com> wrote: > Jessica Clarke jrtc27 at freebsd.org wrote on > Sun Feb 28 01:25:47 UTC 2021 : >=20 >> On 28 Feb 2021, at 01:22, Brandon Bergren <bdragon at FreeBSD.org> = wrote: >>>=20 >>> On Sat, Feb 27, 2021, at 7:10 PM, Brandon Bergren wrote: >>>> This is mistakenly detecting pseries powerpc64* as an EFI platform = and=20 >>>> causing install to error out. Please add back the uname checks so = this=20 >>>> code doesn't run on powerpc*. >>>=20 >>> Specifically, the /boot/efi stuff in = usr.sbin/bsdinstall/scripts/bootconfig should not run on mips / 32 bit = ARM / powerpc* systems. I believe /boot/efi is always created so it = can't be used to infer existence of EFI. >>=20 >> 32-bit Arm can boot via EFI. Just mips* and powerpc*. >=20 >=20 > So far as I know, those 32-bit arm systems using sysutils/u-boot-* > ports that, in turn, are using boot.scr and ublr.bin are not using > EFI. Are there problems for any of the following contexts? >=20 > /usr/ports/sysutils/u-boot-a13-olinuxino/pkg-descr: * A boot.scr = (U-Boot script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-bananapi/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-bananapim2/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-beaglebone/pkg-descr: * A boot.scr (U-Boot = scripts ) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-chip/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-cubieboard/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-cubieboard2/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-duovero/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-nanopi-m1plus/pkg-descr: * A boot.scr = (U-Boot script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-nanopi-neo-air/pkg-descr: * A boot.scr = (U-Boot script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-nanopi-neo/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-olimex-a20-som-evb/pkg-descr: * A boot.scr = (U-Boot script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-olinuxino-lime/pkg-descr: * A boot.scr = (U-Boot script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-olinuxino-lime2-emmc/pkg-descr: * A = boot.scr (U-Boot script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-olinuxino-lime2/pkg-descr: * A boot.scr = (U-Boot script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-orangepi-one/pkg-descr: * A boot.scr = (U-Boot script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-orangepi-pc-plus/pkg-descr: * A boot.scr = (U-Boot script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-orangepi-pc/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-orangepi-plus-2e/pkg-descr: * A boot.scr = (U-Boot script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-orangepi-zero/pkg-descr: * A boot.scr = (U-Boot script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-pandaboard/pkg-descr: * A boot.scr (U-Boot = scripts ) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-pcduino3/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-riotboard/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-rpi-0-w/pkg-descr: * A boot.scr (U-Boot = script) that loads ubldr.bin and execute it is included > /usr/ports/sysutils/u-boot-sinovoip-bpi-m3/pkg-descr: * A boot.scr = (U-Boot script) that loads ubldr.bin and execute it is included (I became curious and so looked around some more at the modern context.) I suppose a more direct note is that FreeBSD-13.0-BETA4-arm-armv7-GENERICSD.img put on a microsd card looks like: # gpart show -p /dev/mmcsd1 =3D> 63 62333889 mmcsd1 MBR (30G) 63 2016 - free - (1.0M) 2079 102312 mmcsd1s1 fat32lba [active] (50M) 104391 6187041 mmcsd1s2 freebsd (3.0G) 6291432 56042520 - free - (27G) # ls -Tld /mnt/* drwxr-xr-x 1 root wheel 4096 Feb 26 01:06:32 2021 /mnt/EFI -rwxr-xr-x 1 root wheel 103488 Feb 25 21:59:06 2021 /mnt/MLO -rwxr-xr-x 1 root wheel 26533 Feb 1 03:42:56 2021 = /mnt/bcm2709-rpi-2-b.dtb -rwxr-xr-x 1 root wheel 52456 Feb 1 03:42:56 2021 = /mnt/bootcode.bin -rwxr-xr-x 1 root wheel 89 Feb 25 22:12:10 2021 /mnt/config.txt drwxr-xr-x 1 root wheel 8192 Feb 26 01:06:32 2021 /mnt/dtb -rwxr-xr-x 1 root wheel 7302 Feb 1 03:42:56 2021 /mnt/fixup.dat -rwxr-xr-x 1 root wheel 3179 Feb 1 03:42:56 2021 = /mnt/fixup_cd.dat -rwxr-xr-x 1 root wheel 10291 Feb 1 03:42:56 2021 = /mnt/fixup_db.dat -rwxr-xr-x 1 root wheel 10289 Feb 1 03:42:56 2021 /mnt/fixup_x.dat drwxr-xr-x 1 root wheel 4096 Feb 26 01:06:36 2021 /mnt/overlays -rwxr-xr-x 1 root wheel 2951392 Feb 1 03:42:56 2021 /mnt/start.elf -rwxr-xr-x 1 root wheel 791996 Feb 1 03:42:56 2021 = /mnt/start_cd.elf -rwxr-xr-x 1 root wheel 4792808 Feb 1 03:42:56 2021 = /mnt/start_db.elf -rwxr-xr-x 1 root wheel 3703208 Feb 1 03:42:56 2021 /mnt/start_x.elf -rwxr-xr-x 1 root wheel 467824 Feb 25 22:11:32 2021 /mnt/u-boot.bin -rwxr-xr-x 1 root wheel 716804 Feb 25 21:59:06 2021 /mnt/u-boot.img -r-xr-xr-x 1 root wheel 462412 Feb 26 01:00:54 2021 /mnt/ubldr.bin # find /mnt/EFI/ -print /mnt/EFI/ /mnt/EFI/BOOT /mnt/EFI/BOOT/bootarm.efi (Nothing for efi/boot/startup.nsh . Also a capitalization style difference vs. what I see on the OverDrive 1000 and MACCHIATOBin Double Shot that I have in use [ efi/boot/BOOTaa64.efi ].) So it looks like EFI/BOOT/bootarm.efi exists even when it is not used, when the context is based on a release or snapshot GENERICSD for armv7. (I've not identified an armv7 EFI/BOOT/bootarm.efi use but there may well be some for all I know.) The above also points out u-boot.bin and u-boot.img contexts, as well as the boot.scr / ubldr.bin ones. When one of these are used, EFI/BOOT/bootarm.efi is not used, even when present. As for aarch64 . . . Looking at FreeBSD-13.0-BETA4-arm64-aarch64-mini-memstick.img shows (when expanded to a microsd card): # gpart show -p /dev/mmcsd1 =3D> 3 679832 mmcsd1 GPT (30G) [CORRUPT] 3 66584 mmcsd1p1 efi (33M) 66587 613248 mmcsd1p2 freebsd-ufs (299M) # find /mnt/ -print /mnt/ /mnt/EFI /mnt/EFI/BOOT /mnt/EFI/BOOT/bootaa64.efi (Again: capitalization and startup.nsh differences compared to what I see on the OverDrive 1000 and MACCHIATObin Double Shot.) RPI, PINE64, PINE64-LTS, ROCK64, and ROCKPRO64 have images for aarch64. Looking at RPI: # gpart show -p /dev/mmcsd1 =3D> 63 62333889 mmcsd1 MBR (30G) 63 2016 - free - (1.0M) 2079 102312 mmcsd1s1 fat32lba [active] (50M) 104391 6187041 mmcsd1s2 freebsd (3.0G) 6291432 56042520 - free - (27G) So, not GPT. # find /mnt/ -print /mnt/ /mnt/EFI /mnt/EFI/BOOT /mnt/EFI/BOOT/bootaa64.efi /mnt/dtb . . . (dtb substructure omitted) . . . /mnt/README /mnt/u-boot.bin /mnt/armstub8.bin /mnt/armstub8-gic.bin /mnt/bootcode.bin /mnt/fixup_cd.dat /mnt/fixup_db.dat /mnt/fixup_x.dat /mnt/fixup.dat /mnt/LICENCE.broadcom /mnt/start_cd.elf /mnt/start_db.elf /mnt/start_x.elf /mnt/start.elf /mnt/fixup4.dat /mnt/fixup4cd.dat /mnt/fixup4db.dat /mnt/fixup4x.dat /mnt/start4.elf /mnt/start4cd.elf /mnt/start4db.elf /mnt/start4x.elf /mnt/bcm2710-rpi-2-b.dtb /mnt/bcm2710-rpi-3-b.dtb /mnt/bcm2710-rpi-3-b-plus.dtb /mnt/bcm2711-rpi-4-b.dtb /mnt/config.txt /mnt/overlays /mnt/overlays/mmc.dtbo /mnt/overlays/pwm.dtbo /mnt/overlays/disable-bt.dtbo # more /mnt/config.txt=20 [all] arm_64bit=3D1 dtparam=3Daudio=3Don,i2c_arm=3Don,spi=3Don dtoverlay=3Dmmc dtoverlay=3Ddisable-bt device_tree_address=3D0x4000 kernel=3Du-boot.bin [pi4] hdmi_safe=3D1 armstub=3Darmstub8-gic.bin So it has EFI/BOOT/bootaa64.efi but is a u-boot.bin context in operation: bootaa64.efi is unused unless changes are made. By contrast, ROCK64 does use GPT and has just: # find /mnt/ -print /mnt/ /mnt/EFI /mnt/EFI/BOOT /mnt/EFI/BOOT/bootaa64.efi /mnt/dtb . . . (dtb substructure omitted) . . . (spans more than ROCK64) and EFI/BOOT/bootaa64.efi is used. (I'll not look at the other 3 --or at riscv64 or the like.) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-dev-commits-src-main@freebsd.org Sun Feb 28 14:08:38 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CE5ED56C39C; Sun, 28 Feb 2021 14:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DpQGt5Vmkz3sfh; Sun, 28 Feb 2021 14:08: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 ABC2311F91; Sun, 28 Feb 2021 14:08: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 11SE8csR042527; Sun, 28 Feb 2021 14:08:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11SE8cjY042526; Sun, 28 Feb 2021 14:08:38 GMT (envelope-from git) Date: Sun, 28 Feb 2021 14:08:38 GMT Message-Id: <202102281408.11SE8cjY042526@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin <mav@FreeBSD.org> Subject: git: d01032736cf0 - main - Fix diroffdiroff, probably copy/paste bug. 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: d01032736cf067d63e66d6428ffc08e47652600f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 14:08:38 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=d01032736cf067d63e66d6428ffc08e47652600f commit d01032736cf067d63e66d6428ffc08e47652600f Author: Alexander Motin <mav@FreeBSD.org> AuthorDate: 2021-02-28 14:07:13 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2021-02-28 14:08:31 +0000 Fix diroffdiroff, probably copy/paste bug. Too long name looks bad in `vmstat -m`. MFC after: 1 week --- sys/fs/nfs/nfs_commonport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c index a7ce2d4bd015..47038980c640 100644 --- a/sys/fs/nfs/nfs_commonport.c +++ b/sys/fs/nfs/nfs_commonport.c @@ -123,7 +123,7 @@ MALLOC_DEFINE(M_NEWNFSCLLOCKOWNER, "NFSCL lckown", "NFSCL Lock Owner"); MALLOC_DEFINE(M_NEWNFSCLLOCK, "NFSCL lck", "NFSCL Lock"); MALLOC_DEFINE(M_NEWNFSV4NODE, "NEWNFSnode", "NFS vnode"); MALLOC_DEFINE(M_NEWNFSDIRECTIO, "NEWdirectio", "NFS Direct IO buffer"); -MALLOC_DEFINE(M_NEWNFSDIROFF, "NFSCL diroffdiroff", +MALLOC_DEFINE(M_NEWNFSDIROFF, "NFSCL diroff", "NFS directory offset data"); MALLOC_DEFINE(M_NEWNFSDROLLBACK, "NFSD rollback", "NFS local lock rollback"); From owner-dev-commits-src-main@freebsd.org Sun Feb 28 15:14:52 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E16B956DEB7; Sun, 28 Feb 2021 15:14: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DpRlJ63Fjz4RWc; Sun, 28 Feb 2021 15:14: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 BE94A12F80; Sun, 28 Feb 2021 15:14: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 11SFEq4d034209; Sun, 28 Feb 2021 15:14:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11SFEqC8034208; Sun, 28 Feb 2021 15:14:52 GMT (envelope-from git) Date: Sun, 28 Feb 2021 15:14:52 GMT Message-Id: <202102281514.11SFEqC8034208@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger <rscheff@FreeBSD.org> Subject: git: e9071000c9a0 - main - Improve PRR initial transmission timing MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e9071000c9a04e3f685579500e24da9848944bb1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 15:14:52 -0000 The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=e9071000c9a04e3f685579500e24da9848944bb1 commit e9071000c9a04e3f685579500e24da9848944bb1 Author: Richard Scheffenegger <rscheff@FreeBSD.org> AuthorDate: 2021-02-28 14:46:38 +0000 Commit: Richard Scheffenegger <rscheff@FreeBSD.org> CommitDate: 2021-02-28 14:46:54 +0000 Improve PRR initial transmission timing Reviewed By: tuexen, #transport MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28953 --- sys/netinet/tcp_input.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 7b0987eed358..d802bc8f47ae 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2589,7 +2589,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, pipe = (tp->snd_nxt - tp->snd_fack) + tp->sackhint.sack_bytes_rexmit; tp->sackhint.prr_delivered += del_data; - if (pipe > tp->snd_ssthresh) { + if (pipe >= tp->snd_ssthresh) { if (tp->sackhint.recover_fs == 0) tp->sackhint.recover_fs = imax(1, tp->snd_nxt - tp->snd_una); @@ -2689,7 +2689,8 @@ enter_recovery: * snd_ssthresh is already updated by * cc_cong_signal. */ - tp->sackhint.prr_delivered = 0; + tp->sackhint.prr_delivered = + tp->sackhint.sacked_bytes; tp->sackhint.sack_bytes_rexmit = 0; tp->sackhint.recover_fs = max(1, tp->snd_nxt - tp->snd_una); @@ -3964,7 +3965,7 @@ tcp_prr_partialack(struct tcpcb *tp, struct tcphdr *th) /* * Proportional Rate Reduction */ - if (pipe > tp->snd_ssthresh) { + if (pipe >= tp->snd_ssthresh) { if (tp->sackhint.recover_fs == 0) tp->sackhint.recover_fs = imax(1, tp->snd_nxt - tp->snd_una); From owner-dev-commits-src-main@freebsd.org Sun Feb 28 16:48:38 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 704CF538398 for <dev-commits-src-main@mailman.nyi.freebsd.org>; Sun, 28 Feb 2021 16:48:38 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) (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 4DpTqV2HTTz4Xjc for <dev-commits-src-main@freebsd.org>; Sun, 28 Feb 2021 16:48:38 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: by mail-yb1-xb2b.google.com with SMTP id c131so14396467ybf.7 for <dev-commits-src-main@freebsd.org>; Sun, 28 Feb 2021 08:48:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=noz9imA/pb+7uFn8w3HZLM/YX9oXcwUkr/F2X8HSQfM=; b=JwX4WG1evI4j91Nvn4h22KRQcSQEDTXuUu2kBFVP6BSh3ELOs3vC+gqpUeXB4ZYDuc 0cGMuS5x6HZurzJpW3duXiTDvHn8DqEvreaTX1Oz/vYTS7Ja+FPs1m9zbxisgr4hOFLW cj4EI5P2a3cGiyne0u4gPoezL2gWtKoNmJysM= 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=noz9imA/pb+7uFn8w3HZLM/YX9oXcwUkr/F2X8HSQfM=; b=iigmOlnFveHTQhGE8z1Ig88W8TPgMcKIhf3AaNhh+IcThWlqqNIJQIzOVSfBXx4QQM aZ8a4G0tRunDIhfS/+NO97wd6Fblixl/g70rHmUp2qEQE45yKfi0kL16jUc4tf9NITlC 20KirTm2Un+Z7wcAULqDHGynWunfR6nxPQDNaeObzcwtvVECX30MLhDn3mbQO7iH6Lmw PiYyXMZAJU2EpZlCz5MhruubQ8qNiSM2XmYIT4LcogRKMzwCyQKfE7wkgZgj7tQ0iXHN LlIcEYZwouUhqV/ZnYepWITLz9YYUuNncR8jQXA8ymxf6RFGVOHY+t9mw/ZgxMKoqCFN DTjQ== X-Gm-Message-State: AOAM530VXBtR7dcnZ2f46ZFtSLzOe7LdxNklsw6poENEgzRuRK2u4BC8 SLgFEMUpbnTHJji4SEZ+1/+BdGgh4n6VGQVCGIkhNA== X-Google-Smtp-Source: ABdhPJxNi/0ySHZYTKIKgwI5CCeIJrSWz0+zTBwL/kl4wWJMuCaoPEm7weVHqd1vXkAoSamElQ/yPycJIMYfYY8bUNg= X-Received: by 2002:a25:818b:: with SMTP id p11mr18933488ybk.330.1614530917144; Sun, 28 Feb 2021 08:48:37 -0800 (PST) MIME-Version: 1.0 References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <01000177d0e7f033-389acb59-2004-4040-ba7c-762878ef86b4-000000@email.amazonses.com> <dba58a1f-5eb0-da87-7d18-d930aa5d422a@freebsd.org> <CANCZdfoL3QFg9NvpkPW8pfVrNvUK-cTPD2ZGbBr2xxh-0dv=eA@mail.gmail.com> <dc61048c-2cfa-0ff5-0470-e93aa5233aae@freebsd.org> <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> <743fd126-2077-49b1-9c85-7ccc61616b98@www.fastmail.com> <460ceb98-e0c1-42b3-8e3c-2587c5ce8398@www.fastmail.com> <F4E1978D-DE96-4082-885F-D6686A5D005C@freebsd.org> <CANCZdfpw1+sjHVPH4zahywMsLHJ1jKWbnd5A3RjGinu=nQFSGA@mail.gmail.com> <a30870ef-00b1-40b6-b378-033d8737c7e4@www.fastmail.com> <CANCZdfqPNf-RW=-T9qk5a4o-rX3CWFVGz0H_hTav-CqnW9JJ=Q@mail.gmail.com> In-Reply-To: <CANCZdfqPNf-RW=-T9qk5a4o-rX3CWFVGz0H_hTav-CqnW9JJ=Q@mail.gmail.com> From: Kevin Bowling <kevin.bowling@kev009.com> Date: Sun, 28 Feb 2021 09:48:25 -0700 Message-ID: <CAK7dMtD9k5FscvG754tLO6ZeTm5+ru87F06O8+H3bVJqVjf9iQ@mail.gmail.com> Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. To: Warner Losh <imp@bsdimp.com>, Brandon Bergren <bdragon@freebsd.org> Cc: Jessica Clarke <jrtc27@freebsd.org>, Nathan Whitehorn <nwhitehorn@freebsd.org>, Colin Percival <cperciva@tarsnap.com>, src-committers <src-committers@freebsd.org>, "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DpTqV2HTTz4Xjc 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 16:48:38 -0000 This got me interested because I did recall something like Warner mentioned. It seems like some of the folks that used to be at OzLabs did it as a PoC https://www.flamingspork.com/blog/2015/10/20/tianocore-uefi-ported-to-openpower/. One of the exciting things about OpenPower was that everything above the gates was open in a way only RISC-V seems a chance of repeating any time soon. There are no practical limits to the firmware and runtime service; if you haven't seen this you both might enjoy it https://www.flamingspork.com/blog/2016/10/30/windows-nt4-for-powerpc-guest-on-opal-on-power8-in-qemu/. Practically speaking, with Petitboot (which FreeBSD on PowerNV uses) there isn't much point to go to something like UEFI. It's literally Unix vs DOS-like. The primary targets are Raptor POWER9 hardware and LoPAPR/LoPAR VMs (kvm, PowerVM) and I don't see any near term indication of the ISA expanding to new platforms that would concern FreeBSD. Regards, Kevin On Sat, Feb 27, 2021 at 8:18 PM Warner Losh <imp@bsdimp.com> wrote: > > On Sat, Feb 27, 2021, 8:01 PM Brandon Bergren <bdragon@freebsd.org> wrote: > > > On Sat, Feb 27, 2021, at 8:39 PM, Warner Losh wrote: > > > > 32-bit Arm can boot via EFI. Just mips* and powerpc*. > > > > > > There was some rumblings of little endian powerpc64 efi, but I don't > > > think it's ready... > > > > I've never heard of such things. PAPR/LoPAPR/LoPAR (pseries) is specified > > as an OpenFirmware platform, and I don't see that changing in the future > > given the way it's baked into the spec. And PowerNV is a > > minimal-runtime-services platform where the runtime abstraction (OPAL) > > calls don't include any sort of way to access disk devices. > > > > Do you mean alternative firmware for PowerNV? I've heard people talking on > > and off about coreboot, but I don't see that becoming mainstream over the > > petitboot skiroot payload. > > > > I don't see the pseries virtualization requirements changing away from > > OpenFirmware in the future either, given the OpenFirmware requirement has > > been a constant all the way back to CHRP. > > > > > There was a working group that was defining powerpc bindings that were > being worked on. When I went back to find them again I couldn't, so maybe > they came to naught... > > Warner > > > > > > Yea, we have long since switched our preferred boot on arm to EFI... > > > though we don't have installer images for 32bit arm, which is this > > > runs... so it's needed for correctness, but not a practical > > > difference... > > > > > > Warner > > > > -- > > Brandon Bergren > > bdragon@FreeBSD.org > > > _______________________________________________ > dev-commits-src-main@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main > To unsubscribe, send any mail to "dev-commits-src-main-unsubscribe@freebsd.org" From owner-dev-commits-src-main@freebsd.org Sun Feb 28 19:37:10 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EDFD253FA83; Sun, 28 Feb 2021 19:37: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DpYYy6PQWz4nG4; Sun, 28 Feb 2021 19:37: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 CA2811668C; Sun, 28 Feb 2021 19:37: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 11SJbA2u076330; Sun, 28 Feb 2021 19:37:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11SJbANM076329; Sun, 28 Feb 2021 19:37:10 GMT (envelope-from git) Date: Sun, 28 Feb 2021 19:37:10 GMT Message-Id: <202102281937.11SJbANM076329@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" <bz@FreeBSD.org> Subject: git: a9cc796fa73d - main - net80211: rx_stats add 160Mhz channel width. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a9cc796fa73de2e80a2d989ba7c2c5a7c7ce9f2e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 19:37:11 -0000 The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a9cc796fa73de2e80a2d989ba7c2c5a7c7ce9f2e commit a9cc796fa73de2e80a2d989ba7c2c5a7c7ce9f2e Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2021-02-28 19:24:22 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2021-02-28 19:24:22 +0000 net80211: rx_stats add 160Mhz channel width. Add the missing receive stat(u)s flag for 160Mhz channel width. While here correct the comment for c_phytype to reference the correct flags. MFC-after: 3 days Sponsored-by: Rubicon Communications, LLC ("Netgate") --- sys/net80211/_ieee80211.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/net80211/_ieee80211.h b/sys/net80211/_ieee80211.h index 928d7b0fd957..dc6773afac09 100644 --- a/sys/net80211/_ieee80211.h +++ b/sys/net80211/_ieee80211.h @@ -580,6 +580,7 @@ struct ieee80211_mimo_info { #define IEEE80211_RX_FW_20MHZ 1 #define IEEE80211_RX_FW_40MHZ 2 #define IEEE80211_RX_FW_80MHZ 3 +#define IEEE80211_RX_FW_160MHZ 4 /* PHY type */ #define IEEE80211_RX_FP_11B 1 @@ -619,7 +620,7 @@ struct ieee80211_rx_stats { } evm; /* 32 bits */ - uint8_t c_phytype; /* PHY type, FP flags above */ + uint8_t c_phytype; /* PHY type, FW flags above */ uint8_t c_vhtnss; /* VHT - number of spatial streams */ uint8_t c_pad2[2]; }; From owner-dev-commits-src-main@freebsd.org Sun Feb 28 20:09:00 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 03637548071; Sun, 28 Feb 2021 20:09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DpZGg6hTtz4psm; Sun, 28 Feb 2021 20:08: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 D897E169E8; Sun, 28 Feb 2021 20:08: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 11SK8x9h016801; Sun, 28 Feb 2021 20:08:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11SK8xAD016800; Sun, 28 Feb 2021 20:08:59 GMT (envelope-from git) Date: Sun, 28 Feb 2021 20:08:59 GMT Message-Id: <202102282008.11SK8xAD016800@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne <mhorne@FreeBSD.org> Subject: git: 530d38441d55 - main - armv8crypto: add missing newline MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 530d38441d55b7ac62ebae6ac8ea76903a4a3b0c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 20:09:00 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=530d38441d55b7ac62ebae6ac8ea76903a4a3b0c commit 530d38441d55b7ac62ebae6ac8ea76903a4a3b0c Author: Elliott Mitchell <ehem+freebsd@m5p.com> AuthorDate: 2021-02-28 20:03:44 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2021-02-28 20:03:55 +0000 armv8crypto: add missing newline The missing newline mildly garbles boot-time messages and this can be troublesome if you need those. Fixes: a520f5ca580f ("armv8crypto: print a message on probe failure") Reported by: Mike Karels (mike@karels.net) Reviewed By: gonzo Differential Revision: https://reviews.freebsd.org/D28988 --- sys/crypto/armv8/armv8_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/crypto/armv8/armv8_crypto.c b/sys/crypto/armv8/armv8_crypto.c index be39168d50f3..24f6eff5608d 100644 --- a/sys/crypto/armv8/armv8_crypto.c +++ b/sys/crypto/armv8/armv8_crypto.c @@ -122,7 +122,7 @@ armv8_crypto_probe(device_t dev) default: break; case ID_AA64ISAR0_AES_NONE: - device_printf(dev, "CPU lacks AES instructions"); + device_printf(dev, "CPU lacks AES instructions\n"); break; } From owner-dev-commits-src-main@freebsd.org Sun Feb 28 20:13:15 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 868355483E5; Sun, 28 Feb 2021 20:13:15 +0000 (UTC) (envelope-from mhorne@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DpZMb3DgXz4qDN; Sun, 28 Feb 2021 20:13:15 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com [209.85.219.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: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id 618E62A2CD; Sun, 28 Feb 2021 20:13:15 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: by mail-yb1-f180.google.com with SMTP id n195so14760493ybg.9; Sun, 28 Feb 2021 12:13:15 -0800 (PST) X-Gm-Message-State: AOAM532EIm5XgGx+cHrnUjqBp+pBvp9ZiO8wScPjNWpnbvyf8ECZ898e Vhi81b5fGJ6Uz5baUDUAGHTN5/Ylj6vjcWCKtHI= X-Google-Smtp-Source: ABdhPJyiZn/gi2gEPGaC7wFfbmEC9K28vfC/rXyY/D/yVftZNqmHbwJz3hhxq3bn0jCTPmZl/4mjmxWLFfYgxI19YzQ= X-Received: by 2002:a25:1883:: with SMTP id 125mr18371041yby.465.1614543194858; Sun, 28 Feb 2021 12:13:14 -0800 (PST) MIME-Version: 1.0 References: <202102282008.11SK8xAD016800@gitrepo.freebsd.org> In-Reply-To: <202102282008.11SK8xAD016800@gitrepo.freebsd.org> From: Mitchell Horne <mhorne@freebsd.org> Date: Sun, 28 Feb 2021 16:13:04 -0400 X-Gmail-Original-Message-ID: <CADeAsy1qD-afd2Fdxy7evgFBgKApEPeH3JAa7j4HBYGbwPnNRA@mail.gmail.com> Message-ID: <CADeAsy1qD-afd2Fdxy7evgFBgKApEPeH3JAa7j4HBYGbwPnNRA@mail.gmail.com> Subject: Re: git: 530d38441d55 - main - armv8crypto: add missing newline To: Mitchell Horne <mhorne@freebsd.org> Cc: src-committers <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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 20:13:15 -0000 On Sun, Feb 28, 2021 at 4:09 PM Mitchell Horne <mhorne@freebsd.org> wrote: > > The branch main has been updated by mhorne: > > URL: https://cgit.FreeBSD.org/src/commit/?id=530d38441d55b7ac62ebae6ac8ea76903a4a3b0c > > commit 530d38441d55b7ac62ebae6ac8ea76903a4a3b0c > Author: Elliott Mitchell <ehem+freebsd@m5p.com> > AuthorDate: 2021-02-28 20:03:44 +0000 > Commit: Mitchell Horne <mhorne@FreeBSD.org> > CommitDate: 2021-02-28 20:03:55 +0000 > > armv8crypto: add missing newline > > The missing newline mildly garbles boot-time messages and this can be > troublesome if you need those. > > Fixes: a520f5ca580f ("armv8crypto: print a message on probe failure") > Reported by: Mike Karels (mike@karels.net) > Reviewed By: gonzo > Differential Revision: https://reviews.freebsd.org/D28988 MFC after: 3 days > --- > sys/crypto/armv8/armv8_crypto.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sys/crypto/armv8/armv8_crypto.c b/sys/crypto/armv8/armv8_crypto.c > index be39168d50f3..24f6eff5608d 100644 > --- a/sys/crypto/armv8/armv8_crypto.c > +++ b/sys/crypto/armv8/armv8_crypto.c > @@ -122,7 +122,7 @@ armv8_crypto_probe(device_t dev) > default: > break; > case ID_AA64ISAR0_AES_NONE: > - device_printf(dev, "CPU lacks AES instructions"); > + device_printf(dev, "CPU lacks AES instructions\n"); > break; > } > From owner-dev-commits-src-main@freebsd.org Sun Feb 28 20:25:24 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CE2C954910A for <dev-commits-src-main@mailman.nyi.freebsd.org>; Sun, 28 Feb 2021 20:25:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) (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 4DpZdc54X4z4qxT for <dev-commits-src-main@freebsd.org>; Sun, 28 Feb 2021 20:25:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72d.google.com with SMTP id h8so14641565qkk.6 for <dev-commits-src-main@freebsd.org>; Sun, 28 Feb 2021 12:25:24 -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=xQ8dzRf8Ng+PttZxu8m++PWT7Op7/JEhf1S5CT6bsCU=; b=A2/FTVFWl5VvMS1GBgKddVkhMgdaulUScpst3eXVnCTAMLb4cZD22NSa3pOeyEv736 5Ww7JARghv5v26Y/A94p6ac527t31g5yw+nnczAUuxLgrGCvmCWuCE7yr000mMTS3CcL BSIRZJnyMk4InJGXQKaGoiTMepxIpPjN9nNJ9SbuAr4gBuUS/KXxiuJqW6SQWja30YiE fittmi9q84iNAmGR05+6mEB7bNv1notrHJDEHAx8s7QXasw3/W9l5B+4vFSPFSe+jy0z nspXDVwCHpaFQPxwf6jg61nPAUoryaGndJ0zXS5zccotHbM2D191rVVPDl6+XlcjDVEK Cq5w== 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=xQ8dzRf8Ng+PttZxu8m++PWT7Op7/JEhf1S5CT6bsCU=; b=O2FEtTAIGrEC9F9yZc+2dwuoWjzTvTSINjM0QA4lcrGKp1jsUejo72ctFUXqeimN3c Q7Cjct88w9D5/QZX9cbl3vZJwmUYNAkvwIHoNv1Tn8H1L/cv31xWjWBreQzsxwTEeCbY 51+kBm+WbAhpFXToSw05bSidHAhJHIHQq/+SO3DhGTPrvXesgzVzHlL8oaegaMHzO9sI FQ5bYYZ3cu3WM+MbjqR4niEPDoGEgd1zzdCaebdMJJQub4rflUDdPhL47u5EKJWZqHCy BXLIxeK/XF5acLUqfYqP4TWB9bLRkUFAshE6aM+qHWIJa1nMzMihRGl2qGCEDoEvBPJg wVZQ== X-Gm-Message-State: AOAM531n248VkFxF2eNmbqzL312uykgsrUppYedj6BLsI1wpDd0BCQbu QQSC1hV3pbYqy8TUHwn70z4lBO+xuqncPhTZ2qazsw== X-Google-Smtp-Source: ABdhPJxPqTad23aRCc5n4DfIlFBg5PQx1dTCffeqnyFOeBvpsXjSjttCz6mi8oavyyBr/fzh0wRS4Abk5Spo3nUCLZ0= X-Received: by 2002:a37:a085:: with SMTP id j127mr11267092qke.206.1614543923532; Sun, 28 Feb 2021 12:25:23 -0800 (PST) MIME-Version: 1.0 References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <01000177d0e7f033-389acb59-2004-4040-ba7c-762878ef86b4-000000@email.amazonses.com> <dba58a1f-5eb0-da87-7d18-d930aa5d422a@freebsd.org> <CANCZdfoL3QFg9NvpkPW8pfVrNvUK-cTPD2ZGbBr2xxh-0dv=eA@mail.gmail.com> <dc61048c-2cfa-0ff5-0470-e93aa5233aae@freebsd.org> <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> <743fd126-2077-49b1-9c85-7ccc61616b98@www.fastmail.com> <460ceb98-e0c1-42b3-8e3c-2587c5ce8398@www.fastmail.com> <F4E1978D-DE96-4082-885F-D6686A5D005C@freebsd.org> <CANCZdfpw1+sjHVPH4zahywMsLHJ1jKWbnd5A3RjGinu=nQFSGA@mail.gmail.com> <a30870ef-00b1-40b6-b378-033d8737c7e4@www.fastmail.com> <CANCZdfqPNf-RW=-T9qk5a4o-rX3CWFVGz0H_hTav-CqnW9JJ=Q@mail.gmail.com> <CAK7dMtD9k5FscvG754tLO6ZeTm5+ru87F06O8+H3bVJqVjf9iQ@mail.gmail.com> In-Reply-To: <CAK7dMtD9k5FscvG754tLO6ZeTm5+ru87F06O8+H3bVJqVjf9iQ@mail.gmail.com> From: Warner Losh <imp@bsdimp.com> Date: Sun, 28 Feb 2021 13:25:12 -0700 Message-ID: <CANCZdfrej=mY0uZnY4Cg0PxTtPjJdCUVsM2trBO83z--Qks7JA@mail.gmail.com> Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. To: Kevin Bowling <kevin.bowling@kev009.com> Cc: Brandon Bergren <bdragon@freebsd.org>, Jessica Clarke <jrtc27@freebsd.org>, Nathan Whitehorn <nwhitehorn@freebsd.org>, Colin Percival <cperciva@tarsnap.com>, src-committers <src-committers@freebsd.org>, "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>, dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4DpZdc54X4z4qxT 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 20:25:24 -0000 On Sun, Feb 28, 2021 at 9:48 AM Kevin Bowling <kevin.bowling@kev009.com> wrote: > This got me interested because I did recall something like Warner > mentioned. It seems like some of the folks that used to be at OzLabs > did it as a PoC > > https://www.flamingspork.com/blog/2015/10/20/tianocore-uefi-ported-to-openpower/ > . > Ah yes, it was OzLabs' tianocore port that I recalled. > One of the exciting things about OpenPower was that everything above > the gates was open in a way only RISC-V seems a chance of repeating > any time soon. There are no practical limits to the firmware and > runtime service; if you haven't seen this you both might enjoy it > > https://www.flamingspork.com/blog/2016/10/30/windows-nt4-for-powerpc-guest-on-opal-on-power8-in-qemu/ > . > > Practically speaking, with Petitboot (which FreeBSD on PowerNV uses) > there isn't much point to go to something like UEFI. It's literally > Unix vs DOS-like. The primary targets are Raptor POWER9 hardware and > LoPAPR/LoPAR VMs (kvm, PowerVM) and I don't see any near term > indication of the ISA expanding to new platforms that would concern > FreeBSD. > Yes. I agree as well. I was just hoping to say just that: EFI is barely theoretically possible, but in reality we'll likely never use it.... The net effect is that we don't want to install efi on powerpc on freebsd. Warner > Regards, > Kevin > > On Sat, Feb 27, 2021 at 8:18 PM Warner Losh <imp@bsdimp.com> wrote: > > > > On Sat, Feb 27, 2021, 8:01 PM Brandon Bergren <bdragon@freebsd.org> > wrote: > > > > > On Sat, Feb 27, 2021, at 8:39 PM, Warner Losh wrote: > > > > > 32-bit Arm can boot via EFI. Just mips* and powerpc*. > > > > > > > > There was some rumblings of little endian powerpc64 efi, but I don't > > > > think it's ready... > > > > > > I've never heard of such things. PAPR/LoPAPR/LoPAR (pseries) is > specified > > > as an OpenFirmware platform, and I don't see that changing in the > future > > > given the way it's baked into the spec. And PowerNV is a > > > minimal-runtime-services platform where the runtime abstraction (OPAL) > > > calls don't include any sort of way to access disk devices. > > > > > > Do you mean alternative firmware for PowerNV? I've heard people > talking on > > > and off about coreboot, but I don't see that becoming mainstream over > the > > > petitboot skiroot payload. > > > > > > I don't see the pseries virtualization requirements changing away from > > > OpenFirmware in the future either, given the OpenFirmware requirement > has > > > been a constant all the way back to CHRP. > > > > > > > > > There was a working group that was defining powerpc bindings that were > > being worked on. When I went back to find them again I couldn't, so maybe > > they came to naught... > > > > Warner > > > > > > > > > Yea, we have long since switched our preferred boot on arm to EFI... > > > > though we don't have installer images for 32bit arm, which is this > > > > runs... so it's needed for correctness, but not a practical > > > > difference... > > > > > > > > Warner > > > > > > -- > > > Brandon Bergren > > > bdragon@FreeBSD.org > > > > > _______________________________________________ > > dev-commits-src-main@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main > > To unsubscribe, send any mail to " > dev-commits-src-main-unsubscribe@freebsd.org" > From owner-dev-commits-src-main@freebsd.org Sun Feb 28 20:40:25 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 29D235495BF; Sun, 28 Feb 2021 20:40: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DpZyx0HTDz4rqv; Sun, 28 Feb 2021 20:40: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 F026C17324; Sun, 28 Feb 2021 20:40: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 11SKeOZ8063584; Sun, 28 Feb 2021 20:40:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11SKeO5u063583; Sun, 28 Feb 2021 20:40:24 GMT (envelope-from git) Date: Sun, 28 Feb 2021 20:40:24 GMT Message-Id: <202102282040.11SKeO5u063583@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Moeller <freqlabs@FreeBSD.org> Subject: git: 6f497e47e925 - main - sbin/ifconfig: Get bridge status with libifconfig MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: freqlabs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f497e47e925f6886f444a8e31e2e939fca264f2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 20:40:25 -0000 The branch main has been updated by freqlabs: URL: https://cgit.FreeBSD.org/src/commit/?id=6f497e47e925f6886f444a8e31e2e939fca264f2 commit 6f497e47e925f6886f444a8e31e2e939fca264f2 Author: Ryan Moeller <freqlabs@FreeBSD.org> AuthorDate: 2021-02-26 23:04:38 +0000 Commit: Ryan Moeller <freqlabs@FreeBSD.org> CommitDate: 2021-02-28 20:29:23 +0000 sbin/ifconfig: Get bridge status with libifconfig Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28954 --- sbin/ifconfig/ifbridge.c | 169 +++++++++++++++++++---------------------------- 1 file changed, 69 insertions(+), 100 deletions(-) diff --git a/sbin/ifconfig/ifbridge.c b/sbin/ifconfig/ifbridge.c index f4c51632bc98..cc1520a2e3f0 100644 --- a/sbin/ifconfig/ifbridge.c +++ b/sbin/ifconfig/ifbridge.c @@ -61,6 +61,8 @@ static const char rcsid[] = #include <err.h> #include <errno.h> +#include <libifconfig.h> + #include "ifconfig.h" static const char *stpstates[] = { STP_STATES }; @@ -116,74 +118,6 @@ do_bridgeflag(int sock, const char *ifs, int flag, int set) err(1, "unable to set bridge flags"); } -static void -bridge_interfaces(int s, const char *prefix) -{ - struct ifbifconf bifc; - struct ifbreq *req; - char *inbuf = NULL, *ninbuf; - char *p, *pad; - int i, len = 8192; - - pad = strdup(prefix); - if (pad == NULL) - err(1, "strdup"); - /* replace the prefix with whitespace */ - for (p = pad; *p != '\0'; p++) { - if(isprint(*p)) - *p = ' '; - } - - for (;;) { - ninbuf = realloc(inbuf, len); - if (ninbuf == NULL) - err(1, "unable to allocate interface buffer"); - bifc.ifbic_len = len; - bifc.ifbic_buf = inbuf = ninbuf; - if (do_cmd(s, BRDGGIFS, &bifc, sizeof(bifc), 0) < 0) - err(1, "unable to get interface list"); - if ((bifc.ifbic_len + sizeof(*req)) < len) - break; - len *= 2; - } - - for (i = 0; i < bifc.ifbic_len / sizeof(*req); i++) { - req = bifc.ifbic_req + i; - printf("%s%s ", prefix, req->ifbr_ifsname); - printb("flags", req->ifbr_ifsflags, IFBIFBITS); - printf("\n"); - - printf("%s", pad); - printf("ifmaxaddr %u", req->ifbr_addrmax); - printf(" port %u priority %u", req->ifbr_portno, - req->ifbr_priority); - printf(" path cost %u", req->ifbr_path_cost); - - if (req->ifbr_ifsflags & IFBIF_STP) { - if (req->ifbr_proto < nitems(stpproto)) - printf(" proto %s", stpproto[req->ifbr_proto]); - else - printf(" <unknown proto %d>", - req->ifbr_proto); - - printf("\n%s", pad); - if (req->ifbr_role < nitems(stproles)) - printf("role %s", stproles[req->ifbr_role]); - else - printf("<unknown role %d>", - req->ifbr_role); - if (req->ifbr_state < nitems(stpstates)) - printf(" state %s", stpstates[req->ifbr_state]); - else - printf(" <unknown state %d>", - req->ifbr_state); - } - printf("\n"); - } - free(pad); - free(inbuf); -} - static void bridge_addresses(int s, const char *prefix) { @@ -222,44 +156,79 @@ bridge_addresses(int s, const char *prefix) static void bridge_status(int s) { - struct ifbropreq ifbp; - struct ifbrparam param; - u_int16_t pri; - u_int8_t ht, fd, ma, hc, pro; - u_int8_t lladdr[ETHER_ADDR_LEN]; - u_int16_t bprio; - u_int32_t csize, ctime; + ifconfig_handle_t *lifh; + struct ifconfig_bridge_status *bridge; + struct ifbropreq *params; + const char *pad, *prefix; + uint8_t lladdr[ETHER_ADDR_LEN]; + uint16_t bprio; - if (do_cmd(s, BRDGGCACHE, ¶m, sizeof(param), 0) < 0) - return; - csize = param.ifbrp_csize; - if (do_cmd(s, BRDGGTO, ¶m, sizeof(param), 0) < 0) - return; - ctime = param.ifbrp_ctime; - if (do_cmd(s, BRDGPARAM, &ifbp, sizeof(ifbp), 0) < 0) + lifh = ifconfig_open(); + if (lifh == NULL) return; - pri = ifbp.ifbop_priority; - pro = ifbp.ifbop_protocol; - ht = ifbp.ifbop_hellotime; - fd = ifbp.ifbop_fwddelay; - hc = ifbp.ifbop_holdcount; - ma = ifbp.ifbop_maxage; - - PV2ID(ifbp.ifbop_bridgeid, bprio, lladdr); - printf("\tid %s priority %u hellotime %u fwddelay %u\n", - ether_ntoa((struct ether_addr *)lladdr), pri, ht, fd); - printf("\tmaxage %u holdcnt %u proto %s maxaddr %u timeout %u\n", - ma, hc, stpproto[pro], csize, ctime); - PV2ID(ifbp.ifbop_designated_root, bprio, lladdr); - printf("\troot id %s priority %d ifcost %u port %u\n", - ether_ntoa((struct ether_addr *)lladdr), bprio, - ifbp.ifbop_root_path_cost, ifbp.ifbop_root_port & 0xfff); + if (ifconfig_bridge_get_bridge_status(lifh, name, &bridge) == -1) + goto close; - bridge_interfaces(s, "\tmember: "); + params = bridge->params; - return; + PV2ID(params->ifbop_bridgeid, bprio, lladdr); + printf("\tid %s priority %u hellotime %u fwddelay %u\n", + ether_ntoa((struct ether_addr *)lladdr), + params->ifbop_priority, + params->ifbop_hellotime, + params->ifbop_fwddelay); + printf("\tmaxage %u holdcnt %u proto %s maxaddr %u timeout %u\n", + params->ifbop_maxage, + params->ifbop_holdcount, + stpproto[params->ifbop_protocol], + bridge->cache_size, + bridge->cache_lifetime); + PV2ID(params->ifbop_designated_root, bprio, lladdr); + printf("\troot id %s priority %d ifcost %u port %u\n", + ether_ntoa((struct ether_addr *)lladdr), + bprio, + params->ifbop_root_path_cost, + params->ifbop_root_port & 0xfff); + + prefix = "\tmember: "; + pad = "\t "; + for (size_t i = 0; i < bridge->members_count; ++i) { + struct ifbreq *member = &bridge->members[i]; + + printf("%s%s ", prefix, member->ifbr_ifsname); + printb("flags", member->ifbr_ifsflags, IFBIFBITS); + printf("\n%s", pad); + printf("ifmaxaddr %u port %u priority %u path cost %u", + member->ifbr_addrmax, + member->ifbr_portno, + member->ifbr_priority, + member->ifbr_path_cost); + if (member->ifbr_ifsflags & IFBIF_STP) { + uint8_t proto = member->ifbr_proto; + uint8_t role = member->ifbr_role; + uint8_t state = member->ifbr_state; + + if (proto < nitems(stpproto)) + printf(" proto %s", stpproto[proto]); + else + printf(" <unknown proto %d>", proto); + printf("\n%s", pad); + if (role < nitems(stproles)) + printf("role %s", stproles[role]); + else + printf("<unknown role %d>", role); + if (state < nitems(stpstates)) + printf(" state %s", stpstates[state]); + else + printf(" <unknown state %d>", state); + } + printf("\n"); + } + ifconfig_bridge_free_bridge_status(bridge); +close: + ifconfig_close(lifh); } static void From owner-dev-commits-src-main@freebsd.org Sun Feb 28 20:40:26 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3A0CE549803; Sun, 28 Feb 2021 20:40: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DpZyy19xyz4rwH; Sun, 28 Feb 2021 20:40: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 1B3D216FEC; Sun, 28 Feb 2021 20:40: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 11SKeQNW063606; Sun, 28 Feb 2021 20:40:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11SKeQaG063605; Sun, 28 Feb 2021 20:40:26 GMT (envelope-from git) Date: Sun, 28 Feb 2021 20:40:26 GMT Message-Id: <202102282040.11SKeQaG063605@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Moeller <freqlabs@FreeBSD.org> Subject: git: 64bacab177f7 - main - sbin/ifconfig: Get groups with libifconfig MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: freqlabs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 64bacab177f7c743af3268a3e1ffcddaf77a68d0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 20:40:26 -0000 The branch main has been updated by freqlabs: URL: https://cgit.FreeBSD.org/src/commit/?id=64bacab177f7c743af3268a3e1ffcddaf77a68d0 commit 64bacab177f7c743af3268a3e1ffcddaf77a68d0 Author: Ryan Moeller <freqlabs@FreeBSD.org> AuthorDate: 2021-02-27 08:17:04 +0000 Commit: Ryan Moeller <freqlabs@FreeBSD.org> CommitDate: 2021-02-28 20:38:50 +0000 sbin/ifconfig: Get groups with libifconfig Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28965 --- sbin/ifconfig/ifgroup.c | 38 +++++++++++++++----------------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/sbin/ifconfig/ifgroup.c b/sbin/ifconfig/ifgroup.c index 50d17ca6429e..2b13227af4f3 100644 --- a/sbin/ifconfig/ifgroup.c +++ b/sbin/ifconfig/ifgroup.c @@ -43,6 +43,8 @@ static const char rcsid[] = #include <string.h> #include <unistd.h> +#include <libifconfig.h> + #include "ifconfig.h" /* ARGSUSED */ @@ -84,33 +86,21 @@ unsetifgroup(const char *group_name, int d, int s, const struct afswtch *rafp) static void getifgroups(int s) { - int len, cnt; - struct ifgroupreq ifgr; - struct ifg_req *ifg; - - memset(&ifgr, 0, sizeof(ifgr)); - strlcpy(ifgr.ifgr_name, name, IFNAMSIZ); + ifconfig_handle_t *lifh; + struct ifgroupreq ifgr; + size_t cnt; - if (ioctl(s, SIOCGIFGROUP, (caddr_t)&ifgr) == -1) { - if (errno == EINVAL || errno == ENOTTY) - return; - else - err(1, "SIOCGIFGROUP"); - } + lifh = ifconfig_open(); + if (lifh == NULL) + return; - len = ifgr.ifgr_len; - ifgr.ifgr_groups = - (struct ifg_req *)calloc(len / sizeof(struct ifg_req), - sizeof(struct ifg_req)); - if (ifgr.ifgr_groups == NULL) - err(1, "getifgroups"); - if (ioctl(s, SIOCGIFGROUP, (caddr_t)&ifgr) == -1) - err(1, "SIOCGIFGROUP"); + if (ifconfig_get_groups(lifh, name, &ifgr) == -1) + goto close; cnt = 0; - ifg = ifgr.ifgr_groups; - for (; ifg && len >= sizeof(struct ifg_req); ifg++) { - len -= sizeof(struct ifg_req); + for (size_t i = 0; i < ifgr.ifgr_len / sizeof(struct ifg_req); ++i) { + struct ifg_req *ifg = &ifgr.ifgr_groups[i]; + if (strcmp(ifg->ifgrq_group, "all")) { if (cnt == 0) printf("\tgroups:"); @@ -122,6 +112,8 @@ getifgroups(int s) printf("\n"); free(ifgr.ifgr_groups); +close: + ifconfig_close(lifh); } static void From owner-dev-commits-src-main@freebsd.org Sun Feb 28 20:44:23 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 31D28549C38; Sun, 28 Feb 2021 20:44:23 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dpb3W0ZV5z4stg; Sun, 28 Feb 2021 20:44:23 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (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 F38512AE71; Sun, 28 Feb 2021 20:44:22 +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 8A3E727C005B; Sun, 28 Feb 2021 15:44:22 -0500 (EST) Received: from imap38 ([10.202.2.88]) by compute3.internal (MEProxy); Sun, 28 Feb 2021 15:44:22 -0500 X-ME-Sender: <xms:pQA8YLgSmg80H9INiFN_dbvNLRA1aOsG-TnFZO6nKbU8Z08SELXr9Q> <xme:pQA8YIBkASvofg-Evs1sXBKEQEoQabkpbbWWkMVppvk729WehdXcg2KupgE7tkcLI vyPGwqzGOCev1TS> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrleeigddugedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepjefhfedtuddtleegkeeg tdegjeekffdvjedttdehgffgveeugffgfeelvdeghffgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepsggurhgrghhonhdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidquddtgedvfeehkeeigedqudekuddtkeehuddqsggurh grghhonheppefhrhgvvgeuufffrdhorhhgsehimhgrphdrtggt X-ME-Proxy: <xmx:pQA8YLEiQy1gP1h29ElT5q4pzvrDjwCHgwmm93RSora_wRqTmcWFtg> <xmx:pQA8YIQ30FTW3nIc0TSqG58Q6sFheZR1OxfrZVUwElWO9bd2gO1ySg> <xmx:pQA8YIz_exBoiYJ-D1jF54zyRh90kHjauYZU1sACWVVL6B8pAVcVjw> <xmx:pgA8YHpRbWdofXB4Y3kJ-anzhAnBNb2t07Zw19WODhp-4g70UNBC-w> Received: by mailuser.nyi.internal (Postfix, from userid 501) id B9449CA005D; Sun, 28 Feb 2021 15:44:21 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-141-gf094924a34-fm-20210210.001-gf094924a Mime-Version: 1.0 Message-Id: <8215cd95-6905-49da-ab07-65796845613c@www.fastmail.com> In-Reply-To: <CANCZdfrej=mY0uZnY4Cg0PxTtPjJdCUVsM2trBO83z--Qks7JA@mail.gmail.com> References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <01000177d0e7f033-389acb59-2004-4040-ba7c-762878ef86b4-000000@email.amazonses.com> <dba58a1f-5eb0-da87-7d18-d930aa5d422a@freebsd.org> <CANCZdfoL3QFg9NvpkPW8pfVrNvUK-cTPD2ZGbBr2xxh-0dv=eA@mail.gmail.com> <dc61048c-2cfa-0ff5-0470-e93aa5233aae@freebsd.org> <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> <743fd126-2077-49b1-9c85-7ccc61616b98@www.fastmail.com> <460ceb98-e0c1-42b3-8e3c-2587c5ce8398@www.fastmail.com> <F4E1978D-DE96-4082-885F-D6686A5D005C@freebsd.org> <CANCZdfpw1+sjHVPH4zahywMsLHJ1jKWbnd5A3RjGinu=nQFSGA@mail.gmail.com> <a30870ef-00b1-40b6-b378-033d8737c7e4@www.fastmail.com> <CANCZdfqPNf-RW=-T9qk5a4o-rX3CWFVGz0H_hTav-CqnW9JJ=Q@mail.gmail.com> <CAK7dMtD9k5FscvG754tLO6ZeTm5+ru87F06O8+H3bVJqVjf9iQ@mail.gmail.com> <CANCZdfrej=mY0uZnY4Cg0PxTtPjJdCUVsM2trBO83z--Qks7JA@mail.gmail.com> Date: Sun, 28 Feb 2021 14:44:02 -0600 From: "Brandon Bergren" <bdragon@FreeBSD.org> To: "Warner Losh" <imp@bsdimp.com>, "Kevin Bowling" <kevin.bowling@kev009.com> Cc: "Jessica Clarke" <jrtc27@freebsd.org>, "Nathan Whitehorn" <nwhitehorn@freebsd.org>, "Colin Percival" <cperciva@tarsnap.com>, src-committers <src-committers@freebsd.org>, "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>, dev-commits-src-main@freebsd.org Subject: =?UTF-8?Q?Re:_git:_0b7472b3d8d2_-_main_-_Mount_the_EFI_system_partition_?= =?UTF-8?Q?(ESP)_on_newly-installed_systems.?= Content-Type: text/plain X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 20:44:23 -0000 On Sun, Feb 28, 2021, at 2:25 PM, Warner Losh wrote: > Yes. I agree as well. I was just hoping to say just that: EFI is barely > theoretically possible, but in reality we'll likely never use it.... > > The net effect is that we don't want to install efi on powerpc on freebsd. > > Warner > Yeah. The code before the change excluded mips and powerpc platforms, and it should continue to do so instead of using the existence of a /boot/efi directory as the only clue. Currently bsdinstall bails out and leaves powerpc* in a half-installed state because the die in the uname case propagates to the main script, so it never runs the bits after the bootconfig. -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-main@freebsd.org Sun Feb 28 21:47:06 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0F15F54CED3; Sun, 28 Feb 2021 21:47: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DpcRs71Qgz3Fyn; Sun, 28 Feb 2021 21:47: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 DF8C9180C0; Sun, 28 Feb 2021 21:47: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 11SLl5lW048146; Sun, 28 Feb 2021 21:47:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11SLl5ad048145; Sun, 28 Feb 2021 21:47:05 GMT (envelope-from git) Date: Sun, 28 Feb 2021 21:47:05 GMT Message-Id: <202102282147.11SLl5ad048145@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Moeller <freqlabs@FreeBSD.org> Subject: git: b12a960e4274 - main - libifconfig: Add a function to get down reason MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: freqlabs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b12a960e4274926171dc7a4f9887a0d0a5195b44 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 21:47:06 -0000 The branch main has been updated by freqlabs: URL: https://cgit.FreeBSD.org/src/commit/?id=b12a960e4274926171dc7a4f9887a0d0a5195b44 commit b12a960e4274926171dc7a4f9887a0d0a5195b44 Author: Ryan Moeller <freqlabs@FreeBSD.org> AuthorDate: 2021-02-28 09:34:30 +0000 Commit: Ryan Moeller <freqlabs@FreeBSD.org> CommitDate: 2021-02-28 21:43:54 +0000 libifconfig: Add a function to get down reason For use in ifconfig. Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28991 --- lib/libifconfig/Symbol.map | 1 + lib/libifconfig/libifconfig.h | 9 +++++++++ lib/libifconfig/libifconfig_media.c | 10 ++++++++++ 3 files changed, 20 insertions(+) diff --git a/lib/libifconfig/Symbol.map b/lib/libifconfig/Symbol.map index 4f82c8185d0b..b3e81d6ee497 100644 --- a/lib/libifconfig/Symbol.map +++ b/lib/libifconfig/Symbol.map @@ -31,6 +31,7 @@ FBSD_1.6 { ifconfig_media_get_status; ifconfig_media_get_subtype; ifconfig_media_get_type; + ifconfig_media_get_downreason; ifconfig_open; ifconfig_set_capability; ifconfig_set_description; diff --git a/lib/libifconfig/libifconfig.h b/lib/libifconfig/libifconfig.h index 46a13ae27d69..d8245ea13b23 100644 --- a/lib/libifconfig/libifconfig.h +++ b/lib/libifconfig/libifconfig.h @@ -207,6 +207,15 @@ const char *ifconfig_media_get_subtype(int ifmw); const char *ifconfig_media_get_status(const struct ifmediareq *ifmr); void ifconfig_media_get_options_string(int ifmw, char *buf, size_t buflen); +/** Retrieve the reason the interface is down + * @param h An open ifconfig state object + * @param name The interface name + * @param ifdr Return argument. + * @return 0 on success, nonzero on failure + */ +int ifconfig_media_get_downreason(ifconfig_handle_t *h, const char *name, + struct ifdownreason *ifdr); + int ifconfig_carp_get_info(ifconfig_handle_t *h, const char *name, struct carpreq *carpr, int ncarpr); diff --git a/lib/libifconfig/libifconfig_media.c b/lib/libifconfig/libifconfig_media.c index f7302d8a9b24..d7ef507604be 100644 --- a/lib/libifconfig/libifconfig_media.c +++ b/lib/libifconfig/libifconfig_media.c @@ -392,3 +392,13 @@ ifconfig_media_get_options_string(int ifmw, char *buf, size_t buflen) } } } + +int +ifconfig_media_get_downreason(ifconfig_handle_t *h, const char *name, + struct ifdownreason *ifdr) +{ + + (void)memset(ifdr, 0, sizeof(*ifdr)); + (void)strlcpy(ifdr->ifdr_name, name, sizeof(ifdr->ifdr_name)); + return (ifconfig_ioctlwrap(h, AF_LOCAL, SIOCGIFDOWNREASON, ifdr)); +} From owner-dev-commits-src-main@freebsd.org Sun Feb 28 22:17:07 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 41B1254D1D1; Sun, 28 Feb 2021 22:17:07 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dpd6W1NVXz3HVG; Sun, 28 Feb 2021 22:17:07 +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 1399418A08; Sun, 28 Feb 2021 22:17: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 11SMH6Sl088189; Sun, 28 Feb 2021 22:17:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11SMH6h6088188; Sun, 28 Feb 2021 22:17:06 GMT (envelope-from git) Date: Sun, 28 Feb 2021 22:17:06 GMT Message-Id: <202102282217.11SMH6h6088188@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem <rmacklem@FreeBSD.org> Subject: git: 3e04ab36ba5c - main - nfsclient: add checks for a server returning the current directory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3e04ab36ba5ce5cbbf6d22f17a01a391a04e465f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 22:17:07 -0000 The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=3e04ab36ba5ce5cbbf6d22f17a01a391a04e465f commit 3e04ab36ba5ce5cbbf6d22f17a01a391a04e465f Author: Rick Macklem <rmacklem@FreeBSD.org> AuthorDate: 2021-02-28 22:15:32 +0000 Commit: Rick Macklem <rmacklem@FreeBSD.org> CommitDate: 2021-02-28 22:15:32 +0000 nfsclient: add checks for a server returning the current directory Commit 3fe2c68ba20f dealt with a panic in cache_enter_time() where the vnode referred to the directory argument. It would also be possible to get these panics if a broken NFS server were to return the directory as an new object being created within the directory or in a Lookup reply. This patch adds checks to avoid the panics and logs messages to indicate that the server is broken for the file object creation cases. Reviewd by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28987 --- sys/fs/nfsclient/nfs_clvnops.c | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 80317cfd7a50..fc5445ef1e76 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -1423,7 +1423,7 @@ nfs_lookup(struct vop_lookup_args *ap) } if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN)) cnp->cn_flags |= SAVENAME; - if ((cnp->cn_flags & MAKEENTRY) && + if ((cnp->cn_flags & MAKEENTRY) && dvp != newvp && (cnp->cn_nameiop != DELETE || !(flags & ISLASTCN)) && attrflag != 0 && (newvp->v_type != VDIR || dattrflag != 0)) cache_enter_time(dvp, newvp, cnp, &nfsva.na_ctime, @@ -1752,9 +1752,14 @@ again: } } if (!error) { - if ((cnp->cn_flags & MAKEENTRY) && attrflag) - cache_enter_time(dvp, newvp, cnp, &nfsva.na_ctime, - NULL); + if ((cnp->cn_flags & MAKEENTRY) && attrflag) { + if (dvp != newvp) + cache_enter_time(dvp, newvp, cnp, + &nfsva.na_ctime, NULL); + else + printf("nfs_create: bogus NFS server returned " + "the directory as the new file object\n"); + } *ap->a_vpp = newvp; } else if (NFS_ISV4(dvp)) { error = nfscl_maperr(cnp->cn_thread, error, vap->va_uid, @@ -2126,7 +2131,11 @@ nfs_link(struct vop_link_args *ap) */ if (VFSTONFS(vp->v_mount)->nm_negnametimeo != 0 && (cnp->cn_flags & MAKEENTRY) && attrflag != 0 && error == 0) { - cache_enter_time(tdvp, vp, cnp, &nfsva.na_ctime, NULL); + if (tdvp != vp) + cache_enter_time(tdvp, vp, cnp, &nfsva.na_ctime, NULL); + else + printf("nfs_link: bogus NFS server returned " + "the directory as the new link\n"); } if (error && NFS_ISV4(vp)) error = nfscl_maperr(cnp->cn_thread, error, (uid_t)0, @@ -2205,7 +2214,12 @@ nfs_symlink(struct vop_symlink_args *ap) */ if (VFSTONFS(dvp->v_mount)->nm_negnametimeo != 0 && (cnp->cn_flags & MAKEENTRY) && attrflag != 0 && error == 0) { - cache_enter_time(dvp, newvp, cnp, &nfsva.na_ctime, NULL); + if (dvp != newvp) + cache_enter_time(dvp, newvp, cnp, &nfsva.na_ctime, + NULL); + else + printf("nfs_symlink: bogus NFS server returned " + "the directory as the new file object\n"); } return (error); } @@ -2278,9 +2292,15 @@ nfs_mkdir(struct vop_mkdir_args *ap) */ if (VFSTONFS(dvp->v_mount)->nm_negnametimeo != 0 && (cnp->cn_flags & MAKEENTRY) && - attrflag != 0 && dattrflag != 0) - cache_enter_time(dvp, newvp, cnp, &nfsva.na_ctime, - &dnfsva.na_ctime); + attrflag != 0 && dattrflag != 0) { + if (dvp != newvp) + cache_enter_time(dvp, newvp, cnp, + &nfsva.na_ctime, &dnfsva.na_ctime); + else + printf("nfs_mkdir: bogus NFS server returned " + "the directory that the directory was " + "created in as the new file object\n"); + } *ap->a_vpp = newvp; } return (error); From owner-dev-commits-src-main@freebsd.org Sun Feb 28 22:32:37 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4158A54DC70; Sun, 28 Feb 2021 22:32: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DpdSP1MFVz3JMv; Sun, 28 Feb 2021 22:32: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 2183418E9C; Sun, 28 Feb 2021 22:32: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 11SMWbre013272; Sun, 28 Feb 2021 22:32:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11SMWbuq013271; Sun, 28 Feb 2021 22:32:37 GMT (envelope-from git) Date: Sun, 28 Feb 2021 22:32:37 GMT Message-Id: <202102282232.11SMWbuq013271@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Juraj Lutter <otis@FreeBSD.org> Subject: git: c7d27b225df8 - main - newsyslog(8): Implement a new 'E' flag to not rotate empty log files MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: otis X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7d27b225df8d7fb36a31a21737d4309593c4604 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 22:32:37 -0000 The branch main has been updated by otis (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=c7d27b225df8d7fb36a31a21737d4309593c4604 commit c7d27b225df8d7fb36a31a21737d4309593c4604 Author: Juraj Lutter <otis@FreeBSD.org> AuthorDate: 2021-02-28 22:07:14 +0000 Commit: Juraj Lutter <otis@FreeBSD.org> CommitDate: 2021-02-28 22:32:19 +0000 newsyslog(8): Implement a new 'E' flag to not rotate empty log files Based on an idea from dvl's coworker, László DANIELISZ, implement a new flag, 'E', that prevents newsyslog(8) from rotating the empty log files. This 'E' flag ist mostly usable in conjunction with 'B' flag that instructs newsyslog(8) to not insert an informational message into the log file after rotation, keeping it still empty. Reviewed by: markj, ian, manpages (rpokala) Approved by: markj, ian, manpages (rpokala) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28940 --- usr.sbin/newsyslog/newsyslog.c | 11 ++++++++++- usr.sbin/newsyslog/newsyslog.conf.5 | 14 +++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index dc3ea51c8032..8f8bb54e9b46 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -114,7 +114,8 @@ __FBSDID("$FreeBSD$"); #define CE_PID2CMD 0x0400 /* Replace PID file with a shell command.*/ #define CE_PLAIN0 0x0800 /* Do not compress zero'th history file */ #define CE_RFC5424 0x1000 /* Use RFC5424 format rotation message */ - +#define CE_NOEMPTY 0x2000 /* Do not rotate the file when its size */ + /* is zero */ #define MIN_PID 5 /* Don't touch pids lower than this */ #define MAX_PID 99999 /* was lower, see /usr/include/sys/proc.h */ @@ -531,6 +532,11 @@ do_entry(struct conf_entry * ent) printf("does not exist, skipped%s.\n", temp_reason); } } else { + if (ent->flags & CE_NOEMPTY && ent->fsize == 0) { + if (verbose) + printf("--> Not rotating empty file\n"); + return (free_or_keep); + } if (ent->flags & CE_TRIMAT && !force && !rotatereq && !oversized) { diffsecs = ptimeget_diff(timenow, ent->trim_at); @@ -1291,6 +1297,9 @@ no_trimat: case 'd': working->flags |= CE_NODUMP; break; + case 'e': + working->flags |= CE_NOEMPTY; + break; case 'g': working->flags |= CE_GLOB; break; diff --git a/usr.sbin/newsyslog/newsyslog.conf.5 b/usr.sbin/newsyslog/newsyslog.conf.5 index d6b1191aa8b2..b897389b99dd 100644 --- a/usr.sbin/newsyslog/newsyslog.conf.5 +++ b/usr.sbin/newsyslog/newsyslog.conf.5 @@ -21,7 +21,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd August 21, 2018 +.Dd February 26, 2021 .Dt NEWSYSLOG.CONF 5 .Os .Sh NAME @@ -286,6 +286,18 @@ this log file. This option would affect how the .Xr dump 8 command treats the log file when making a file system backup. +.It Cm E +indicates that the log file should not be rotated when its +size is zero. +The +.Cm E +flag is mostly useful in conjunction with +.Cm B +flag to prevent +.Xr newsyslog 8 +from inserting an informational +.Tn ASCII +message into the new file. .It Cm G indicates that the specified .Ar logfile_name From owner-dev-commits-src-main@freebsd.org Sun Feb 28 22:55:44 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BD1A554E962; Sun, 28 Feb 2021 22:55: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dpdz44vFNz3KF6; Sun, 28 Feb 2021 22:55: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 9B0A819092; Sun, 28 Feb 2021 22:55: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 11SMtiua040208; Sun, 28 Feb 2021 22:55:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11SMtih6040207; Sun, 28 Feb 2021 22:55:44 GMT (envelope-from git) Date: Sun, 28 Feb 2021 22:55:44 GMT Message-Id: <202102282255.11SMtih6040207@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem <rmacklem@FreeBSD.org> Subject: git: 15bed8c46b32 - main - nfsclient: add nfs node locking around uses of n_direofoffset MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 15bed8c46b32dec19e922cb89e12c8970867a303 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 22:55:44 -0000 The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=15bed8c46b32dec19e922cb89e12c8970867a303 commit 15bed8c46b32dec19e922cb89e12c8970867a303 Author: Rick Macklem <rmacklem@FreeBSD.org> AuthorDate: 2021-02-28 22:53:54 +0000 Commit: Rick Macklem <rmacklem@FreeBSD.org> CommitDate: 2021-02-28 22:53:54 +0000 nfsclient: add nfs node locking around uses of n_direofoffset During code inspection I noticed that the n_direofoffset field of the NFS node was being manipulated without any lock being held to make it SMP safe. This patch adds locking of the NFS node's mutex around handling of n_direofoffset to make it SMP safe. I have not seen any failure that could be attributed to n_direofoffset being manipulated concurrently by multiple processors, but I think this is possible, since directories are read with shared vnode locking, plus locks only on individual buffer cache blocks. However, there have been as yet unexplained issues w.r.t reading large directories over NFS that could have conceivably been caused by concurrent manipulation of n_direofoffset. MFC after: 2 weeks --- sys/fs/nfsclient/nfs_clbio.c | 10 ++++++++++ sys/fs/nfsclient/nfs_clsubs.c | 3 ++- sys/fs/nfsclient/nfs_clvnops.c | 21 ++++++++++++++++----- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index 832b44b99c8d..ff9f446ff1ef 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -584,11 +584,14 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) break; case VDIR: NFSINCRGLOBAL(nfsstatsv1.biocache_readdirs); + NFSLOCKNODE(np); if (np->n_direofoffset && uio->uio_offset >= np->n_direofoffset) { + NFSUNLOCKNODE(np); error = 0; goto out; } + NFSUNLOCKNODE(np); lbn = (uoff_t)uio->uio_offset / NFS_DIRBLKSIZ; on = uio->uio_offset & (NFS_DIRBLKSIZ - 1); bp = nfs_getcacheblk(vp, lbn, NFS_DIRBLKSIZ, td); @@ -620,11 +623,14 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) * NFSERR_BAD_COOKIE (double yuch!). */ for (i = 0; i <= lbn && !error; i++) { + NFSLOCKNODE(np); if (np->n_direofoffset && (i * NFS_DIRBLKSIZ) >= np->n_direofoffset) { + NFSUNLOCKNODE(np); error = 0; goto out; } + NFSUNLOCKNODE(np); bp = nfs_getcacheblk(vp, i, NFS_DIRBLKSIZ, td); if (!bp) { error = newnfs_sigintr(nmp, td); @@ -667,11 +673,13 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) * (You need the current block first, so that you have the * directory offset cookie of the next block.) */ + NFSLOCKNODE(np); if (nmp->nm_readahead > 0 && (bp->b_flags & B_INVAL) == 0 && (np->n_direofoffset == 0 || (lbn + 1) * NFS_DIRBLKSIZ < np->n_direofoffset) && incore(&vp->v_bufobj, lbn + 1) == NULL) { + NFSUNLOCKNODE(np); rabp = nfs_getcacheblk(vp, lbn + 1, NFS_DIRBLKSIZ, td); if (rabp) { if ((rabp->b_flags & (B_CACHE|B_DELWRI)) == 0) { @@ -688,6 +696,7 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) brelse(rabp); } } + NFSLOCKNODE(np); } /* * Unlike VREG files, whos buffer size ( bp->b_bcount ) is @@ -704,6 +713,7 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) n = lmin(uio->uio_resid, NFS_DIRBLKSIZ - bp->b_resid - on); if (np->n_direofoffset && n > np->n_direofoffset - uio->uio_offset) n = np->n_direofoffset - uio->uio_offset; + NFSUNLOCKNODE(np); break; default: printf(" ncl_bioread: type %x unexpected\n", vp->v_type); diff --git a/sys/fs/nfsclient/nfs_clsubs.c b/sys/fs/nfsclient/nfs_clsubs.c index f26ad0452e07..d361c175aa8e 100644 --- a/sys/fs/nfsclient/nfs_clsubs.c +++ b/sys/fs/nfsclient/nfs_clsubs.c @@ -118,6 +118,7 @@ ncl_uninit(struct vfsconf *vfsp) #endif } +/* Returns with NFSLOCKNODE() held. */ void ncl_dircookie_lock(struct nfsnode *np) { @@ -125,7 +126,6 @@ ncl_dircookie_lock(struct nfsnode *np) while (np->n_flag & NDIRCOOKIELK) (void) msleep(&np->n_flag, &np->n_mtx, PZERO, "nfsdirlk", 0); np->n_flag |= NDIRCOOKIELK; - NFSUNLOCKNODE(np); } void @@ -330,6 +330,7 @@ ncl_invaldir(struct vnode *vp) KASSERT(vp->v_type == VDIR, ("nfs: invaldir not dir")); ncl_dircookie_lock(np); np->n_direofoffset = 0; + NFSUNLOCKNODE(np); np->n_cookieverf.nfsuquad[0] = 0; np->n_cookieverf.nfsuquad[1] = 0; if (LIST_FIRST(&np->n_cookies)) diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index fc5445ef1e76..217290b080b3 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -2369,8 +2369,10 @@ nfs_readdir(struct vop_readdir_args *ap) /* * First, check for hit on the EOF offset cache */ + NFSLOCKNODE(np); if (np->n_direofoffset > 0 && uio->uio_offset >= np->n_direofoffset && (np->n_flag & NMODIFIED) == 0) { + NFSUNLOCKNODE(np); if (VOP_GETATTR(vp, &vattr, ap->a_cred) == 0) { NFSLOCKNODE(np); if ((NFS_ISV4(vp) && np->n_change == vattr.va_filerev) || @@ -2383,7 +2385,8 @@ nfs_readdir(struct vop_readdir_args *ap) } else NFSUNLOCKNODE(np); } - } + } else + NFSUNLOCKNODE(np); /* * NFS always guarantees that directory entries don't straddle @@ -2436,6 +2439,7 @@ ncl_readdirrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred, * If there is no cookie, assume directory was stale. */ ncl_dircookie_lock(dnp); + NFSUNLOCKNODE(dnp); cookiep = ncl_getcookie(dnp, uiop->uio_offset, 0); if (cookiep) { cookie = *cookiep; @@ -2458,12 +2462,15 @@ ncl_readdirrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred, * We are now either at the end of the directory or have filled * the block. */ - if (eof) + if (eof) { + NFSLOCKNODE(dnp); dnp->n_direofoffset = uiop->uio_offset; - else { + NFSUNLOCKNODE(dnp); + } else { if (uiop->uio_resid > 0) printf("EEK! readdirrpc resid > 0\n"); ncl_dircookie_lock(dnp); + NFSUNLOCKNODE(dnp); cookiep = ncl_getcookie(dnp, uiop->uio_offset, 1); *cookiep = cookie; ncl_dircookie_unlock(dnp); @@ -2496,6 +2503,7 @@ ncl_readdirplusrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred, * If there is no cookie, assume directory was stale. */ ncl_dircookie_lock(dnp); + NFSUNLOCKNODE(dnp); cookiep = ncl_getcookie(dnp, uiop->uio_offset, 0); if (cookiep) { cookie = *cookiep; @@ -2517,12 +2525,15 @@ ncl_readdirplusrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred, * We are now either at end of the directory or have filled the * the block. */ - if (eof) + if (eof) { + NFSLOCKNODE(dnp); dnp->n_direofoffset = uiop->uio_offset; - else { + NFSUNLOCKNODE(dnp); + } else { if (uiop->uio_resid > 0) printf("EEK! readdirplusrpc resid > 0\n"); ncl_dircookie_lock(dnp); + NFSUNLOCKNODE(dnp); cookiep = ncl_getcookie(dnp, uiop->uio_offset, 1); *cookiep = cookie; ncl_dircookie_unlock(dnp); From owner-dev-commits-src-main@freebsd.org Sun Feb 28 23:39:01 2021 Return-Path: <owner-dev-commits-src-main@freebsd.org> Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3DBB554F7E3; Sun, 28 Feb 2021 23:39: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dpfx11MDYz3LyP; Sun, 28 Feb 2021 23:39: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 1EDAC19A58; Sun, 28 Feb 2021 23:39: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 11SNd1pT093545; Sun, 28 Feb 2021 23:39:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11SNd1IB093544; Sun, 28 Feb 2021 23:39:01 GMT (envelope-from git) Date: Sun, 28 Feb 2021 23:39:01 GMT Message-Id: <202102282339.11SNd1IB093544@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov <kib@FreeBSD.org> Subject: git: 55eb51ab6649 - main - Add VOP_READ_PGCACHE(9) 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: 55eb51ab6649c3c10bf201f82a4ec410fe4da4a2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-main/> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Help: <mailto:dev-commits-src-main-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main>, <mailto:dev-commits-src-main-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Feb 2021 23:39:01 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=55eb51ab6649c3c10bf201f82a4ec410fe4da4a2 commit 55eb51ab6649c3c10bf201f82a4ec410fe4da4a2 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-02-28 01:08:37 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-02-28 23:38:33 +0000 Add VOP_READ_PGCACHE(9) PR: 253894 Reviewed by: gbe, rwatson Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28980 --- share/man/man9/Makefile | 1 + share/man/man9/VOP_RDWR.9 | 1 + share/man/man9/VOP_READ_PGCACHE.9 | 134 ++++++++++++++++++++++++++++++++++++++ share/man/man9/vnode.9 | 1 + 4 files changed, 137 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 7b55bf8516c7..50e760d3e047 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -425,6 +425,7 @@ MAN= accept_filter.9 \ VOP_PATHCONF.9 \ VOP_PRINT.9 \ VOP_RDWR.9 \ + VOP_READ_PGCACHE.9 \ VOP_READDIR.9 \ VOP_READLINK.9 \ VOP_REALLOCBLKS.9 \ diff --git a/share/man/man9/VOP_RDWR.9 b/share/man/man9/VOP_RDWR.9 index 4719ebabd094..2de7f9c9e7d2 100644 --- a/share/man/man9/VOP_RDWR.9 +++ b/share/man/man9/VOP_RDWR.9 @@ -83,6 +83,7 @@ Data already in VMIO space. .El .Sh LOCKS The file should be locked on entry and will still be locked on exit. +Rangelock covering the whole i/o range should be owned around the call. .Sh RETURN VALUES Zero is returned on success, otherwise an error code is returned. .Sh ERRORS diff --git a/share/man/man9/VOP_READ_PGCACHE.9 b/share/man/man9/VOP_READ_PGCACHE.9 new file mode 100644 index 000000000000..3e6ae9be4fc7 --- /dev/null +++ b/share/man/man9/VOP_READ_PGCACHE.9 @@ -0,0 +1,134 @@ +.\" Copyright (c) 2021 The FreeBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This documentation was written by +.\" Konstantin Belousov <kib@FreeBSD.org> under sponsorship +.\" from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS 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 February 28, 2021 +.Dt VOP_READ_PGCACHE 9 +.Os +.Sh NAME +.Nm VOP_READ_PGCACHE +.Nd read a file, fast +.Sh SYNOPSIS +.In sys/param.h +.In sys/vnode.h +.In sys/uio.h +.Ft int +.Fo VOP_READ_PGCACHE +.Fa "struct vnode *vp" +.Fa "struct uio *uio" +.Fa "int ioflag" +.Fa "struct ucred *cred" +.Fc +.Sh DESCRIPTION +This entry point reads the contents of a file. +The intent is to provide the data from caches, which do not require +expensive operations or any disk IO. +For instance, if filesystem uses normal VM page cache and maintains +.Dv v_object +lifetime, it can use +.Xr vn_read_from_obj 9 +helper to return data from the resident +.Dv vp->v_object +pages. +.Pp +The filesystem indicates support for the +.Nm +on specific vnode by setting the +.Dv VIRF_PGREAD +flag in +.Dv vp->v_irflag . +.Pp +The function does not need to satisfy the whole request; it also might choose +to not provide any data. +In these cases, the +.Fa uio +must be advanced by the amount of read data, +.Nm +should return +.Er EJUSTRETURN , +and VFS would handle the rest of the read operation using the +.Xr VOP_READ 9 . +.Pp +The VFS layer does the same deadlock avoidance for accessing userspace +pages from +.Nm +as for +.Xr VOP_READ 9 . +.Pp +Vnode is not locked on the call entry and should not be locked on return. +For a filesystem that requires vnode lock to return any data, it does +not make sense to implement +.Nm +(and set +.Dv VIRF_PGREAD +flag) since VFS arranges the call to +.Xr VOP_READ 9 +as needed. +.Pp +The arguments are: +.Bl -tag -width ioflag +.It Fa vp +The vnode of the file. +.It Fa uio +The location of the data to be read. +.It Fa ioflag +Various flags, see +.Xr VOP_READ 9 +for the list. +.It Fa cred +The credentials of the caller. +.El +.Pp +.Nm +does not handle non-zero +.Fa ioflag +argument. +.Sh LOCKS +The file should be referenced on entry on entry and will still be +referenced on exit. +Rangelock covering the whole read range should be owned around the call. +.Sh RETURN VALUES +Zero is returned on success, when the whole request is satisfied, and no +more data cannot be provided for it by any means. +If more data can be returned, but +.Nm +was unable to provide it, +.Er EJUSTRETURN +must be returned. +The +.Dv uio +records should be updated according to the partial operation done. +.Pp +Otherwise an error code is returned, +same as from +.Xr VOP_READ 9 +.Sh SEE ALSO +.Xr uiomove 9 , +.Xr vnode 9 , +.Xr VOP_READ 9 diff --git a/share/man/man9/vnode.9 b/share/man/man9/vnode.9 index 5ff45d7a1364..8d8da46b93ea 100644 --- a/share/man/man9/vnode.9 +++ b/share/man/man9/vnode.9 @@ -181,6 +181,7 @@ intertwining of VM Objects and Vnodes. .Xr VOP_PATHCONF 9 , .Xr VOP_PRINT 9 , .Xr VOP_RDWR 9 , +.Xr VOP_READ_PGCACHE 9 , .Xr VOP_READDIR 9 , .Xr VOP_READLINK 9 , .Xr VOP_REALLOCBLKS 9 ,