From owner-svn-src-stable@freebsd.org Sun May 31 21:44:03 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F7082F28C2; Sun, 31 May 2020 21:44:03 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ZsJM2z7cz413b; Sun, 31 May 2020 21:44:03 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 60AC120AB3; Sun, 31 May 2020 21:44:03 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 04VLi392008892; Sun, 31 May 2020 21:44:03 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04VLhxtg008845; Sun, 31 May 2020 21:43:59 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <202005312143.04VLhxtg008845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Sun, 31 May 2020 21:43:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361674 - in stable/12: contrib/bmake contrib/bmake/filemon contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake usr.bin/bmake/unit-tests X-SVN-Group: stable-12 X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: in stable/12: contrib/bmake contrib/bmake/filemon contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake usr.bin/bmake/unit-tests X-SVN-Commit-Revision: 361674 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2020 21:44:03 -0000 Author: sjg Date: Sun May 31 21:43:59 2020 New Revision: 361674 URL: https://svnweb.freebsd.org/changeset/base/361674 Log: Update to bmake-20200517 MFC of r341652, r342376, r361307 Changes since 20180512 are mostly portability related hence the large gap in versions imported. There are however some bug fixes, and a rework of filemon handling. In NetBSD make/filemon/filemon_ktrace.c allows use of fktrace and elimination of filemon(4) which has not had the TLC it needs. FreeBSD filemon(4) is in much better shape, so bmake/filemon/filemon_dev.c allows use of that, with a bit less overhead than the ktrace model. Summary of changes from ChangeLog o str.c: empty string does not match % pattern plus unit-test changes o var.c: import handling of old sysV style modifier using '%' o str.c: refactor brk_string o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD a blank command is perfectly valid. o meta.c: meta_oodate, check for corrupted meta file earlier and more often. * meta.c: meta_compat_parent check for USE_FILEMON patch from Soeren Tempel o meta.c: fix compat mode, need to call meta_job_output() o job.c: extra fds for meta mode not needed if using filemon_dev o meta.c: avoid passing NULL to filemon_*() when meta_needed() returns FALSE. o filemon/filemon_{dev,ktrace}.c: allow selection of filemon implementation. filemon_dev.c uses the kernel module while filemon_ktrace.c leverages the fktrace api available in NetBSD. filemon_ktrace.c can hopefully form the basis for adding support for other tracing mechanisms such as strace on Linux. o meta.c: when target is out-of-date per normal make rules record value of .OODATE in meta file. o parse.c: don't pass NULL to realpath(3) some versions cannot handle it. o parse.c: ParseDoDependency: free paths rather than assert o parse.c: ParseVErrorInternal use .PARSEDIR and apply if relative, and then use .PARSEFILE for consistent result. o parse.c: ParseVErrorInternal use .CURDIR if .PARSEDIR is relative o var.c: avoid SEGFAULT in .unexport-env when MAKELEVEL is not set o var.c: add :q o dir.c: cleanup caching of stats plus more unit-tests Added: stable/12/contrib/bmake/filemon/ - copied from r361307, head/contrib/bmake/filemon/ stable/12/contrib/bmake/mk/compiler.mk - copied unchanged from r361307, head/contrib/bmake/mk/compiler.mk stable/12/contrib/bmake/mk/dirdeps-targets.mk - copied unchanged from r361307, head/contrib/bmake/mk/dirdeps-targets.mk stable/12/contrib/bmake/unit-tests/Makefile - copied unchanged from r361307, head/contrib/bmake/unit-tests/Makefile stable/12/contrib/bmake/unit-tests/Makefile.config.in - copied unchanged from r361307, head/contrib/bmake/unit-tests/Makefile.config.in stable/12/contrib/bmake/unit-tests/cond-late.exp - copied unchanged from r361307, head/contrib/bmake/unit-tests/cond-late.exp stable/12/contrib/bmake/unit-tests/cond-late.mk - copied unchanged from r361307, head/contrib/bmake/unit-tests/cond-late.mk stable/12/contrib/bmake/unit-tests/dollar.exp - copied unchanged from r361307, head/contrib/bmake/unit-tests/dollar.exp stable/12/contrib/bmake/unit-tests/dollar.mk - copied unchanged from r361307, head/contrib/bmake/unit-tests/dollar.mk stable/12/contrib/bmake/unit-tests/include-main.exp - copied unchanged from r361307, head/contrib/bmake/unit-tests/include-main.exp stable/12/contrib/bmake/unit-tests/include-main.mk - copied unchanged from r361307, head/contrib/bmake/unit-tests/include-main.mk stable/12/contrib/bmake/unit-tests/include-sub.mk - copied unchanged from r361307, head/contrib/bmake/unit-tests/include-sub.mk stable/12/contrib/bmake/unit-tests/include-subsub.mk - copied unchanged from r361307, head/contrib/bmake/unit-tests/include-subsub.mk stable/12/contrib/bmake/unit-tests/varmod-edge.exp - copied unchanged from r361307, head/contrib/bmake/unit-tests/varmod-edge.exp stable/12/contrib/bmake/unit-tests/varmod-edge.mk - copied unchanged from r361307, head/contrib/bmake/unit-tests/varmod-edge.mk stable/12/contrib/bmake/unit-tests/varquote.exp - copied unchanged from r341652, head/contrib/bmake/unit-tests/varquote.exp stable/12/contrib/bmake/unit-tests/varquote.mk - copied, changed from r341652, head/contrib/bmake/unit-tests/varquote.mk Deleted: stable/12/contrib/bmake/unit-tests/Makefile.in Modified: stable/12/contrib/bmake/ChangeLog stable/12/contrib/bmake/FILES stable/12/contrib/bmake/Makefile stable/12/contrib/bmake/Makefile.config.in stable/12/contrib/bmake/VERSION stable/12/contrib/bmake/arch.c stable/12/contrib/bmake/bmake.1 stable/12/contrib/bmake/boot-strap stable/12/contrib/bmake/bsd.after-import.mk stable/12/contrib/bmake/compat.c stable/12/contrib/bmake/config.h.in stable/12/contrib/bmake/configure stable/12/contrib/bmake/configure.in stable/12/contrib/bmake/dir.c stable/12/contrib/bmake/dirname.c stable/12/contrib/bmake/job.c stable/12/contrib/bmake/make-bootstrap.sh.in stable/12/contrib/bmake/make.1 stable/12/contrib/bmake/make.h stable/12/contrib/bmake/meta.c stable/12/contrib/bmake/meta.h stable/12/contrib/bmake/mk/ChangeLog stable/12/contrib/bmake/mk/FILES stable/12/contrib/bmake/mk/autodep.mk stable/12/contrib/bmake/mk/dirdeps-options.mk stable/12/contrib/bmake/mk/dirdeps.mk stable/12/contrib/bmake/mk/doc.mk stable/12/contrib/bmake/mk/dpadd.mk stable/12/contrib/bmake/mk/gendirdeps.mk stable/12/contrib/bmake/mk/init.mk stable/12/contrib/bmake/mk/install-mk stable/12/contrib/bmake/mk/lib.mk stable/12/contrib/bmake/mk/meta.autodep.mk stable/12/contrib/bmake/mk/meta.stage.mk stable/12/contrib/bmake/mk/meta.sys.mk stable/12/contrib/bmake/mk/meta2deps.py stable/12/contrib/bmake/mk/mk-files.txt stable/12/contrib/bmake/mk/options.mk stable/12/contrib/bmake/mk/sys.mk stable/12/contrib/bmake/mk/sys.vars.mk stable/12/contrib/bmake/mk/sys/AIX.mk stable/12/contrib/bmake/mk/sys/Darwin.mk stable/12/contrib/bmake/mk/sys/Generic.mk stable/12/contrib/bmake/mk/sys/HP-UX.mk stable/12/contrib/bmake/mk/sys/IRIX.mk stable/12/contrib/bmake/mk/sys/Linux.mk stable/12/contrib/bmake/mk/sys/NetBSD.mk stable/12/contrib/bmake/mk/sys/OSF1.mk stable/12/contrib/bmake/mk/sys/OpenBSD.mk stable/12/contrib/bmake/mk/sys/SunOS.mk stable/12/contrib/bmake/mk/sys/UnixWare.mk stable/12/contrib/bmake/mk/whats.mk stable/12/contrib/bmake/nonints.h stable/12/contrib/bmake/parse.c stable/12/contrib/bmake/str.c stable/12/contrib/bmake/unit-tests/escape.mk stable/12/contrib/bmake/unit-tests/forloop.exp stable/12/contrib/bmake/unit-tests/forloop.mk stable/12/contrib/bmake/unit-tests/modorder.mk stable/12/contrib/bmake/unit-tests/sysv.exp stable/12/contrib/bmake/unit-tests/sysv.mk stable/12/contrib/bmake/util.c stable/12/contrib/bmake/var.c stable/12/usr.bin/bmake/Makefile stable/12/usr.bin/bmake/Makefile.config stable/12/usr.bin/bmake/Makefile.depend stable/12/usr.bin/bmake/config.h stable/12/usr.bin/bmake/unit-tests/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/bmake/ChangeLog ============================================================================== --- stable/12/contrib/bmake/ChangeLog Sun May 31 21:38:33 2020 (r361673) +++ stable/12/contrib/bmake/ChangeLog Sun May 31 21:43:59 2020 (r361674) @@ -1,3 +1,172 @@ +2020-05-17 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200517 + Merge with NetBSD make, pick up + o modified dollar tests to avoid shell dependencies + o new tests for .INCLUDEFROM + +2020-05-16 Simon J Gerraty + + * unit-tests/dollar.mk: tweak '1 dollar literal' test + to not depend so much on shell behavior + +2020-05-10 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200510 + Merge with NetBSD make, pick up + o unit test for dollar handling + +2020-05-06 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200506 + Merge with NetBSD make, pick up + o str.c: empty string does not match % pattern + plus unit-test changes + +2020-05-04 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200504 + May the 4th be with you + Merge with NetBSD make, pick up + o var.c: import handling of old sysV style modifier using '%' + o str.c: refactor brk_string + o unit-tests: add test case for lazy conditions + +2020-04-18 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200418 + + * configure.in: use_makefile=no for cygwin et al. + case insensitive filesystems just don't work if both + makefile and Makefile exist. + NOTE: bmake does not support cygwin and likely never will, + but if brave souls want to try it - help them out. + +2020-04-02 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200402 + Merge with NetBSD make, pick up + o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD + a blank command is perfectly valid. + +2020-03-30 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200330 + Merge with NetBSD make, pick up + o make.h: extern debug_file + +2020-03-18 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200318 + Merge with NetBSD make, pick up + o meta.c: meta_oodate, check for corrupted meta file + earlier and more often. + +2020-02-20 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200220 + +2020-02-19 Simon J Gerraty + + * boot-strap: unset MAKEFLAGS + +2020-02-12 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200212 + * meta.c: meta_compat_parent check for USE_FILEMON + patch from Soeren Tempel + +2020-02-05 Simon J Gerraty + + * VERSION: 20200205 + Merge with NetBSD make, pick up + o meta.c: fix compat mode, need to call meta_job_output() + o job.c: extra fds for meta mode not needed if using filemon_dev + +2020-01-22 Simon J Gerraty + + * VERSION: 20200122 + Merge with NetBSD make, pick up + o meta.c: avoid passing NULL to filemon_*() when meta_needed() + returns FALSE. + +2020-01-21 Simon J Gerraty + + * VERSION: 20200121 + Merge with NetBSD make, pick up + o filemon/filemon_{dev,ktrace}.c: allow selection of + filemon implementation. filemon_dev.c uses the kernel module + while filemon_ktrace.c leverages the fktrace api available in + NetBSD. filemon_ktrace.c can hopefully form the basis for + adding support for other tracing mechanisms such as strace on + Linux. + o meta.c: when target is out-of-date per normal make rules + record value of .OODATE in meta file. + +2019-09-26 Simon J Gerraty + + * VERSION: 20190926 + Merge with NetBSD make, pick up + o parse.c: don't pass NULL to realpath(3) + some versions cannot handle it. + +2019-04-09 Simon J Gerraty + + * VERSION: 20190409 + Merge with NetBSD make, pick up + o parse.c: ParseDoDependency: free paths rather than assert + +2018-12-22 Simon J Gerraty + + * VERSION: 20181222 + + * configure.in: add --without-makefile to avoid generating + makefile and make-bootstrap.sh + + * include Makefile.inc if it exists + + * Use Makefile and Makefile.config.in in unit-tests + so we can use just: make obj && make && make test + when bmake is already available. + We add --without-makefile to CONFIGURE_ARGS in this case. + + * tweak bsd.after-import.mk (captures Makefile.config etc + after import to FreeBSD for example) to cope with all the above. + +2018-12-21 Simon J Gerraty + + * VERSION: 20181221 + Merge with NetBSD make, pick up + o parse.c: ParseVErrorInternal use .PARSEDIR + and apply if relative, and then use .PARSEFILE + for consistent result. + +2018-12-20 Simon J Gerraty + + * VERSION: 20181220 + Merge with NetBSD make, pick up + o parse.c: ParseVErrorInternal use .CURDIR if .PARSEDIR + is relative + o var.c: avoid SEGFAULT in .unexport-env + when MAKELEVEL is not set + +2018-12-16 Simon J Gerraty + + * VERSION: 20181216 + Merge with NetBSD make, pick up + o fix for unit-tests/varquote.mk on Debian + +2018-09-21 Simon J. Gerraty + + * VERSION: 20180919 + Merge with NetBSD make, pick up + o var.c: add :q + o dir.c: cleanup caching of stats + +2018-09-21 Simon J Gerraty + + * Makefile.config.in: use += where it makes sense. + 2018-05-12 Simon J. Gerraty * VERSION: 20180512 Modified: stable/12/contrib/bmake/FILES ============================================================================== --- stable/12/contrib/bmake/FILES Sun May 31 21:38:33 2020 (r361673) +++ stable/12/contrib/bmake/FILES Sun May 31 21:43:59 2020 (r361674) @@ -22,6 +22,9 @@ configure.in dir.c dir.h dirname.c +filemon/filemon.h +filemon/filemon_dev.c +filemon/filemon_ktrace.c find_lib.sh for.c getopt.c @@ -94,13 +97,18 @@ suff.c targ.c trace.c trace.h -unit-tests/Makefile.in +unit-tests/Makefile +unit-tests/Makefile.config.in unit-tests/comment.exp unit-tests/comment.mk unit-tests/cond1.exp unit-tests/cond1.mk unit-tests/cond2.exp unit-tests/cond2.mk +unit-tests/cond-late.mk +unit-tests/cond-late.exp +unit-tests/dollar.exp +unit-tests/dollar.mk unit-tests/doterror.exp unit-tests/doterror.mk unit-tests/dotwait.exp @@ -123,6 +131,10 @@ unit-tests/hash.exp unit-tests/hash.mk unit-tests/impsrc.exp unit-tests/impsrc.mk +unit-tests/include-main.exp +unit-tests/include-main.mk +unit-tests/include-sub.mk +unit-tests/include-subsub.mk unit-tests/misc.exp unit-tests/misc.mk unit-tests/moderrs.exp @@ -163,6 +175,10 @@ unit-tests/varcmd.exp unit-tests/varcmd.mk unit-tests/varmisc.exp unit-tests/varmisc.mk +unit-tests/varmod-edge.exp +unit-tests/varmod-edge.mk +unit-tests/varquote.exp +unit-tests/varquote.mk unit-tests/varshell.exp unit-tests/varshell.mk util.c Modified: stable/12/contrib/bmake/Makefile ============================================================================== --- stable/12/contrib/bmake/Makefile Sun May 31 21:38:33 2020 (r361673) +++ stable/12/contrib/bmake/Makefile Sun May 31 21:43:59 2020 (r361674) @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.99 2017/08/13 20:12:53 sjg Exp $ +# $Id: Makefile,v 1.104 2020/02/06 01:33:54 sjg Exp $ PROG= bmake @@ -56,6 +56,7 @@ SRCS+= \ lstSucc.c .-include "VERSION" +.-include "Makefile.inc" # this file gets generated by configure .-include "Makefile.config" @@ -77,12 +78,24 @@ CFLAGS+= -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}} COPTS.main.c+= "-DMAKE_VERSION=\"${_MAKE_VERSION}\"" -# meta mode can be useful even without filemon +# meta mode can be useful even without filemon +# should be set by now +USE_FILEMON ?= no +.if ${USE_FILEMON:tl} != "no" +.PATH: ${.CURDIR}/filemon +SRCS+= filemon_${USE_FILEMON}.c +COPTS.meta.c+= -DUSE_FILEMON -DUSE_FILEMON_${USE_FILEMON:tu} +COPTS.job.c+= ${COPTS.meta.c} + +.if ${USE_FILEMON} == "dev" FILEMON_H ?= /usr/include/dev/filemon/filemon.h .if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h" -COPTS.meta.c += -DHAVE_FILEMON_H -I${FILEMON_H:H} +COPTS.filemon_dev.c += -DHAVE_FILEMON_H -I${FILEMON_H:H} .endif +.endif # USE_FILEMON == dev +.endif # USE_FILEMON + .PATH: ${srcdir} .PATH: ${srcdir}/lst.lib @@ -198,6 +211,8 @@ main.o: ${SRCS} ${.CURDIR}/VERSION .if ${MK_AUTOCONF_MK} == "yes" CONFIGURE_DEPS += ${.CURDIR}/VERSION +# we do not need or want the generated makefile +CONFIGURE_ARGS += --without-makefile .include .endif SHARE_MK?=${SHAREDIR}/mk Modified: stable/12/contrib/bmake/Makefile.config.in ============================================================================== --- stable/12/contrib/bmake/Makefile.config.in Sun May 31 21:38:33 2020 (r361673) +++ stable/12/contrib/bmake/Makefile.config.in Sun May 31 21:43:59 2020 (r361674) @@ -1,6 +1,6 @@ # things set by configure -_MAKE_VERSION=@_MAKE_VERSION@ +_MAKE_VERSION?=@_MAKE_VERSION@ prefix?= @prefix@ srcdir= @srcdir@ @@ -11,10 +11,11 @@ DEFAULT_SYS_PATH?= @default_sys_path@ CPPFLAGS+= @CPPFLAGS@ CFLAGS+= ${CPPFLAGS} @DEFS@ -LDFLAGS= @LDFLAGS@ -LIBOBJS= @LIBOBJS@ -LDADD= @LIBS@ -USE_META= @use_meta@ +LDFLAGS+= @LDFLAGS@ +LIBOBJS+= @LIBOBJS@ +LDADD+= @LIBS@ +USE_META?= @use_meta@ +USE_FILEMON?= @use_filemon@ FILEMON_H?= @filemon_h@ BMAKE_PATH_MAX?= @bmake_path_max@ # used if MAXPATHLEN not defined Modified: stable/12/contrib/bmake/VERSION ============================================================================== --- stable/12/contrib/bmake/VERSION Sun May 31 21:38:33 2020 (r361673) +++ stable/12/contrib/bmake/VERSION Sun May 31 21:43:59 2020 (r361674) @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20180512 +_MAKE_VERSION=20200517 Modified: stable/12/contrib/bmake/arch.c ============================================================================== --- stable/12/contrib/bmake/arch.c Sun May 31 21:38:33 2020 (r361673) +++ stable/12/contrib/bmake/arch.c Sun May 31 21:43:59 2020 (r361674) @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.70 2017/04/16 20:49:09 riastradh Exp $ */ +/* $NetBSD: arch.c,v 1.71 2019/10/05 23:35:57 mrg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: arch.c,v 1.70 2017/04/16 20:49:09 riastradh Exp $"; +static char rcsid[] = "$NetBSD: arch.c,v 1.71 2019/10/05 23:35:57 mrg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: arch.c,v 1.70 2017/04/16 20:49:09 riastradh Exp $"); +__RCSID("$NetBSD: arch.c,v 1.71 2019/10/05 23:35:57 mrg Exp $"); #endif #endif /* not lint */ #endif @@ -682,7 +682,7 @@ ArchStatMember(char *archive, char *member, Boolean ha arh.AR_SIZE[sizeof(arh.AR_SIZE)-1] = '\0'; size = (int)strtol(arh.AR_SIZE, NULL, 10); - (void)strncpy(memName, arh.AR_NAME, sizeof(arh.AR_NAME)); + memcpy(memName, arh.AR_NAME, sizeof(arh.AR_NAME)); for (cp = &memName[AR_MAX_NAME_LEN]; *cp == ' '; cp--) { continue; } Modified: stable/12/contrib/bmake/bmake.1 ============================================================================== --- stable/12/contrib/bmake/bmake.1 Sun May 31 21:38:33 2020 (r361673) +++ stable/12/contrib/bmake/bmake.1 Sun May 31 21:43:59 2020 (r361674) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.272 2018/04/02 04:26:17 dholland Exp $ +.\" $NetBSD: make.1,v 1.273 2018/05/27 01:14:51 christos Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd June 22, 2017 +.Dd May 26, 2018 .Dt BMAKE 1 .Os .Sh NAME @@ -1227,8 +1227,15 @@ due uno quattro tre .Ed .It Cm \&:Q Quotes every shell meta-character in the variable, so that it can be passed +safely to the shell. +.It Cm \&:q +Quotes every shell meta-character in the variable, and also doubles +.Sq $ +characters so that it can be passed safely through recursive invocations of .Nm . +This is equivalent to: +.Sq \&:S/\e\&$/&&/g:Q . .It Cm \&:R Replaces each word in the variable with everything but its suffix. .It Cm \&:range[=count] Modified: stable/12/contrib/bmake/boot-strap ============================================================================== --- stable/12/contrib/bmake/boot-strap Sun May 31 21:38:33 2020 (r361673) +++ stable/12/contrib/bmake/boot-strap Sun May 31 21:43:59 2020 (r361674) @@ -89,6 +89,10 @@ # disable use of filemon(9) which is currently only # available for NetBSD and FreeBSD. # +# --with-filemon=ktrace +# on NetBSD or others with fktrace(2), use ktrace +# version of filemon. +# # --with-filemon="path/to/filemon.h" # enables use of filemon(9) by meta mode. # @@ -111,7 +115,7 @@ # Simon J. Gerraty # RCSid: -# $Id: boot-strap,v 1.49 2016/05/29 00:09:14 sjg Exp $ +# $Id: boot-strap,v 1.51 2020/02/19 16:46:23 sjg Exp $ # # @(#) Copyright (c) 2001 Simon J. Gerraty # @@ -161,6 +165,8 @@ cmd_args="$@" # clear some things from the environment that we care about unset MAKEOBJDIR MAKEOBJDIRPREFIX +# or that might be incompatible +unset MAKE MAKEFLAGS # --install[-host-target] will set this INSTALL_PREFIX= Modified: stable/12/contrib/bmake/bsd.after-import.mk ============================================================================== --- stable/12/contrib/bmake/bsd.after-import.mk Sun May 31 21:38:33 2020 (r361673) +++ stable/12/contrib/bmake/bsd.after-import.mk Sun May 31 21:43:59 2020 (r361674) @@ -1,4 +1,4 @@ -# $Id: bsd.after-import.mk,v 1.13 2017/08/13 00:56:10 sjg Exp $ +# $Id: bsd.after-import.mk,v 1.15 2018/12/30 17:14:24 sjg Exp $ # This makefile is for use when integrating bmake into a BSD build # system. Use this makefile after importing bmake. @@ -63,7 +63,7 @@ MAKEFILE_SED = sed -e '/^MACHINE/d' \ -e 's,${SRCTOP},$${SRCTOP},g' # These are the simple files we want to capture -configured_files= config.h Makefile.config unit-tests/Makefile +configured_files= config.h Makefile.config unit-tests/Makefile.config after-import: bootstrap ${MAKEFILE} .for f in ${configured_files:M*.[ch]} @@ -87,7 +87,6 @@ _makefile: bootstrap ${MAKEFILE} @(echo '# This is a generated file, do NOT edit!'; \ echo '# See ${_this:S,${SRCTOP}/,,}'; \ echo '#'; echo '# $$${HOST_OS}$$'; \ - echo; echo '.sinclude "Makefile.inc"'; \ echo; echo 'SRCTOP?= $${.CURDIR:${.CURDIR:S,${SRCTOP}/,,:C,[^/]+,H,g:S,/,:,g}}'; \ echo; echo '# look here first for config.h'; \ echo 'CFLAGS+= -I$${.CURDIR}'; echo; \ Modified: stable/12/contrib/bmake/compat.c ============================================================================== --- stable/12/contrib/bmake/compat.c Sun May 31 21:38:33 2020 (r361673) +++ stable/12/contrib/bmake/compat.c Sun May 31 21:43:59 2020 (r361674) @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.107 2017/07/20 19:29:54 sjg Exp $ */ +/* $NetBSD: compat.c,v 1.110 2020/01/19 19:42:32 riastradh Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: compat.c,v 1.107 2017/07/20 19:29:54 sjg Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.110 2020/01/19 19:42:32 riastradh Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: compat.c,v 1.107 2017/07/20 19:29:54 sjg Exp $"); +__RCSID("$NetBSD: compat.c,v 1.110 2020/01/19 19:42:32 riastradh Exp $"); #endif #endif /* not lint */ #endif @@ -407,7 +407,7 @@ again: #ifdef USE_META if (useMeta) { - meta_compat_parent(); + meta_compat_parent(cpid); } #endif Modified: stable/12/contrib/bmake/config.h.in ============================================================================== --- stable/12/contrib/bmake/config.h.in Sun May 31 21:38:33 2020 (r361673) +++ stable/12/contrib/bmake/config.h.in Sun May 31 21:43:59 2020 (r361674) @@ -143,7 +143,7 @@ /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL -/* Define to 1 if `struct stat' is a member of `st_rdev'. */ +/* Define to 1 if `st_rdev' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_RDEV /* Define to 1 if your `struct stat' has `st_rdev'. Deprecated, use Modified: stable/12/contrib/bmake/configure ============================================================================== Binary file (source and/or target). No diff available. Modified: stable/12/contrib/bmake/configure.in ============================================================================== --- stable/12/contrib/bmake/configure.in Sun May 31 21:38:33 2020 (r361673) +++ stable/12/contrib/bmake/configure.in Sun May 31 21:43:59 2020 (r361674) @@ -1,11 +1,11 @@ dnl dnl RCSid: -dnl $Id: configure.in,v 1.59 2017/11/26 22:39:20 sjg Exp $ +dnl $Id: configure.in,v 1.63 2020/04/19 05:17:57 sjg Exp $ dnl dnl Process this file with autoconf to produce a configure script dnl AC_PREREQ(2.50) -AC_INIT([bmake], [20171126], [sjg@NetBSD.org]) +AC_INIT([bmake], [20200418], [sjg@NetBSD.org]) AC_CONFIG_HEADERS(config.h) dnl make srcdir absolute @@ -16,6 +16,7 @@ esac dnl get _MAKE_VERSION . $srcdir/VERSION +OS=`uname -s` dnl AC_ARG_WITH(defshell, @@ -32,6 +33,17 @@ no) ;; ;; esac]) dnl +case "$OS" in +CYGWIN*|MINGW*) use_makefile=no;; +*) use_makefile=yes;; +esac +AC_ARG_WITH(makefile, +[ --without-makefile dissable use of generated makefile], +[case "${withval}" in +yes|no) use_makefile=${withval};; +*) AC_MSG_ERROR(bad value ${withval} given for makefile) ;; +esac]) +dnl use_meta=yes AC_ARG_WITH(meta, [ --without-meta dissable use of meta-mode], @@ -41,30 +53,41 @@ yes|no) use_meta=${withval};; esac]) dnl AC_ARG_WITH(filemon, -[ --with-filemon=path/filemon.h indicate path to filemon.h for meta-mode], +[ --with-filemon={no,dev,ktrace,path/filemon.h} indicate filemon method for meta-mode. Path to filemon.h implies dev], [ case "/${withval}" in -/no|*/filemon.h) filemon_h="${withval}";; +/no) use_filemon=no;; +/*trace) filemon_h=no use_filemon="${withval}";; +*/filemon.h) filemon_h="${withval}";; */filemon*) filemon_h="${withval}/filemon.h";; *) AC_MSG_ERROR(bad value ${withval} given for filemon) ;; esac], [ -OS=`uname -s` -for d in "/usr/include/dev/filemon" "$prefix/include/dev/filemon" "$srcdir/filemon" "$srcdir/../filemon" "$srcdir/../../sys/dev/filemon" -do - for x in "/$OS" "" - do - filemon_h="$d$x/filemon.h" - test -s "$filemon_h" && break - done - test -s "$filemon_h" && break -done -test -s "${filemon_h:-/dev/null}" || filemon_h=no +case "$OS" in +NetBSD) filemon_h=no use_filemon=ktrace;; +*) + for d in "/usr/include/dev/filemon" "$prefix/include/dev/filemon" "$srcdir/../../sys/dev/filemon" + do + for x in "/$OS" "" + do + filemon_h="$d$x/filemon.h" + test -s "$filemon_h" && break + done + test -s "$filemon_h" && { use_filemon=dev; break; } + done + ;; +esac +use_filemon=${use_filemon:-no} +case "$use_filemon" in +dev) ;; +*) filemon_h=no;; +esac ]) -dnl echo "Note: use_meta=$use_meta filemon_h=$filemon_h" >&6 +dnl echo "Note: use_meta=$use_meta use_filemon=$use_filemon filemon_h=$filemon_h" >&6 case "$use_meta" in yes) - case "$filemon_h" in - *.h) echo "Using: filemon=$filemon_h" >&6;; + case "$use_filemon" in + no) ;; + *) echo "Using: filemon_${use_filemon}.c" >&6;; esac ;; esac @@ -388,10 +411,14 @@ AC_SUBST(INSTALL) AC_SUBST(GCC) AC_SUBST(diff_u) AC_SUBST(use_meta) +AC_SUBST(use_filemon) AC_SUBST(filemon_h) AC_SUBST(_MAKE_VERSION) -AC_OUTPUT(makefile Makefile.config make-bootstrap.sh unit-tests/Makefile) - +bm_outfiles="Makefile.config unit-tests/Makefile.config make-bootstrap.sh" +if test $use_makefile = yes; then + bm_outfiles="makefile $bm_outfiles" +fi +AC_OUTPUT($bm_outfiles) cat < #ifndef lint #if 0 static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: dir.c,v 1.71 2017/04/16 21:14:47 riastradh Exp $"); +__RCSID("$NetBSD: dir.c,v 1.73 2018/07/12 18:03:31 christos Exp $"); #endif #endif /* not lint */ #endif @@ -268,15 +268,6 @@ struct cache_st { }; /* minimize changes below */ -static time_t -Hash_GetTimeValue(Hash_Entry *entry) -{ - struct cache_st *cst; - - cst = entry->clientPtr; - return cst->mtime; -} - #define CST_LSTAT 1 #define CST_UPDATE 2 @@ -298,6 +289,10 @@ cached_stats(Hash_Table *htp, const char *pathname, st memset(st, 0, sizeof(*st)); st->st_mtime = cst->mtime; st->st_mode = cst->mode; + if (DEBUG(DIR)) { + fprintf(debug_file, "Using cached time %s for %s\n", + Targ_FmtTime(st->st_mtime), pathname); + } return 0; } @@ -315,6 +310,10 @@ cached_stats(Hash_Table *htp, const char *pathname, st cst = entry->clientPtr; cst->mtime = st->st_mtime; cst->mode = st->st_mode; + if (DEBUG(DIR)) { + fprintf(debug_file, " Caching %s for %s\n", + Targ_FmtTime(st->st_mtime), pathname); + } return 0; } @@ -995,14 +994,6 @@ DirLookupSubdir(Path *p, const char *name) } if (cached_stat(file, &stb) == 0) { - /* - * Save the modification time so if it's needed, we don't have - * to fetch it again. - */ - if (DEBUG(DIR)) { - fprintf(debug_file, " Caching %s for %s\n", Targ_FmtTime(stb.st_mtime), - file); - } nearmisses += 1; return (file); } @@ -1134,7 +1125,6 @@ Dir_FindFile(const char *name, Lst path) Boolean hasLastDot = FALSE; /* true we should search dot last */ Boolean hasSlash; /* true if 'name' contains a / */ struct stat stb; /* Buffer for stat, if necessary */ - Hash_Entry *entry; /* Entry for mtimes table */ const char *trailing_dot = "."; /* @@ -1395,24 +1385,14 @@ Dir_FindFile(const char *name, Lst path) } bigmisses += 1; - entry = Hash_FindEntry(&mtimes, name); - if (entry != NULL) { - if (DEBUG(DIR)) { - fprintf(debug_file, " got it (in mtime cache)\n"); - } - return(bmake_strdup(name)); - } else if (cached_stat(name, &stb) == 0) { - if (DEBUG(DIR)) { - fprintf(debug_file, " Caching %s for %s\n", Targ_FmtTime(stb.st_mtime), - name); - } + if (cached_stat(name, &stb) == 0) { return (bmake_strdup(name)); - } else { - if (DEBUG(DIR)) { - fprintf(debug_file, " failed. Returning NULL\n"); - } - return NULL; } + + if (DEBUG(DIR)) { + fprintf(debug_file, " failed. Returning NULL\n"); + } + return NULL; #endif /* notdef */ } @@ -1518,7 +1498,6 @@ Dir_MTime(GNode *gn, Boolean recheck) { char *fullName; /* the full pathname of name */ struct stat stb; /* buffer for finding the mod time */ - Hash_Entry *entry; if (gn->type & OP_ARCHV) { return Arch_MTime(gn); @@ -1569,17 +1548,7 @@ Dir_MTime(GNode *gn, Boolean recheck) fullName = bmake_strdup(gn->name); } - if (!recheck) - entry = Hash_FindEntry(&mtimes, fullName); - else - entry = NULL; - if (entry != NULL) { - stb.st_mtime = Hash_GetTimeValue(entry); - if (DEBUG(DIR)) { - fprintf(debug_file, "Using cached time %s for %s\n", - Targ_FmtTime(stb.st_mtime), fullName); - } - } else if (cached_stats(&mtimes, fullName, &stb, recheck ? CST_UPDATE : 0) < 0) { + if (cached_stats(&mtimes, fullName, &stb, recheck ? CST_UPDATE : 0) < 0) { if (gn->type & OP_MEMBER) { if (fullName != gn->path) free(fullName); Modified: stable/12/contrib/bmake/dirname.c ============================================================================== --- stable/12/contrib/bmake/dirname.c Sun May 31 21:38:33 2020 (r361673) +++ stable/12/contrib/bmake/dirname.c Sun May 31 21:43:59 2020 (r361674) @@ -1,4 +1,4 @@ -/* $NetBSD: dirname.c,v 1.13 2014/07/16 10:52:26 christos Exp $ */ +/* $NetBSD: dirname.c,v 1.14 2018/09/27 00:45:34 kre Exp $ */ /*- * Copyright (c) 1997, 2002 The NetBSD Foundation, Inc. @@ -35,6 +35,11 @@ #ifndef HAVE_DIRNAME #include +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: dirname.c,v 1.14 2018/09/27 00:45:34 kre Exp $"); +#endif /* !LIBC_SCCS && !lint */ + +#include "namespace.h" #include #ifdef HAVE_LIBGEN_H #include @@ -92,7 +97,8 @@ xdirname_r(const char *path, char *buf, size_t buflen) out: if (buf != NULL && buflen != 0) { buflen = MIN(len, buflen - 1); - memcpy(buf, path, buflen); + if (buf != path) + memcpy(buf, path, buflen); buf[buflen] = '\0'; } return len; Modified: stable/12/contrib/bmake/job.c ============================================================================== --- stable/12/contrib/bmake/job.c Sun May 31 21:38:33 2020 (r361673) +++ stable/12/contrib/bmake/job.c Sun May 31 21:43:59 2020 (r361674) @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.195 2018/05/13 22:13:28 sjg Exp $ */ +/* $NetBSD: job.c,v 1.197 2020/02/06 01:13:19 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.195 2018/05/13 22:13:28 sjg Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.197 2020/02/06 01:13:19 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.195 2018/05/13 22:13:28 sjg Exp $"); +__RCSID("$NetBSD: job.c,v 1.197 2020/02/06 01:13:19 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -358,6 +358,8 @@ static Job childExitJob; /* child exit pseudo-job */ #define CHILD_EXIT "." #define DO_JOB_RESUME "R" +static const int npseudojobs = 2; /* number of pseudo-jobs */ + #define TARG_FMT "%s %s ---\n" /* Default format */ #define MESSAGE(fp, gn) \ if (maxJobs != 1 && targPrefix && *targPrefix) \ @@ -389,6 +391,16 @@ static void JobSigReset(void); #endif const char *malloc_options= MALLOC_OPTIONS; +static unsigned +nfds_per_job(void) +{ +#if defined(USE_FILEMON) && !defined(USE_FILEMON_DEV) + if (useMeta) + return 2; +#endif + return 1; +} + static void job_table_dump(const char *where) { @@ -1475,6 +1487,12 @@ JobExec(Job *job, char **argv) Trace_Log(JOBSTART, job); +#ifdef USE_META + if (useMeta) { + meta_job_parent(job, cpid); + } +#endif + /* * Set the current position in the buffer to the beginning * and mark another stream to watch in the outputs mask @@ -2157,12 +2175,24 @@ Job_CatchOutput(void) if (nready == 0) return; - for (i = 2; i < nfds; i++) { + for (i = npseudojobs*nfds_per_job(); i < nfds; i++) { if (!fds[i].revents) continue; job = jobfds[i]; if (job->job_state == JOB_ST_RUNNING) JobDoOutput(job, FALSE); +#if defined(USE_FILEMON) && !defined(USE_FILEMON_DEV) + /* + * With meta mode, we may have activity on the job's filemon + * descriptor too, which at the moment is any pollfd other than + * job->inPollfd. + */ + if (useMeta && job->inPollfd != &fds[i]) { + if (meta_job_event(job) <= 0) { + fds[i].events = 0; /* never mind */ + } + } +#endif if (--nready == 0) return; } @@ -2313,9 +2343,11 @@ Job_Init(void) JobCreatePipe(&childExitJob, 3); - /* We can only need to wait for tokens, children and output from each job */ - fds = bmake_malloc(sizeof (*fds) * (2 + maxJobs)); - jobfds = bmake_malloc(sizeof (*jobfds) * (2 + maxJobs)); + /* Preallocate enough for the maximum number of jobs. */ + fds = bmake_malloc(sizeof(*fds) * + (npseudojobs + maxJobs) * nfds_per_job()); + jobfds = bmake_malloc(sizeof(*jobfds) * + (npseudojobs + maxJobs) * nfds_per_job()); /* These are permanent entries and take slots 0 and 1 */ watchfd(&tokenWaitJob); @@ -2834,6 +2866,14 @@ watchfd(Job *job) jobfds[nfds] = job; job->inPollfd = &fds[nfds]; nfds++; +#if defined(USE_FILEMON) && !defined(USE_FILEMON_DEV) + if (useMeta) { + fds[nfds].fd = meta_job_fd(job); + fds[nfds].events = fds[nfds].fd == -1 ? 0 : POLLIN; + jobfds[nfds] = job; + nfds++; + } +#endif } static void @@ -2844,6 +2884,18 @@ clearfd(Job *job) Punt("Unwatching unwatched job"); i = job->inPollfd - fds; nfds--; +#if defined(USE_FILEMON) && !defined(USE_FILEMON_DEV) + if (useMeta) { + /* + * Sanity check: there should be two fds per job, so the job's + * pollfd number should be even. + */ + assert(nfds_per_job() == 2); + if (i % 2) + Punt("odd-numbered fd with meta"); + nfds--; + } +#endif /* * Move last job in table into hole made by dead job. */ @@ -2851,6 +2903,12 @@ clearfd(Job *job) fds[i] = fds[nfds]; jobfds[i] = jobfds[nfds]; jobfds[i]->inPollfd = &fds[i]; +#if defined(USE_FILEMON) && !defined(USE_FILEMON_DEV) + if (useMeta) { + fds[i + 1] = fds[nfds + 1]; + jobfds[i + 1] = jobfds[nfds + 1]; + } +#endif } job->inPollfd = NULL; } Modified: stable/12/contrib/bmake/make-bootstrap.sh.in ============================================================================== --- stable/12/contrib/bmake/make-bootstrap.sh.in Sun May 31 21:38:33 2020 (r361673) +++ stable/12/contrib/bmake/make-bootstrap.sh.in Sun May 31 21:43:59 2020 (r361674) @@ -23,6 +23,10 @@ MDEFS="-DMAKE_VERSION=\"$MAKE_VERSION\" \ LDFLAGS="@LDFLAGS@" LIBS="@LIBS@" +toUpper() { + ${TR:-tr} abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ +} + do_compile2() { obj="$1"; shift src="$1"; shift @@ -32,7 +36,10 @@ do_compile2() { do_compile() { obj="$1"; shift - src=`basename "$obj" .o`.c + case "$1" in + *.c) src=$1; shift;; + *) src=`basename "$obj" .o`.c;; + esac for d in "$srcdir" "$srcdir/lst.lib" do @@ -52,7 +59,7 @@ do_link() { } BASE_OBJECTS="arch.o buf.o compat.o cond.o dir.o for.o getopt hash.o \ -job.o make.o make_malloc.o metachar.o parse.o sigcompat.o str.o strlist.o \ +make.o make_malloc.o metachar.o parse.o sigcompat.o str.o strlist.o \ suff.o targ.o trace.o var.o util.o" LST_OBJECTS="lstAppend.o lstDupl.o lstInit.o lstOpen.o \ @@ -73,12 +80,22 @@ done case "@use_meta@" in yes) - case "@filemon_h@" in - */filemon.h) FDEFS="-DHAVE_FILEMON_H -I`dirname @filemon_h@`";; + case "@use_filemon@" in + no) MDEFS=;; + *) + MDEFS="-DUSE_FILEMON -DUSE_FILEMON_`echo @use_filemon@ | toUpper`" + case "@use_filemon@,@filemon_h@" in + dev,*/filemon.h) FDEFS="-DHAVE_FILEMON_H -I`dirname @filemon_h@`";; + *) FDEFS=;; + esac + do_compile filemon_@use_filemon@.o filemon/filemon_@use_filemon@.c ${FDEFS} + BASE_OBJECTS="filemon_@use_filemon@.o $BASE_OBJECTS" + ;; esac - do_compile meta.o ${FDEFS} - BASE_OBJECTS="meta.o ${BASE_OBJECTS}" - ;; + do_compile meta.o ${MDEFS} + BASE_OBJECTS="meta.o ${BASE_OBJECTS}" + ;; esac +do_compile job.o ${MDEFS} -do_link bmake main.o ${BASE_OBJECTS} ${LST_OBJECTS} ${LIB_OBJECTS} +do_link bmake main.o job.o ${BASE_OBJECTS} ${LST_OBJECTS} ${LIB_OBJECTS} Modified: stable/12/contrib/bmake/make.1 ============================================================================== --- stable/12/contrib/bmake/make.1 Sun May 31 21:38:33 2020 (r361673) +++ stable/12/contrib/bmake/make.1 Sun May 31 21:43:59 2020 (r361674) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.272 2018/04/02 04:26:17 dholland Exp $ +.\" $NetBSD: make.1,v 1.280 2020/04/27 20:03:08 christos Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd September 27, 2018 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Mon Jun 1 05:14:03 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1ABDA2F8E6C; Mon, 1 Jun 2020 05:14:03 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49b3HZ5XnYz3ZbD; Mon, 1 Jun 2020 05:14:02 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD8AE25FF5; Mon, 1 Jun 2020 05:14:02 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0515E2bH086489; Mon, 1 Jun 2020 05:14:02 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0515E2cL086486; Mon, 1 Jun 2020 05:14:02 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <202006010514.0515E2cL086486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Mon, 1 Jun 2020 05:14:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361686 - stable/12/usr.sbin/bhyve X-SVN-Group: stable-12 X-SVN-Commit-Author: grehan X-SVN-Commit-Paths: stable/12/usr.sbin/bhyve X-SVN-Commit-Revision: 361686 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2020 05:14:03 -0000 Author: grehan Date: Mon Jun 1 05:14:01 2020 New Revision: 361686 URL: https://svnweb.freebsd.org/changeset/base/361686 Log: MFC r361442 Fix pci-passthru MSI issues with OpenBSD guests PR: 245392 Modified: stable/12/usr.sbin/bhyve/pci_emul.c stable/12/usr.sbin/bhyve/pci_emul.h stable/12/usr.sbin/bhyve/pci_passthru.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bhyve/pci_emul.c ============================================================================== --- stable/12/usr.sbin/bhyve/pci_emul.c Mon Jun 1 03:37:58 2020 (r361685) +++ stable/12/usr.sbin/bhyve/pci_emul.c Mon Jun 1 05:14:01 2020 (r361686) @@ -874,7 +874,7 @@ pci_emul_add_msixcap(struct pci_devinst *pi, int msgnu sizeof(msixcap))); } -void +static void msixcap_cfgwrite(struct pci_devinst *pi, int capoff, int offset, int bytes, uint32_t val) { @@ -898,7 +898,7 @@ msixcap_cfgwrite(struct pci_devinst *pi, int capoff, i CFGWRITE(pi, offset, val, bytes); } -void +static void msicap_cfgwrite(struct pci_devinst *pi, int capoff, int offset, int bytes, uint32_t val) { @@ -977,30 +977,34 @@ pci_emul_add_pciecap(struct pci_devinst *pi, int type) /* * This function assumes that 'coff' is in the capabilities region of the - * config space. + * config space. A capoff parameter of zero will force a search for the + * offset and type. */ -static void -pci_emul_capwrite(struct pci_devinst *pi, int offset, int bytes, uint32_t val) +void +pci_emul_capwrite(struct pci_devinst *pi, int offset, int bytes, uint32_t val, + uint8_t capoff, int capid) { - int capid; - uint8_t capoff, nextoff; + uint8_t nextoff; /* Do not allow un-aligned writes */ if ((offset & (bytes - 1)) != 0) return; - /* Find the capability that we want to update */ - capoff = CAP_START_OFFSET; - while (1) { - nextoff = pci_get_cfgdata8(pi, capoff + 1); - if (nextoff == 0) - break; - if (offset >= capoff && offset < nextoff) - break; + if (capoff == 0) { + /* Find the capability that we want to update */ + capoff = CAP_START_OFFSET; + while (1) { + nextoff = pci_get_cfgdata8(pi, capoff + 1); + if (nextoff == 0) + break; + if (offset >= capoff && offset < nextoff) + break; - capoff = nextoff; + capoff = nextoff; + } + assert(offset >= capoff); + capid = pci_get_cfgdata8(pi, capoff); } - assert(offset >= capoff); /* * Capability ID and Next Capability Pointer are readonly. @@ -1017,7 +1021,6 @@ pci_emul_capwrite(struct pci_devinst *pi, int offset, return; } - capid = pci_get_cfgdata8(pi, capoff); switch (capid) { case PCIY_MSI: msicap_cfgwrite(pi, capoff, offset, bytes, val); @@ -1896,7 +1899,7 @@ pci_cfgrw(struct vmctx *ctx, int vcpu, int in, int bus pci_set_cfgdata32(pi, coff, bar); } else if (pci_emul_iscap(pi, coff)) { - pci_emul_capwrite(pi, coff, bytes, *eax); + pci_emul_capwrite(pi, coff, bytes, *eax, 0, 0); } else if (coff >= PCIR_COMMAND && coff < PCIR_REVID) { pci_emul_cmdsts_write(pi, coff, *eax, bytes); } else { Modified: stable/12/usr.sbin/bhyve/pci_emul.h ============================================================================== --- stable/12/usr.sbin/bhyve/pci_emul.h Mon Jun 1 03:37:58 2020 (r361685) +++ stable/12/usr.sbin/bhyve/pci_emul.h Mon Jun 1 05:14:01 2020 (r361686) @@ -212,10 +212,6 @@ typedef void (*pci_lintr_cb)(int b, int s, int pin, in int ioapic_irq, void *arg); int init_pci(struct vmctx *ctx); -void msicap_cfgwrite(struct pci_devinst *pi, int capoff, int offset, - int bytes, uint32_t val); -void msixcap_cfgwrite(struct pci_devinst *pi, int capoff, int offset, - int bytes, uint32_t val); void pci_callback(void); int pci_emul_alloc_bar(struct pci_devinst *pdi, int idx, enum pcibar_type type, uint64_t size); @@ -223,6 +219,8 @@ int pci_emul_alloc_pbar(struct pci_devinst *pdi, int i uint64_t hostbase, enum pcibar_type type, uint64_t size); int pci_emul_add_msicap(struct pci_devinst *pi, int msgnum); int pci_emul_add_pciecap(struct pci_devinst *pi, int pcie_device_type); +void pci_emul_capwrite(struct pci_devinst *pi, int offset, int bytes, + uint32_t val, uint8_t capoff, int capid); void pci_emul_cmd_changed(struct pci_devinst *pi, uint16_t old); void pci_generate_msi(struct pci_devinst *pi, int msgnum); void pci_generate_msix(struct pci_devinst *pi, int msgnum); Modified: stable/12/usr.sbin/bhyve/pci_passthru.c ============================================================================== --- stable/12/usr.sbin/bhyve/pci_passthru.c Mon Jun 1 03:37:58 2020 (r361685) +++ stable/12/usr.sbin/bhyve/pci_passthru.c Mon Jun 1 05:14:01 2020 (r361686) @@ -814,8 +814,8 @@ passthru_cfgread(struct vmctx *ctx, int vcpu, struct p if (coff == PCIR_COMMAND) { if (bytes <= 2) return (-1); - *rv = pci_get_cfgdata16(pi, PCIR_COMMAND) << 16 | - read_config(&sc->psc_sel, PCIR_STATUS, 2); + *rv = read_config(&sc->psc_sel, PCIR_STATUS, 2) << 16 | + pci_get_cfgdata16(pi, PCIR_COMMAND); return (0); } @@ -845,8 +845,8 @@ passthru_cfgwrite(struct vmctx *ctx, int vcpu, struct * MSI capability is emulated */ if (msicap_access(sc, coff)) { - msicap_cfgwrite(pi, sc->psc_msi.capoff, coff, bytes, val); - + pci_emul_capwrite(pi, coff, bytes, val, sc->psc_msi.capoff, + PCIY_MSI); error = vm_setup_pptdev_msi(ctx, vcpu, sc->psc_sel.pc_bus, sc->psc_sel.pc_dev, sc->psc_sel.pc_func, pi->pi_msi.addr, pi->pi_msi.msg_data, @@ -857,7 +857,8 @@ passthru_cfgwrite(struct vmctx *ctx, int vcpu, struct } if (msixcap_access(sc, coff)) { - msixcap_cfgwrite(pi, sc->psc_msix.capoff, coff, bytes, val); + pci_emul_capwrite(pi, coff, bytes, val, sc->psc_msix.capoff, + PCIY_MSIX); if (pi->pi_msix.enabled) { msix_table_entries = pi->pi_msix.table_count; for (i = 0; i < msix_table_entries; i++) { From owner-svn-src-stable@freebsd.org Tue Jun 2 00:49:14 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6AE652F8D58; Tue, 2 Jun 2020 00:49:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49bYMZ27H8z4H5X; Tue, 2 Jun 2020 00:49:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4467114591; Tue, 2 Jun 2020 00:49:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0520nE6i009417; Tue, 2 Jun 2020 00:49:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0520nESt009416; Tue, 2 Jun 2020 00:49:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202006020049.0520nESt009416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Jun 2020 00:49:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361714 - stable/12/sys/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/sys/sys X-SVN-Commit-Revision: 361714 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2020 00:49:14 -0000 Author: emaste Date: Tue Jun 2 00:49:13 2020 New Revision: 361714 URL: https://svnweb.freebsd.org/changeset/base/361714 Log: MFC r361657: elf_common.h: define DF_1_PIE DF_1_PIE indicates that the object is a position-independent executable. Reference: https://docs.oracle.com/cd/E36784_01/html/E36857/chapter6-42444.html Modified: stable/12/sys/sys/elf_common.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/sys/elf_common.h ============================================================================== --- stable/12/sys/sys/elf_common.h Tue Jun 2 00:46:15 2020 (r361713) +++ stable/12/sys/sys/elf_common.h Tue Jun 2 00:49:13 2020 (r361714) @@ -762,6 +762,7 @@ typedef struct { #define DF_1_ORIGIN 0x00000080 /* Process $ORIGIN */ #define DF_1_INTERPOSE 0x00000400 /* Interpose all objects but main */ #define DF_1_NODEFLIB 0x00000800 /* Do not search default paths */ +#define DF_1_PIE 0x08000000 /* Is position-independent executable */ /* Values for l_flags. */ #define LL_NONE 0x0 /* no flags */ From owner-svn-src-stable@freebsd.org Tue Jun 2 00:56:10 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAD1E2F9162; Tue, 2 Jun 2020 00:56:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49bYWZ52bxz4HyK; Tue, 2 Jun 2020 00:56:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A3E2A145C4; Tue, 2 Jun 2020 00:56:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0520uAYN015499; Tue, 2 Jun 2020 00:56:10 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0520uAT1015498; Tue, 2 Jun 2020 00:56:10 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006020056.0520uAT1015498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 2 Jun 2020 00:56:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361716 - stable/12/usr.sbin/certctl X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/usr.sbin/certctl X-SVN-Commit-Revision: 361716 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2020 00:56:10 -0000 Author: markj Date: Tue Jun 2 00:56:10 2020 New Revision: 361716 URL: https://svnweb.freebsd.org/changeset/base/361716 Log: MFC r361655: certctl.8: Correct the HISTORY section. PR: 246190 Modified: stable/12/usr.sbin/certctl/certctl.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/certctl/certctl.8 ============================================================================== --- stable/12/usr.sbin/certctl/certctl.8 Tue Jun 2 00:53:39 2020 (r361715) +++ stable/12/usr.sbin/certctl/certctl.8 Tue Jun 2 00:56:10 2020 (r361716) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 19, 2019 +.Dd May 30, 2020 .Dt CERTCTL 8 .Os .Sh NAME @@ -114,6 +114,6 @@ Default: *.pem *.crt *.cer *.crl *.0 .Sh HISTORY .Nm first appeared in -.Fx 12.0 +.Fx 12.2 .Sh AUTHORS .An Allan Jude Aq Mt allanjude@freebsd.org From owner-svn-src-stable@freebsd.org Tue Jun 2 00:57:50 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 364992F90EF; Tue, 2 Jun 2020 00:57:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49bYYV0jQlz4JB4; Tue, 2 Jun 2020 00:57:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EDFBE14176; Tue, 2 Jun 2020 00:57:49 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0520vnQ7015750; Tue, 2 Jun 2020 00:57:49 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0520vnox015746; Tue, 2 Jun 2020 00:57:49 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006020057.0520vnox015746@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 2 Jun 2020 00:57:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361717 - in stable/12/sys: netinet sys X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12/sys: netinet sys X-SVN-Commit-Revision: 361717 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2020 00:57:50 -0000 Author: markj Date: Tue Jun 2 00:57:48 2020 New Revision: 361717 URL: https://svnweb.freebsd.org/changeset/base/361717 Log: MFC r361263, r361338: Define a module version for accept filter modules. PR: 245870 Modified: stable/12/sys/netinet/accf_data.c stable/12/sys/netinet/accf_dns.c stable/12/sys/netinet/accf_http.c stable/12/sys/sys/socketvar.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/accf_data.c ============================================================================== --- stable/12/sys/netinet/accf_data.c Tue Jun 2 00:56:10 2020 (r361716) +++ stable/12/sys/netinet/accf_data.c Tue Jun 2 00:57:48 2020 (r361717) @@ -42,20 +42,7 @@ __FBSDID("$FreeBSD$"); static int sohasdata(struct socket *so, void *arg, int waitflag); -static struct accept_filter accf_data_filter = { - "dataready", - sohasdata, - NULL, - NULL -}; - -static moduledata_t accf_data_mod = { - "accf_data", - accept_filt_generic_mod_event, - &accf_data_filter -}; - -DECLARE_MODULE(accf_data, accf_data_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); +ACCEPT_FILTER_DEFINE(accf_data, "dataready", sohasdata, NULL, NULL, 1); static int sohasdata(struct socket *so, void *arg, int waitflag) Modified: stable/12/sys/netinet/accf_dns.c ============================================================================== --- stable/12/sys/netinet/accf_dns.c Tue Jun 2 00:56:10 2020 (r361716) +++ stable/12/sys/netinet/accf_dns.c Tue Jun 2 00:57:48 2020 (r361717) @@ -41,6 +41,8 @@ /* check for full DNS request */ static int sohasdns(struct socket *so, void *arg, int waitflag); +ACCEPT_FILTER_DEFINE(accf_dns, "dnsready", sohasdns, NULL, NULL, 1); + struct packet { struct mbuf *m; /* Current mbuf. */ struct mbuf *n; /* nextpkt mbuf. */ @@ -55,21 +57,6 @@ struct packet { /* check we can skip over various parts of DNS request */ static int skippacket(struct sockbuf *sb); - -static struct accept_filter accf_dns_filter = { - "dnsready", - sohasdns, - NULL, - NULL -}; - -static moduledata_t accf_dns_mod = { - "accf_dns", - accept_filt_generic_mod_event, - &accf_dns_filter -}; - -DECLARE_MODULE(accf_dns, accf_dns_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); static int sohasdns(struct socket *so, void *arg, int waitflag) Modified: stable/12/sys/netinet/accf_http.c ============================================================================== --- stable/12/sys/netinet/accf_http.c Tue Jun 2 00:56:10 2020 (r361716) +++ stable/12/sys/netinet/accf_http.c Tue Jun 2 00:57:48 2020 (r361717) @@ -54,28 +54,15 @@ static int mbufstrncmp(struct mbuf *m, struct mbuf *np /* socketbuffer is full */ static int sbfull(struct sockbuf *sb); -static struct accept_filter accf_http_filter = { - "httpready", - sohashttpget, - NULL, - NULL -}; +ACCEPT_FILTER_DEFINE(accf_http, "httpready", sohashttpget, NULL, NULL, 1); -static moduledata_t accf_http_mod = { - "accf_http", - accept_filt_generic_mod_event, - &accf_http_filter -}; - -DECLARE_MODULE(accf_http, accf_http_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); - static int parse_http_version = 1; static SYSCTL_NODE(_net_inet_accf, OID_AUTO, http, CTLFLAG_RW, 0, "HTTP accept filter"); SYSCTL_INT(_net_inet_accf_http, OID_AUTO, parsehttpversion, CTLFLAG_RW, -&parse_http_version, 1, -"Parse http version so that non 1.x requests work"); + &parse_http_version, 1, + "Parse http version so that non 1.x requests work"); #ifdef ACCF_HTTP_DEBUG #define DPRINT(fmt, args...) \ Modified: stable/12/sys/sys/socketvar.h ============================================================================== --- stable/12/sys/sys/socketvar.h Tue Jun 2 00:56:10 2020 (r361716) +++ stable/12/sys/sys/socketvar.h Tue Jun 2 00:57:48 2020 (r361717) @@ -331,6 +331,22 @@ struct accept_filter { SLIST_ENTRY(accept_filter) accf_next; }; +#define ACCEPT_FILTER_DEFINE(modname, filtname, cb, create, destroy, ver) \ + static struct accept_filter modname##_filter = { \ + .accf_name = filtname, \ + .accf_callback = cb, \ + .accf_create = create, \ + .accf_destroy = destroy, \ + }; \ + static moduledata_t modname##_mod = { \ + .name = __XSTRING(modname), \ + .evhand = accept_filt_generic_mod_event, \ + .priv = &modname##_filter, \ + }; \ + DECLARE_MODULE(modname, modname##_mod, SI_SUB_DRIVERS, \ + SI_ORDER_MIDDLE); \ + MODULE_VERSION(modname, ver) + #ifdef MALLOC_DECLARE MALLOC_DECLARE(M_ACCF); MALLOC_DECLARE(M_PCB); From owner-svn-src-stable@freebsd.org Tue Jun 2 20:37:04 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AE2922F8E71; Tue, 2 Jun 2020 20:37:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49c3k84DTMz3TBT; Tue, 2 Jun 2020 20:37:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C68E227AF; Tue, 2 Jun 2020 20:37:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 052Kb4uR050224; Tue, 2 Jun 2020 20:37:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 052Kb4ZN050223; Tue, 2 Jun 2020 20:37:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202006022037.052Kb4ZN050223@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 2 Jun 2020 20:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361729 - stable/12/sys/cam/ctl X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cam/ctl X-SVN-Commit-Revision: 361729 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2020 20:37:04 -0000 Author: mav Date: Tue Jun 2 20:37:04 2020 New Revision: 361729 URL: https://svnweb.freebsd.org/changeset/base/361729 Log: MFC r361502, r361509: Fix fallout of r319722 in CTL HA. ha_lso is a listening socket (unless bind() has failed), so should use solisten_upcall_set(NULL, NULL), not soupcall_clear(). Modified: stable/12/sys/cam/ctl/ctl_ha.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/ctl/ctl_ha.c ============================================================================== --- stable/12/sys/cam/ctl/ctl_ha.c Tue Jun 2 17:33:10 2020 (r361728) +++ stable/12/sys/cam/ctl/ctl_ha.c Tue Jun 2 20:37:04 2020 (r361729) @@ -258,9 +258,11 @@ ctl_ha_lclose(struct ha_softc *softc) { if (softc->ha_lso) { - SOCKBUF_LOCK(&softc->ha_lso->so_rcv); - soupcall_clear(softc->ha_lso, SO_RCV); - SOCKBUF_UNLOCK(&softc->ha_lso->so_rcv); + if (SOLISTENING(softc->ha_lso)) { + SOLISTEN_LOCK(softc->ha_lso); + solisten_upcall_set(softc->ha_lso, NULL, NULL); + SOLISTEN_UNLOCK(softc->ha_lso); + } soclose(softc->ha_lso); softc->ha_lso = NULL; } From owner-svn-src-stable@freebsd.org Tue Jun 2 20:37:31 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C692B2F94B1; Tue, 2 Jun 2020 20:37:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49c3kg4c82z3T4T; Tue, 2 Jun 2020 20:37:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 994AA2236D; Tue, 2 Jun 2020 20:37:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 052KbVPK050288; Tue, 2 Jun 2020 20:37:31 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 052KbVuk050287; Tue, 2 Jun 2020 20:37:31 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202006022037.052KbVuk050287@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 2 Jun 2020 20:37:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361730 - stable/11/sys/cam/ctl X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cam/ctl X-SVN-Commit-Revision: 361730 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2020 20:37:31 -0000 Author: mav Date: Tue Jun 2 20:37:31 2020 New Revision: 361730 URL: https://svnweb.freebsd.org/changeset/base/361730 Log: MFC r361502: Do not remove upcall if we haven't yet. This fixes assertion if we failed to bind listening HA socket. Modified: stable/11/sys/cam/ctl/ctl_ha.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ctl/ctl_ha.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_ha.c Tue Jun 2 20:37:04 2020 (r361729) +++ stable/11/sys/cam/ctl/ctl_ha.c Tue Jun 2 20:37:31 2020 (r361730) @@ -257,7 +257,8 @@ ctl_ha_lclose(struct ha_softc *softc) if (softc->ha_lso) { SOCKBUF_LOCK(&softc->ha_lso->so_rcv); - soupcall_clear(softc->ha_lso, SO_RCV); + if (softc->ha_lso->so_rcv.sb_upcall != NULL) + soupcall_clear(softc->ha_lso, SO_RCV); SOCKBUF_UNLOCK(&softc->ha_lso->so_rcv); soclose(softc->ha_lso); softc->ha_lso = NULL; From owner-svn-src-stable@freebsd.org Tue Jun 2 20:38:19 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 52A8F2F9910; Tue, 2 Jun 2020 20:38:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49c3lb1Xrlz3TNl; Tue, 2 Jun 2020 20:38:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 301C32244A; Tue, 2 Jun 2020 20:38:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 052KcJPD050378; Tue, 2 Jun 2020 20:38:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 052KcJ07050377; Tue, 2 Jun 2020 20:38:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202006022038.052KcJ07050377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 2 Jun 2020 20:38:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361731 - stable/12/sys/cam/ctl X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cam/ctl X-SVN-Commit-Revision: 361731 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2020 20:38:19 -0000 Author: mav Date: Tue Jun 2 20:38:18 2020 New Revision: 361731 URL: https://svnweb.freebsd.org/changeset/base/361731 Log: MFC r361536: Properly check kern_sg_entries for S/G list. ctl_data_print() is called in core context, so does not even know meaning of ext_sg_entries. Modified: stable/12/sys/cam/ctl/ctl_util.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/ctl/ctl_util.c ============================================================================== --- stable/12/sys/cam/ctl/ctl_util.c Tue Jun 2 20:37:31 2020 (r361730) +++ stable/12/sys/cam/ctl/ctl_util.c Tue Jun 2 20:38:18 2020 (r361731) @@ -861,7 +861,7 @@ ctl_data_print(union ctl_io *io) return; if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) return; - if (io->scsiio.ext_sg_entries > 0) /* XXX: Implement */ + if (io->scsiio.kern_sg_entries > 0) /* XXX: Implement */ return; ctl_scsi_path_string(io, path_str, sizeof(path_str)); len = min(io->scsiio.kern_data_len, 4096); From owner-svn-src-stable@freebsd.org Tue Jun 2 20:38:54 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4BD9F2F986C; Tue, 2 Jun 2020 20:38:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49c3mG0l17z3TKS; Tue, 2 Jun 2020 20:38:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 14A302292C; Tue, 2 Jun 2020 20:38:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 052Kcr2q050463; Tue, 2 Jun 2020 20:38:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 052KcrJl050462; Tue, 2 Jun 2020 20:38:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202006022038.052KcrJl050462@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 2 Jun 2020 20:38:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361732 - stable/11/sys/cam/ctl X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cam/ctl X-SVN-Commit-Revision: 361732 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2020 20:38:54 -0000 Author: mav Date: Tue Jun 2 20:38:53 2020 New Revision: 361732 URL: https://svnweb.freebsd.org/changeset/base/361732 Log: MFC r361536: Properly check kern_sg_entries for S/G list. ctl_data_print() is called in core context, so does not even know meaning of ext_sg_entries. Modified: stable/11/sys/cam/ctl/ctl_util.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ctl/ctl_util.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_util.c Tue Jun 2 20:38:18 2020 (r361731) +++ stable/11/sys/cam/ctl/ctl_util.c Tue Jun 2 20:38:53 2020 (r361732) @@ -859,7 +859,7 @@ ctl_data_print(union ctl_io *io) return; if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) return; - if (io->scsiio.ext_sg_entries > 0) /* XXX: Implement */ + if (io->scsiio.kern_sg_entries > 0) /* XXX: Implement */ return; ctl_scsi_path_string(io, path_str, sizeof(path_str)); len = min(io->scsiio.kern_data_len, 4096); From owner-svn-src-stable@freebsd.org Tue Jun 2 20:39:34 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E39642F9B1E; Tue, 2 Jun 2020 20:39:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49c3n25nvQz3Tfg; Tue, 2 Jun 2020 20:39:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C20A622B02; Tue, 2 Jun 2020 20:39:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 052KdYHh050547; Tue, 2 Jun 2020 20:39:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 052KdYjC050546; Tue, 2 Jun 2020 20:39:34 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202006022039.052KdYjC050546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 2 Jun 2020 20:39:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361733 - stable/12/sys/cam/ctl X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cam/ctl X-SVN-Commit-Revision: 361733 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2020 20:39:35 -0000 Author: mav Date: Tue Jun 2 20:39:34 2020 New Revision: 361733 URL: https://svnweb.freebsd.org/changeset/base/361733 Log: MFC r361590: Remove ctl_free_beio() LUN and ctl_io dependencies. This slightly simplifies the code, plus may be a ground for asynchronous buffer free. Modified: stable/12/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/12/sys/cam/ctl/ctl_backend_block.c Tue Jun 2 20:38:53 2020 (r361732) +++ stable/12/sys/cam/ctl/ctl_backend_block.c Tue Jun 2 20:39:34 2020 (r361733) @@ -162,7 +162,6 @@ struct ctl_be_block_lun { cbb_dispatch_t unmap; cbb_dispatch_t get_lba_status; cbb_getattr_t getattr; - uma_zone_t lun_zone; uint64_t size_blocks; uint64_t size_bytes; struct ctl_be_block_softc *softc; @@ -187,9 +186,10 @@ struct ctl_be_block_lun { struct ctl_be_block_softc { struct sx modify_lock; struct mtx lock; - uma_zone_t beio_zone; int num_luns; SLIST_HEAD(, ctl_be_block_lun) lun_list; + uma_zone_t beio_zone; + uma_zone_t buf_zone; }; static struct ctl_be_block_softc backend_block_softc; @@ -202,6 +202,7 @@ struct ctl_be_block_io { struct ctl_sg_entry sg_segs[CTLBLK_MAX_SEGS]; struct iovec xiovecs[CTLBLK_MAX_SEGS]; int bio_cmd; + int two_sglists; int num_segs; int num_bios_sent; int num_bios_done; @@ -310,32 +311,20 @@ ctl_alloc_beio(struct ctl_be_block_softc *softc) static void ctl_free_beio(struct ctl_be_block_io *beio) { - int duplicate_free; + struct ctl_be_block_softc *softc = beio->softc; int i; - duplicate_free = 0; - for (i = 0; i < beio->num_segs; i++) { - if (beio->sg_segs[i].addr == NULL) - duplicate_free++; + uma_zfree(softc->buf_zone, beio->sg_segs[i].addr); - uma_zfree(beio->lun->lun_zone, beio->sg_segs[i].addr); - beio->sg_segs[i].addr = NULL; - /* For compare we had two equal S/G lists. */ - if (ARGS(beio->io)->flags & CTL_LLF_COMPARE) { - uma_zfree(beio->lun->lun_zone, + if (beio->two_sglists) { + uma_zfree(softc->buf_zone, beio->sg_segs[i + CTLBLK_HALF_SEGS].addr); - beio->sg_segs[i + CTLBLK_HALF_SEGS].addr = NULL; } } - if (duplicate_free > 0) { - printf("%s: %d duplicate frees out of %d segments\n", __func__, - duplicate_free, beio->num_segs); - } - - uma_zfree(beio->softc->beio_zone, beio); + uma_zfree(softc->beio_zone, beio); } static void @@ -1272,6 +1261,7 @@ static void ctl_be_block_cw_dispatch_ws(struct ctl_be_block_lun *be_lun, union ctl_io *io) { + struct ctl_be_block_softc *softc = be_lun->softc; struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun; struct ctl_be_block_io *beio; struct ctl_lba_len_flags *lbalen; @@ -1336,7 +1326,7 @@ ctl_be_block_cw_dispatch_ws(struct ctl_be_block_lun *b } else seglen -= seglen % cbe_lun->blocksize; beio->sg_segs[i].len = seglen; - beio->sg_segs[i].addr = uma_zalloc(be_lun->lun_zone, M_WAITOK); + beio->sg_segs[i].addr = uma_zalloc(softc->buf_zone, M_WAITOK); DPRINTF("segment %d addr %p len %zd\n", i, beio->sg_segs[i].addr, beio->sg_segs[i].len); @@ -1590,10 +1580,12 @@ ctl_be_block_dispatch(struct ctl_be_block_lun *be_lun, DPRINTF("%s at LBA %jx len %u @%ju\n", (beio->bio_cmd == BIO_READ) ? "READ" : "WRITE", (uintmax_t)lbalen->lba, lbalen->len, bptrlen->len); - if (lbalen->flags & CTL_LLF_COMPARE) + if (lbalen->flags & CTL_LLF_COMPARE) { + beio->two_sglists = 1; lbas = CTLBLK_HALF_IO_SIZE; - else + } else { lbas = CTLBLK_MAX_IO_SIZE; + } lbas = MIN(lbalen->len - bptrlen->len, lbas / cbe_lun->blocksize); beio->io_offset = (lbalen->lba + bptrlen->len) * cbe_lun->blocksize; beio->io_len = lbas * cbe_lun->blocksize; @@ -1607,17 +1599,17 @@ ctl_be_block_dispatch(struct ctl_be_block_lun *be_lun, * Setup the S/G entry for this chunk. */ beio->sg_segs[i].len = min(CTLBLK_MAX_SEG, len_left); - beio->sg_segs[i].addr = uma_zalloc(be_lun->lun_zone, M_WAITOK); + beio->sg_segs[i].addr = uma_zalloc(softc->buf_zone, M_WAITOK); DPRINTF("segment %d addr %p len %zd\n", i, beio->sg_segs[i].addr, beio->sg_segs[i].len); /* Set up second segment for compare operation. */ - if (lbalen->flags & CTL_LLF_COMPARE) { + if (beio->two_sglists) { beio->sg_segs[i + CTLBLK_HALF_SEGS].len = beio->sg_segs[i].len; beio->sg_segs[i + CTLBLK_HALF_SEGS].addr = - uma_zalloc(be_lun->lun_zone, M_WAITOK); + uma_zalloc(softc->buf_zone, M_WAITOK); } beio->num_segs++; @@ -1627,7 +1619,7 @@ ctl_be_block_dispatch(struct ctl_be_block_lun *be_lun, beio->beio_cont = ctl_be_block_next; io->scsiio.be_move_done = ctl_be_block_move_done; /* For compare we have separate S/G lists for read and datamove. */ - if (lbalen->flags & CTL_LLF_COMPARE) + if (beio->two_sglists) io->scsiio.kern_data_ptr = (uint8_t *)&beio->sg_segs[CTLBLK_HALF_SEGS]; else io->scsiio.kern_data_ptr = (uint8_t *)beio->sg_segs; @@ -2240,13 +2232,6 @@ ctl_be_block_create(struct ctl_be_block_softc *softc, mtx_init(&be_lun->io_lock, "ctlblock io", NULL, MTX_DEF); mtx_init(&be_lun->queue_lock, "ctlblock queue", NULL, MTX_DEF); cbe_lun->options = nvlist_clone(req->args_nvl); - be_lun->lun_zone = uma_zcreate("ctlblock", CTLBLK_MAX_SEG, - NULL, NULL, NULL, NULL, /*align*/ 0, /*flags*/0); - if (be_lun->lun_zone == NULL) { - snprintf(req->error_str, sizeof(req->error_str), - "error allocating UMA zone"); - goto bailout_error; - } if (params->flags & CTL_LUN_FLAG_DEV_TYPE) cbe_lun->lun_type = params->device_type; @@ -2416,8 +2401,6 @@ bailout_error: ctl_be_block_close(be_lun); if (be_lun->dev_path != NULL) free(be_lun->dev_path, M_CTLBLK); - if (be_lun->lun_zone != NULL) - uma_zdestroy(be_lun->lun_zone); nvlist_destroy(cbe_lun->options); mtx_destroy(&be_lun->queue_lock); mtx_destroy(&be_lun->io_lock); @@ -2612,7 +2595,6 @@ ctl_be_block_lun_shutdown(void *lun) taskqueue_free(be_lun->io_taskqueue); if (be_lun->disk_stats != NULL) devstat_remove_entry(be_lun->disk_stats); - uma_zdestroy(be_lun->lun_zone); nvlist_destroy(be_lun->cbe_lun.options); free(be_lun->dev_path, M_CTLBLK); mtx_destroy(&be_lun->queue_lock); @@ -2794,6 +2776,8 @@ ctl_be_block_init(void) mtx_init(&softc->lock, "ctlblock", NULL, MTX_DEF); softc->beio_zone = uma_zcreate("beio", sizeof(struct ctl_be_block_io), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); + softc->buf_zone = uma_zcreate("ctlblock", CTLBLK_MAX_SEG, + NULL, NULL, NULL, NULL, /*align*/ 0, /*flags*/0); SLIST_INIT(&softc->lun_list); return (0); } @@ -2819,6 +2803,7 @@ ctl_be_block_shutdown(void) mtx_lock(&softc->lock); } mtx_unlock(&softc->lock); + uma_zdestroy(softc->buf_zone); uma_zdestroy(softc->beio_zone); mtx_destroy(&softc->lock); sx_destroy(&softc->modify_lock); From owner-svn-src-stable@freebsd.org Tue Jun 2 20:40:12 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C63302F9A44; Tue, 2 Jun 2020 20:40:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49c3nm1Wnfz3V7G; Tue, 2 Jun 2020 20:40:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3712B22A86; Tue, 2 Jun 2020 20:40:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 052KeB2m050677; Tue, 2 Jun 2020 20:40:11 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 052KeAWG050673; Tue, 2 Jun 2020 20:40:10 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202006022040.052KeAWG050673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 2 Jun 2020 20:40:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361734 - stable/12/sys/cam/ctl X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cam/ctl X-SVN-Commit-Revision: 361734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2020 20:40:13 -0000 Author: mav Date: Tue Jun 2 20:40:10 2020 New Revision: 361734 URL: https://svnweb.freebsd.org/changeset/base/361734 Log: MFC r361604: Make struct ctl_be_lun first element of struct ctl_be_*_lun. It allows to remove some extra pointer dereferences and slightly tightens up the code by unification. Modified: stable/12/sys/cam/ctl/ctl.c stable/12/sys/cam/ctl/ctl_backend.h stable/12/sys/cam/ctl/ctl_backend_block.c stable/12/sys/cam/ctl/ctl_backend_ramdisk.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/ctl/ctl.c ============================================================================== --- stable/12/sys/cam/ctl/ctl.c Tue Jun 2 20:39:34 2020 (r361733) +++ stable/12/sys/cam/ctl/ctl.c Tue Jun 2 20:40:10 2020 (r361734) @@ -3081,7 +3081,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, break; if (lun->backend->lun_info != NULL) { - retval = lun->backend->lun_info(lun->be_lun->be_lun, sb); + retval = lun->backend->lun_info(lun->be_lun, sb); if (retval != 0) break; } @@ -4749,7 +4749,7 @@ ctl_free_lun(struct ctl_lun *lun) /* * Tell the backend to free resources, if this LUN has a backend. */ - lun->be_lun->lun_shutdown(lun->be_lun->be_lun); + lun->be_lun->lun_shutdown(lun->be_lun); lun->ie_reportcnt = UINT32_MAX; callout_drain(&lun->ie_callout); @@ -6706,7 +6706,7 @@ ctl_lbp_log_sense_handler(struct ctl_scsiio *ctsio, data = page_index->page_data; if (lun->backend->lun_attr != NULL && - (val = lun->backend->lun_attr(lun->be_lun->be_lun, "blocksavail")) + (val = lun->backend->lun_attr(lun->be_lun, "blocksavail")) != UINT64_MAX) { phdr = (struct scsi_log_param_header *)data; scsi_ulto2b(0x0001, phdr->param_code); @@ -6719,7 +6719,7 @@ ctl_lbp_log_sense_handler(struct ctl_scsiio *ctsio, } if (lun->backend->lun_attr != NULL && - (val = lun->backend->lun_attr(lun->be_lun->be_lun, "blocksused")) + (val = lun->backend->lun_attr(lun->be_lun, "blocksused")) != UINT64_MAX) { phdr = (struct scsi_log_param_header *)data; scsi_ulto2b(0x0002, phdr->param_code); @@ -6732,7 +6732,7 @@ ctl_lbp_log_sense_handler(struct ctl_scsiio *ctsio, } if (lun->backend->lun_attr != NULL && - (val = lun->backend->lun_attr(lun->be_lun->be_lun, "poolblocksavail")) + (val = lun->backend->lun_attr(lun->be_lun, "poolblocksavail")) != UINT64_MAX) { phdr = (struct scsi_log_param_header *)data; scsi_ulto2b(0x00f1, phdr->param_code); @@ -6745,7 +6745,7 @@ ctl_lbp_log_sense_handler(struct ctl_scsiio *ctsio, } if (lun->backend->lun_attr != NULL && - (val = lun->backend->lun_attr(lun->be_lun->be_lun, "poolblocksused")) + (val = lun->backend->lun_attr(lun->be_lun, "poolblocksused")) != UINT64_MAX) { phdr = (struct scsi_log_param_header *)data; scsi_ulto2b(0x00f2, phdr->param_code); @@ -13384,8 +13384,7 @@ ctl_thresh_thread(void *arg) continue; } mtx_unlock(&softc->ctl_lock); // XXX - val = lun->backend->lun_attr( - lun->be_lun->be_lun, attr); + val = lun->backend->lun_attr(lun->be_lun, attr); mtx_lock(&softc->ctl_lock); if (val == UINT64_MAX) continue; Modified: stable/12/sys/cam/ctl/ctl_backend.h ============================================================================== --- stable/12/sys/cam/ctl/ctl_backend.h Tue Jun 2 20:39:34 2020 (r361733) +++ stable/12/sys/cam/ctl/ctl_backend.h Tue Jun 2 20:40:10 2020 (r361734) @@ -80,7 +80,8 @@ typedef enum { MODULE_DEPEND(name, cam, 1, 1, 1) -typedef void (*be_callback_t)(void *be_lun); +struct ctl_be_lun; +typedef void (*be_callback_t)(struct ctl_be_lun *be_lun); /* * The lun_type field is the SCSI device type of this particular LUN. In @@ -147,7 +148,6 @@ struct ctl_be_lun { uint8_t lun_type; /* passed to CTL */ ctl_backend_lun_flags flags; /* passed to CTL */ ctl_lun_serseq serseq; /* passed to CTL */ - void *be_lun; /* passed to CTL */ uint64_t maxlba; /* passed to CTL */ uint32_t blocksize; /* passed to CTL */ uint16_t pblockexp; /* passed to CTL */ @@ -178,8 +178,8 @@ typedef int (*be_func_t)(union ctl_io *io); typedef void (*be_vfunc_t)(union ctl_io *io); typedef int (*be_ioctl_t)(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td); -typedef int (*be_luninfo_t)(void *be_lun, struct sbuf *sb); -typedef uint64_t (*be_lunattr_t)(void *be_lun, const char *attrname); +typedef int (*be_luninfo_t)(struct ctl_be_lun *be_lun, struct sbuf *sb); +typedef uint64_t (*be_lunattr_t)(struct ctl_be_lun *be_lun, const char *attrname); struct ctl_backend_driver { char name[CTL_BE_NAME_LEN]; /* passed to CTL */ Modified: stable/12/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/12/sys/cam/ctl/ctl_backend_block.c Tue Jun 2 20:39:34 2020 (r361733) +++ stable/12/sys/cam/ctl/ctl_backend_block.c Tue Jun 2 20:40:10 2020 (r361734) @@ -152,6 +152,7 @@ typedef uint64_t (*cbb_getattr_t)(struct ctl_be_block_ * and a backend block LUN, and between a backend block LUN and a CTL LUN. */ struct ctl_be_block_lun { + struct ctl_be_lun cbe_lun; /* Must be first element. */ struct ctl_lun_create_params params; char *dev_path; ctl_be_block_type dev_type; @@ -168,7 +169,6 @@ struct ctl_be_block_lun { struct devstat *disk_stats; ctl_be_block_lun_flags flags; SLIST_ENTRY(ctl_be_block_lun) links; - struct ctl_be_lun cbe_lun; struct taskqueue *io_taskqueue; struct task io_task; int num_threads; @@ -272,11 +272,11 @@ static int ctl_be_block_rm(struct ctl_be_block_softc * struct ctl_lun_req *req); static int ctl_be_block_modify(struct ctl_be_block_softc *softc, struct ctl_lun_req *req); -static void ctl_be_block_lun_shutdown(void *be_lun); +static void ctl_be_block_lun_shutdown(struct ctl_be_lun *cbe_lun); static int ctl_be_block_config_write(union ctl_io *io); static int ctl_be_block_config_read(union ctl_io *io); -static int ctl_be_block_lun_info(void *be_lun, struct sbuf *sb); -static uint64_t ctl_be_block_lun_attr(void *be_lun, const char *attrname); +static int ctl_be_block_lun_info(struct ctl_be_lun *cbe_lun, struct sbuf *sb); +static uint64_t ctl_be_block_lun_attr(struct ctl_be_lun *cbe_lun, const char *attrname); static int ctl_be_block_init(void); static int ctl_be_block_shutdown(void); @@ -1736,12 +1736,10 @@ static int ctl_be_block_submit(union ctl_io *io) { struct ctl_be_block_lun *be_lun; - struct ctl_be_lun *cbe_lun; DPRINTF("entered\n"); - cbe_lun = CTL_BACKEND_LUN(io); - be_lun = (struct ctl_be_block_lun *)cbe_lun->be_lun; + be_lun = (struct ctl_be_block_lun *)CTL_BACKEND_LUN(io); /* * Make sure we only get SCSI I/O. @@ -2222,7 +2220,6 @@ ctl_be_block_create(struct ctl_be_block_softc *softc, be_lun = malloc(sizeof(*be_lun), M_CTLBLK, M_ZERO | M_WAITOK); cbe_lun = &be_lun->cbe_lun; - cbe_lun->be_lun = be_lun; be_lun->params = req->reqdata.create; be_lun->softc = softc; STAILQ_INIT(&be_lun->input_queue); @@ -2586,9 +2583,9 @@ bailout_error: } static void -ctl_be_block_lun_shutdown(void *lun) +ctl_be_block_lun_shutdown(struct ctl_be_lun *cbe_lun) { - struct ctl_be_block_lun *be_lun = lun; + struct ctl_be_block_lun *be_lun = (struct ctl_be_block_lun *)cbe_lun; struct ctl_be_block_softc *softc = be_lun->softc; taskqueue_drain_all(be_lun->io_taskqueue); @@ -2619,7 +2616,7 @@ ctl_be_block_config_write(union ctl_io *io) DPRINTF("entered\n"); cbe_lun = CTL_BACKEND_LUN(io); - be_lun = (struct ctl_be_block_lun *)cbe_lun->be_lun; + be_lun = (struct ctl_be_block_lun *)cbe_lun; retval = 0; switch (io->scsiio.cdb[0]) { @@ -2698,13 +2695,11 @@ static int ctl_be_block_config_read(union ctl_io *io) { struct ctl_be_block_lun *be_lun; - struct ctl_be_lun *cbe_lun; int retval = 0; DPRINTF("entered\n"); - cbe_lun = CTL_BACKEND_LUN(io); - be_lun = (struct ctl_be_block_lun *)cbe_lun->be_lun; + be_lun = (struct ctl_be_block_lun *)CTL_BACKEND_LUN(io); switch (io->scsiio.cdb[0]) { case SERVICE_ACTION_IN: @@ -2738,13 +2733,11 @@ ctl_be_block_config_read(union ctl_io *io) } static int -ctl_be_block_lun_info(void *be_lun, struct sbuf *sb) +ctl_be_block_lun_info(struct ctl_be_lun *cbe_lun, struct sbuf *sb) { - struct ctl_be_block_lun *lun; + struct ctl_be_block_lun *lun = (struct ctl_be_block_lun *)cbe_lun; int retval; - lun = (struct ctl_be_block_lun *)be_lun; - retval = sbuf_printf(sb, "\t"); if (retval != 0) goto bailout; @@ -2758,9 +2751,9 @@ bailout: } static uint64_t -ctl_be_block_lun_attr(void *be_lun, const char *attrname) +ctl_be_block_lun_attr(struct ctl_be_lun *cbe_lun, const char *attrname) { - struct ctl_be_block_lun *lun = (struct ctl_be_block_lun *)be_lun; + struct ctl_be_block_lun *lun = (struct ctl_be_block_lun *)cbe_lun; if (lun->getattr == NULL) return (UINT64_MAX); Modified: stable/12/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/12/sys/cam/ctl/ctl_backend_ramdisk.c Tue Jun 2 20:39:34 2020 (r361733) +++ stable/12/sys/cam/ctl/ctl_backend_ramdisk.c Tue Jun 2 20:40:10 2020 (r361734) @@ -106,6 +106,7 @@ typedef enum { } ctl_be_ramdisk_lun_flags; struct ctl_be_ramdisk_lun { + struct ctl_be_lun cbe_lun; /* Must be first element. */ struct ctl_lun_create_params params; int indir; uint8_t **pages; @@ -120,7 +121,6 @@ struct ctl_be_ramdisk_lun { struct ctl_be_ramdisk_softc *softc; ctl_be_ramdisk_lun_flags flags; SLIST_ENTRY(ctl_be_ramdisk_lun) links; - struct ctl_be_lun cbe_lun; struct taskqueue *io_taskqueue; struct task io_task; STAILQ_HEAD(, ctl_io_hdr) cont_queue; @@ -146,7 +146,7 @@ static int ctl_backend_ramdisk_submit(union ctl_io *io static void ctl_backend_ramdisk_worker(void *context, int pending); static int ctl_backend_ramdisk_config_read(union ctl_io *io); static int ctl_backend_ramdisk_config_write(union ctl_io *io); -static uint64_t ctl_backend_ramdisk_lun_attr(void *be_lun, const char *attrname); +static uint64_t ctl_backend_ramdisk_lun_attr(struct ctl_be_lun *cbe_lun, const char *attrname); static int ctl_backend_ramdisk_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td); static int ctl_backend_ramdisk_rm(struct ctl_be_ramdisk_softc *softc, @@ -155,7 +155,7 @@ static int ctl_backend_ramdisk_create(struct ctl_be_ra struct ctl_lun_req *req); static int ctl_backend_ramdisk_modify(struct ctl_be_ramdisk_softc *softc, struct ctl_lun_req *req); -static void ctl_backend_ramdisk_lun_shutdown(void *be_lun); +static void ctl_backend_ramdisk_lun_shutdown(struct ctl_be_lun *cbe_lun); static struct ctl_backend_driver ctl_be_ramdisk_driver = { @@ -367,7 +367,7 @@ static int ctl_backend_ramdisk_cmp(union ctl_io *io) { struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); - struct ctl_be_ramdisk_lun *be_lun = cbe_lun->be_lun; + struct ctl_be_ramdisk_lun *be_lun = (struct ctl_be_ramdisk_lun *)cbe_lun; uint8_t *page; uint8_t info[8]; uint64_t lba; @@ -404,8 +404,8 @@ ctl_backend_ramdisk_cmp(union ctl_io *io) static int ctl_backend_ramdisk_move_done(union ctl_io *io) { - struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); - struct ctl_be_ramdisk_lun *be_lun = cbe_lun->be_lun; + struct ctl_be_ramdisk_lun *be_lun = + (struct ctl_be_ramdisk_lun *)CTL_BACKEND_LUN(io); #ifdef CTL_TIME_IO struct bintime cur_bt; #endif @@ -481,7 +481,7 @@ static void ctl_backend_ramdisk_rw(union ctl_io *io) { struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); - struct ctl_be_ramdisk_lun *be_lun = cbe_lun->be_lun; + struct ctl_be_ramdisk_lun *be_lun = (struct ctl_be_ramdisk_lun *)cbe_lun; struct ctl_sg_entry *sg_entries; uint8_t *page; uint64_t lba; @@ -593,7 +593,7 @@ static int ctl_backend_ramdisk_gls(union ctl_io *io) { struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); - struct ctl_be_ramdisk_lun *be_lun = cbe_lun->be_lun; + struct ctl_be_ramdisk_lun *be_lun = (struct ctl_be_ramdisk_lun *)cbe_lun; struct scsi_get_lba_status_data *data; uint8_t *page; u_int lbaoff; @@ -647,7 +647,7 @@ static void ctl_backend_ramdisk_delete(struct ctl_be_lun *cbe_lun, off_t lba, off_t len, int anchor) { - struct ctl_be_ramdisk_lun *be_lun = cbe_lun->be_lun; + struct ctl_be_ramdisk_lun *be_lun = (struct ctl_be_ramdisk_lun *)cbe_lun; uint8_t *page; uint64_t p, lp; u_int lbaoff; @@ -689,7 +689,7 @@ static void ctl_backend_ramdisk_ws(union ctl_io *io) { struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); - struct ctl_be_ramdisk_lun *be_lun = cbe_lun->be_lun; + struct ctl_be_ramdisk_lun *be_lun = (struct ctl_be_ramdisk_lun *)cbe_lun; struct ctl_lba_len_flags *lbalen = ARGS(io); uint8_t *page; uint64_t lba; @@ -823,9 +823,9 @@ ctl_backend_ramdisk_config_write(union ctl_io *io) } static uint64_t -ctl_backend_ramdisk_lun_attr(void *arg, const char *attrname) +ctl_backend_ramdisk_lun_attr(struct ctl_be_lun *cbe_lun, const char *attrname) { - struct ctl_be_ramdisk_lun *be_lun = arg; + struct ctl_be_ramdisk_lun *be_lun = (struct ctl_be_ramdisk_lun *)cbe_lun; uint64_t val; val = UINT64_MAX; @@ -971,7 +971,6 @@ ctl_backend_ramdisk_create(struct ctl_be_ramdisk_softc be_lun = malloc(sizeof(*be_lun), M_RAMDISK, M_ZERO | M_WAITOK); cbe_lun = &be_lun->cbe_lun; - cbe_lun->be_lun = be_lun; cbe_lun->options = nvlist_clone(req->args_nvl); be_lun->params = req->reqdata.create; be_lun->softc = softc; @@ -1246,9 +1245,9 @@ bailout_error: } static void -ctl_backend_ramdisk_lun_shutdown(void *lun) +ctl_backend_ramdisk_lun_shutdown(struct ctl_be_lun *cbe_lun) { - struct ctl_be_ramdisk_lun *be_lun = lun; + struct ctl_be_ramdisk_lun *be_lun = (struct ctl_be_ramdisk_lun *)cbe_lun; struct ctl_be_ramdisk_softc *softc = be_lun->softc; taskqueue_drain_all(be_lun->io_taskqueue); From owner-svn-src-stable@freebsd.org Tue Jun 2 20:42:25 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 95AAB2F9B5B; Tue, 2 Jun 2020 20:42:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49c3rK3V9yz3VQw; Tue, 2 Jun 2020 20:42:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7300922BA8; Tue, 2 Jun 2020 20:42:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 052KgPZG056468; Tue, 2 Jun 2020 20:42:25 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 052KgPZ9056467; Tue, 2 Jun 2020 20:42:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202006022042.052KgPZ9056467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 2 Jun 2020 20:42:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361735 - stable/12/sys/dev/iscsi X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/iscsi X-SVN-Commit-Revision: 361735 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2020 20:42:25 -0000 Author: mav Date: Tue Jun 2 20:42:25 2020 New Revision: 361735 URL: https://svnweb.freebsd.org/changeset/base/361735 Log: MFC 361400: Do not try to fill socket send buffer to the last byte. Setting so_snd.sb_lowat to at least 1/8 of the socket buffer size allows send thread more actively use PDUs coalescing, that dramatically reduces TCP lock congestion and number of context switches, when the socket is full and PDUs are small. Modified: stable/12/sys/dev/iscsi/icl_soft.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/iscsi/icl_soft.c ============================================================================== --- stable/12/sys/dev/iscsi/icl_soft.c Tue Jun 2 20:40:10 2020 (r361734) +++ stable/12/sys/dev/iscsi/icl_soft.c Tue Jun 2 20:42:25 2020 (r361735) @@ -913,7 +913,8 @@ icl_conn_send_pdus(struct icl_conn *ic, struct icl_pdu "have %ld, need %ld", available, size); #endif - so->so_snd.sb_lowat = size; + so->so_snd.sb_lowat = max(size, + so->so_snd.sb_hiwat / 8); SOCKBUF_UNLOCK(&so->so_snd); return; } From owner-svn-src-stable@freebsd.org Tue Jun 2 20:42:46 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 263AA2F9BC2; Tue, 2 Jun 2020 20:42:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49c3rk0KDRz3VgP; Tue, 2 Jun 2020 20:42:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 05B3322954; Tue, 2 Jun 2020 20:42:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 052KgjSu056538; Tue, 2 Jun 2020 20:42:45 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 052KgjAi056537; Tue, 2 Jun 2020 20:42:45 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202006022042.052KgjAi056537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 2 Jun 2020 20:42:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361736 - stable/11/sys/dev/iscsi X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/iscsi X-SVN-Commit-Revision: 361736 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2020 20:42:46 -0000 Author: mav Date: Tue Jun 2 20:42:45 2020 New Revision: 361736 URL: https://svnweb.freebsd.org/changeset/base/361736 Log: MFC 361400: Do not try to fill socket send buffer to the last byte. Setting so_snd.sb_lowat to at least 1/8 of the socket buffer size allows send thread more actively use PDUs coalescing, that dramatically reduces TCP lock congestion and number of context switches, when the socket is full and PDUs are small. Modified: stable/11/sys/dev/iscsi/icl_soft.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iscsi/icl_soft.c ============================================================================== --- stable/11/sys/dev/iscsi/icl_soft.c Tue Jun 2 20:42:25 2020 (r361735) +++ stable/11/sys/dev/iscsi/icl_soft.c Tue Jun 2 20:42:45 2020 (r361736) @@ -913,7 +913,8 @@ icl_conn_send_pdus(struct icl_conn *ic, struct icl_pdu "have %ld, need %ld", available, size); #endif - so->so_snd.sb_lowat = size; + so->so_snd.sb_lowat = max(size, + so->so_snd.sb_hiwat / 8); SOCKBUF_UNLOCK(&so->so_snd); return; } From owner-svn-src-stable@freebsd.org Wed Jun 3 04:48:01 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 601AE32C501; Wed, 3 Jun 2020 04:48:01 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49cGcd1VyWz4gJ9; Wed, 3 Jun 2020 04:48:01 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2928088AF; Wed, 3 Jun 2020 04:48:01 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0534m0Yq052245; Wed, 3 Jun 2020 04:48:00 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0534m0ME052244; Wed, 3 Jun 2020 04:48:00 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202006030448.0534m0ME052244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Wed, 3 Jun 2020 04:48:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361742 - stable/12/sbin/ifconfig X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/sbin/ifconfig X-SVN-Commit-Revision: 361742 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2020 04:48:01 -0000 Author: eugen Date: Wed Jun 3 04:48:00 2020 New Revision: 361742 URL: https://svnweb.freebsd.org/changeset/base/361742 Log: MFC r361548: ifconfig(8): spell "groupname" consistently with SYNOPSYS. Modified: stable/12/sbin/ifconfig/ifconfig.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/12/sbin/ifconfig/ifconfig.8 Wed Jun 3 00:16:36 2020 (r361741) +++ stable/12/sbin/ifconfig/ifconfig.8 Wed Jun 3 04:48:00 2020 (r361742) @@ -369,7 +369,7 @@ the system will not attempt to transmit messages through that interface. If possible, the interface will be reset to disable reception as well. This action does not automatically disable routes using the interface. -.It Cm group Ar group-name +.It Cm group Ar groupname Assign the interface to a .Dq group . Any interface can be in multiple groups. @@ -382,7 +382,7 @@ is a member of the PPP interface family group, .\" The interface(s) the default route(s) point to are members of the .\" .Em egress .\" interface group. -.It Cm -group Ar group-name +.It Cm -group Ar groupname Remove the interface from the given .Dq group . .It Cm eui64 From owner-svn-src-stable@freebsd.org Wed Jun 3 05:00:41 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46D5632C335; Wed, 3 Jun 2020 05:00:41 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49cGvF0GTHz4h6M; Wed, 3 Jun 2020 05:00:41 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 046658641; Wed, 3 Jun 2020 05:00:41 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05350ekx058517; Wed, 3 Jun 2020 05:00:40 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05350e7i058516; Wed, 3 Jun 2020 05:00:40 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202006030500.05350e7i058516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Wed, 3 Jun 2020 05:00:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361743 - stable/11/sbin/ifconfig X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/sbin/ifconfig X-SVN-Commit-Revision: 361743 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2020 05:00:41 -0000 Author: eugen Date: Wed Jun 3 05:00:40 2020 New Revision: 361743 URL: https://svnweb.freebsd.org/changeset/base/361743 Log: MFC r361548: ifconfig(8): spell "groupname" consistently with SYNOPSYS. Modified: stable/11/sbin/ifconfig/ifconfig.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/11/sbin/ifconfig/ifconfig.8 Wed Jun 3 04:48:00 2020 (r361742) +++ stable/11/sbin/ifconfig/ifconfig.8 Wed Jun 3 05:00:40 2020 (r361743) @@ -369,7 +369,7 @@ the system will not attempt to transmit messages through that interface. If possible, the interface will be reset to disable reception as well. This action does not automatically disable routes using the interface. -.It Cm group Ar group-name +.It Cm group Ar groupname Assign the interface to a .Dq group . Any interface can be in multiple groups. @@ -382,7 +382,7 @@ is a member of the PPP interface family group, .\" The interface(s) the default route(s) point to are members of the .\" .Em egress .\" interface group. -.It Cm -group Ar group-name +.It Cm -group Ar groupname Remove the interface from the given .Dq group . .It Cm eui64 From owner-svn-src-stable@freebsd.org Wed Jun 3 14:54:55 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 96CCF3393C5; Wed, 3 Jun 2020 14:54:55 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49cX4v3Yrzz4YgB; Wed, 3 Jun 2020 14:54:55 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 71354F5E7; Wed, 3 Jun 2020 14:54:55 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 053Esthj029951; Wed, 3 Jun 2020 14:54:55 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 053EstRV029950; Wed, 3 Jun 2020 14:54:55 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006031454.053EstRV029950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jun 2020 14:54:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361753 - stable/12/usr.sbin/ctld X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/usr.sbin/ctld X-SVN-Commit-Revision: 361753 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2020 14:54:55 -0000 Author: markj Date: Wed Jun 3 14:54:54 2020 New Revision: 361753 URL: https://svnweb.freebsd.org/changeset/base/361753 Log: MFC r361654: ctld: Fix a memory leak in uclparse_conf(). PR: 246596 Modified: stable/12/usr.sbin/ctld/uclparse.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/ctld/uclparse.c ============================================================================== --- stable/12/usr.sbin/ctld/uclparse.c Wed Jun 3 14:16:40 2020 (r361752) +++ stable/12/usr.sbin/ctld/uclparse.c Wed Jun 3 14:54:54 2020 (r361753) @@ -914,6 +914,7 @@ int uclparse_conf(struct conf *newconf, const char *path) { struct ucl_parser *parser; + ucl_object_t *top; int error; conf = newconf; @@ -922,10 +923,14 @@ uclparse_conf(struct conf *newconf, const char *path) if (!ucl_parser_add_file(parser, path)) { log_warn("unable to parse configuration file %s: %s", path, ucl_parser_get_error(parser)); + ucl_parser_free(parser); return (1); } - error = uclparse_toplevel(ucl_parser_get_object(parser)); + top = ucl_parser_get_object(parser); + error = uclparse_toplevel(top); + ucl_object_unref(top); + ucl_parser_free(parser); return (error); } From owner-svn-src-stable@freebsd.org Wed Jun 3 16:51:30 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 97B1733B9E6; Wed, 3 Jun 2020 16:51:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49cZgQ3V26z3Z1g; Wed, 3 Jun 2020 16:51:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 72F3D10BFC; Wed, 3 Jun 2020 16:51:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 053GpUUB099464; Wed, 3 Jun 2020 16:51:30 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 053GpUZ7099463; Wed, 3 Jun 2020 16:51:30 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006031651.053GpUZ7099463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 3 Jun 2020 16:51:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361755 - in stable: 11/lib/clang/include/clang/Config 12/lib/clang/include/clang/Config X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/lib/clang/include/clang/Config 12/lib/clang/include/clang/Config X-SVN-Commit-Revision: 361755 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2020 16:51:30 -0000 Author: dim Date: Wed Jun 3 16:51:30 2020 New Revision: 361755 URL: https://svnweb.freebsd.org/changeset/base/361755 Log: Disable clang's -fintegrated-cc1 stage by default In bug 246630, it was found that part of the rescue binary could be compiled to very slightly different (but still equivalent) machine code, depending on the number of simultaneous make jobs (via the -j option). This turned out to be caused by the upstream change that made clang's first stage compiler (i.e. the -cc1 stage) run as part of the initial clang process invocation, instead of forking and exec'ing a new clang process. We are currently investigating the root cause for the difference in output, but while that is ongoing, disable the integrated cc1 stage for now to work around it. You can always turn it on explicitly by using the -fintegrated-cc1 option, or turn it off with -fno-integrated-cc1. Direct commit to stable/{11,12}, so this can hopefully end up in the upcoming 11.4-RELEASE. Reported by: Fabian Keil PR: 246630 Modified: stable/12/lib/clang/include/clang/Config/config.h Changes in other areas also in this revision: Modified: stable/11/lib/clang/include/clang/Config/config.h Modified: stable/12/lib/clang/include/clang/Config/config.h ============================================================================== --- stable/12/lib/clang/include/clang/Config/config.h Wed Jun 3 16:38:16 2020 (r361754) +++ stable/12/lib/clang/include/clang/Config/config.h Wed Jun 3 16:51:30 2020 (r361755) @@ -82,6 +82,6 @@ /* #undef CLANG_ENABLE_STATIC_ANALYZER */ /* Spawn a new process clang.exe for the CC1 tool invocation, when necessary */ -#define CLANG_SPAWN_CC1 0 +#define CLANG_SPAWN_CC1 1 #endif From owner-svn-src-stable@freebsd.org Wed Jun 3 16:51:30 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E8EA833B8AC; Wed, 3 Jun 2020 16:51:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49cZgQ5wzqz3YsN; Wed, 3 Jun 2020 16:51:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6BEA10BFD; Wed, 3 Jun 2020 16:51:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 053GpU0w099470; Wed, 3 Jun 2020 16:51:30 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 053GpUSU099469; Wed, 3 Jun 2020 16:51:30 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006031651.053GpUSU099469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 3 Jun 2020 16:51:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361755 - in stable: 11/lib/clang/include/clang/Config 12/lib/clang/include/clang/Config X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/lib/clang/include/clang/Config 12/lib/clang/include/clang/Config X-SVN-Commit-Revision: 361755 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2020 16:51:31 -0000 Author: dim Date: Wed Jun 3 16:51:30 2020 New Revision: 361755 URL: https://svnweb.freebsd.org/changeset/base/361755 Log: Disable clang's -fintegrated-cc1 stage by default In bug 246630, it was found that part of the rescue binary could be compiled to very slightly different (but still equivalent) machine code, depending on the number of simultaneous make jobs (via the -j option). This turned out to be caused by the upstream change that made clang's first stage compiler (i.e. the -cc1 stage) run as part of the initial clang process invocation, instead of forking and exec'ing a new clang process. We are currently investigating the root cause for the difference in output, but while that is ongoing, disable the integrated cc1 stage for now to work around it. You can always turn it on explicitly by using the -fintegrated-cc1 option, or turn it off with -fno-integrated-cc1. Direct commit to stable/{11,12}, so this can hopefully end up in the upcoming 11.4-RELEASE. Reported by: Fabian Keil PR: 246630 Modified: stable/11/lib/clang/include/clang/Config/config.h Changes in other areas also in this revision: Modified: stable/12/lib/clang/include/clang/Config/config.h Modified: stable/11/lib/clang/include/clang/Config/config.h ============================================================================== --- stable/11/lib/clang/include/clang/Config/config.h Wed Jun 3 16:38:16 2020 (r361754) +++ stable/11/lib/clang/include/clang/Config/config.h Wed Jun 3 16:51:30 2020 (r361755) @@ -82,6 +82,6 @@ /* #undef CLANG_ENABLE_STATIC_ANALYZER */ /* Spawn a new process clang.exe for the CC1 tool invocation, when necessary */ -#define CLANG_SPAWN_CC1 0 +#define CLANG_SPAWN_CC1 1 #endif From owner-svn-src-stable@freebsd.org Wed Jun 3 18:09:35 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 050EE33D3D4; Wed, 3 Jun 2020 18:09:35 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ccPS5MCqz43JP; Wed, 3 Jun 2020 18:09:32 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E1C4D121F6; Wed, 3 Jun 2020 18:09:31 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 053I9VOI051486; Wed, 3 Jun 2020 18:09:31 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 053I9VZv051449; Wed, 3 Jun 2020 18:09:31 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202006031809.053I9VZv051449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 3 Jun 2020 18:09:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361761 - stable/12/sys/dev/bnxt X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/12/sys/dev/bnxt X-SVN-Commit-Revision: 361761 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2020 18:09:35 -0000 Author: kp Date: Wed Jun 3 18:09:31 2020 New Revision: 361761 URL: https://svnweb.freebsd.org/changeset/base/361761 Log: MFC r361279: bnxt: isc_nrxd_max and isc_ntxd_max must be powers of two Modified: stable/12/sys/dev/bnxt/bnxt.h stable/12/sys/dev/bnxt/if_bnxt.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/bnxt/bnxt.h ============================================================================== --- stable/12/sys/dev/bnxt/bnxt.h Wed Jun 3 17:47:32 2020 (r361760) +++ stable/12/sys/dev/bnxt/bnxt.h Wed Jun 3 18:09:31 2020 (r361761) @@ -87,6 +87,11 @@ __FBSDID("$FreeBSD$"); #define NETXTREME_E_VF2 0x16d3 #define NETXTREME_E_VF3 0x16dc +/* Maximum numbers of RX and TX descriptors. iflib requires this to be a power + * of two. The hardware has no particular limitation. */ +#define BNXT_MAX_RXD ((INT32_MAX >> 1) + 1) +#define BNXT_MAX_TXD ((INT32_MAX >> 1) + 1) + #define CSUM_OFFLOAD (CSUM_IP_TSO|CSUM_IP6_TSO|CSUM_IP| \ CSUM_IP_UDP|CSUM_IP_TCP|CSUM_IP_SCTP| \ CSUM_IP6_UDP|CSUM_IP6_TCP|CSUM_IP6_SCTP) Modified: stable/12/sys/dev/bnxt/if_bnxt.c ============================================================================== --- stable/12/sys/dev/bnxt/if_bnxt.c Wed Jun 3 17:47:32 2020 (r361760) +++ stable/12/sys/dev/bnxt/if_bnxt.c Wed Jun 3 18:09:31 2020 (r361761) @@ -315,11 +315,11 @@ static struct if_shared_ctx bnxt_sctx_init = { .isc_nrxd_default = {PAGE_SIZE / sizeof(struct cmpl_base) * 8, PAGE_SIZE / sizeof(struct rx_prod_pkt_bd), PAGE_SIZE / sizeof(struct rx_prod_pkt_bd)}, - .isc_nrxd_max = {INT32_MAX, INT32_MAX, INT32_MAX}, + .isc_nrxd_max = {BNXT_MAX_RXD, BNXT_MAX_RXD, BNXT_MAX_RXD}, .isc_ntxd_min = {16, 16, 16}, .isc_ntxd_default = {PAGE_SIZE / sizeof(struct cmpl_base) * 2, PAGE_SIZE / sizeof(struct tx_bd_short)}, - .isc_ntxd_max = {INT32_MAX, INT32_MAX, INT32_MAX}, + .isc_ntxd_max = {BNXT_MAX_TXD, BNXT_MAX_TXD, BNXT_MAX_TXD}, .isc_admin_intrcnt = 1, .isc_vendor_info = bnxt_vendor_info_array, From owner-svn-src-stable@freebsd.org Wed Jun 3 18:09:36 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B4B6D33D4B9; Wed, 3 Jun 2020 18:09:36 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ccPW0WJJz43PL; Wed, 3 Jun 2020 18:09:35 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1DCD012143; Wed, 3 Jun 2020 18:09:33 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 053I9W5c051569; Wed, 3 Jun 2020 18:09:32 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 053I9WZF051567; Wed, 3 Jun 2020 18:09:32 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202006031809.053I9WZF051567@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 3 Jun 2020 18:09:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361762 - stable/11/sys/dev/bnxt X-SVN-Group: stable-11 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/11/sys/dev/bnxt X-SVN-Commit-Revision: 361762 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2020 18:09:37 -0000 Author: kp Date: Wed Jun 3 18:09:32 2020 New Revision: 361762 URL: https://svnweb.freebsd.org/changeset/base/361762 Log: MFC r361279: bnxt: isc_nrxd_max and isc_ntxd_max must be powers of two Modified: stable/11/sys/dev/bnxt/bnxt.h stable/11/sys/dev/bnxt/if_bnxt.c Modified: stable/11/sys/dev/bnxt/bnxt.h ============================================================================== --- stable/11/sys/dev/bnxt/bnxt.h Wed Jun 3 18:09:31 2020 (r361761) +++ stable/11/sys/dev/bnxt/bnxt.h Wed Jun 3 18:09:32 2020 (r361762) @@ -87,6 +87,11 @@ __FBSDID("$FreeBSD$"); #define NETXTREME_E_VF2 0x16d3 #define NETXTREME_E_VF3 0x16dc +/* Maximum numbers of RX and TX descriptors. iflib requires this to be a power + * of two. The hardware has no particular limitation. */ +#define BNXT_MAX_RXD ((INT32_MAX >> 1) + 1) +#define BNXT_MAX_TXD ((INT32_MAX >> 1) + 1) + #define CSUM_OFFLOAD (CSUM_IP_TSO|CSUM_IP6_TSO|CSUM_IP| \ CSUM_IP_UDP|CSUM_IP_TCP|CSUM_IP_SCTP| \ CSUM_IP6_UDP|CSUM_IP6_TCP|CSUM_IP6_SCTP) Modified: stable/11/sys/dev/bnxt/if_bnxt.c ============================================================================== --- stable/11/sys/dev/bnxt/if_bnxt.c Wed Jun 3 18:09:31 2020 (r361761) +++ stable/11/sys/dev/bnxt/if_bnxt.c Wed Jun 3 18:09:32 2020 (r361762) @@ -313,11 +313,11 @@ static struct if_shared_ctx bnxt_sctx_init = { .isc_nrxd_default = {PAGE_SIZE / sizeof(struct cmpl_base) * 8, PAGE_SIZE / sizeof(struct rx_prod_pkt_bd), PAGE_SIZE / sizeof(struct rx_prod_pkt_bd)}, - .isc_nrxd_max = {INT32_MAX, INT32_MAX, INT32_MAX}, + .isc_nrxd_max = {BNXT_MAX_RXD, BNXT_MAX_RXD, BNXT_MAX_RXD}, .isc_ntxd_min = {16, 16, 16}, .isc_ntxd_default = {PAGE_SIZE / sizeof(struct cmpl_base) * 2, PAGE_SIZE / sizeof(struct tx_bd_short)}, - .isc_ntxd_max = {INT32_MAX, INT32_MAX, INT32_MAX}, + .isc_ntxd_max = {BNXT_MAX_TXD, BNXT_MAX_TXD, BNXT_MAX_TXD}, .isc_admin_intrcnt = 1, .isc_vendor_info = bnxt_vendor_info_array, From owner-svn-src-stable@freebsd.org Thu Jun 4 13:03:14 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A7F6E2F2537; Thu, 4 Jun 2020 13:03:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49d5YZ3xt3z3TGh; Thu, 4 Jun 2020 13:03:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 82D851FDB9; Thu, 4 Jun 2020 13:03:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 054D3ExY085943; Thu, 4 Jun 2020 13:03:14 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 054D3E2a085941; Thu, 4 Jun 2020 13:03:14 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202006041303.054D3E2a085941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 4 Jun 2020 13:03:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361786 - stable/12/sys/dev/iwm X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/12/sys/dev/iwm X-SVN-Commit-Revision: 361786 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2020 13:03:14 -0000 Author: avg Date: Thu Jun 4 13:03:13 2020 New Revision: 361786 URL: https://svnweb.freebsd.org/changeset/base/361786 Log: MFC r361273: iwm: improve rfkill handling Previously the driver handled the bit within itself, but did not expose the state change to net80211 and interface layers. This change uses net80211 KPI for rfkill signaling. The code is modeled after similar code in iwn and wpi. Modified: stable/12/sys/dev/iwm/if_iwm.c stable/12/sys/dev/iwm/if_iwmvar.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/iwm/if_iwm.c ============================================================================== --- stable/12/sys/dev/iwm/if_iwm.c Thu Jun 4 12:23:15 2020 (r361785) +++ stable/12/sys/dev/iwm/if_iwm.c Thu Jun 4 13:03:13 2020 (r361786) @@ -5059,20 +5059,48 @@ iwm_parent(struct ieee80211com *ic) { struct iwm_softc *sc = ic->ic_softc; int startall = 0; + int rfkill = 0; IWM_LOCK(sc); if (ic->ic_nrunning > 0) { if (!(sc->sc_flags & IWM_FLAG_HW_INITED)) { iwm_init(sc); - startall = 1; + rfkill = iwm_check_rfkill(sc); + if (!rfkill) + startall = 1; } } else if (sc->sc_flags & IWM_FLAG_HW_INITED) iwm_stop(sc); IWM_UNLOCK(sc); if (startall) ieee80211_start_all(ic); + else if (rfkill) + taskqueue_enqueue(sc->sc_tq, &sc->sc_rftoggle_task); } +static void +iwm_rftoggle_task(void *arg, int npending __unused) +{ + struct iwm_softc *sc = arg; + struct ieee80211com *ic = &sc->sc_ic; + int rfkill; + + IWM_LOCK(sc); + rfkill = iwm_check_rfkill(sc); + IWM_UNLOCK(sc); + if (rfkill) { + device_printf(sc->sc_dev, + "%s: rfkill switch, disabling interface\n", __func__); + ieee80211_suspend_all(ic); + ieee80211_notify_radio(ic, 0); + } else { + device_printf(sc->sc_dev, + "%s: rfkill cleared, re-enabling interface\n", __func__); + ieee80211_resume_all(ic); + ieee80211_notify_radio(ic, 1); + } +} + /* * The interrupt side of things */ @@ -5809,12 +5837,7 @@ iwm_intr(void *arg) if (r1 & IWM_CSR_INT_BIT_RF_KILL) { handled |= IWM_CSR_INT_BIT_RF_KILL; - if (iwm_check_rfkill(sc)) { - device_printf(sc->sc_dev, - "%s: rfkill switch, disabling interface\n", - __func__); - iwm_stop(sc); - } + taskqueue_enqueue(sc->sc_tq, &sc->sc_rftoggle_task); } /* @@ -6019,7 +6042,17 @@ iwm_attach(device_t dev) callout_init_mtx(&sc->sc_watchdog_to, &sc->sc_mtx, 0); callout_init_mtx(&sc->sc_led_blink_to, &sc->sc_mtx, 0); TASK_INIT(&sc->sc_es_task, 0, iwm_endscan_cb, sc); + TASK_INIT(&sc->sc_rftoggle_task, 0, iwm_rftoggle_task, sc); + sc->sc_tq = taskqueue_create("iwm_taskq", M_WAITOK, + taskqueue_thread_enqueue, &sc->sc_tq); + error = taskqueue_start_threads(&sc->sc_tq, 1, 0, "iwm_taskq"); + if (error != 0) { + device_printf(dev, "can't start taskq thread, error %d\n", + error); + goto fail; + } + error = iwm_dev_check(dev); if (error != 0) goto fail; @@ -6585,6 +6618,8 @@ iwm_detach_local(struct iwm_softc *sc, int do_net80211 ieee80211_draintask(&sc->sc_ic, &sc->sc_es_task); } iwm_stop_device(sc); + taskqueue_drain_all(sc->sc_tq); + taskqueue_free(sc->sc_tq); if (do_net80211) { IWM_LOCK(sc); iwm_xmit_queue_drain(sc); Modified: stable/12/sys/dev/iwm/if_iwmvar.h ============================================================================== --- stable/12/sys/dev/iwm/if_iwmvar.h Thu Jun 4 12:23:15 2020 (r361785) +++ stable/12/sys/dev/iwm/if_iwmvar.h Thu Jun 4 13:03:13 2020 (r361786) @@ -499,7 +499,9 @@ struct iwm_softc { uint8_t sc_cmd_resp[IWM_CMD_RESP_MAX]; int sc_wantresp; + struct taskqueue *sc_tq; struct task sc_es_task; + struct task sc_rftoggle_task; struct iwm_rx_phy_info sc_last_phy_info; int sc_ampdu_ref; From owner-svn-src-stable@freebsd.org Thu Jun 4 17:01:40 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 858A332A43C; Thu, 4 Jun 2020 17:01:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49dBrh32ZKz4JY1; Thu, 4 Jun 2020 17:01:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 63882228CB; Thu, 4 Jun 2020 17:01:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 054H1eNh036949; Thu, 4 Jun 2020 17:01:40 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 054H1e3D036948; Thu, 4 Jun 2020 17:01:40 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202006041701.054H1e3D036948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 4 Jun 2020 17:01:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361794 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/amd64/amd64 X-SVN-Commit-Revision: 361794 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2020 17:01:40 -0000 Author: mav Date: Thu Jun 4 17:01:39 2020 New Revision: 361794 URL: https://svnweb.freebsd.org/changeset/base/361794 Log: MFC r354638: teach db_nextframe/x86 about [X]xen_intr_upcall interrupt handler Modified: stable/11/sys/amd64/amd64/db_trace.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/db_trace.c ============================================================================== --- stable/11/sys/amd64/amd64/db_trace.c Thu Jun 4 16:24:13 2020 (r361793) +++ stable/11/sys/amd64/amd64/db_trace.c Thu Jun 4 17:01:39 2020 (r361794) @@ -206,6 +206,7 @@ db_nextframe(struct amd64_frame **fp, db_addr_t *ip, s frame_type = TRAP; else if (strncmp(name, "Xatpic_intr", 11) == 0 || strncmp(name, "Xapic_isr", 9) == 0 || + strcmp(name, "Xxen_intr_upcall") == 0 || strcmp(name, "Xtimerint") == 0 || strcmp(name, "Xipi_intr_bitmap_handler") == 0 || strcmp(name, "Xcpustop") == 0 || From owner-svn-src-stable@freebsd.org Thu Jun 4 17:08:08 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7840D32A0F4; Thu, 4 Jun 2020 17:08:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49dC082dpSz4KC9; Thu, 4 Jun 2020 17:08:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 37945228D4; Thu, 4 Jun 2020 17:08:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 054H87tH038271; Thu, 4 Jun 2020 17:08:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 054H87BT038270; Thu, 4 Jun 2020 17:08:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202006041708.054H87BT038270@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 4 Jun 2020 17:08:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361795 - stable/11/sys/x86/xen X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/x86/xen X-SVN-Commit-Revision: 361795 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2020 17:08:08 -0000 Author: mav Date: Thu Jun 4 17:08:07 2020 New Revision: 361795 URL: https://svnweb.freebsd.org/changeset/base/361795 Log: MFC r354637 (by royger): xen: fix dispatching of NMIs Modified: stable/11/sys/x86/xen/xen_apic.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/xen/xen_apic.c ============================================================================== --- stable/11/sys/x86/xen/xen_apic.c Thu Jun 4 17:01:39 2020 (r361794) +++ stable/11/sys/x86/xen/xen_apic.c Thu Jun 4 17:08:07 2020 (r361795) @@ -72,7 +72,6 @@ static driver_filter_t xen_invlcache; static driver_filter_t xen_ipi_bitmap_handler; static driver_filter_t xen_cpustop_handler; static driver_filter_t xen_cpususpend_handler; -static driver_filter_t xen_cpustophard_handler; #endif /*---------------------------------- Macros ----------------------------------*/ @@ -96,7 +95,6 @@ static struct xen_ipi_handler xen_ipis[] = [IPI_TO_IDX(IPI_BITMAP_VECTOR)] = { xen_ipi_bitmap_handler, "b" }, [IPI_TO_IDX(IPI_STOP)] = { xen_cpustop_handler, "st" }, [IPI_TO_IDX(IPI_SUSPEND)] = { xen_cpususpend_handler, "sp" }, - [IPI_TO_IDX(IPI_STOP_HARD)] = { xen_cpustophard_handler, "sth" }, }; #endif @@ -259,12 +257,52 @@ xen_pv_lapic_ipi_raw(register_t icrlo, u_int dest) XEN_APIC_UNSUPPORTED; } +#define PCPU_ID_GET(id, field) (pcpu_find(id)->pc_##field) static void +send_nmi(int dest) +{ + unsigned int cpu; + + /* + * NMIs are not routed over event channels, and instead delivered as on + * native using the exception vector (#2). Triggering them can be done + * using the local APIC, or an hypercall as a shortcut like it's done + * below. + */ + switch(dest) { + case APIC_IPI_DEST_SELF: + HYPERVISOR_vcpu_op(VCPUOP_send_nmi, PCPU_GET(vcpu_id), NULL); + break; + case APIC_IPI_DEST_ALL: + CPU_FOREACH(cpu) + HYPERVISOR_vcpu_op(VCPUOP_send_nmi, + PCPU_ID_GET(cpu, vcpu_id), NULL); + break; + case APIC_IPI_DEST_OTHERS: + CPU_FOREACH(cpu) + if (cpu != PCPU_GET(cpuid)) + HYPERVISOR_vcpu_op(VCPUOP_send_nmi, + PCPU_ID_GET(cpu, vcpu_id), NULL); + break; + default: + HYPERVISOR_vcpu_op(VCPUOP_send_nmi, + PCPU_ID_GET(apic_cpuid(dest), vcpu_id), NULL); + break; + } +} +#undef PCPU_ID_GET + +static void xen_pv_lapic_ipi_vectored(u_int vector, int dest) { xen_intr_handle_t *ipi_handle; int ipi_idx, to_cpu, self; + if (vector >= IPI_NMI_FIRST) { + send_nmi(dest); + return; + } + ipi_idx = IPI_TO_IDX(vector); if (ipi_idx >= nitems(xen_ipis)) panic("IPI out of range"); @@ -519,14 +557,6 @@ xen_cpususpend_handler(void *arg) { cpususpend_handler(); - return (FILTER_HANDLED); -} - -static int -xen_cpustophard_handler(void *arg) -{ - - ipi_nmi_handler(); return (FILTER_HANDLED); } From owner-svn-src-stable@freebsd.org Thu Jun 4 17:23:50 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6D42732A65A; Thu, 4 Jun 2020 17:23:50 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49dCLG2KPMz4Lc8; Thu, 4 Jun 2020 17:23:50 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4AF8822FD2; Thu, 4 Jun 2020 17:23:50 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 054HNoH9050695; Thu, 4 Jun 2020 17:23:50 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 054HNod4050694; Thu, 4 Jun 2020 17:23:50 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202006041723.054HNod4050694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Thu, 4 Jun 2020 17:23:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361797 - in stable: 11/sys/kern 12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: in stable: 11/sys/kern 12/sys/kern X-SVN-Commit-Revision: 361797 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2020 17:23:50 -0000 Author: freqlabs Date: Thu Jun 4 17:23:49 2020 New Revision: 361797 URL: https://svnweb.freebsd.org/changeset/base/361797 Log: MFC r361699, r361711: Assign default security flavor when converting old export args vfs_export requires security flavors be explicitly listed when exporting as of r360900. Use the default AUTH_SYS flavor when converting old export args to ensure compatibility with the legacy mount syscall. Reported by: rmacklem Reviewed by: rmacklem Approved by: mav (mentor) Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25045 Modified: stable/12/sys/kern/vfs_mount.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/kern/vfs_mount.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/kern/vfs_mount.c ============================================================================== --- stable/12/sys/kern/vfs_mount.c Thu Jun 4 17:20:58 2020 (r361796) +++ stable/12/sys/kern/vfs_mount.c Thu Jun 4 17:23:49 2020 (r361797) @@ -68,6 +68,9 @@ __FBSDID("$FreeBSD$"); #include +#include +#include + #include #include @@ -2043,10 +2046,22 @@ kernel_vmount(int flags, ...) return (error); } +/* + * Convert the old export args format into new export args. + * + * The old export args struct does not have security flavors. Otherwise, the + * structs are identical. The default security flavor 'sys' is applied when + * the given args export the filesystem. + */ void vfs_oexport_conv(const struct oexport_args *oexp, struct export_args *exp) { bcopy(oexp, exp, sizeof(*oexp)); - exp->ex_numsecflavors = 0; + if (exp->ex_flags & MNT_EXPORTED) { + exp->ex_numsecflavors = 1; + exp->ex_secflavors[0] = AUTH_SYS; + } else { + exp->ex_numsecflavors = 0; + } } From owner-svn-src-stable@freebsd.org Thu Jun 4 17:23:50 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C7DD32AA49; Thu, 4 Jun 2020 17:23:50 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49dCLG007mz4LkW; Thu, 4 Jun 2020 17:23:49 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EEFBC22EC5; Thu, 4 Jun 2020 17:23:49 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 054HNnxv050689; Thu, 4 Jun 2020 17:23:49 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 054HNnbw050688; Thu, 4 Jun 2020 17:23:49 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202006041723.054HNnbw050688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Thu, 4 Jun 2020 17:23:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361797 - in stable: 11/sys/kern 12/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: in stable: 11/sys/kern 12/sys/kern X-SVN-Commit-Revision: 361797 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2020 17:23:50 -0000 Author: freqlabs Date: Thu Jun 4 17:23:49 2020 New Revision: 361797 URL: https://svnweb.freebsd.org/changeset/base/361797 Log: MFC r361699, r361711: Assign default security flavor when converting old export args vfs_export requires security flavors be explicitly listed when exporting as of r360900. Use the default AUTH_SYS flavor when converting old export args to ensure compatibility with the legacy mount syscall. Reported by: rmacklem Reviewed by: rmacklem Approved by: mav (mentor) Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25045 Modified: stable/11/sys/kern/vfs_mount.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/kern/vfs_mount.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/kern/vfs_mount.c ============================================================================== --- stable/11/sys/kern/vfs_mount.c Thu Jun 4 17:20:58 2020 (r361796) +++ stable/11/sys/kern/vfs_mount.c Thu Jun 4 17:23:49 2020 (r361797) @@ -65,6 +65,9 @@ __FBSDID("$FreeBSD$"); #include +#include +#include + #include #include @@ -2049,10 +2052,22 @@ kernel_vmount(int flags, ...) return (error); } +/* + * Convert the old export args format into new export args. + * + * The old export args struct does not have security flavors. Otherwise, the + * structs are identical. The default security flavor 'sys' is applied when + * the given args export the filesystem. + */ void vfs_oexport_conv(const struct oexport_args *oexp, struct export_args *exp) { bcopy(oexp, exp, sizeof(*oexp)); - exp->ex_numsecflavors = 0; + if (exp->ex_flags & MNT_EXPORTED) { + exp->ex_numsecflavors = 1; + exp->ex_secflavors[0] = AUTH_SYS; + } else { + exp->ex_numsecflavors = 0; + } } From owner-svn-src-stable@freebsd.org Thu Jun 4 21:02:24 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC282331FE0; Thu, 4 Jun 2020 21:02:24 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49dJBS4BGqz3fMQ; Thu, 4 Jun 2020 21:02:24 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8827A25D55; Thu, 4 Jun 2020 21:02:24 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 054L2OJ9094477; Thu, 4 Jun 2020 21:02:24 GMT (envelope-from rscheff@FreeBSD.org) Received: (from rscheff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 054L2O5W094476; Thu, 4 Jun 2020 21:02:24 GMT (envelope-from rscheff@FreeBSD.org) Message-Id: <202006042102.054L2O5W094476@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rscheff set sender to rscheff@FreeBSD.org using -f From: Richard Scheffenegger Date: Thu, 4 Jun 2020 21:02:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361808 - stable/12/sys/netinet/cc X-SVN-Group: stable-12 X-SVN-Commit-Author: rscheff X-SVN-Commit-Paths: stable/12/sys/netinet/cc X-SVN-Commit-Revision: 361808 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2020 21:02:24 -0000 Author: rscheff Date: Thu Jun 4 21:02:24 2020 New Revision: 361808 URL: https://svnweb.freebsd.org/changeset/base/361808 Log: MFC rS361348: DCTCP: update alpha only once after loss recovery. In mixed ECN marking and loss scenarios it was found, that the alpha value of DCTCP is updated two times. The second update happens with freshly initialized counters indicating to ECN loss. Overall this leads to alpha not adjusting as quickly as expected to ECN markings, and therefore lead to excessive loss. Reported by: Cheng Cui Reviewed by: chengc_netapp.com, rrs, tuexen (mentor) Approved by: tuexen (mentor), rgrimes (mentor, blanket) Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D24817 Modified: stable/12/sys/netinet/cc/cc_dctcp.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/cc/cc_dctcp.c ============================================================================== --- stable/12/sys/netinet/cc/cc_dctcp.c Thu Jun 4 20:48:57 2020 (r361807) +++ stable/12/sys/netinet/cc/cc_dctcp.c Thu Jun 4 21:02:24 2020 (r361808) @@ -154,10 +154,8 @@ dctcp_ack_received(struct cc_var *ccv, uint16_t type) * Update the fraction of marked bytes at the end of * current window size. */ - if ((IN_FASTRECOVERY(CCV(ccv, t_flags)) && - SEQ_GEQ(ccv->curack, CCV(ccv, snd_recover))) || - (!IN_FASTRECOVERY(CCV(ccv, t_flags)) && - SEQ_GT(ccv->curack, dctcp_data->save_sndnxt))) + if (!IN_FASTRECOVERY(CCV(ccv, t_flags)) && + SEQ_GT(ccv->curack, dctcp_data->save_sndnxt)) dctcp_update_alpha(ccv); } else newreno_cc_algo.ack_received(ccv, type); From owner-svn-src-stable@freebsd.org Fri Jun 5 02:52:07 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BF8C233C40B; Fri, 5 Jun 2020 02:52:07 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49dRxz4jMBz3V0l; Fri, 5 Jun 2020 02:52:07 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9CDC4A204; Fri, 5 Jun 2020 02:52:07 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0552q74A009651; Fri, 5 Jun 2020 02:52:07 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0552q7w4009650; Fri, 5 Jun 2020 02:52:07 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202006050252.0552q7w4009650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 5 Jun 2020 02:52:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361817 - in stable: 11/stand/lua 12/stand/lua X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/stand/lua 12/stand/lua X-SVN-Commit-Revision: 361817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2020 02:52:07 -0000 Author: kevans Date: Fri Jun 5 02:52:07 2020 New Revision: 361817 URL: https://svnweb.freebsd.org/changeset/base/361817 Log: MFC r361709: lualoader: improve drawer error handling At least one user has landed in a scenario where logo files appear to be misnamed, and we failed to find them. Our fallback for missing logodefs is orb/orbbw, based on the color status. In a scenario where we can't locate the logos, though, this is not ideal. Add in one more layer of fallback to properly just don't draw any logo if the fan has been jam packed with foreign material. PR: 246046 Modified: stable/11/stand/lua/drawer.lua Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/stand/lua/drawer.lua Directory Properties: stable/12/ (props changed) Modified: stable/11/stand/lua/drawer.lua ============================================================================== --- stable/11/stand/lua/drawer.lua Fri Jun 5 02:21:46 2020 (r361816) +++ stable/11/stand/lua/drawer.lua Fri Jun 5 02:52:07 2020 (r361817) @@ -258,6 +258,11 @@ local function drawlogo() else logodef = getLogodef(drawer.default_bw_logodef) end + + -- Something has gone terribly wrong. + if logodef == nil then + logodef = getLogodef(drawer.default_fallback_logodef) + end end if logodef ~= nil and logodef.graphic == none then @@ -355,6 +360,9 @@ shift = default_shift drawer.default_brand = 'fbsd' drawer.default_color_logodef = 'orb' drawer.default_bw_logodef = 'orbbw' +-- For when things go terribly wrong; this def should be present here in the +-- drawer module in case it's a filesystem issue. +drawer.default_fallback_logodef = 'none' function drawer.addBrand(name, def) branddefs[name] = def From owner-svn-src-stable@freebsd.org Fri Jun 5 02:52:08 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 345A633C19F; Fri, 5 Jun 2020 02:52:08 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49dRy00fPWz3TxV; Fri, 5 Jun 2020 02:52:08 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 118BD9FB9; Fri, 5 Jun 2020 02:52:08 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0552q7J3009658; Fri, 5 Jun 2020 02:52:07 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0552q7np009657; Fri, 5 Jun 2020 02:52:07 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202006050252.0552q7np009657@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 5 Jun 2020 02:52:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361817 - in stable: 11/stand/lua 12/stand/lua X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/stand/lua 12/stand/lua X-SVN-Commit-Revision: 361817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2020 02:52:08 -0000 Author: kevans Date: Fri Jun 5 02:52:07 2020 New Revision: 361817 URL: https://svnweb.freebsd.org/changeset/base/361817 Log: MFC r361709: lualoader: improve drawer error handling At least one user has landed in a scenario where logo files appear to be misnamed, and we failed to find them. Our fallback for missing logodefs is orb/orbbw, based on the color status. In a scenario where we can't locate the logos, though, this is not ideal. Add in one more layer of fallback to properly just don't draw any logo if the fan has been jam packed with foreign material. PR: 246046 Modified: stable/12/stand/lua/drawer.lua Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/stand/lua/drawer.lua Directory Properties: stable/11/ (props changed) Modified: stable/12/stand/lua/drawer.lua ============================================================================== --- stable/12/stand/lua/drawer.lua Fri Jun 5 02:21:46 2020 (r361816) +++ stable/12/stand/lua/drawer.lua Fri Jun 5 02:52:07 2020 (r361817) @@ -258,6 +258,11 @@ local function drawlogo() else logodef = getLogodef(drawer.default_bw_logodef) end + + -- Something has gone terribly wrong. + if logodef == nil then + logodef = getLogodef(drawer.default_fallback_logodef) + end end if logodef ~= nil and logodef.graphic == none then @@ -355,6 +360,9 @@ shift = default_shift drawer.default_brand = 'fbsd' drawer.default_color_logodef = 'orb' drawer.default_bw_logodef = 'orbbw' +-- For when things go terribly wrong; this def should be present here in the +-- drawer module in case it's a filesystem issue. +drawer.default_fallback_logodef = 'none' function drawer.addBrand(name, def) branddefs[name] = def From owner-svn-src-stable@freebsd.org Fri Jun 5 02:56:43 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5D7A333C458; Fri, 5 Jun 2020 02:56:43 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49dS3H1kMLz3VnX; Fri, 5 Jun 2020 02:56:43 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 365C1A0EE; Fri, 5 Jun 2020 02:56:43 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0552ug5F012271; Fri, 5 Jun 2020 02:56:42 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0552ugee012269; Fri, 5 Jun 2020 02:56:42 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202006050256.0552ugee012269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 5 Jun 2020 02:56:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361818 - stable/12/bin/ls X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/12/bin/ls X-SVN-Commit-Revision: 361818 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2020 02:56:43 -0000 Author: kevans Date: Fri Jun 5 02:56:42 2020 New Revision: 361818 URL: https://svnweb.freebsd.org/changeset/base/361818 Log: MFC r361318, r361331-r361332 r361318: ls: fix a --color regression from r337956 The regression is in-fact that I flipped the default from never to auto. The incorrect impression was based on an alias that I failed to notice, installed by the Linux distribution that I used for testing compatibility here. Users that want the old default should be doing so with a shell alias as is done elsewhere, rather than making this decision in ls(1). Many thanks to rgrimes for pointing out the alias that I clearly overlooked that resulted in this; if you despised colors in your terminal from this, consider buying him a beer at the next venue that you see him at. r361331: ls(1): actually restore proper behavior Highlights: - CLICOLOR in the environment should imply --color=auto to maintain compatibility with historical behavior - -G should set CLICOLOR and imply --color=auto The manpage has been updated to draw the connection between -G and --color; the former is in-fact a sort of compromise between --color=always and --color=auto, where we'll output color regardless of the environment lacking CLICOLOR/COLORTERM assuming stdout is a tty. r361332: ls: fix WITHOUT_LS_COLORS build *sigh* references to colorflags should be gated by COLORLS. Relnotes: yes Modified: stable/12/bin/ls/ls.1 stable/12/bin/ls/ls.c Directory Properties: stable/12/ (props changed) Modified: stable/12/bin/ls/ls.1 ============================================================================== --- stable/12/bin/ls/ls.1 Fri Jun 5 02:52:07 2020 (r361817) +++ stable/12/bin/ls/ls.1 Fri Jun 5 02:56:42 2020 (r361818) @@ -32,7 +32,7 @@ .\" @(#)ls.1 8.7 (Berkeley) 7/29/94 .\" $FreeBSD$ .\" -.Dd August 18, 2018 +.Dd May 21, 2020 .Dt LS 1 .Os .Sh NAME @@ -135,7 +135,8 @@ This option is equivalent to defining .Ev CLICOLOR or .Ev COLORTERM -in the environment. +in the environment and setting +.Fl -color Ns = Ns Ar auto . (See below.) This functionality can be compiled out by removing the definition of .Ev COLORLS . @@ -216,8 +217,8 @@ Output colored escape sequences based on .Ar when , which may be set to either .Cm always , -.Cm auto -(default), or +.Cm auto , +or .Cm never . .Pp .Cm always @@ -252,6 +253,12 @@ environment variable is set and not empty. .Pp .Cm never will disable color regardless of environment variables. +.Cm never +is the default when neither +.Fl -color +nor +.Fl G +is specified. .Pp For compatibility with GNU coreutils, .Nm Modified: stable/12/bin/ls/ls.c ============================================================================== --- stable/12/bin/ls/ls.c Fri Jun 5 02:52:07 2020 (r361817) +++ stable/12/bin/ls/ls.c Fri Jun 5 02:56:42 2020 (r361818) @@ -152,7 +152,7 @@ static int f_timesort; /* sort by time vice name */ int f_type; /* add type character for non-regular files */ static int f_whiteout; /* show whiteout entries */ #ifdef COLORLS - int colorflag = COLORFLAG_AUTO; /* passed in colorflag */ + int colorflag = COLORFLAG_NEVER; /* passed in colorflag */ int f_color; /* add type in color for non-regular files */ bool explicitansi; /* Explicit ANSI sequences, no termcap(5) */ char *ansi_bgcol; /* ANSI sequence to set background colour */ @@ -265,6 +265,15 @@ main(int argc, char *argv[]) fts_options = FTS_PHYSICAL; if (getenv("LS_SAMESORT")) f_samesort = 1; + + /* + * For historical compatibility, we'll use our autodetection if CLICOLOR + * is set. + */ +#ifdef COLORLS + if (getenv("CLICOLOR")) + colorflag = COLORFLAG_AUTO; +#endif while ((ch = getopt_long(argc, argv, "+1ABCD:FGHILPRSTUWXZabcdfghiklmnopqrstuwxy,", long_opts, NULL)) != -1) { @@ -342,7 +351,15 @@ main(int argc, char *argv[]) f_slash = 0; break; case 'G': + /* + * We both set CLICOLOR here and set colorflag to + * COLORFLAG_AUTO, because -G should not force color if + * stdout isn't a tty. + */ setenv("CLICOLOR", "", 1); +#ifdef COLORLS + colorflag = COLORFLAG_AUTO; +#endif break; case 'H': fts_options |= FTS_COMFOLLOW; From owner-svn-src-stable@freebsd.org Fri Jun 5 06:34:07 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A505F341C66; Fri, 5 Jun 2020 06:34:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49dXt610ctz4CvF; Fri, 5 Jun 2020 06:34:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 942B8CC86; Fri, 5 Jun 2020 06:34:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0556Y5eT048676; Fri, 5 Jun 2020 06:34:05 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0556Y4ch048671; Fri, 5 Jun 2020 06:34:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202006050634.0556Y4ch048671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2020 06:34:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361823 - in stable/12/lib/libprocstat: . zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/12/lib/libprocstat: . zfs X-SVN-Commit-Revision: 361823 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2020 06:34:07 -0000 Author: avg Date: Fri Jun 5 06:34:04 2020 New Revision: 361823 URL: https://svnweb.freebsd.org/changeset/base/361823 Log: MFC r361363,r361434: libprocstat: fix ZFS support First of all, znode_phys_t hasn't been used for storing file attributes for a long time now. Modern ZFS versions use a System Attribute table with a flexible layout. But more importantly all the required information is available in znode_t itself. It's not easy to include zfs_znode.h in userland without breaking code because the most interesting parts of the header are kernel-only. And hardcoding field offsets is too fragile. So, I created a new compilation unit that includes zfs_znode.h using some mild kludges to get it and its dependencies to compile in userland. The compilation unit exports interesting field offsets and does not have any other code. PR: 194117 Sponsored by: Panzura Added: stable/12/lib/libprocstat/zfs_defs.c - copied, changed from r361363, head/lib/libprocstat/zfs_defs.c stable/12/lib/libprocstat/zfs_defs.h - copied unchanged from r361363, head/lib/libprocstat/zfs_defs.h Modified: stable/12/lib/libprocstat/Makefile stable/12/lib/libprocstat/zfs.c stable/12/lib/libprocstat/zfs/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libprocstat/Makefile ============================================================================== --- stable/12/lib/libprocstat/Makefile Fri Jun 5 06:21:23 2020 (r361822) +++ stable/12/lib/libprocstat/Makefile Fri Jun 5 06:34:04 2020 (r361823) @@ -61,16 +61,17 @@ MLINKS+=libprocstat.3 procstat_close.3 \ # XXX This is a hack. .if ${MK_CDDL} != "no" CFLAGS+= -DLIBPROCSTAT_ZFS -OBJS+= zfs/zfs.o -SOBJS+= zfs/zfs.pico -POBJS+= zfs/zfs.po +SRCS+= zfs.c +OBJS+= zfs/zfs_defs.o +SOBJS+= zfs/zfs_defs.pico +POBJS+= zfs/zfs_defs.po SUBDIR= zfs -zfs/zfs.o: .PHONY - @cd ${.CURDIR}/zfs && ${MAKE} zfs.o -zfs/zfs.pico: .PHONY - @cd ${.CURDIR}/zfs && ${MAKE} zfs.pico -zfs/zfs.po: .PHONY - @cd ${.CURDIR}/zfs && ${MAKE} zfs.po +zfs/zfs_defs.o: .PHONY + @cd ${.CURDIR}/zfs && ${MAKE} zfs_defs.o +zfs/zfs_defs.pico: .PHONY + @cd ${.CURDIR}/zfs && ${MAKE} zfs_defs.pico +zfs/zfs_defs.po: .PHONY + @cd ${.CURDIR}/zfs && ${MAKE} zfs_defs.po .endif .include Modified: stable/12/lib/libprocstat/zfs.c ============================================================================== --- stable/12/lib/libprocstat/zfs.c Fri Jun 5 06:21:23 2020 (r361822) +++ stable/12/lib/libprocstat/zfs.c Fri Jun 5 06:34:04 2020 (r361823) @@ -31,22 +31,13 @@ #include #define _KERNEL #include -#include #undef _KERNEL +#include +#include #include +#include +#include -#undef lbolt -#undef lbolt64 -#undef gethrestime_sec -#include -#include -#include -#include -#include -#include -#include -#include - #include #include @@ -57,24 +48,15 @@ #define ZFS #include "libprocstat.h" #include "common_kvm.h" +#include "zfs_defs.h" -/* - * Offset calculations that are used to get data from znode without having the - * definition. - */ -#define LOCATION_ZID (2 * sizeof(void *)) -#define LOCATION_ZPHYS(zsize) ((zsize) - (2 * sizeof(void *) + sizeof(struct task))) - int zfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn) { - znode_phys_t zphys; struct mount mount, *mountptr; - uint64_t *zid; - void *znodeptr, *vnodeptr; + void *znodeptr; char *dataptr; - void *zphys_addr; size_t len; int size; @@ -83,33 +65,27 @@ zfs_filestat(kvm_t *kd, struct vnode *vp, struct vnsta warnx("error getting sysctl"); return (1); } - znodeptr = malloc(size); - if (znodeptr == NULL) { + dataptr = malloc(size); + if (dataptr == NULL) { warnx("error allocating memory for znode storage"); return (1); } - /* Since we have problems including vnode.h, we'll use the wrappers. */ - vnodeptr = getvnodedata(vp); - if (!kvm_read_all(kd, (unsigned long)vnodeptr, znodeptr, - (size_t)size)) { - warnx("can't read znode at %p", (void *)vnodeptr); + + if ((size_t)size < offsetof_z_id + sizeof(uint64_t) || + (size_t)size < offsetof_z_mode + sizeof(mode_t) || + (size_t)size < offsetof_z_size + sizeof(uint64_t)) { + warnx("znode_t size is too small"); goto bad; } - /* - * z_id field is stored in the third pointer. We therefore skip the two - * first bytes. - * - * Pointer to the z_phys structure is the next last pointer. Therefore - * go back two bytes from the end. - */ - dataptr = znodeptr; - zid = (uint64_t *)(dataptr + LOCATION_ZID); - zphys_addr = *(void **)(dataptr + LOCATION_ZPHYS(size)); + if ((size_t)size != sizeof_znode_t) + warnx("znode_t size mismatch, data could be wrong"); - if (!kvm_read_all(kd, (unsigned long)zphys_addr, &zphys, - sizeof(zphys))) { - warnx("can't read znode_phys at %p", zphys_addr); + /* Since we have problems including vnode.h, we'll use the wrappers. */ + znodeptr = getvnodedata(vp); + if (!kvm_read_all(kd, (unsigned long)znodeptr, dataptr, + (size_t)size)) { + warnx("can't read znode at %p", (void *)znodeptr); goto bad; } @@ -119,18 +95,18 @@ zfs_filestat(kvm_t *kd, struct vnode *vp, struct vnsta warnx("can't read mount at %p", (void *)mountptr); goto bad; } - vn->vn_fsid = mount.mnt_stat.f_fsid.val[0]; - vn->vn_fileid = *zid; + /* - * XXX: Shows up wrong in output, but UFS has this error too. Could - * be that we're casting mode-variables from 64-bit to 8-bit or simply - * error in the mode-to-string function. + * XXX Assume that this is a znode, but it can be a special node + * under .zfs/. */ - vn->vn_mode = (mode_t)zphys.zp_mode; - vn->vn_size = (u_long)zphys.zp_size; - free(znodeptr); + vn->vn_fsid = mount.mnt_stat.f_fsid.val[0]; + vn->vn_fileid = *(uint64_t *)(void *)(dataptr + offsetof_z_id); + vn->vn_mode = *(mode_t *)(void *)(dataptr + offsetof_z_mode); + vn->vn_size = *(uint64_t *)(void *)(dataptr + offsetof_z_size); + free(dataptr); return (0); bad: - free(znodeptr); + free(dataptr); return (1); } Modified: stable/12/lib/libprocstat/zfs/Makefile ============================================================================== --- stable/12/lib/libprocstat/zfs/Makefile Fri Jun 5 06:21:23 2020 (r361822) +++ stable/12/lib/libprocstat/zfs/Makefile Fri Jun 5 06:34:04 2020 (r361823) @@ -2,20 +2,20 @@ .PATH: ${.CURDIR:H} -SRCS= zfs.c -OBJS= zfs.o +SRCS= zfs_defs.c +OBJS= zfs_defs.o WARNS?= 1 CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head CFLAGS+= -I${.CURDIR:H} CFLAGS+= -DNEED_SOLARIS_BOOLEAN +CFLAGS+= -fno-builtin -nostdlib all: ${OBJS} CLEANFILES= ${OBJS} Copied and modified: stable/12/lib/libprocstat/zfs_defs.c (from r361363, head/lib/libprocstat/zfs_defs.c) ============================================================================== --- head/lib/libprocstat/zfs_defs.c Fri May 22 11:20:23 2020 (r361363, copy source) +++ stable/12/lib/libprocstat/zfs_defs.c Fri Jun 5 06:34:04 2020 (r361823) @@ -57,3 +57,7 @@ size_t sizeof_znode_t = sizeof(znode_t); size_t offsetof_z_id = offsetof(znode_t, z_id); size_t offsetof_z_size = offsetof(znode_t, z_size); size_t offsetof_z_mode = offsetof(znode_t, z_mode); + +/* Keep pcpu.h satisfied. */ +uintptr_t *__start_set_pcpu; +uintptr_t *__stop_set_pcpu; Copied: stable/12/lib/libprocstat/zfs_defs.h (from r361363, head/lib/libprocstat/zfs_defs.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/lib/libprocstat/zfs_defs.h Fri Jun 5 06:34:04 2020 (r361823, copy of r361363, head/lib/libprocstat/zfs_defs.h) @@ -0,0 +1,38 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Andriy Gapon + * + * 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 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$ + */ + +#ifndef _LIBPROCSTAT_ZFS_DEFS_H +#define _LIBPROCSTAT_ZFS_DEFS_H + +extern size_t sizeof_znode_t; +extern size_t offsetof_z_id; +extern size_t offsetof_z_size; +extern size_t offsetof_z_mode; + +#endif /* _LIBPROCSTAT_ZFS_DEFS_H */ From owner-svn-src-stable@freebsd.org Fri Jun 5 07:37:53 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9230C342F60; Fri, 5 Jun 2020 07:37:53 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49dZHj2WRRz4KnH; Fri, 5 Jun 2020 07:37:53 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51ADFD547; Fri, 5 Jun 2020 07:37:53 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0557bren085770; Fri, 5 Jun 2020 07:37:53 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0557brnG085769; Fri, 5 Jun 2020 07:37:53 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202006050737.0557brnG085769@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2020 07:37:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361824 - stable/12/lib/libprocstat X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/12/lib/libprocstat X-SVN-Commit-Revision: 361824 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2020 07:37:53 -0000 Author: avg Date: Fri Jun 5 07:37:52 2020 New Revision: 361824 URL: https://svnweb.freebsd.org/changeset/base/361824 Log: fix up r361823, libprocstat zfs support, on powerpc This fixes a build failure: In file included from .../zfs_context.h:104, from .../libprocstat/zfs_defs.c:53: .../vm/vm_page.h:204: error: field 'md' has incomplete type In this branch, on powerpc, struct md_page is visible only if either AIM or BOOKE is defined. This is a direct commit. Modified: stable/12/lib/libprocstat/zfs_defs.c Modified: stable/12/lib/libprocstat/zfs_defs.c ============================================================================== --- stable/12/lib/libprocstat/zfs_defs.c Fri Jun 5 06:34:04 2020 (r361823) +++ stable/12/lib/libprocstat/zfs_defs.c Fri Jun 5 07:37:52 2020 (r361824) @@ -43,6 +43,9 @@ __FBSDID("$FreeBSD$"); #define _OPENSOLARIS_SYS_POLICY_H_ #define _OPENSOLARIS_SYS_VNODE_H_ #define _VNODE_PAGER_ +#ifdef __powerpc__ +#define AIM /* AIM or BOOKE, insignificant. */ +#endif typedef struct vnode vnode_t; typedef struct vattr vattr_t; From owner-svn-src-stable@freebsd.org Fri Jun 5 09:56:52 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 50D81346707; Fri, 5 Jun 2020 09:56:52 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ddN41PTDz4cVT; Fri, 5 Jun 2020 09:56:52 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27383EF34; Fri, 5 Jun 2020 09:56:52 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0559uqBt072952; Fri, 5 Jun 2020 09:56:52 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0559uphp072951; Fri, 5 Jun 2020 09:56:51 GMT (envelope-from ae@FreeBSD.org) Message-Id: <202006050956.0559uphp072951@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 5 Jun 2020 09:56:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361831 - stable/12/sys/netpfil/ipfw X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/12/sys/netpfil/ipfw X-SVN-Commit-Revision: 361831 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2020 09:56:52 -0000 Author: ae Date: Fri Jun 5 09:56:51 2020 New Revision: 361831 URL: https://svnweb.freebsd.org/changeset/base/361831 Log: MFC r361624: Fix O_IP_FLOW_LOOKUP opcode handling. Do not check table value matching when table lookup has failed. Modified: stable/12/sys/netpfil/ipfw/ip_fw2.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/12/sys/netpfil/ipfw/ip_fw2.c Fri Jun 5 08:46:55 2020 (r361830) +++ stable/12/sys/netpfil/ipfw/ip_fw2.c Fri Jun 5 09:56:51 2020 (r361831) @@ -2068,6 +2068,8 @@ do { \ uint32_t v = 0; match = ipfw_lookup_table(chain, cmd->arg1, 0, &args->f_id, &v); + if (!match) + break; if (cmdlen == F_INSN_SIZE(ipfw_insn_u32)) match = ((ipfw_insn_u32 *)cmd)->d[0] == TARG_VAL(chain, v, tag); From owner-svn-src-stable@freebsd.org Fri Jun 5 09:58:59 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C01F53464FC; Fri, 5 Jun 2020 09:58:59 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ddQW4dd8z4cnD; Fri, 5 Jun 2020 09:58:59 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 997D3F31E; Fri, 5 Jun 2020 09:58:59 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0559wxXf073102; Fri, 5 Jun 2020 09:58:59 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0559wxNN073101; Fri, 5 Jun 2020 09:58:59 GMT (envelope-from ae@FreeBSD.org) Message-Id: <202006050958.0559wxNN073101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 5 Jun 2020 09:58:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361832 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/netpfil/ipfw X-SVN-Commit-Revision: 361832 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2020 09:58:59 -0000 Author: ae Date: Fri Jun 5 09:58:59 2020 New Revision: 361832 URL: https://svnweb.freebsd.org/changeset/base/361832 Log: MFC r361624: Fix O_IP_FLOW_LOOKUP opcode handling. Do not check table value matching when table lookup has failed. Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw2.c Fri Jun 5 09:56:51 2020 (r361831) +++ stable/11/sys/netpfil/ipfw/ip_fw2.c Fri Jun 5 09:58:59 2020 (r361832) @@ -2066,6 +2066,8 @@ do { \ uint32_t v = 0; match = ipfw_lookup_table(chain, cmd->arg1, 0, &args->f_id, &v); + if (!match) + break; if (cmdlen == F_INSN_SIZE(ipfw_insn_u32)) match = ((ipfw_insn_u32 *)cmd)->d[0] == TARG_VAL(chain, v, tag); From owner-svn-src-stable@freebsd.org Fri Jun 5 18:00:37 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7473C332EA0; Fri, 5 Jun 2020 18:00:37 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49dr6F2Zksz4R51; Fri, 5 Jun 2020 18:00:37 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4EB7514C62; Fri, 5 Jun 2020 18:00:37 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 055I0bYv073166; Fri, 5 Jun 2020 18:00:37 GMT (envelope-from rscheff@FreeBSD.org) Received: (from rscheff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 055I0bMM073165; Fri, 5 Jun 2020 18:00:37 GMT (envelope-from rscheff@FreeBSD.org) Message-Id: <202006051800.055I0bMM073165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rscheff set sender to rscheff@FreeBSD.org using -f From: Richard Scheffenegger Date: Fri, 5 Jun 2020 18:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361841 - in stable/12/sys/netinet: . tcp_stacks X-SVN-Group: stable-12 X-SVN-Commit-Author: rscheff X-SVN-Commit-Paths: in stable/12/sys/netinet: . tcp_stacks X-SVN-Commit-Revision: 361841 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2020 18:00:37 -0000 Author: rscheff Date: Fri Jun 5 18:00:36 2020 New Revision: 361841 URL: https://svnweb.freebsd.org/changeset/base/361841 Log: MFC r361346: Retain only mutually supported TCP options after simultaneous SYN When receiving a parallel SYN in SYN-SENT state, remove all the options only we supported locally before sending the SYN,ACK. This addresses a consistency issue on parallel opens. Also, on such a parallel open, the stack could be coaxed into running with timestamps enabled, even if administratively disabled. This does NOT contain the merge of the change to BBR since at this time that code does not exist in stable/12, and there is no plan to merge BBR(v1) to stable/12. Reviewed by: tuexen (mentor) Approved by: tuexen (mentor), rgrimes (mentor, blanket) Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D23371 Modified: stable/12/sys/netinet/tcp_input.c stable/12/sys/netinet/tcp_stacks/rack.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/tcp_input.c ============================================================================== --- stable/12/sys/netinet/tcp_input.c Fri Jun 5 17:00:38 2020 (r361840) +++ stable/12/sys/netinet/tcp_input.c Fri Jun 5 18:00:36 2020 (r361841) @@ -1667,17 +1667,20 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru (tp->t_flags & TF_REQ_SCALE)) { tp->t_flags |= TF_RCVD_SCALE; tp->snd_scale = to.to_wscale; - } + } else + tp->t_flags &= ~TF_REQ_SCALE; /* * Initial send window. It will be updated with * the next incoming segment to the scaled value. */ tp->snd_wnd = th->th_win; - if (to.to_flags & TOF_TS) { + if ((to.to_flags & TOF_TS) && + (tp->t_flags & TF_REQ_TSTMP)) { tp->t_flags |= TF_RCVD_TSTMP; tp->ts_recent = to.to_tsval; tp->ts_recent_age = tcp_ts_getticks(); - } + } else + tp->t_flags &= ~TF_REQ_TSTMP; if (to.to_flags & TOF_MSS) tcp_mss(tp, to.to_mss); if ((tp->t_flags & TF_SACK_PERMIT) && Modified: stable/12/sys/netinet/tcp_stacks/rack.c ============================================================================== --- stable/12/sys/netinet/tcp_stacks/rack.c Fri Jun 5 17:00:38 2020 (r361840) +++ stable/12/sys/netinet/tcp_stacks/rack.c Fri Jun 5 18:00:36 2020 (r361841) @@ -6754,17 +6754,20 @@ rack_hpts_do_segment(struct mbuf *m, struct tcphdr *th (tp->t_flags & TF_REQ_SCALE)) { tp->t_flags |= TF_RCVD_SCALE; tp->snd_scale = to.to_wscale; - } + } else + tp->t_flags &= ~TF_REQ_SCALE; /* * Initial send window. It will be updated with the * next incoming segment to the scaled value. */ tp->snd_wnd = th->th_win; - if (to.to_flags & TOF_TS) { + if ((to.to_flags & TOF_TS) && + (tp->t_flags & TF_REQ_TSTMP)) { tp->t_flags |= TF_RCVD_TSTMP; tp->ts_recent = to.to_tsval; tp->ts_recent_age = cts; - } + } else + tp->t_flags &= ~TF_REQ_TSTMP; if (to.to_flags & TOF_MSS) tcp_mss(tp, to.to_mss); if ((tp->t_flags & TF_SACK_PERMIT) && From owner-svn-src-stable@freebsd.org Sat Jun 6 01:56:31 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 48A6333E97D; Sat, 6 Jun 2020 01:56:31 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49f2gM1HpSz4SsD; Sat, 6 Jun 2020 01:56:31 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 279FD1A7D0; Sat, 6 Jun 2020 01:56:31 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0561uVE1071694; Sat, 6 Jun 2020 01:56:31 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0561uVrN071693; Sat, 6 Jun 2020 01:56:31 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202006060156.0561uVrN071693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 6 Jun 2020 01:56:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361856 - in stable: 11/stand/common 12/stand/common X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/stand/common 12/stand/common X-SVN-Commit-Revision: 361856 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2020 01:56:31 -0000 Author: kevans Date: Sat Jun 6 01:56:30 2020 New Revision: 361856 URL: https://svnweb.freebsd.org/changeset/base/361856 Log: MFC r361763: lualoader: drop the filename and word "LUA" from errors The filename is nearly always wrong since it's /boot/lua/loader.lua, which is not useful for diagnostics. The actual errmsg will include a lua filename if this is relevant. Dropping "LUA" while we're here because that's almost universally irrelevant to whatever error follows, unless the error states that it's actually a lua problem. Both of these are minor nits that just detract from identifying the pertinent information. Modified: stable/11/stand/common/interp_lua.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/stand/common/interp_lua.c Directory Properties: stable/12/ (props changed) Modified: stable/11/stand/common/interp_lua.c ============================================================================== --- stable/11/stand/common/interp_lua.c Sat Jun 6 00:47:59 2020 (r361855) +++ stable/11/stand/common/interp_lua.c Sat Jun 6 01:56:30 2020 (r361856) @@ -126,7 +126,7 @@ interp_init(void) if (interp_include(filename) != 0) { const char *errstr = lua_tostring(luap, -1); errstr = errstr == NULL ? "unknown" : errstr; - printf("Startup error in %s:\nLUA ERROR: %s.\n", filename, errstr); + printf("ERROR: %s.\n", errstr); lua_pop(luap, 1); setenv("autoboot_delay", "NO", 1); } From owner-svn-src-stable@freebsd.org Sat Jun 6 01:56:31 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9D6BA33E97E; Sat, 6 Jun 2020 01:56:31 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49f2gM3df1z4ShT; Sat, 6 Jun 2020 01:56:31 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 780F01A8B1; Sat, 6 Jun 2020 01:56:31 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0561uVq6071700; Sat, 6 Jun 2020 01:56:31 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0561uV6R071699; Sat, 6 Jun 2020 01:56:31 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202006060156.0561uV6R071699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 6 Jun 2020 01:56:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361856 - in stable: 11/stand/common 12/stand/common X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/stand/common 12/stand/common X-SVN-Commit-Revision: 361856 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2020 01:56:31 -0000 Author: kevans Date: Sat Jun 6 01:56:30 2020 New Revision: 361856 URL: https://svnweb.freebsd.org/changeset/base/361856 Log: MFC r361763: lualoader: drop the filename and word "LUA" from errors The filename is nearly always wrong since it's /boot/lua/loader.lua, which is not useful for diagnostics. The actual errmsg will include a lua filename if this is relevant. Dropping "LUA" while we're here because that's almost universally irrelevant to whatever error follows, unless the error states that it's actually a lua problem. Both of these are minor nits that just detract from identifying the pertinent information. Modified: stable/12/stand/common/interp_lua.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/stand/common/interp_lua.c Directory Properties: stable/11/ (props changed) Modified: stable/12/stand/common/interp_lua.c ============================================================================== --- stable/12/stand/common/interp_lua.c Sat Jun 6 00:47:59 2020 (r361855) +++ stable/12/stand/common/interp_lua.c Sat Jun 6 01:56:30 2020 (r361856) @@ -126,7 +126,7 @@ interp_init(void) if (interp_include(filename) != 0) { const char *errstr = lua_tostring(luap, -1); errstr = errstr == NULL ? "unknown" : errstr; - printf("Startup error in %s:\nLUA ERROR: %s.\n", filename, errstr); + printf("ERROR: %s.\n", errstr); lua_pop(luap, 1); setenv("autoboot_delay", "NO", 1); } From owner-svn-src-stable@freebsd.org Sat Jun 6 03:54:07 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 135F3340EF4; Sat, 6 Jun 2020 03:54:07 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49f5H26fQ6z3SQ5; Sat, 6 Jun 2020 03:54:06 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF8891C204; Sat, 6 Jun 2020 03:54:06 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0563s6W6046421; Sat, 6 Jun 2020 03:54:06 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0563s6VT046420; Sat, 6 Jun 2020 03:54:06 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202006060354.0563s6VT046420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Sat, 6 Jun 2020 03:54:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361862 - in stable: 11/sys/netinet6 12/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: in stable: 11/sys/netinet6 12/sys/netinet6 X-SVN-Commit-Revision: 361862 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2020 03:54:07 -0000 Author: freqlabs Date: Sat Jun 6 03:54:06 2020 New Revision: 361862 URL: https://svnweb.freebsd.org/changeset/base/361862 Log: MFC r361756, r361757: scope6: Check for NULL afdata before dereferencing Narrows the race window with if_detach. Approved by: mav (mentor) Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25017 Modified: stable/11/sys/netinet6/scope6.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/netinet6/scope6.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/netinet6/scope6.c ============================================================================== --- stable/11/sys/netinet6/scope6.c Sat Jun 6 03:09:12 2020 (r361861) +++ stable/11/sys/netinet6/scope6.c Sat Jun 6 03:54:06 2020 (r361862) @@ -417,6 +417,10 @@ in6_setscope(struct in6_addr *in6, struct ifnet *ifp, in6->s6_addr16[1] = htons(zoneid & 0xffff); /* XXX */ } else if (scope != IPV6_ADDR_SCOPE_GLOBAL) { IF_AFDATA_RLOCK(ifp); + if (ifp->if_afdata[AF_INET6] == NULL) { + IF_AFDATA_RUNLOCK(ifp); + return (ENETDOWN); + } sid = SID(ifp); zoneid = sid->s6id_list[scope]; IF_AFDATA_RUNLOCK(ifp); From owner-svn-src-stable@freebsd.org Sat Jun 6 03:54:07 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4D916340FB1; Sat, 6 Jun 2020 03:54:07 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49f5H31Prlz3STv; Sat, 6 Jun 2020 03:54:07 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 29EA91C093; Sat, 6 Jun 2020 03:54:07 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0563s7Xo046427; Sat, 6 Jun 2020 03:54:07 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0563s7ng046426; Sat, 6 Jun 2020 03:54:07 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202006060354.0563s7ng046426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Sat, 6 Jun 2020 03:54:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361862 - in stable: 11/sys/netinet6 12/sys/netinet6 X-SVN-Group: stable-12 X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: in stable: 11/sys/netinet6 12/sys/netinet6 X-SVN-Commit-Revision: 361862 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2020 03:54:07 -0000 Author: freqlabs Date: Sat Jun 6 03:54:06 2020 New Revision: 361862 URL: https://svnweb.freebsd.org/changeset/base/361862 Log: MFC r361756, r361757: scope6: Check for NULL afdata before dereferencing Narrows the race window with if_detach. Approved by: mav (mentor) Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25017 Modified: stable/12/sys/netinet6/scope6.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/netinet6/scope6.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/netinet6/scope6.c ============================================================================== --- stable/12/sys/netinet6/scope6.c Sat Jun 6 03:09:12 2020 (r361861) +++ stable/12/sys/netinet6/scope6.c Sat Jun 6 03:54:06 2020 (r361862) @@ -419,6 +419,10 @@ in6_setscope(struct in6_addr *in6, struct ifnet *ifp, in6->s6_addr16[1] = htons(zoneid & 0xffff); /* XXX */ } else if (scope != IPV6_ADDR_SCOPE_GLOBAL) { IF_AFDATA_RLOCK(ifp); + if (ifp->if_afdata[AF_INET6] == NULL) { + IF_AFDATA_RUNLOCK(ifp); + return (ENETDOWN); + } sid = SID(ifp); zoneid = sid->s6id_list[scope]; IF_AFDATA_RUNLOCK(ifp);