From owner-svn-src-head@freebsd.org Sun Jul 12 01:11:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 93E84374FF8; Sun, 12 Jul 2020 01:11:50 +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 4B47zB2k8Bz3YtF; Sun, 12 Jul 2020 01:11:50 +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 41DBE1BDF8; Sun, 12 Jul 2020 01:11:50 +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 06C1BohR006671; Sun, 12 Jul 2020 01:11:50 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06C1BmbJ006486; Sun, 12 Jul 2020 01:11:48 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <202007120111.06C1BmbJ006486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Sun, 12 Jul 2020 01:11:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363117 - in head: contrib/bmake contrib/bmake/filemon contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake usr.bin/bmake/unit-tests X-SVN-Group: head X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: in head: contrib/bmake contrib/bmake/filemon contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/mk/sys contrib/bmake/unit-tests usr.bin/bmake usr.bin/bmake/unit-tests X-SVN-Commit-Revision: 363117 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 01:11:50 -0000 Author: sjg Date: Sun Jul 12 01:11:48 2020 New Revision: 363117 URL: https://svnweb.freebsd.org/changeset/base/363117 Log: Update to bmake-20200710 Key changes include reduced noise at end of failed build log and avoid evaluation of unnecessary terms in conditionals. In META MODE; a target flagged .META is out-of-date if meta file is missing MFC after: 1 week Modified: head/contrib/bmake/ChangeLog head/contrib/bmake/FILES head/contrib/bmake/VERSION head/contrib/bmake/arch.c head/contrib/bmake/buf.c head/contrib/bmake/compat.c head/contrib/bmake/cond.c head/contrib/bmake/configure head/contrib/bmake/configure.in head/contrib/bmake/dir.c head/contrib/bmake/filemon/filemon_dev.c head/contrib/bmake/for.c head/contrib/bmake/hash.c head/contrib/bmake/hash.h head/contrib/bmake/job.c head/contrib/bmake/job.h head/contrib/bmake/lst.lib/lstAppend.c head/contrib/bmake/lst.lib/lstAtEnd.c head/contrib/bmake/lst.lib/lstAtFront.c head/contrib/bmake/lst.lib/lstClose.c head/contrib/bmake/lst.lib/lstConcat.c head/contrib/bmake/lst.lib/lstDatum.c head/contrib/bmake/lst.lib/lstDeQueue.c head/contrib/bmake/lst.lib/lstDupl.c head/contrib/bmake/lst.lib/lstEnQueue.c head/contrib/bmake/lst.lib/lstFind.c head/contrib/bmake/lst.lib/lstFindFrom.c head/contrib/bmake/lst.lib/lstFirst.c head/contrib/bmake/lst.lib/lstForEach.c head/contrib/bmake/lst.lib/lstForEachFrom.c head/contrib/bmake/lst.lib/lstInit.c head/contrib/bmake/lst.lib/lstInsert.c head/contrib/bmake/lst.lib/lstIsAtEnd.c head/contrib/bmake/lst.lib/lstIsEmpty.c head/contrib/bmake/lst.lib/lstLast.c head/contrib/bmake/lst.lib/lstNext.c head/contrib/bmake/lst.lib/lstOpen.c head/contrib/bmake/lst.lib/lstPrev.c head/contrib/bmake/lst.lib/lstRemove.c head/contrib/bmake/lst.lib/lstReplace.c head/contrib/bmake/lst.lib/lstSucc.c head/contrib/bmake/main.c head/contrib/bmake/make.c head/contrib/bmake/make.h head/contrib/bmake/make_malloc.c head/contrib/bmake/meta.c head/contrib/bmake/meta.h head/contrib/bmake/mk/ChangeLog head/contrib/bmake/mk/FILES head/contrib/bmake/mk/dirdeps.mk head/contrib/bmake/mk/gendirdeps.mk head/contrib/bmake/mk/host-target.mk head/contrib/bmake/mk/install-mk head/contrib/bmake/mk/mkopt.sh head/contrib/bmake/mk/sys/AIX.mk head/contrib/bmake/mk/sys/Darwin.mk head/contrib/bmake/mk/sys/Generic.mk head/contrib/bmake/mk/sys/HP-UX.mk head/contrib/bmake/mk/sys/IRIX.mk head/contrib/bmake/mk/sys/Linux.mk head/contrib/bmake/mk/sys/NetBSD.mk head/contrib/bmake/mk/sys/OSF1.mk head/contrib/bmake/mk/sys/OpenBSD.mk head/contrib/bmake/mk/sys/SunOS.mk head/contrib/bmake/mk/sys/UnixWare.mk head/contrib/bmake/nonints.h head/contrib/bmake/parse.c head/contrib/bmake/str.c head/contrib/bmake/suff.c head/contrib/bmake/targ.c head/contrib/bmake/trace.c head/contrib/bmake/unit-tests/Makefile head/contrib/bmake/unit-tests/cond-short.exp head/contrib/bmake/unit-tests/cond-short.mk head/contrib/bmake/unit-tests/modmatch.mk head/contrib/bmake/unit-tests/modmisc.exp head/contrib/bmake/unit-tests/modmisc.mk head/contrib/bmake/unit-tests/modorder.exp head/contrib/bmake/unit-tests/modorder.mk head/contrib/bmake/unit-tests/sysv.exp head/contrib/bmake/unit-tests/sysv.mk head/contrib/bmake/unit-tests/varmisc.exp head/contrib/bmake/unit-tests/varmisc.mk head/contrib/bmake/util.c head/contrib/bmake/var.c head/usr.bin/bmake/Makefile.config head/usr.bin/bmake/config.h head/usr.bin/bmake/unit-tests/Makefile Directory Properties: head/contrib/bmake/ (props changed) Modified: head/contrib/bmake/ChangeLog ============================================================================== --- head/contrib/bmake/ChangeLog Sat Jul 11 22:45:36 2020 (r363116) +++ head/contrib/bmake/ChangeLog Sun Jul 12 01:11:48 2020 (r363117) @@ -1,3 +1,98 @@ +2020-07-10 Simon J Gerraty + + * configure.in: use AC_INCLUDES_DEFAULT rather than AC_HEADER_STDC + + * VERSION (_MAKE_VERSION): 20200710 + Merge with NetBSD make, pick up + o filemon/filemon_dev.c: use O_CLOEXEC rather than extra syscall + o meta.c: target flagged .META is out-of-date if meta file missing + +2020-07-09 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200709 + Merge with NetBSD make, pick up + o cond.c: fix for compare_expression when doEval=0 + o unit-tests/Makefile: rework + o filemon/filemon_dev.c: ensure filemon fd is closed on exec. + +2020-07-04 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200704 + Merge with NetBSD make, pick up + (most of this by rillig@) + o lots of style and white-space cleanup + o lots more unit tests for variable modifiers + o simplified description of some functions + o str.c: refactor Str_Match + o var.c: debugging output for :@ + constify VarModify parameter + fix :hash modifier on 16-bit platforms + remove unnecessary forward declarations + refactor ApplyModifier_SysV to have less indentation + simplify code for :E and :R + clean up code for :H and :T + refactor ApplyModifiers + + * var.c: we need stdint.h on some platforms to get uint32_t + * unit-test/Makefile: we need to supress the specific error + for RE substitution error in modmisc, since it varies accross + different OS. + +2020-07-02 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200702 + Merge with NetBSD make, pick up + o var.c: more improvements to avoiding unnecessary evaluation + use enums for flags + o remove flags arg to Var_Set which outside of var.c is always 0 + +2020-07-01 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200701 + Merge with NetBSD make, pick up + o var.c: with change to cond.c; ensure that nested variables + within a variable name are expanded. + o unit-tests/varmisc.mk: test for nested varname + +2020-06-29 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200629 + Merge with NetBSD make, pick up + o cond.c: do not eval unnecessary terms of conditionals. + +2020-06-25 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200625 + Merge with NetBSD make, pick up + o meta.c: report error if lseek in filemon_read fails + +2020-06-22 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200622 + Merge with NetBSD make, pick up + o dieQuietly: ignore OP_SUBMAKE as too aggressive + +2020-06-19 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200619 + Merge with NetBSD make, pick up + o str.c: performance improvement for Str_Match for multiple '*' + o dieQuietly: supress the failure output from make + when failing node is a sub-make or a sibling failed. + This cuts down greatly on unhelpful noise at the end of + build log. Disabled by -dj or .MAKE.DIE_QUIETLY=no + +2020-06-10 Simon J Gerraty + + * FILES: add LICENSE to appease some packagers. + This is an attempt to fairly represent the license on almost + 200 files, which are almost all BSD-3-Clause + The few exceptions being more liberal. + + * VERSION (_MAKE_VERSION): 20200610 + Merge with NetBSD make, pick up + o unit test for :Or + 2020-06-06 Simon J Gerraty * VERSION (_MAKE_VERSION): 20200606 Modified: head/contrib/bmake/FILES ============================================================================== --- head/contrib/bmake/FILES Sat Jul 11 22:45:36 2020 (r363116) +++ head/contrib/bmake/FILES Sun Jul 12 01:11:48 2020 (r363117) @@ -1,5 +1,6 @@ ChangeLog FILES +LICENSE Makefile Makefile.config.in PSD.doc/Makefile @@ -107,6 +108,8 @@ unit-tests/cond2.exp unit-tests/cond2.mk unit-tests/cond-late.mk unit-tests/cond-late.exp +unit-tests/cond-short.mk +unit-tests/cond-short.exp unit-tests/dollar.exp unit-tests/dollar.mk unit-tests/doterror.exp Modified: head/contrib/bmake/VERSION ============================================================================== --- head/contrib/bmake/VERSION Sat Jul 11 22:45:36 2020 (r363116) +++ head/contrib/bmake/VERSION Sun Jul 12 01:11:48 2020 (r363117) @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20200606 +_MAKE_VERSION=20200710 Modified: head/contrib/bmake/arch.c ============================================================================== --- head/contrib/bmake/arch.c Sat Jul 11 22:45:36 2020 (r363116) +++ head/contrib/bmake/arch.c Sun Jul 12 01:11:48 2020 (r363117) @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.71 2019/10/05 23:35:57 mrg Exp $ */ +/* $NetBSD: arch.c,v 1.73 2020/07/03 08:02:55 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: arch.c,v 1.71 2019/10/05 23:35:57 mrg Exp $"; +static char rcsid[] = "$NetBSD: arch.c,v 1.73 2020/07/03 08:02:55 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: arch.c,v 1.71 2019/10/05 23:35:57 mrg Exp $"); +__RCSID("$NetBSD: arch.c,v 1.73 2020/07/03 08:02:55 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -312,7 +312,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * free(freeIt); if (result == var_Error) { - return(FAILURE); + return FAILURE; } else { subLibName = TRUE; } @@ -354,7 +354,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * free(freeIt); if (result == var_Error) { - return(FAILURE); + return FAILURE; } else { doSubst = TRUE; } @@ -372,7 +372,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * */ if (*cp == '\0') { printf("No closing parenthesis in archive specification\n"); - return (FAILURE); + return FAILURE; } /* @@ -426,7 +426,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * if (gn == NULL) { free(buf); - return(FAILURE); + return FAILURE; } else { gn->type |= OP_ARCHV; (void)Lst_AtEnd(nodeLst, gn); @@ -437,7 +437,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * * ourselves. */ free(buf); - return(FAILURE); + return FAILURE; } /* * Free buffer and continue with our work. @@ -461,7 +461,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * gn = Targ_FindNode(nameBuf, TARG_CREATE); if (gn == NULL) { free(nameBuf); - return (FAILURE); + return FAILURE; } else { /* * We've found the node, but have to make sure the rest of @@ -483,7 +483,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * gn = Targ_FindNode(nameBuf, TARG_CREATE); free(nameBuf); if (gn == NULL) { - return (FAILURE); + return FAILURE; } else { /* * We've found the node, but have to make sure the rest of the @@ -520,7 +520,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * } while (*cp != '\0' && isspace ((unsigned char)*cp)); *linePtr = cp; - return (SUCCESS); + return SUCCESS; } /*- @@ -544,7 +544,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode * static int ArchFindArchive(const void *ar, const void *archName) { - return (strcmp(archName, ((const Arch *)ar)->name)); + return strcmp(archName, ((const Arch *)ar)->name); } /*- @@ -602,7 +602,7 @@ ArchStatMember(char *archive, char *member, Boolean ha he = Hash_FindEntry(&ar->members, member); if (he != NULL) { - return ((struct ar_hdr *)Hash_GetValue(he)); + return (struct ar_hdr *)Hash_GetValue(he); } else { /* Try truncated name */ char copy[AR_MAX_NAME_LEN+1]; @@ -614,7 +614,7 @@ ArchStatMember(char *archive, char *member, Boolean ha copy[AR_MAX_NAME_LEN] = '\0'; } if ((he = Hash_FindEntry(&ar->members, copy)) != NULL) - return ((struct ar_hdr *)Hash_GetValue(he)); + return (struct ar_hdr *)Hash_GetValue(he); return NULL; } } @@ -635,7 +635,7 @@ ArchStatMember(char *archive, char *member, Boolean ha return NULL; } else { fclose(arch); - return (&sarh); + return &sarh; } } @@ -753,7 +753,7 @@ ArchStatMember(char *archive, char *member, Boolean ha he = Hash_FindEntry(&ar->members, member); if (he != NULL) { - return ((struct ar_hdr *)Hash_GetValue(he)); + return (struct ar_hdr *)Hash_GetValue(he); } else { return NULL; } @@ -962,7 +962,7 @@ ArchFindMember(char *archive, char *member, struct ar_ fclose(arch); return NULL; } - return (arch); + return arch; } } else #ifdef AR_EFMT1 @@ -996,7 +996,7 @@ ArchFindMember(char *archive, char *member, struct ar_ fclose(arch); return NULL; } - return (arch); + return arch; } if (fseek(arch, -elen, SEEK_CUR) != 0) { fclose(arch); @@ -1152,7 +1152,7 @@ Arch_MTime(GNode *gn) } gn->mtime = modTime; - return (modTime); + return modTime; } /*- @@ -1179,7 +1179,7 @@ Arch_MemMTime(GNode *gn) if (Lst_Open(gn->parents) != SUCCESS) { gn->mtime = 0; - return (0); + return 0; } while ((ln = Lst_Next(gn->parents)) != NULL) { pgn = (GNode *)Lst_Datum(ln); @@ -1211,7 +1211,7 @@ Arch_MemMTime(GNode *gn) Lst_Close(gn->parents); - return (gn->mtime); + return gn->mtime; } /*- @@ -1252,9 +1252,9 @@ Arch_FindLib(GNode *gn, Lst path) free(libName); #ifdef LIBRARIES - Var_Set(TARGET, gn->name, gn, 0); + Var_Set(TARGET, gn->name, gn); #else - Var_Set(TARGET, gn->path == NULL ? gn->name : gn->path, gn, 0); + Var_Set(TARGET, gn->path == NULL ? gn->name : gn->path, gn); #endif /* LIBRARIES */ } @@ -1337,7 +1337,7 @@ Arch_LibOODate(GNode *gn) oodate = FALSE; #endif } - return (oodate); + return oodate; } /*- Modified: head/contrib/bmake/buf.c ============================================================================== --- head/contrib/bmake/buf.c Sat Jul 11 22:45:36 2020 (r363116) +++ head/contrib/bmake/buf.c Sun Jul 12 01:11:48 2020 (r363117) @@ -1,4 +1,4 @@ -/* $NetBSD: buf.c,v 1.25 2012/04/24 20:26:58 sjg Exp $ */ +/* $NetBSD: buf.c,v 1.26 2020/07/03 08:02:55 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: buf.c,v 1.25 2012/04/24 20:26:58 sjg Exp $"; +static char rcsid[] = "$NetBSD: buf.c,v 1.26 2020/07/03 08:02:55 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)buf.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: buf.c,v 1.25 2012/04/24 20:26:58 sjg Exp $"); +__RCSID("$NetBSD: buf.c,v 1.26 2020/07/03 08:02:55 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -160,7 +160,7 @@ Buf_GetAll(Buffer *bp, int *numBytesPtr) if (numBytesPtr != NULL) *numBytesPtr = bp->count; - return (bp->buffer); + return bp->buffer; } /*- Modified: head/contrib/bmake/compat.c ============================================================================== --- head/contrib/bmake/compat.c Sat Jul 11 22:45:36 2020 (r363116) +++ head/contrib/bmake/compat.c Sun Jul 12 01:11:48 2020 (r363117) @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.110 2020/01/19 19:42:32 riastradh Exp $ */ +/* $NetBSD: compat.c,v 1.113 2020/07/03 08:13:23 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: compat.c,v 1.110 2020/01/19 19:42:32 riastradh Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.113 2020/07/03 08:13:23 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: compat.c,v 1.110 2020/01/19 19:42:32 riastradh Exp $"); +__RCSID("$NetBSD: compat.c,v 1.113 2020/07/03 08:13:23 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -236,7 +236,7 @@ CompatRunCommand(void *cmdp, void *gnp) silent = gn->type & OP_SILENT; errCheck = !(gn->type & OP_IGNORE); doIt = FALSE; - + cmdNode = Lst_Member(gn->commands, cmd); cmdStart = Var_Subst(NULL, cmd, gn, VARF_WANTRES); @@ -249,18 +249,18 @@ CompatRunCommand(void *cmdp, void *gnp) if (*cmdStart == '\0') { free(cmdStart); - return(0); + return 0; } cmd = cmdStart; Lst_Replace(cmdNode, cmdStart); if ((gn->type & OP_SAVE_CMDS) && (gn != ENDNode)) { (void)Lst_AtEnd(ENDNode->commands, cmdStart); - return(0); + return 0; } if (strcmp(cmdStart, "...") == 0) { gn->type |= OP_SAVE_CMDS; - return(0); + return 0; } while ((*cmd == '@') || (*cmd == '-') || (*cmd == '+')) { @@ -287,7 +287,7 @@ CompatRunCommand(void *cmdp, void *gnp) * If we did not end up with a command, just skip it. */ if (!*cmd) - return (0); + return 0; #if !defined(MAKE_NATIVE) /* @@ -307,7 +307,7 @@ CompatRunCommand(void *cmdp, void *gnp) * go to the shell. Therefore treat '=' and ':' like shell * meta characters as documented in make(1). */ - + useShell = needshell(cmd, FALSE); #endif @@ -325,7 +325,7 @@ CompatRunCommand(void *cmdp, void *gnp) * we go... */ if (!doIt && NoExecute(gn)) { - return (0); + return 0; } if (DEBUG(JOB)) fprintf(debug_file, "Execute: '%s'\n", cmd); @@ -377,7 +377,7 @@ again: meta_compat_start(); } #endif - + /* * Fork and execute the single command. If the fork fails, we abort. */ @@ -499,8 +499,8 @@ again: bmake_signal(compatSigno, SIG_DFL); kill(myPid, compatSigno); } - - return (status); + + return status; } /*- @@ -550,7 +550,7 @@ Compat_Make(void *gnp, void *pgnp) if (Lst_Member(gn->iParents, pgn) != NULL) { char *p1; - Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), pgn, 0); + Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), pgn); free(p1); } @@ -654,7 +654,7 @@ Compat_Make(void *gnp, void *pgnp) } else { if (Lst_Member(gn->iParents, pgn) != NULL) { char *p1; - Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), pgn, 0); + Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), pgn); free(p1); } switch(gn->made) { @@ -681,7 +681,7 @@ Compat_Make(void *gnp, void *pgnp) cohorts: Lst_ForEach(gn->cohorts, Compat_Make, pgnp); - return (0); + return 0; } /*- Modified: head/contrib/bmake/cond.c ============================================================================== --- head/contrib/bmake/cond.c Sat Jul 11 22:45:36 2020 (r363116) +++ head/contrib/bmake/cond.c Sun Jul 12 01:11:48 2020 (r363117) @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.75 2017/04/16 20:59:04 riastradh Exp $ */ +/* $NetBSD: cond.c,v 1.79 2020/07/09 22:34:08 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: cond.c,v 1.75 2017/04/16 20:59:04 riastradh Exp $"; +static char rcsid[] = "$NetBSD: cond.c,v 1.79 2020/07/09 22:34:08 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: cond.c,v 1.75 2017/04/16 20:59:04 riastradh Exp $"); +__RCSID("$NetBSD: cond.c,v 1.79 2020/07/09 22:34:08 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -146,7 +146,7 @@ typedef enum { * last two fields are stored in condInvert and condDefProc, respectively. */ static void CondPushBack(Token); -static int CondGetArg(char **, char **, const char *); +static int CondGetArg(Boolean, char **, char **, const char *); static Boolean CondDoDefined(int, const char *); static int CondStrMatch(const void *, const void *); static Boolean CondDoMake(int, const char *); @@ -186,7 +186,7 @@ static unsigned int cond_min_depth = 0; /* depth at * Indicate when we should be strict about lhs of comparisons. * TRUE when Cond_EvalExpression is called from Cond_Eval (.if etc) * FALSE when Cond_EvalExpression is called from var.c:ApplyModifiers - * since lhs is already expanded and we cannot tell if + * since lhs is already expanded and we cannot tell if * it was a variable reference or not. */ static Boolean lhsStrict; @@ -225,9 +225,6 @@ CondPushBack(Token t) * CondGetArg -- * Find the argument of a built-in function. * - * Input: - * parens TRUE if arg should be bounded by parens - * * Results: * The length of the argument and the address of the argument. * @@ -238,7 +235,7 @@ CondPushBack(Token t) *----------------------------------------------------------------------- */ static int -CondGetArg(char **linePtr, char **argPtr, const char *func) +CondGetArg(Boolean doEval, char **linePtr, char **argPtr, const char *func) { char *cp; int argLen; @@ -259,7 +256,7 @@ CondGetArg(char **linePtr, char **argPtr, const char * * the word 'make' or 'defined' at the beginning of a symbol... */ *argPtr = NULL; - return (0); + return 0; } while (*cp == ' ' || *cp == '\t') { @@ -290,7 +287,8 @@ CondGetArg(char **linePtr, char **argPtr, const char * int len; void *freeIt; - cp2 = Var_Parse(cp, VAR_CMD, VARF_UNDEFERR|VARF_WANTRES, + cp2 = Var_Parse(cp, VAR_CMD, VARF_UNDEFERR| + (doEval ? VARF_WANTRES : 0), &len, &freeIt); Buf_AddBytes(&buf, strlen(cp2), cp2); free(freeIt); @@ -316,11 +314,11 @@ CondGetArg(char **linePtr, char **argPtr, const char * if (func != NULL && *cp++ != ')') { Parse_Error(PARSE_WARNING, "Missing closing parenthesis for %s()", func); - return (0); + return 0; } *linePtr = cp; - return (argLen); + return argLen; } /*- @@ -349,7 +347,7 @@ CondDoDefined(int argLen MAKE_ATTR_UNUSED, const char } free(p1); - return (result); + return result; } /*- @@ -369,7 +367,7 @@ CondDoDefined(int argLen MAKE_ATTR_UNUSED, const char static int CondStrMatch(const void *string, const void *pattern) { - return(!Str_Match(string, pattern)); + return !Str_Match(string, pattern); } /*- @@ -414,14 +412,14 @@ CondDoExists(int argLen MAKE_ATTR_UNUSED, const char * if (DEBUG(COND)) { fprintf(debug_file, "exists(%s) result is \"%s\"\n", arg, path ? path : ""); - } + } if (path != NULL) { result = TRUE; free(path); } else { result = FALSE; } - return (result); + return result; } /*- @@ -443,7 +441,7 @@ CondDoTarget(int argLen MAKE_ATTR_UNUSED, const char * GNode *gn; gn = Targ_FindNode(arg, TARG_NOCREATE); - return (gn != NULL) && !OP_NOP(gn->type); + return gn != NULL && !OP_NOP(gn->type); } /*- @@ -467,7 +465,7 @@ CondDoCommands(int argLen MAKE_ATTR_UNUSED, const char GNode *gn; gn = Targ_FindNode(arg, TARG_NOCREATE); - return (gn != NULL) && !OP_NOP(gn->type) && !Lst_IsEmpty(gn->commands); + return gn != NULL && !OP_NOP(gn->type) && !Lst_IsEmpty(gn->commands); } /*- @@ -577,7 +575,7 @@ CondGetString(Boolean doEval, Boolean *quoted, void ** /* if we are in quotes, then an undefined variable is ok */ str = Var_Parse(condExpr, VAR_CMD, ((!qt && doEval) ? VARF_UNDEFERR : 0) | - VARF_WANTRES, &len, freeIt); + (doEval ? VARF_WANTRES : 0), &len, freeIt); if (str == var_Error) { if (*freeIt) { free(*freeIt); @@ -668,7 +666,7 @@ compare_expression(Boolean doEval) rhs = NULL; lhsFree = rhsFree = FALSE; lhsQuoted = rhsQuoted = FALSE; - + /* * Parse the variable spec and skip over it, saving its * value in lhs. @@ -711,7 +709,7 @@ compare_expression(Boolean doEval) goto done; } /* For .ifxxx compare against zero */ - if (CondCvtArg(lhs, &left)) { + if (CondCvtArg(lhs, &left)) { t = left != 0.0; goto done; } @@ -738,6 +736,11 @@ compare_expression(Boolean doEval) if (!rhs) goto done; + if (!doEval) { + t = TOK_FALSE; + goto done; + } + if (rhsQuoted || lhsQuoted) { do_string_compare: if (((*op != '!') && (*op != '=')) || (op[1] != '=')) { @@ -764,7 +767,7 @@ do_string_compare: * rhs is either a float or an integer. Convert both the * lhs and the rhs to a double and compare the two. */ - + if (!CondCvtArg(lhs, &left) || !CondCvtArg(rhs, &right)) goto do_string_compare; @@ -813,7 +816,7 @@ done: } static int -get_mpt_arg(char **linePtr, char **argPtr, const char *func MAKE_ATTR_UNUSED) +get_mpt_arg(Boolean doEval, char **linePtr, char **argPtr, const char *func MAKE_ATTR_UNUSED) { /* * Use Var_Parse to parse the spec in parens and return @@ -827,7 +830,7 @@ get_mpt_arg(char **linePtr, char **argPtr, const char /* We do all the work here and return the result as the length */ *argPtr = NULL; - val = Var_Parse(cp - 1, VAR_CMD, VARF_WANTRES, &length, &freeIt); + val = Var_Parse(cp - 1, VAR_CMD, doEval ? VARF_WANTRES : 0, &length, &freeIt); /* * Advance *linePtr to beyond the closing ). Note that * we subtract one because 'length' is calculated from 'cp - 1'. @@ -864,7 +867,7 @@ compare_function(Boolean doEval) static const struct fn_def { const char *fn_name; int fn_name_len; - int (*fn_getarg)(char **, char **, const char *); + int (*fn_getarg)(Boolean, char **, char **, const char *); Boolean (*fn_proc)(int, const char *); } fn_defs[] = { { "defined", 7, CondGetArg, CondDoDefined }, @@ -892,7 +895,7 @@ compare_function(Boolean doEval) if (*cp != '(') break; - arglen = fn_def->fn_getarg(&cp, &arg, fn_def->fn_name); + arglen = fn_def->fn_getarg(doEval, &cp, &arg, fn_def->fn_name); if (arglen <= 0) { condExpr = cp; return arglen < 0 ? TOK_ERROR : TOK_FALSE; @@ -917,7 +920,7 @@ compare_function(Boolean doEval) * would be invalid if we did "defined(a)" - so instead treat as an * expression. */ - arglen = CondGetArg(&cp, &arg, NULL); + arglen = CondGetArg(doEval, &cp, &arg, NULL); for (cp1 = cp; isspace(*(unsigned char *)cp1); cp1++) continue; if (*cp1 == '=' || *cp1 == '!') @@ -1040,7 +1043,7 @@ CondT(Boolean doEval) t = TOK_TRUE; } } - return (t); + return t; } /*- @@ -1086,7 +1089,7 @@ CondF(Boolean doEval) CondPushBack(o); } } - return (l); + return l; } /*- @@ -1133,7 +1136,7 @@ CondE(Boolean doEval) CondPushBack(o); } } - return (l); + return l; } /*- Modified: head/contrib/bmake/configure ============================================================================== Binary file (source and/or target). No diff available. Modified: head/contrib/bmake/configure.in ============================================================================== --- head/contrib/bmake/configure.in Sat Jul 11 22:45:36 2020 (r363116) +++ head/contrib/bmake/configure.in Sun Jul 12 01:11:48 2020 (r363117) @@ -1,11 +1,11 @@ dnl dnl RCSid: -dnl $Id: configure.in,v 1.65 2020/05/25 01:11:40 sjg Exp $ +dnl $Id: configure.in,v 1.66 2020/07/10 16:34:38 sjg Exp $ dnl dnl Process this file with autoconf to produce a configure script dnl AC_PREREQ(2.50) -AC_INIT([bmake], [20200524], [sjg@NetBSD.org]) +AC_INIT([bmake], [20200710], [sjg@NetBSD.org]) AC_CONFIG_HEADERS(config.h) dnl make srcdir absolute @@ -128,7 +128,7 @@ dnl AC_C_CROSS dnl dnl Checks for header files. -AC_HEADER_STDC +AC_INCLUDES_DEFAULT AC_HEADER_SYS_WAIT AC_HEADER_DIRENT dnl Keep this list sorted @@ -149,13 +149,11 @@ AC_CHECK_HEADERS( \ paths.h \ poll.h \ ranlib.h \ - string.h \ sys/mman.h \ sys/select.h \ sys/socket.h \ sys/time.h \ sys/uio.h \ - unistd.h \ utime.h \ ) Modified: head/contrib/bmake/dir.c ============================================================================== --- head/contrib/bmake/dir.c Sat Jul 11 22:45:36 2020 (r363116) +++ head/contrib/bmake/dir.c Sun Jul 12 01:11:48 2020 (r363117) @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.74 2020/06/05 18:03:59 sjg Exp $ */ +/* $NetBSD: dir.c,v 1.76 2020/07/03 08:13:23 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: dir.c,v 1.74 2020/06/05 18:03:59 sjg Exp $"; +static char rcsid[] = "$NetBSD: dir.c,v 1.76 2020/07/03 08:13:23 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: dir.c,v 1.74 2020/06/05 18:03:59 sjg Exp $"); +__RCSID("$NetBSD: dir.c,v 1.76 2020/07/03 08:13:23 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -112,7 +112,7 @@ __RCSID("$NetBSD: dir.c,v 1.74 2020/06/05 18:03:59 sjg * Dir_FindHereOrAbove Search for a path in the current directory and * then all the directories above it in turn until * the path is found or we reach the root ("/"). - * + * * Dir_MTime Return the modification time of a node. The file * is searched for along the default search path. * The path and mtime fields of the node are filled @@ -377,7 +377,7 @@ void Dir_InitCur(const char *cdname) { Path *p; - + if (cdname != NULL) { /* * Our build directory is not the same as our source directory. @@ -480,7 +480,7 @@ Dir_SetPATH(void) Boolean hasLastDot = FALSE; /* true we should search dot last */ Var_Delete(".PATH", VAR_GLOBAL); - + if (Lst_Open(dirSearchPath) == SUCCESS) { if ((ln = Lst_First(dirSearchPath)) != NULL) { p = (Path *)Lst_Datum(ln); @@ -537,7 +537,7 @@ Dir_SetPATH(void) static int DirFindName(const void *p, const void *dname) { - return (strcmp(((const Path *)p)->name, dname)); + return strcmp(((const Path *)p)->name, dname); } /*- @@ -545,7 +545,7 @@ DirFindName(const void *p, const void *dname) * Dir_HasWildcards -- * see if the given name has any wildcard characters in it * be careful not to expand unmatching brackets or braces. - * XXX: This code is not 100% correct. ([^]] fails etc.) + * XXX: This code is not 100% correct. ([^]] fails etc.) * I really don't think that make(1) should be expanding * patterns, because then you have to set a mechanism for * escaping the expansion! @@ -644,7 +644,7 @@ DirMatchFiles(const char *pattern, Path *p, Lst expans STR_ADDSLASH))); } } - return (0); + return 0; } /*- @@ -947,7 +947,7 @@ Dir_Expand(const char *word, Lst path, Lst expansions) *----------------------------------------------------------------------- */ static char * -DirLookup(Path *p, const char *name MAKE_ATTR_UNUSED, const char *cp, +DirLookup(Path *p, const char *name MAKE_ATTR_UNUSED, const char *cp, Boolean hasSlash MAKE_ATTR_UNUSED) { char *file; /* the current filename to check */ @@ -1004,7 +1004,7 @@ DirLookupSubdir(Path *p, const char *name) if (cached_stat(file, &stb) == 0) { nearmisses += 1; - return (file); + return file; } free(file); return NULL; @@ -1061,7 +1061,7 @@ DirLookupAbs(Path *p, const char *name, const char *cp if (DEBUG(DIR)) { fprintf(debug_file, " returning %s\n", name); } - return (bmake_strdup(name)); + return bmake_strdup(name); } /*- @@ -1087,7 +1087,7 @@ DirFindDot(Boolean hasSlash MAKE_ATTR_UNUSED, const ch } hits += 1; dot->hits += 1; - return (bmake_strdup(name)); + return bmake_strdup(name); } if (cur && Hash_FindEntry(&cur->files, cp) != NULL) { @@ -1185,7 +1185,7 @@ Dir_FindFile(const char *name, Lst path) * is found, we concatenate the directory name and the final * component and return the resulting string. If we don't find any * such thing, we go on to phase two... - * + * * No matter what, we always look for the file in the current * directory before anywhere else (unless we found the magic * DOTLAST path, in which case we search it last) and we *do not* @@ -1384,7 +1384,7 @@ Dir_FindFile(const char *name, Lst path) } if (Hash_FindEntry(&p->files, cp) != NULL) { - return (bmake_strdup(name)); + return bmake_strdup(name); } else { return NULL; } @@ -1395,7 +1395,7 @@ Dir_FindFile(const char *name, Lst path) bigmisses += 1; if (cached_stat(name, &stb) == 0) { - return (bmake_strdup(name)); + return bmake_strdup(name); } if (DEBUG(DIR)) { @@ -1409,14 +1409,14 @@ Dir_FindFile(const char *name, Lst path) /*- *----------------------------------------------------------------------- * Dir_FindHereOrAbove -- - * search for a path starting at a given directory and then working + * search for a path starting at a given directory and then working * our way up towards the root. * * Input: * here starting directory * search_path the path we are looking for * result the result of a successful search is placed here - * rlen the length of the result buffer + * rlen the length of the result buffer * (typically MAXPATHLEN + 1) * * Results: @@ -1426,7 +1426,7 @@ Dir_FindFile(const char *name, Lst path) * Side Effects: *----------------------------------------------------------------------- */ -int +int Dir_FindHereOrAbove(char *here, char *search_path, char *result, int rlen) { struct stat st; @@ -1451,7 +1451,7 @@ Dir_FindHereOrAbove(char *here, char *search_path, cha try_end = try + strlen(try); while (try_end > try && *try_end != '/') try_end--; - if (try_end > try) + if (try_end > try) *try_end = 0; /* chop! */ } @@ -1459,10 +1459,10 @@ Dir_FindHereOrAbove(char *here, char *search_path, cha * done! */ snprintf(result, rlen, "%s", try); - return(1); + return 1; } - /* + /* * nope, we didn't find it. if we used up dirbase we've * reached the root and failed. */ @@ -1479,9 +1479,9 @@ Dir_FindHereOrAbove(char *here, char *search_path, cha } /* while (1) */ /* - * we failed... + * we failed... *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sun Jul 12 07:27:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 18DC335ACEB; Sun, 12 Jul 2020 07:27:22 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4JJT6w50z4FG2; Sun, 12 Jul 2020 07:27:21 +0000 (UTC) (envelope-from mmel@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 D049F20F0A; Sun, 12 Jul 2020 07:27:21 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06C7RLXC036350; Sun, 12 Jul 2020 07:27:21 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06C7RLU3036348; Sun, 12 Jul 2020 07:27:21 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <202007120727.06C7RLU3036348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sun, 12 Jul 2020 07:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363121 - in head/sys/arm: broadcom/bcm2835 mv X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: in head/sys/arm: broadcom/bcm2835 mv X-SVN-Commit-Revision: 363121 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 07:27:22 -0000 Author: mmel Date: Sun Jul 12 07:27:21 2020 New Revision: 363121 URL: https://svnweb.freebsd.org/changeset/base/363121 Log: Fix the module name for some arm drivers. Module name (unlike of the of driver name) must be system wide unique. Reported by: Mark Millard(bcm_pci), andrew(mvebu_gpio) MFC with: r362954, r362385 Modified: head/sys/arm/broadcom/bcm2835/bcm2838_pci.c head/sys/arm/mv/mvebu_gpio.c Modified: head/sys/arm/broadcom/bcm2835/bcm2838_pci.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2838_pci.c Sun Jul 12 07:25:02 2020 (r363120) +++ head/sys/arm/broadcom/bcm2835/bcm2838_pci.c Sun Jul 12 07:27:21 2020 (r363121) @@ -739,5 +739,5 @@ DEFINE_CLASS_1(pcib, bcm_pcib_driver, bcm_pcib_methods sizeof(struct bcm_pcib_softc), generic_pcie_fdt_driver); static devclass_t bcm_pcib_devclass; -DRIVER_MODULE(pcib, simplebus, bcm_pcib_driver, bcm_pcib_devclass, 0, 0); +DRIVER_MODULE(bcm_pcib, simplebus, bcm_pcib_driver, bcm_pcib_devclass, 0, 0); Modified: head/sys/arm/mv/mvebu_gpio.c ============================================================================== --- head/sys/arm/mv/mvebu_gpio.c Sun Jul 12 07:25:02 2020 (r363120) +++ head/sys/arm/mv/mvebu_gpio.c Sun Jul 12 07:27:21 2020 (r363121) @@ -864,6 +864,6 @@ static device_method_t mvebu_gpio_methods[] = { static devclass_t mvebu_gpio_devclass; static DEFINE_CLASS_0(gpio, mvebu_gpio_driver, mvebu_gpio_methods, sizeof(struct mvebu_gpio_softc)); -EARLY_DRIVER_MODULE(gpio, simplebus, mvebu_gpio_driver, +EARLY_DRIVER_MODULE(mvebu_gpio, simplebus, mvebu_gpio_driver, mvebu_gpio_devclass, NULL, NULL, BUS_PASS_TIMER + BUS_PASS_ORDER_LAST); From owner-svn-src-head@freebsd.org Sun Jul 12 07:42:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 284F635B992; Sun, 12 Jul 2020 07:42:22 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4Jdp0JTdz4GD9; Sun, 12 Jul 2020 07:42:22 +0000 (UTC) (envelope-from mmel@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 E1F8320EC2; Sun, 12 Jul 2020 07:42:21 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06C7gLxs047269; Sun, 12 Jul 2020 07:42:21 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06C7gL68047268; Sun, 12 Jul 2020 07:42:21 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <202007120742.06C7gL68047268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sun, 12 Jul 2020 07:42:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363122 - head/sys/dev/extres/clk X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: head/sys/dev/extres/clk X-SVN-Commit-Revision: 363122 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 07:42:22 -0000 Author: mmel Date: Sun Jul 12 07:42:21 2020 New Revision: 363122 URL: https://svnweb.freebsd.org/changeset/base/363122 Log: Assigned clocks: fix off-by-one bug, don't leak allocated memory. MFC after: 1 week Modified: head/sys/dev/extres/clk/clk.c Modified: head/sys/dev/extres/clk/clk.c ============================================================================== --- head/sys/dev/extres/clk/clk.c Sun Jul 12 07:27:21 2020 (r363121) +++ head/sys/dev/extres/clk/clk.c Sun Jul 12 07:42:21 2020 (r363122) @@ -1420,15 +1420,17 @@ clk_set_assigned(device_t dev, phandle_t node) } /* First set it's parent if needed */ - if (i <= nparents) + if (i < nparents) clk_set_assigned_parent(dev, clk, i); /* Then set a new frequency */ - if (i <= nrates && rates[i] != 0) + if (i < nrates && rates[i] != 0) clk_set_assigned_rates(dev, clk, rates[i]); clk_release(clk); } + if (rates != NULL) + OF_prop_free(rates); return (0); } From owner-svn-src-head@freebsd.org Sun Jul 12 07:59:16 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A5E2335BF9F; Sun, 12 Jul 2020 07:59:16 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4K1J2wT0z4HDL; Sun, 12 Jul 2020 07:59:16 +0000 (UTC) (envelope-from mmel@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 48CB520F59; Sun, 12 Jul 2020 07:59:16 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06C7xGnD054536; Sun, 12 Jul 2020 07:59:16 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06C7xG7k054535; Sun, 12 Jul 2020 07:59:16 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <202007120759.06C7xG7k054535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sun, 12 Jul 2020 07:59:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363123 - head/sys/dev/extres/clk X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: head/sys/dev/extres/clk X-SVN-Commit-Revision: 363123 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 07:59:16 -0000 Author: mmel Date: Sun Jul 12 07:59:15 2020 New Revision: 363123 URL: https://svnweb.freebsd.org/changeset/base/363123 Log: Reverse the processing order of assigned clocks property. Linux processes these clocks in reverse order and some DT relies on this fact. For example, the frequency setting for a given PLL is the last in the list, preceded by the frequency setting of its following divider or so... MFC after: 1 week Modified: head/sys/dev/extres/clk/clk.c Modified: head/sys/dev/extres/clk/clk.c ============================================================================== --- head/sys/dev/extres/clk/clk.c Sun Jul 12 07:42:21 2020 (r363122) +++ head/sys/dev/extres/clk/clk.c Sun Jul 12 07:59:15 2020 (r363123) @@ -1407,7 +1407,7 @@ clk_set_assigned(device_t dev, phandle_t node) if (ofw_bus_parse_xref_list_get_length(node, "assigned-clock-parents", "#clock-cells", &nparents) != 0) nparents = -1; - for (i = 0; i < nclocks; i++) { + for (i = nclocks - 1; i >= 0; i--) { /* First get the clock we are supposed to modify */ rv = clk_get_by_ofw_index_prop(dev, 0, "assigned-clocks", i, &clk); From owner-svn-src-head@freebsd.org Sun Jul 12 09:51:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9618335E38B; Sun, 12 Jul 2020 09:51:10 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4MVQ3RzPz4M59; Sun, 12 Jul 2020 09:51:10 +0000 (UTC) (envelope-from netchild@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 5ADAE228A3; Sun, 12 Jul 2020 09:51:10 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06C9pArk024294; Sun, 12 Jul 2020 09:51:10 GMT (envelope-from netchild@FreeBSD.org) Received: (from netchild@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06C9pA4F024281; Sun, 12 Jul 2020 09:51:10 GMT (envelope-from netchild@FreeBSD.org) Message-Id: <202007120951.06C9pA4F024281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: netchild set sender to netchild@FreeBSD.org using -f From: Alexander Leidinger Date: Sun, 12 Jul 2020 09:51:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363125 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: netchild X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 363125 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 09:51:10 -0000 Author: netchild Date: Sun Jul 12 09:51:09 2020 New Revision: 363125 URL: https://svnweb.freebsd.org/changeset/base/363125 Log: Implement CLOCK_MONOTONIC_RAW (linux >= 2.6.28). It is documented as a raw hardware-based clock not subject to NTP or incremental adjustments. With this "not as precise as CLOCK_MONOTONIC" description in mind, map it to our CLOCK_MONOTNIC_FAST (the same mapping as for the linux CLOCK_MONOTONIC_COARSE). This is needed for the webcomponent of steam (chromium) and some other steam component or game. The linux-steam-utils port contains a LD_PRELOAD based fix for this. There this is mapped to CLOCK_MONOTONIC. As an untrained ear/eye (= the majority of people) is normaly not noticing a difference of jitter in the 10-20 ms range, specially if you don't pay attention like for example in a browser session while watching a video stream, the mapping to CLOCK_MONOTONIC_FAST seems more appropriate than to CLOCK_MONOTONIC. Modified: head/sys/compat/linux/linux_time.c Modified: head/sys/compat/linux/linux_time.c ============================================================================== --- head/sys/compat/linux/linux_time.c Sun Jul 12 09:49:53 2020 (r363124) +++ head/sys/compat/linux/linux_time.c Sun Jul 12 09:51:09 2020 (r363125) @@ -212,6 +212,7 @@ linux_to_native_clockid(clockid_t *n, clockid_t l) *n = CLOCK_THREAD_CPUTIME_ID; break; case LINUX_CLOCK_REALTIME_COARSE: + case LINUX_CLOCK_MONOTONIC_RAW: *n = CLOCK_REALTIME_FAST; break; case LINUX_CLOCK_MONOTONIC_COARSE: @@ -220,7 +221,6 @@ linux_to_native_clockid(clockid_t *n, clockid_t l) case LINUX_CLOCK_BOOTTIME: *n = CLOCK_UPTIME; break; - case LINUX_CLOCK_MONOTONIC_RAW: case LINUX_CLOCK_REALTIME_ALARM: case LINUX_CLOCK_BOOTTIME_ALARM: case LINUX_CLOCK_SGI_CYCLE: From owner-svn-src-head@freebsd.org Sun Jul 12 11:18:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B4A4360048; Sun, 12 Jul 2020 11:18:10 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4PQp2Bxgz4R26; Sun, 12 Jul 2020 11:18:10 +0000 (UTC) (envelope-from melifaro@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 2F20C2336C; Sun, 12 Jul 2020 11:18:10 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06CBI9SG078000; Sun, 12 Jul 2020 11:18:09 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06CBI9xY077998; Sun, 12 Jul 2020 11:18:09 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202007121118.06CBI9xY077998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 12 Jul 2020 11:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363127 - in head/sys/net: . route X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head/sys/net: . route X-SVN-Commit-Revision: 363127 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 11:18:10 -0000 Author: melifaro Date: Sun Jul 12 11:18:09 2020 New Revision: 363127 URL: https://svnweb.freebsd.org/changeset/base/363127 Log: Add destructor for the rib subscription system to simplify users code. Subscriptions are planned to be used by modules such as route lookup engines. In that case that's the module task to properly unsibscribe before detach. However, the in-kernel customer - inet6 wants to track default route changes. To avoid having inet6 store per-fib subscriptions, handle automatic destruction internally. Differential Revision: https://reviews.freebsd.org/D25614 Modified: head/sys/net/route.c head/sys/net/route/route_ctl.c head/sys/net/route/shared.h Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Sun Jul 12 10:07:01 2020 (r363126) +++ head/sys/net/route.c Sun Jul 12 11:18:09 2020 (r363127) @@ -348,7 +348,7 @@ rt_table_init(int offset, int family, u_int fibnum) nhops_init_rib(rh); /* Init subscription system */ - CK_STAILQ_INIT(&rh->rnh_subscribers); + rib_init_subscriptions(rh); /* Finally, set base callbacks */ rh->rnh_addaddr = rn_addroute; @@ -382,6 +382,8 @@ rt_table_destroy(struct rib_head *rh) rn_walktree(&rh->rmhead.head, rt_freeentry, &rh->rmhead.head); nhops_destroy_rib(rh); + + rib_destroy_subscriptions(rh); /* Assume table is already empty */ RIB_LOCK_DESTROY(rh); Modified: head/sys/net/route/route_ctl.c ============================================================================== --- head/sys/net/route/route_ctl.c Sun Jul 12 10:07:01 2020 (r363126) +++ head/sys/net/route/route_ctl.c Sun Jul 12 11:18:09 2020 (r363127) @@ -847,3 +847,28 @@ destroy_subscription_epoch(epoch_context_t ctx) free(rs, M_RTABLE); } + +void +rib_init_subscriptions(struct rib_head *rnh) +{ + + CK_STAILQ_INIT(&rnh->rnh_subscribers); +} + +void +rib_destroy_subscriptions(struct rib_head *rnh) +{ + struct rib_subscription *rs; + struct epoch_tracker et; + + NET_EPOCH_ENTER(et); + RIB_WLOCK(rnh); + while ((rs = CK_STAILQ_FIRST(&rnh->rnh_subscribers)) != NULL) { + CK_STAILQ_REMOVE_HEAD(&rnh->rnh_subscribers, next); + epoch_call(net_epoch_preempt, destroy_subscription_epoch, + &rs->epoch_ctx); + } + RIB_WUNLOCK(rnh); + NET_EPOCH_EXIT(et); +} + Modified: head/sys/net/route/shared.h ============================================================================== --- head/sys/net/route/shared.h Sun Jul 12 10:07:01 2020 (r363126) +++ head/sys/net/route/shared.h Sun Jul 12 11:18:09 2020 (r363127) @@ -67,6 +67,10 @@ int nhop_create_from_nhop(struct rib_head *rnh, const void nhops_update_ifmtu(struct rib_head *rh, struct ifnet *ifp, uint32_t mtu); int nhops_dump_sysctl(struct rib_head *rh, struct sysctl_req *w); +/* subscriptions */ +void rib_init_subscriptions(struct rib_head *rnh); +void rib_destroy_subscriptions(struct rib_head *rnh); + /* route */ VNET_DECLARE(uma_zone_t, rtzone); /* Routing table UMA zone. */ #define V_rtzone VNET(rtzone) From owner-svn-src-head@freebsd.org Sun Jul 12 11:24:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 104EC360828; Sun, 12 Jul 2020 11:24:25 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4PZ06bnXz4RNK; Sun, 12 Jul 2020 11:24:24 +0000 (UTC) (envelope-from melifaro@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 C61C42383B; Sun, 12 Jul 2020 11:24:24 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06CBOOpZ084080; Sun, 12 Jul 2020 11:24:24 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06CBONPG084075; Sun, 12 Jul 2020 11:24:23 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202007121124.06CBONPG084075@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 12 Jul 2020 11:24:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363128 - in head/sys: net net/route netinet6 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head/sys: net net/route netinet6 X-SVN-Commit-Revision: 363128 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 11:24:25 -0000 Author: melifaro Date: Sun Jul 12 11:24:23 2020 New Revision: 363128 URL: https://svnweb.freebsd.org/changeset/base/363128 Log: Switch inet6 default route subscription to the new rib subscription api. Old subscription model allowed only single customer. Switch inet6 to the new subscription api and eliminate the old model. Differential Revision: https://reviews.freebsd.org/D25615 Modified: head/sys/net/if_var.h head/sys/net/route/route_ctl.c head/sys/netinet6/in6_rmx.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h head/sys/netinet6/nd6_rtr.c Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Sun Jul 12 11:18:09 2020 (r363127) +++ head/sys/net/if_var.h Sun Jul 12 11:24:23 2020 (r363128) @@ -61,8 +61,6 @@ */ struct rtentry; /* ifa_rtrequest */ -struct nhop_object; /* ifa_rtrequest */ -struct rt_addrinfo; /* ifa_rtrequest */ struct socket; struct carp_if; struct carp_softc; @@ -551,9 +549,6 @@ struct ifaddr { struct ifnet *ifa_ifp; /* back-pointer to interface */ struct carp_softc *ifa_carp; /* pointer to CARP data */ CK_STAILQ_ENTRY(ifaddr) ifa_link; /* queue macro glue */ - void (*ifa_rtrequest) /* check or clean routes (+ or -)'d */ - (int, struct rtentry *, struct nhop_object *, - struct rt_addrinfo *); u_short ifa_flags; /* mostly rt_flags for cloning */ #define IFA_ROUTE RTF_UP /* route installed */ #define IFA_RTSELF RTF_HOST /* loopback route to self installed */ Modified: head/sys/net/route/route_ctl.c ============================================================================== --- head/sys/net/route/route_ctl.c Sun Jul 12 11:18:09 2020 (r363127) +++ head/sys/net/route/route_ctl.c Sun Jul 12 11:24:23 2020 (r363128) @@ -79,7 +79,6 @@ struct rib_subscription { static void rib_notify(struct rib_head *rnh, enum rib_subscription_type type, struct rib_cmd_info *rc); -static void rt_notifydelete(struct rtentry *rt, struct rt_addrinfo *info); static void destroy_subscription_epoch(epoch_context_t ctx); static struct rib_head * @@ -275,10 +274,8 @@ add_route(struct rib_head *rnh, struct rt_addrinfo *in if ((rn != NULL) || (rt_old != NULL)) rib_notify(rnh, RIB_NOTIFY_DELAYED, rc); - if (rt_old != NULL) { - rt_notifydelete(rt_old, info); + if (rt_old != NULL) rtfree(rt_old); - } /* * If it still failed to go into the tree, @@ -290,13 +287,6 @@ add_route(struct rib_head *rnh, struct rt_addrinfo *in return (EEXIST); } - /* - * If this protocol has something to add to this then - * allow it to do that as well. - */ - if (ifa->ifa_rtrequest) - ifa->ifa_rtrequest(RTM_ADD, rt, rt->rt_nhop, info); - RT_UNLOCK(rt); return (0); @@ -432,7 +422,6 @@ del_route(struct rib_head *rnh, struct rt_addrinfo *in return (error); rib_notify(rnh, RIB_NOTIFY_DELAYED, rc); - rt_notifydelete(rt, info); /* * If the caller wants it, then it can have it, @@ -554,15 +543,9 @@ change_route_one(struct rib_head *rnh, struct rt_addri RT_LOCK(rt); /* Provide notification to the protocols.*/ - if ((nh_orig->nh_ifa != nh->nh_ifa) && nh_orig->nh_ifa->ifa_rtrequest) - nh_orig->nh_ifa->ifa_rtrequest(RTM_DELETE, rt, nh_orig, info); - rt->rt_nhop = nh; rt_setmetrics(info, rt); - if ((nh_orig->nh_ifa != nh->nh_ifa) && nh_orig->nh_ifa->ifa_rtrequest) - nh_orig->nh_ifa->ifa_rtrequest(RTM_DELETE, rt, nh_orig, info); - /* Finalize notification */ rc->rc_rt = rt; rc->rc_nh_old = nh_orig; @@ -641,19 +624,6 @@ rib_action(uint32_t fibnum, int action, struct rt_addr } -static void -rt_notifydelete(struct rtentry *rt, struct rt_addrinfo *info) -{ - struct ifaddr *ifa; - - /* - * give the protocol a chance to keep things in sync. - */ - ifa = rt->rt_nhop->nh_ifa; - if (ifa != NULL && ifa->ifa_rtrequest != NULL) - ifa->ifa_rtrequest(RTM_DELETE, rt, rt->rt_nhop, info); -} - struct rt_delinfo { struct rt_addrinfo info; @@ -748,8 +718,6 @@ rib_walk_del(u_int fibnum, int family, rt_filter_f_t * /* TODO std rt -> rt_addrinfo export */ di.info.rti_info[RTAX_DST] = rt_key(rt); di.info.rti_info[RTAX_NETMASK] = rt_mask(rt); - - rt_notifydelete(rt, &di.info); if (report) rt_routemsg(RTM_DELETE, rt, rt->rt_nhop->nh_ifp, 0, Modified: head/sys/netinet6/in6_rmx.c ============================================================================== --- head/sys/netinet6/in6_rmx.c Sun Jul 12 11:18:09 2020 (r363127) +++ head/sys/netinet6/in6_rmx.c Sun Jul 12 11:24:23 2020 (r363128) @@ -150,6 +150,7 @@ rib6_preadd(u_int fibnum, const struct sockaddr *addr, int in6_inithead(void **head, int off, u_int fibnum) { + struct epoch_tracker et; struct rib_head *rh; rh = rt_table_init(offsetof(struct sockaddr_in6, sin6_addr) << 3, @@ -162,6 +163,13 @@ in6_inithead(void **head, int off, u_int fibnum) rt_mpath_init_rnh(rh); #endif *head = (void *)rh; + + NET_EPOCH_ENTER(et); + if (rib_subscribe(fibnum, AF_INET6, nd6_subscription_cb, NULL, + RIB_NOTIFY_IMMEDIATE, M_NOWAIT) == NULL) + log(LOG_ERR, "in6_inithead(): unable to subscribe to fib %u\n", + fibnum); + NET_EPOCH_EXIT(et); return (1); } Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Sun Jul 12 11:18:09 2020 (r363127) +++ head/sys/netinet6/nd6.c Sun Jul 12 11:24:23 2020 (r363128) @@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include @@ -138,8 +138,6 @@ static void nd6_free_redirect(const struct llentry *); static void nd6_llinfo_timer(void *); static void nd6_llinfo_settimer_locked(struct llentry *, long); static void clear_llinfo_pqueue(struct llentry *); -static void nd6_rtrequest(int, struct rtentry *, struct nhop_object *, - struct rt_addrinfo *); static int nd6_resolve_slow(struct ifnet *, int, struct mbuf *, const struct sockaddr_in6 *, u_char *, uint32_t *, struct llentry **); static int nd6_need_cache(struct ifnet *); @@ -1580,39 +1578,24 @@ nd6_free_redirect(const struct llentry *ln) } /* - * Rejuvenate this function for routing operations related - * processing. + * Updates status of the default router route. */ void -nd6_rtrequest(int req, struct rtentry *rt, struct nhop_object *nh, - struct rt_addrinfo *info) +nd6_subscription_cb(struct rib_head *rnh, struct rib_cmd_info *rc, void *arg) { - struct sockaddr_in6 *gateway; struct nd_defrouter *dr; + struct nhop_object *nh; - gateway = &nh->gw6_sa; + if (rc->rc_cmd == RTM_DELETE) { + nh = rc->rc_nh_old; - switch (req) { - case RTM_ADD: - break; - - case RTM_DELETE: - /* - * Only indirect routes are interesting. - */ - if ((nh->nh_flags & NHF_GATEWAY) == 0) - return; - /* - * check for default route - */ if (nh->nh_flags & NHF_DEFAULT) { - dr = defrouter_lookup(&gateway->sin6_addr, nh->nh_ifp); + dr = defrouter_lookup(&nh->gw6_sa.sin6_addr, nh->nh_ifp); if (dr != NULL) { dr->installed = 0; defrouter_rele(dr); } } - break; } } @@ -2532,7 +2515,6 @@ nd6_add_ifa_lle(struct in6_ifaddr *ia) if (nd6_need_cache(ifp) == 0) return (0); - ia->ia_ifa.ifa_rtrequest = nd6_rtrequest; dst = (struct sockaddr *)&ia->ia_addr; ln = lltable_alloc_entry(LLTABLE6(ifp), LLE_IFADDR, dst); if (ln == NULL) Modified: head/sys/netinet6/nd6.h ============================================================================== --- head/sys/netinet6/nd6.h Sun Jul 12 11:18:09 2020 (r363127) +++ head/sys/netinet6/nd6.h Sun Jul 12 11:24:23 2020 (r363128) @@ -385,6 +385,11 @@ void nd6_rem_ifa_lle(struct in6_ifaddr *, int); int nd6_output_ifp(struct ifnet *, struct ifnet *, struct mbuf *, struct sockaddr_in6 *, struct route *); +struct rib_head; +struct rib_cmd_info; +void nd6_subscription_cb(struct rib_head *rnh, struct rib_cmd_info *rc, + void *arg); + /* nd6_nbr.c */ void nd6_na_input(struct mbuf *, int, int); void nd6_na_output(struct ifnet *, const struct in6_addr *, Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Sun Jul 12 11:18:09 2020 (r363127) +++ head/sys/netinet6/nd6_rtr.c Sun Jul 12 11:24:23 2020 (r363128) @@ -2014,10 +2014,6 @@ nd6_prefix_onlink_rtrequest(struct nd_prefix *pr, stru u_long rtflags; int error, a_failure, fibnum, maxfib; - /* - * in6_ifinit() sets nd6_rtrequest to ifa_rtrequest for all ifaddrs. - * ifa->ifa_rtrequest = nd6_rtrequest; - */ bzero(&mask6, sizeof(mask6)); mask6.sin6_len = sizeof(mask6); mask6.sin6_addr = pr->ndpr_mask; From owner-svn-src-head@freebsd.org Sun Jul 12 13:36:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AE3C8363AE3; Sun, 12 Jul 2020 13:36:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4SVY4BmZz4Y23; Sun, 12 Jul 2020 13:36:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 34E02234F8; Sun, 12 Jul 2020 13:36:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::b58d:185d:edd7:b302] (unknown [IPv6:2001:470:7a58:0:b58d:185d:edd7:b302]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id DDBA63F0B0; Sun, 12 Jul 2020 15:36:34 +0200 (CEST) From: Dimitry Andric Message-Id: <010ACFFA-35B7-4984-A5E7-1504C72D56F9@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_3BE14362-335B-4C18-976D-6487A1EC1C5B"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Subject: Re: svn commit: r363125 - head/sys/compat/linux Date: Sun, 12 Jul 2020 15:36:25 +0200 In-Reply-To: <202007120951.06C9pA4F024281@repo.freebsd.org> Cc: src-committers , svn-src-all , svn-src-head@freebsd.org To: Alexander Leidinger References: <202007120951.06C9pA4F024281@repo.freebsd.org> X-Mailer: Apple Mail (2.3445.104.14) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 13:36:37 -0000 --Apple-Mail=_3BE14362-335B-4C18-976D-6487A1EC1C5B Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 12 Jul 2020, at 11:51, Alexander Leidinger wrote: > > Author: netchild > Date: Sun Jul 12 09:51:09 2020 > New Revision: 363125 > URL: https://svnweb.freebsd.org/changeset/base/363125 > > Log: > Implement CLOCK_MONOTONIC_RAW (linux >= 2.6.28). > > It is documented as a raw hardware-based clock not subject to NTP or > incremental adjustments. With this "not as precise as CLOCK_MONOTONIC" > description in mind, map it to our CLOCK_MONOTNIC_FAST (the same > mapping as for the linux CLOCK_MONOTONIC_COARSE). Okay, but: > @@ -212,6 +212,7 @@ linux_to_native_clockid(clockid_t *n, clockid_t l) > *n = CLOCK_THREAD_CPUTIME_ID; > break; > case LINUX_CLOCK_REALTIME_COARSE: > + case LINUX_CLOCK_MONOTONIC_RAW: > *n = CLOCK_REALTIME_FAST; > break; > case LINUX_CLOCK_MONOTONIC_COARSE: this shows it is actually mapped to CLOCK_REALTIME_FAST, not CLOCK_MONOTONIC_FAST. Is the code right, or the commit message? :) -Dimitry --Apple-Mail=_3BE14362-335B-4C18-976D-6487A1EC1C5B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCXwsR2QAKCRCwXqMKLiCW oyk/AKCEcInURNI0bPCUNVoLlyIBbI8HPgCg97aWShFuMTdB6Lkhl5PB6PgwWQ8= =m7ks -----END PGP SIGNATURE----- --Apple-Mail=_3BE14362-335B-4C18-976D-6487A1EC1C5B-- From owner-svn-src-head@freebsd.org Sun Jul 12 14:50:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 622A7365529; Sun, 12 Jul 2020 14:50:13 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4V7T21Cfz4cGN; Sun, 12 Jul 2020 14:50:13 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 29C0025F3A; Sun, 12 Jul 2020 14:50:13 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06CEoDde007801; Sun, 12 Jul 2020 14:50:13 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06CEoDGe007800; Sun, 12 Jul 2020 14:50:13 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007121450.06CEoDGe007800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 12 Jul 2020 14:50:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363129 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 363129 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 14:50:13 -0000 Author: tuexen Date: Sun Jul 12 14:50:12 2020 New Revision: 363129 URL: https://svnweb.freebsd.org/changeset/base/363129 Log: (Re)activate SCTP system calls when compiling SCTP support into the kernel r363079 introduced the possibility of loading the SCTP stack as a module in addition to compiling it into the kernel. As part of this, the registration of the system calls was removed and put into the loading of the module. Therefore, the system calls are not registered anymore when compiling the SCTP into the kernel. This patch addresses that. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D25632 Modified: head/sys/netinet/sctp_syscalls.c Modified: head/sys/netinet/sctp_syscalls.c ============================================================================== --- head/sys/netinet/sctp_syscalls.c Sun Jul 12 11:24:23 2020 (r363128) +++ head/sys/netinet/sctp_syscalls.c Sun Jul 12 14:50:12 2020 (r363129) @@ -117,6 +117,10 @@ sctp_syscalls_init(void) return (0); } +#ifdef SCTP +SYSINIT(sctp_syscalls, SI_SUB_SYSCALLS, SI_ORDER_ANY, sctp_syscalls_init, NULL); +#endif + int sctp_syscalls_uninit(void) { From owner-svn-src-head@freebsd.org Sun Jul 12 14:57:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0DE10365539; Sun, 12 Jul 2020 14:57:30 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4VHs6Qn5z4cnW; Sun, 12 Jul 2020 14:57:29 +0000 (UTC) (envelope-from netchild@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 BC2E625C62; Sun, 12 Jul 2020 14:57:29 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06CEvTVJ013737; Sun, 12 Jul 2020 14:57:29 GMT (envelope-from netchild@FreeBSD.org) Received: (from netchild@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06CEvTRP013736; Sun, 12 Jul 2020 14:57:29 GMT (envelope-from netchild@FreeBSD.org) Message-Id: <202007121457.06CEvTRP013736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: netchild set sender to netchild@FreeBSD.org using -f From: Alexander Leidinger Date: Sun, 12 Jul 2020 14:57:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363130 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: netchild X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 363130 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 14:57:30 -0000 Author: netchild Date: Sun Jul 12 14:57:29 2020 New Revision: 363130 URL: https://svnweb.freebsd.org/changeset/base/363130 Log: Fix r363125 (Implement CLOCK_MONOTONIC_RAW (linux >= 2.6.28)), by realy using the MONOTONIC version and not the REALTIME version. Noticed by: myfreeweb at github Modified: head/sys/compat/linux/linux_time.c Modified: head/sys/compat/linux/linux_time.c ============================================================================== --- head/sys/compat/linux/linux_time.c Sun Jul 12 14:50:12 2020 (r363129) +++ head/sys/compat/linux/linux_time.c Sun Jul 12 14:57:29 2020 (r363130) @@ -212,10 +212,10 @@ linux_to_native_clockid(clockid_t *n, clockid_t l) *n = CLOCK_THREAD_CPUTIME_ID; break; case LINUX_CLOCK_REALTIME_COARSE: - case LINUX_CLOCK_MONOTONIC_RAW: *n = CLOCK_REALTIME_FAST; break; case LINUX_CLOCK_MONOTONIC_COARSE: + case LINUX_CLOCK_MONOTONIC_RAW: *n = CLOCK_MONOTONIC_FAST; break; case LINUX_CLOCK_BOOTTIME: From owner-svn-src-head@freebsd.org Sun Jul 12 16:17:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 980FF367741; Sun, 12 Jul 2020 16:17:44 +0000 (UTC) (envelope-from Alexander@leidinger.net) Received: from mailgate.Leidinger.net (mailgate.leidinger.net [IPv6:2a00:1828:2000:313::1:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4X4R5Chcz3SN4; Sun, 12 Jul 2020 16:17:43 +0000 (UTC) (envelope-from Alexander@leidinger.net) Received: from outgoing.leidinger.net (p5b16569f.dip0.t-ipconnect.de [91.22.86.159]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (Client did not present a certificate) by mailgate.Leidinger.net (Postfix) with ESMTPSA id C9D211697; Sun, 12 Jul 2020 18:17:33 +0200 (CEST) Received: from webmail.leidinger.net (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (Client did not present a certificate) by outgoing.leidinger.net (Postfix) with ESMTPS id AA87B10B8; Sun, 12 Jul 2020 18:17:15 +0200 (CEST) Date: Sun, 12 Jul 2020 18:17:15 +0200 Message-ID: <20200712181715.Horde.YfOdq0fEkeFHjcx0fXxQcX1@webmail.leidinger.net> From: Alexander Leidinger To: Dimitry Andric Cc: src-committers , svn-src-all , svn-src-head@freebsd.org Subject: Re: svn commit: r363125 - head/sys/compat/linux References: <202007120951.06C9pA4F024281@repo.freebsd.org> <010ACFFA-35B7-4984-A5E7-1504C72D56F9@FreeBSD.org> In-Reply-To: <010ACFFA-35B7-4984-A5E7-1504C72D56F9@FreeBSD.org> Accept-Language: de,en Content-Type: multipart/signed; boundary="=_wOku1sUdsJw5iUPKYvDG9Fi"; protocol="application/pgp-signature"; micalg=pgp-sha1 MIME-Version: 1.0 X-Rspamd-Queue-Id: 4B4X4R5Chcz3SN4 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:34240, ipnet:2a00:1828::/32, country:DE] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 16:17:44 -0000 This message is in MIME format and has been PGP signed. --=_wOku1sUdsJw5iUPKYvDG9Fi Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Quoting Dimitry Andric (from Sun, 12 Jul 2020=20=20 15:36:25=20+0200): > On 12 Jul 2020, at 11:51, Alexander Leidinger wrot= e: >> >> Author: netchild >> Date: Sun Jul 12 09:51:09 2020 >> New Revision: 363125 >> URL: https://svnweb.freebsd.org/changeset/base/363125 >> >> Log: >> Implement CLOCK_MONOTONIC_RAW (linux >=3D 2.6.28). >> >> It is documented as a raw hardware-based clock not subject to NTP or >> incremental adjustments. With this "not as precise as CLOCK_MONOTONIC" >> description in mind, map it to our CLOCK_MONOTNIC_FAST (the same >> mapping as for the linux CLOCK_MONOTONIC_COARSE). > > Okay, but: > >> @@ -212,6 +212,7 @@ linux_to_native_clockid(clockid_t *n, clockid_t l) >> *n =3D CLOCK_THREAD_CPUTIME_ID; >> break; >> case LINUX_CLOCK_REALTIME_COARSE: >> + case LINUX_CLOCK_MONOTONIC_RAW: >> *n =3D CLOCK_REALTIME_FAST; >> break; >> case LINUX_CLOCK_MONOTONIC_COARSE: > > this shows it is actually mapped to CLOCK_REALTIME_FAST, not > CLOCK_MONOTONIC_FAST. Is the code right, or the commit message? :) The commit message and the code I have running are right, the code I=20=20 committed=20from a "no other change than that"-svn-tree was not. :( I think I should switch to "diff | patch" even for one-liners like that. I commited the fix based upon another message I've seen before this=20=20 one,=20but thanks for looking at the code. Bye, Alexander. --=20 http://www.Leidinger.net=20Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF --=_wOku1sUdsJw5iUPKYvDG9Fi Content-Type: application/pgp-signature Content-Description: Digitale PGP-Signatur Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJfCzeLAAoJEBINsJsD+NiGiH0P/jUVckgElq1GHVof81Ns1uAl s8LUcIHt32XgRTNNJKH672y0X0QipVqrpz+iCghdsfF+zgpIzPI6giz+/ZETaqAs en4ypIW1XZhKjVoSzAhvSUv7B6B0HpQoZxi9O3nSpkDeaRdBFsVuoBcoT/DN3AcY Jb2H87Pl1nBVM4inkqyXfA19ALE+ZSuoYrfoQbJBLuV4iSWJLYecV1YE1Fr4SPfi 2t2lmSYBFpQXhVaXSa351thzpSNrRO1LS5axDkmIjORKnDxb9sn+FPkJrXD5RKfT +8MjjQ5kUrYWfqFPhhPclUXN5Dc2pMrELAJi0lfAH7TBBhL7YVP/IbBBvKBbthtn nUEUYGF471VMnD81EAI016d9SYyoqyIjQM0ab53a8EUDsz+r/tt76UC+nyHs2Rmr yqr5MGTB+dvugrAV22sgCrzxoQ5MbwrS+noqZqBrhNlY3s3ZumMdNcHRu50h9MKB WfBSciH/9061RQXxFG7z7qnH9tr8F376ttydytG4Zu5RDVY7tVx5rBdx4/ImFaLK B8IjoJbLSwnLTtCFPexrKT2BGdnGcj7g4kc3/x3LsjWBHpZUeyFEjF7o5kZJPJEG jKsDJMCvxvGvmpnxZeUYV2Nh1V9/gAVTxLI4UVNrF+q/msvxRG/H7h4p/dwwoHLr 2VMzx8GeUgW59sbOapgK =WHPn -----END PGP SIGNATURE----- --=_wOku1sUdsJw5iUPKYvDG9Fi-- From owner-svn-src-head@freebsd.org Sun Jul 12 17:16:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C6FB5369CB8; Sun, 12 Jul 2020 17:16:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4YNn4sJjz3Xf7; Sun, 12 Jul 2020 17:16:57 +0000 (UTC) (envelope-from ngie@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 85BC227A59; Sun, 12 Jul 2020 17:16:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06CHGvPv099027; Sun, 12 Jul 2020 17:16:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06CHGvgM099026; Sun, 12 Jul 2020 17:16:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <202007121716.06CHGvgM099026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Sun, 12 Jul 2020 17:16:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363132 - head/tests/sys/audit X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/tests/sys/audit X-SVN-Commit-Revision: 363132 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 17:16:57 -0000 Author: ngie Date: Sun Jul 12 17:16:57 2020 New Revision: 363132 URL: https://svnweb.freebsd.org/changeset/base/363132 Log: Don't leave `path` behind when executing `:chflags_success` Prior to this change a `SF_IMMUTABLE` chflagsat(2)'ed file (`path`) was left behind, which sabotaged kyua(1) from being able to clean up the work directory, This resulted in unnecessary work for folks having to clean up the work directory on non-disposable systems, which defaults to `/tmp`. Use `UF_OFFLINE` instead of `SF_IMMUTABLE`, in part because setting `SF_IMMUTABLE` isn't relevant to the test and `SF_IMMUTABLE` cannot be cleared at all securelevels, as pointed out by @asomers. Additional work is required to catch cases like this upfront in the future to avoid tester headache. See PR # 247765 for more details/followup. Suggested by: asomers Reviewed By: asomers, #tests MFC after: 1 week PR: 247761 Sponsored by: DellEMC Differential Revision: https://reviews.freebsd.org/D25561 Modified: head/tests/sys/audit/file-attribute-modify.c Modified: head/tests/sys/audit/file-attribute-modify.c ============================================================================== --- head/tests/sys/audit/file-attribute-modify.c Sun Jul 12 15:57:29 2020 (r363131) +++ head/tests/sys/audit/file-attribute-modify.c Sun Jul 12 17:16:57 2020 (r363132) @@ -704,7 +704,7 @@ ATF_TC_BODY(chflagsat_success, tc) /* File needs to exist to call chflagsat(2) */ ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1); FILE *pipefd = setup(fds, auclass); - ATF_REQUIRE_EQ(0, chflagsat(AT_FDCWD, path, SF_IMMUTABLE, 0)); + ATF_REQUIRE_EQ(0, chflagsat(AT_FDCWD, path, UF_OFFLINE, 0)); check_audit(fds, successreg, pipefd); close(filedesc); } @@ -726,7 +726,7 @@ ATF_TC_BODY(chflagsat_failure, tc) { FILE *pipefd = setup(fds, auclass); /* Failure reason: file does not exist */ - ATF_REQUIRE_EQ(-1, chflagsat(AT_FDCWD, errpath, SF_IMMUTABLE, 0)); + ATF_REQUIRE_EQ(-1, chflagsat(AT_FDCWD, errpath, UF_OFFLINE, 0)); check_audit(fds, failurereg, pipefd); } From owner-svn-src-head@freebsd.org Sun Jul 12 17:32:23 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F1BA836A11D; Sun, 12 Jul 2020 17:32:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4Ykb1K3Rz3YDW; Sun, 12 Jul 2020 17:32:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pl1-x635.google.com with SMTP id w17so4444595ply.11; Sun, 12 Jul 2020 10:32:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=AzEVL/DhKRCA1GZvHRZID+f04wfexToJAQDPuxZ6J7Y=; b=HNoPFXfZOw94r8ZdPXUA4nQ5GzhHYSxLZW/lGkey6piHjlUTj9SsHXPTiUMwaGvJpc /qnY7D8BXN8h6vnfpilpGbMyyXZoOqBSbvxauAk/JnD/U7YxL5XRNjLZpHRJOR5rwiLw Qs9Z48uuW2EfqbY9WLtXilFyPIh54QOiHNrt3u1JIGeO4O4x1JNz4VflSgauO55hv0sA YwLLMyHKG3BfupTcAu+BeojQmdK9aq9Tm1ZIPwNks2GmUwrlSRe+DSHMUgIahUznWnRA waYh5q6aFSiSGX71BdiZjbWBYVjJjeHI9ySOnYxbMeP9zKl0xPMPyLuMFupeDRnXvUZh 32og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=AzEVL/DhKRCA1GZvHRZID+f04wfexToJAQDPuxZ6J7Y=; b=RWD2PmIJqlhRBnHUCgHCSrXgUwJCBxm+UE0AcCgDimCeURnnqs80p57tl+zLoVXdIY MOmNipJD+pp114iynvnsO2lKncEctp7GxiVjNMbi+kaZUW1Hj+lRk3mCfGEqmGxT0/FR eZmkbrdYmOBYXHehWH3a2ZI9bMMEZ4rjzdG6oKFvvEynYA86XoQfUNaK9ya52Oc+evy3 av6T+uqlUCKmT+mEnY5byZV8Fy840o8DB5MRuj+rFfMF24DQRNmpYSWAtsHgy485Pkpt 4uP08PKOuMONhmPPRFs43VuVnVmeHJmLmMB9NLh1hbsMyKQexrsURmI/mp84NyJnleWL SpUw== X-Gm-Message-State: AOAM532U68yYz3Yy0xHzB36je9xQIVkW3kOuLlhE16kFfAWHJLqWDrmu Y38G1ZI8yt8+8BsU72yLS7ICsZ6bNJI= X-Google-Smtp-Source: ABdhPJyhCghTnSpA9Z7NeL6FTDhbb7FLGHmWpCk0TCg90kqDIg/FM9LBeikDSz4HkUrdaTwUrk2+QA== X-Received: by 2002:a17:902:d352:: with SMTP id l18mr24870941plk.56.1594575141389; Sun, 12 Jul 2020 10:32:21 -0700 (PDT) Received: from [192.168.20.26] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id r16sm12064385pfh.64.2020.07.12.10.32.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Jul 2020 10:32:20 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: svn commit: r363103 - head/usr.sbin/bsdinstall/scripts From: Enji Cooper In-Reply-To: <202007111720.06BHKHUE005504@repo.freebsd.org> Date: Sun, 12 Jul 2020 10:32:20 -0700 Cc: src-committers , svn-src-all , svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <3FAAA225-5092-4861-AC61-157417F8FB6F@gmail.com> References: <202007111720.06BHKHUE005504@repo.freebsd.org> To: Allan Jude X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 4B4Ykb1K3Rz3YDW X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=HNoPFXfZ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::635 as permitted sender) smtp.mailfrom=yaneurabeya@gmail.com X-Spamd-Result: default: False [-3.02 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.49)[-0.488]; RECEIVED_SPAMHAUS_PBL(0.00)[73.19.52.228:received]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.02)[-1.023]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.01)[-1.007]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::635:from]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 17:32:24 -0000 > On Jul 11, 2020, at 10:20 AM, Allan Jude = wrote: >=20 > Author: allanjude > Date: Sat Jul 11 17:20:17 2020 > New Revision: 363103 > URL: https://svnweb.freebsd.org/changeset/base/363103 >=20 > Log: > bsdinstall: only kill the dhclient for the interface we are = restarting >=20 > PR: 205821 > Reported by: mjg > MFC after: 2 weeks > Sponsored by: Klara Inc. > Event: July 2020 Bugathon >=20 > Modified: > head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Allan, Thank you so very much for doing this!!! This has been an = annoying nitpick of mine with sysinstall/bsdinstall, for many moons :). It looks like equivalent logic doesn=E2=80=99t need to be = implemented for IPv6. Yay :). Cheers! -Enji= From owner-svn-src-head@freebsd.org Sun Jul 12 17:34:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3AEB136A074; Sun, 12 Jul 2020 17:34:25 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4Ymv6wRwz3YLF; Sun, 12 Jul 2020 17:34:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pl1-x62e.google.com with SMTP id o1so4463628plk.1; Sun, 12 Jul 2020 10:34:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=HRvBgT2STKRLEmGMEvxLCwF3rSb6y/fGgbKqeVBhMXk=; b=d/vbkZGCzLKEX8+fIn01pz/YShJ8TjCXjhyTO281F8TTzdMgcqo/qfa3HzlnyNPoxk nK/c1OoqGs9vCWjZDgijSxvamSp6dYTFXmSFPfwmXHEsj5zt+2ZWBaqHtzbKdGRcTWMf 6o8gBW8M/qZEFw6aqs+7x5QpDhvAa5BMOm9ZAGgjbpacxMqwP4OwpMg+mqX9WXUmFMw4 P5B576H2Vnh43J1Q8Cs68QabJs3cAJKkaq7qZHPjbeexCY6eGMXquarESJpwwBf+aMGr lJG+7lEs6yx8pPAeonuDydlVmzfocJ5hBXUgEFJAj2FV0AHQFgrhwRoeZ+llswKWgi9n gLkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=HRvBgT2STKRLEmGMEvxLCwF3rSb6y/fGgbKqeVBhMXk=; b=p0AAlUQWEef34FgxwVOXSIMIdx/PPJPauIfEDZnWnGjiZxhHIqqkSFVbvLKhuezqnw bqjnMWE+0u63l0SMx1FTK8fDoKZhjHgh8WE3fPafF+9pWRBmmB5Wqa4VlBKhaxejMlJV jDpIO1wNDHrqTyhUNFYKfAxjOfC84Kqz3TAqhgPLd/AXkIv2PFgPtEWoJUnheH8q+IuY AYoht+py/X70lI/pOGy6mb93481x4ANURVbGeL/XSjtlakINJGYR1g2HrXm2DCjF7Q6d TNujUkz21dw8y9yqnB/WTR1YKhvG+ApGTS9oO4eDyCF735seQYElIwn3J22A9GfKnP5Y Of4Q== X-Gm-Message-State: AOAM530iEBb7ZFb/xWQ0kz5eS9CnDHMRAt9Vdis1ceKJNzrkyqp7EQ/d ys32FRcsCfKKQCnWXlpJo3q2k7eRpw8= X-Google-Smtp-Source: ABdhPJzcwefcfz5ml80FTuA614FCkCZZLRh4oLakvktTsFVmtnHzEZRR0Hb+zjAdOLO8vr5v+QTrmg== X-Received: by 2002:a17:902:b694:: with SMTP id c20mr67659443pls.123.1594575262599; Sun, 12 Jul 2020 10:34:22 -0700 (PDT) Received: from [192.168.20.26] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id t1sm12429859pje.55.2020.07.12.10.34.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Jul 2020 10:34:22 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: svn commit: r363088 - head/usr.bin/xinstall/tests From: Enji Cooper In-Reply-To: <33914205-17ca-3ec3-d425-1e269c6d6470@grosbein.net> Date: Sun, 12 Jul 2020 10:34:21 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <0CF1C991-956B-4BBF-86F6-79C4C5FAFABF@gmail.com> References: <202007102259.06AMxQxA013750@repo.freebsd.org> <54EAE812-6AAA-4882-B18E-75ED4FBB6628@gmail.com> <8ac0c5b6-1045-75a2-b7ff-ea7b76780cf0@freebsd.org> <33914205-17ca-3ec3-d425-1e269c6d6470@grosbein.net> To: Eugene Grosbein X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 4B4Ymv6wRwz3YLF X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=d/vbkZGC; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::62e as permitted sender) smtp.mailfrom=yaneurabeya@gmail.com X-Spamd-Result: default: False [-3.12 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.57)[-0.574]; RECEIVED_SPAMHAUS_PBL(0.00)[73.19.52.228:received]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.04)[-1.036]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.01)[-1.014]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::62e:from]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 17:34:25 -0000 > On Jul 10, 2020, at 6:13 PM, Eugene Grosbein = wrote: >=20 > 11.07.2020 8:07, Eugene Grosbein wrote: >=20 >>>> Fix the tests for install(1): add support for STRIPBIN's -o option. >>> Is this feature now completely gone? Are binaries being stripped = properly in ports, etc? >=20 > Support for STRIPBIN has not changed. Stripping of ports etc. still = works as before, just more quick due to less I/O. Eugene, Got it! Thank you very much for the followup/additional = information :). Cheers! -Enji= From owner-svn-src-head@freebsd.org Sun Jul 12 18:34:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 54AEE36AE59; Sun, 12 Jul 2020 18:34:10 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4b5t1XNmz3c9g; Sun, 12 Jul 2020 18:34:10 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 180538C8C; Sun, 12 Jul 2020 18:34:10 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06CIY9r5047593; Sun, 12 Jul 2020 18:34:09 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06CIY9ri047592; Sun, 12 Jul 2020 18:34:09 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007121834.06CIY9ri047592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 12 Jul 2020 18:34:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363133 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 363133 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 18:34:10 -0000 Author: tuexen Date: Sun Jul 12 18:34:09 2020 New Revision: 363133 URL: https://svnweb.freebsd.org/changeset/base/363133 Log: Cleanup, no functional change intended. This file is only compiled if INET or INET6 is defined. So there is no need for checking that. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D25635 Modified: head/sys/netinet/sctp_syscalls.c Modified: head/sys/netinet/sctp_syscalls.c ============================================================================== --- head/sys/netinet/sctp_syscalls.c Sun Jul 12 17:16:57 2020 (r363132) +++ head/sys/netinet/sctp_syscalls.c Sun Jul 12 18:34:09 2020 (r363133) @@ -32,8 +32,6 @@ __FBSDID("$FreeBSD$"); #include "opt_capsicum.h" -#include "opt_inet.h" -#include "opt_inet6.h" #include "opt_sctp.h" #include "opt_ktrace.h" @@ -139,8 +137,6 @@ sctp_syscalls_uninit(void) /* * SCTP syscalls. - * Functionality only compiled in if SCTP is defined in the kernel Makefile, - * otherwise all return EOPNOTSUPP. */ int sys_sctp_peeloff(td, uap) @@ -150,7 +146,6 @@ sys_sctp_peeloff(td, uap) caddr_t name; } */ *uap; { -#if defined(INET) || defined(INET6) struct file *headfp, *nfp = NULL; struct socket *head, *so; cap_rights_t rights; @@ -212,7 +207,6 @@ done: fdrop(headfp, td); done2: return (error); -#endif } int @@ -228,7 +222,6 @@ sys_sctp_generic_sendmsg (td, uap) int flags } */ *uap; { -#if defined(INET) || defined(INET6) struct sctp_sndrcvinfo sinfo, *u_sinfo = NULL; struct socket *so; struct file *fp = NULL; @@ -323,7 +316,6 @@ sctp_bad: sctp_bad2: free(to, M_SONAME); return (error); -#endif } int @@ -339,7 +331,6 @@ sys_sctp_generic_sendmsg_iov(td, uap) int flags } */ *uap; { -#if defined(INET) || defined(INET6) struct sctp_sndrcvinfo sinfo, *u_sinfo = NULL; struct socket *so; struct file *fp = NULL; @@ -451,7 +442,6 @@ sctp_bad1: sctp_bad2: free(to, M_SONAME); return (error); -#endif } int @@ -467,7 +457,6 @@ sys_sctp_generic_recvmsg(td, uap) int *msg_flags } */ *uap; { -#if defined(INET) || defined(INET6) uint8_t sockbufstore[256]; struct uio auio; struct iovec *iov, *tiov; @@ -597,5 +586,4 @@ out1: fdrop(fp, td); return (error); -#endif } From owner-svn-src-head@freebsd.org Sun Jul 12 20:59:53 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AE81636E2F6; Sun, 12 Jul 2020 20:59:53 +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 4B4fL14B92z42rj; Sun, 12 Jul 2020 20:59:53 +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 72F1BA5A5; Sun, 12 Jul 2020 20:59:53 +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 06CKxrcC035280; Sun, 12 Jul 2020 20:59:53 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06CKxrIx035279; Sun, 12 Jul 2020 20:59:53 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202007122059.06CKxrIx035279@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Sun, 12 Jul 2020 20:59:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363136 - head/usr.bin/xinstall X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/usr.bin/xinstall X-SVN-Commit-Revision: 363136 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 20:59:53 -0000 Author: eugen Date: Sun Jul 12 20:59:52 2020 New Revision: 363136 URL: https://svnweb.freebsd.org/changeset/base/363136 Log: install(1): another correction after r363064 Make sure we call fsync(2) on strip result in case of "safecopy" and "strip -o tempcopy -- src" before renaming tempcopy to destination. MFC after: 3 weeks X-MFC-With: r363064 Modified: head/usr.bin/xinstall/xinstall.c Modified: head/usr.bin/xinstall/xinstall.c ============================================================================== --- head/usr.bin/xinstall/xinstall.c Sun Jul 12 19:39:56 2020 (r363135) +++ head/usr.bin/xinstall/xinstall.c Sun Jul 12 20:59:52 2020 (r363136) @@ -147,7 +147,7 @@ static void install_dir(char *); static void metadata_log(const char *, const char *, struct timespec *, const char *, const char *, off_t); static int parseid(const char *, id_t *); -static int strip(const char *, const char *, char **); +static int strip(const char *, int, const char *, char **); static int trymmap(int); static void usage(void); @@ -862,7 +862,7 @@ install(const char *from_name, const char *to_name, u_ if (!devnull) { if (dostrip) stripped = strip(tempcopy ? tempfile : to_name, - from_name, &digestresult); + to_fd, from_name, &digestresult); if (!stripped) digestresult = copy(from_fd, from_name, to_fd, tempcopy ? tempfile : to_name, from_sb.st_size); @@ -871,8 +871,8 @@ install(const char *from_name, const char *to_name, u_ if (dostrip) { if (!stripped) - (void)strip(tempcopy ? tempfile : to_name, NULL, - &digestresult); + (void)strip(tempcopy ? tempfile : to_name, to_fd, + NULL, &digestresult); /* * Re-open our fd on the target, in case @@ -1310,17 +1310,18 @@ copy(int from_fd, const char *from_name, int to_fd, co /* * strip -- * Use strip(1) to strip the target file. - * Just invoke strip(1) on to_name if from_name is NULL, - * else try to run "strip -o to_name -- from_name" and return 0 on failure. - * Return 1 on success and assign result of digest_file(to_name) to *dresp. + * Just invoke strip(1) on to_name if from_name is NULL, else try + * to run "strip -o to_name -- from_name" and return 0 on failure. + * Return 1 on success and assign result of digest_file(to_name) + * to *dresp. */ static int -strip(const char *to_name, const char *from_name, char **dresp) +strip(const char *to_name, int to_fd, const char *from_name, char **dresp) { const char *stripbin; const char *args[6]; pid_t pid; - int error, status; + int error, serrno, status; stripbin = getenv("STRIPBIN"); if (stripbin == NULL) @@ -1355,6 +1356,12 @@ strip(const char *to_name, const char *from_name, char (void)unlink(to_name); errx(EX_SOFTWARE, "strip command %s failed on %s", stripbin, to_name); + } + if (from_name != NULL && safecopy && fsync(to_fd) == -1) { + serrno = errno; + (void)unlink(to_name); + errno = serrno; + err(EX_OSERR, "fsync failed for %s", to_name); } if (dresp != NULL) *dresp = digest_file(to_name); From owner-svn-src-head@freebsd.org Sun Jul 12 23:28:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D08D0351DEF; Sun, 12 Jul 2020 23:28:02 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4jcy3l5pz49bd; Sun, 12 Jul 2020 23:28:02 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-oi1-f169.google.com with SMTP id r8so9542153oij.5; Sun, 12 Jul 2020 16:28:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=lxXaS7tfiFINYnFticiFb8Vl/spAXgbyhYzWVSOb0C0=; b=LDZUM239sIbTfcGsebyLDChSNiZaaZY3Lij9UROjeDS80s4VP3Z0J6nfjZyIMpGdg4 oLj3jom8Qp4geem/gQSjaD75qwmFeZMSpdM183y806n5RVDaCHbMIhuLdjBl1Rz+KACV UY2lYSLFoEskmOZpDFDPMeS3jZQCuMgua2JzgzehMK4x20Z1HKLos42AOje8ybud5OVn OToQ/XsE2UqQZh5gvSo5NQ62H71ZhH4ru64z/y56+Vkl1o0PWiy9EmM2L4tWv4mZmgl2 S5SY2k2W9+PwORI8f/8EfNr5w7Q9GH+bAWDj3IwKkdXU2GBXTrxsFpo7CBtzQD2ezuCR VOXg== X-Gm-Message-State: AOAM5309m/xvTci9CDVhojiVvu+0w0qvqaghrQML1jDUOKxg8vvLdqZp v6zk6RtnaXBrGnexXasdaeNsDNG9 X-Google-Smtp-Source: ABdhPJzvesxak2Z/0EuRRioYJmHive1svmCwZfzWfU6A5/rMxDKOXTRyr4CKR/PNpGMVpXgFtdo4Jw== X-Received: by 2002:a05:6808:7cc:: with SMTP id f12mr11610848oij.52.1594596480864; Sun, 12 Jul 2020 16:28:00 -0700 (PDT) Received: from mail-ot1-f42.google.com (mail-ot1-f42.google.com. [209.85.210.42]) by smtp.gmail.com with ESMTPSA id r18sm2724300otd.59.2020.07.12.16.28.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Jul 2020 16:28:00 -0700 (PDT) Received: by mail-ot1-f42.google.com with SMTP id a21so8213242otq.8; Sun, 12 Jul 2020 16:28:00 -0700 (PDT) X-Received: by 2002:a9d:561a:: with SMTP id e26mr3066372oti.216.1594596480319; Sun, 12 Jul 2020 16:28:00 -0700 (PDT) MIME-Version: 1.0 References: <202007120951.06C9pA4F024281@repo.freebsd.org> In-Reply-To: <202007120951.06C9pA4F024281@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Sun, 12 Jul 2020 16:27:49 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r363125 - head/sys/compat/linux To: Alexander Leidinger Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4B4jcy3l5pz49bd X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 23:28:02 -0000 Hi Alexander, On Sun, Jul 12, 2020 at 2:51 AM Alexander Leidinger wrote: > > Author: netchild > Date: Sun Jul 12 09:51:09 2020 > New Revision: 363125 > URL: https://svnweb.freebsd.org/changeset/base/363125 > > Log: > Implement CLOCK_MONOTONIC_RAW (linux >=3D 2.6.28). > > It is documented as a raw hardware-based clock not subject to NTP or > incremental adjustments. With this "not as precise as CLOCK_MONOTONIC" > description in mind, map it to our CLOCK_MONOTNIC_FAST (the same > mapping as for the linux CLOCK_MONOTONIC_COARSE). Can you point at the documentation suggesting CLOCK_MONOTONIC_RAW is any less precise than CLOCK_MONOTONIC? I'm looking at the Linux manual page and it does not seem to contain any language to that effect. > This is needed for the webcomponent of steam (chromium) and some > other steam component or game. > > The linux-steam-utils port contains a LD_PRELOAD based fix for this. > There this is mapped to CLOCK_MONOTONIC. > As an untrained ear/eye (=3D the majority of people) is normaly not > noticing a difference of jitter in the 10-20 ms range, specially > if you don't pay attention like for example in a browser session > while watching a video stream, the mapping to CLOCK_MONOTONIC_FAST > seems more appropriate than to CLOCK_MONOTONIC. I don't know how these programs use the clock, but 10-20 ms of jitter in the UI is noticeable to even casual users. (In FreeBSD these functions are purportedly accurate to 1 timer tick, which is 1ms on HZ=3D1000 (amd64) =E2=80=94 much better than 10-20ms.) However, I'm concer= ned this is still insufficient precision compared with the documented behavior of the Linux functions. I think regular CLOCK_MONOTONIC is the closest thing we've got to Linux's CLOCK_MONOTONIC_RAW. The Linux analog of _FAST is _COARSE. Best, Conrad From owner-svn-src-head@freebsd.org Mon Jul 13 01:28:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7397D355397; Mon, 13 Jul 2020 01:28:46 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4mJG2RTxz4GQ6; Mon, 13 Jul 2020 01:28:46 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 32C04D6D6; Mon, 13 Jul 2020 01:28:46 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06D1Skto099044; Mon, 13 Jul 2020 01:28:46 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06D1SkeX099043; Mon, 13 Jul 2020 01:28:46 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202007130128.06D1SkeX099043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 13 Jul 2020 01:28:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363137 - head/sys/fs/nfsclient X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfsclient X-SVN-Commit-Revision: 363137 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 01:28:46 -0000 Author: rmacklem Date: Mon Jul 13 01:28:45 2020 New Revision: 363137 URL: https://svnweb.freebsd.org/changeset/base/363137 Log: Minor code cleanup that removes "nd->nd_bpos = mcp;" in both if and else. The statement "nd->nd_bpos = mcp;" was in both the if and else. Correct, but potentially confusing. This patch fixes this. There should be no semantics change caused by this commit. Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clcomsubs.c Sun Jul 12 20:59:52 2020 (r363136) +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Mon Jul 13 01:28:45 2020 (r363137) @@ -145,13 +145,12 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *ui for (left = 0; left < rem; left++) *mcp++ = '\0'; mp->m_len += rem; - nd->nd_bpos = mcp; if ((nd->nd_flag & ND_EXTPG) != 0) { nd->nd_bextpgsiz -= rem; mp->m_epg_last_len += rem; } - } else - nd->nd_bpos = mcp; + } + nd->nd_bpos = mcp; nd->nd_mb = mp; } From owner-svn-src-head@freebsd.org Mon Jul 13 01:32:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B1EDB3551F2; Mon, 13 Jul 2020 01:32:37 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4mNj4Ddvz4H2n; Mon, 13 Jul 2020 01:32:37 +0000 (UTC) (envelope-from yuripv@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 74FDADC59; Mon, 13 Jul 2020 01:32:37 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06D1WbIm004854; Mon, 13 Jul 2020 01:32:37 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06D1WbD3004853; Mon, 13 Jul 2020 01:32:37 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <202007130132.06D1WbD3004853@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Mon, 13 Jul 2020 01:32:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363138 - head/usr.bin/sed/tests X-SVN-Group: head X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: head/usr.bin/sed/tests X-SVN-Commit-Revision: 363138 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 01:32:37 -0000 Author: yuripv Date: Mon Jul 13 01:32:37 2020 New Revision: 363138 URL: https://svnweb.freebsd.org/changeset/base/363138 Log: sed/multi_test: print comment for current test, not next one This is visible when e.g. 8.20 is failing: not ok 96 8.20 # \ in y command 8.20's comment should be '[ as an s delimiter and its escapes'. Modified: head/usr.bin/sed/tests/multi_test.sh Modified: head/usr.bin/sed/tests/multi_test.sh ============================================================================== --- head/usr.bin/sed/tests/multi_test.sh Mon Jul 13 01:28:45 2020 (r363137) +++ head/usr.bin/sed/tests/multi_test.sh Mon Jul 13 01:32:37 2020 (r363138) @@ -92,9 +92,9 @@ result() cp current.out $REGRESS/${TESTNAME} fi if diff -c $REGRESS/${TESTNAME} current.out ; then - echo "ok $MARK $TESTNAME # $TODO$COMMENT" + echo "ok $MARK $TESTNAME # $TODO$OCOMMENT" else - echo "not ok $MARK $TESTNAME # $TODO$COMMENT" + echo "not ok $MARK $TESTNAME # $TODO$OCOMMENT" fi 1>&4 2>&5 } @@ -102,6 +102,7 @@ result() mark() { [ $MARK -gt 0 ] && result + OCOMMENT=$COMMENT MARK=`expr $MARK + 1` TESTNAME=$1 exec 1>&4 2>&5 From owner-svn-src-head@freebsd.org Mon Jul 13 02:09:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C9AA3559B4; Mon, 13 Jul 2020 02:09:22 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4nC609qZz4HmZ; Mon, 13 Jul 2020 02:09:22 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DE352E27D; Mon, 13 Jul 2020 02:09:21 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06D29Lv2023356; Mon, 13 Jul 2020 02:09:21 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06D29L8t023355; Mon, 13 Jul 2020 02:09:21 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202007130209.06D29L8t023355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Mon, 13 Jul 2020 02:09:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363139 - head/stand/man X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/stand/man X-SVN-Commit-Revision: 363139 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 02:09:22 -0000 Author: allanjude Date: Mon Jul 13 02:09:21 2020 New Revision: 363139 URL: https://svnweb.freebsd.org/changeset/base/363139 Log: Loader: explain the syntax of currdev The origin text was: "Syntax for devices is odd." That is not very helpful. PR: 199103 Reviewed by: kevans, tsoome Sponsored by: Klara Inc. Event: July 2020 Bugathon Differential Revision: https://reviews.freebsd.org/D25629 Modified: head/stand/man/loader.8 Modified: head/stand/man/loader.8 ============================================================================== --- head/stand/man/loader.8 Mon Jul 13 01:32:37 2020 (r363138) +++ head/stand/man/loader.8 Mon Jul 13 02:09:21 2020 (r363139) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 15, 2018 +.Dd July 11, 2020 .Dt LOADER 8 .Os .Sh NAME @@ -479,8 +479,14 @@ In that case, the first listed console will become the userland output (e.g.\& from .Xr init 8 ) . .It Va currdev -Selects the default device. -Syntax for devices is odd. +Selects the default device to loader the kernel from. +The syntax is: +.Dl Ic loader_device: +or +.Dl Ic zfs:dataset: +Examples: +.Dl Ic disk0p2: +.Dl Ic zfs:zroot/ROOT/default: .It Va dumpdev Sets the device for kernel dumps. This can be used to ensure that a device is configured before the corresponding From owner-svn-src-head@freebsd.org Mon Jul 13 02:24:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 01F913562BF; Mon, 13 Jul 2020 02:24:32 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4nXb5JCcz4JZT; Mon, 13 Jul 2020 02:24:31 +0000 (UTC) (envelope-from gonzo@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 99558E32A; Mon, 13 Jul 2020 02:24:31 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06D2OVDx035465; Mon, 13 Jul 2020 02:24:31 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06D2OVWr035464; Mon, 13 Jul 2020 02:24:31 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <202007130224.06D2OVWr035464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 13 Jul 2020 02:24:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363140 - head/usr.bin/mkimg X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/usr.bin/mkimg X-SVN-Commit-Revision: 363140 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 02:24:32 -0000 Author: gonzo Date: Mon Jul 13 02:24:31 2020 New Revision: 363140 URL: https://svnweb.freebsd.org/changeset/base/363140 Log: Fix invalid VHDX generation for image larger than 4Gb - Part of BAT payload location was lost due to invalid BAT entry encoding type (32 bits instead of 64 bits) - The sequence of PB/SB entries in BAT was broken due to off-by-one index check. It worked for smaller than 4Gb because there were no SB entries in BAT. MFC after: 1 day Modified: head/usr.bin/mkimg/vhdx.c Modified: head/usr.bin/mkimg/vhdx.c ============================================================================== --- head/usr.bin/mkimg/vhdx.c Mon Jul 13 02:09:21 2020 (r363139) +++ head/usr.bin/mkimg/vhdx.c Mon Jul 13 02:24:31 2020 (r363140) @@ -429,7 +429,7 @@ vhdx_write_bat(int fd, uint64_t image_size) payload_offset = 3 + (bat_size / SIZE_1MB); bat_ptr = 0; for (idx = 0; idx < data_block_count; idx++) { - le32enc(bat + bat_ptr, + le64enc(bat + bat_ptr, BAT_ENTRY(payload_offset, PAYLOAD_BLOCK_FULLY_PRESENT)); bat_ptr += 8; payload_offset += (PAYLOAD_BLOCK_SIZE / SIZE_1MB); @@ -445,9 +445,9 @@ vhdx_write_bat(int fd, uint64_t image_size) bat_ptr = 0; } - if ((idx % chunk_ratio) == 0 && - (idx > 0) && (idx != data_block_count - 1)) { - le32enc(bat + bat_ptr, + if (((idx + 1) % chunk_ratio) == 0 && + (idx != data_block_count - 1)) { + le64enc(bat + bat_ptr, BAT_ENTRY(0, SB_BLOCK_NOT_PRESENT)); bat_ptr += 8; From owner-svn-src-head@freebsd.org Mon Jul 13 13:32:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8102B363DB6; Mon, 13 Jul 2020 13:32:08 +0000 (UTC) (envelope-from netchild@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B54Lw2v59z3f04; Mon, 13 Jul 2020 13:32:08 +0000 (UTC) (envelope-from netchild@freebsd.org) Received: from outgoing.leidinger.net (p5b16506d.dip0.t-ipconnect.de [91.22.80.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: netchild) by smtp.freebsd.org (Postfix) with ESMTPSA id 141D42DE8D; Mon, 13 Jul 2020 13:32:08 +0000 (UTC) (envelope-from netchild@freebsd.org) Received: from webmail.leidinger.net (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (Client did not present a certificate) by outgoing.leidinger.net (Postfix) with ESMTPS id DA743133A; Mon, 13 Jul 2020 15:32:05 +0200 (CEST) Date: Mon, 13 Jul 2020 15:32:05 +0200 Message-ID: <20200713153205.Horde.3fZseDV88TEEnXbYL8ZwX50@webmail.leidinger.net> From: Alexander Leidinger To: Conrad Meyer Cc: src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r363125 - head/sys/compat/linux References: <202007120951.06C9pA4F024281@repo.freebsd.org> In-Reply-To: Accept-Language: de,en Content-Type: multipart/signed; boundary="=_UMX5_4lrr3cyWS9q7suIWav"; protocol="application/pgp-signature"; micalg=pgp-sha1 MIME-Version: 1.0 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 13:32:08 -0000 This message is in MIME format and has been PGP signed. --=_UMX5_4lrr3cyWS9q7suIWav Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Quoting Conrad Meyer (from Sun, 12 Jul 2020 16:27:49 -070= 0): > Hi Alexander, > > On Sun, Jul 12, 2020 at 2:51 AM Alexander Leidinger > wrote: >> >> Author: netchild >> Date: Sun Jul 12 09:51:09 2020 >> New Revision: 363125 >> URL: https://svnweb.freebsd.org/changeset/base/363125 >> >> Log: >> Implement CLOCK_MONOTONIC_RAW (linux >=3D 2.6.28). >> >> It is documented as a raw hardware-based clock not subject to NTP or >> incremental adjustments. With this "not as precise as CLOCK_MONOTONIC" >> description in mind, map it to our CLOCK_MONOTNIC_FAST (the same >> mapping as for the linux CLOCK_MONOTONIC_COARSE). > > Can you point at the documentation suggesting CLOCK_MONOTONIC_RAW is > any less precise than CLOCK_MONOTONIC? I'm looking at the Linux > manual page and it does not seem to contain any language to that > effect. It depends what each of us means by "less precise". I only had a look at the man page online, and what I refer to her in=20=20 terms=20of precision is the "not subject to NTP or incremental=20=20 adjustments".=20I understand this as: MONOTINIC is rather precise about=20= =20 the=20rate of change (e.g. it is close to the rate of change as far as=20= =20 you=20can get with NTP and the hardware you have), whereas MONOTIC_RAW=20= =20 may=20increase faster or slower than MONOTONIC, but it stays monotonic. >> This is needed for the webcomponent of steam (chromium) and some >> other steam component or game. >> >> The linux-steam-utils port contains a LD_PRELOAD based fix for this. >> There this is mapped to CLOCK_MONOTONIC. >> As an untrained ear/eye (=3D the majority of people) is normaly not >> noticing a difference of jitter in the 10-20 ms range, specially >> if you don't pay attention like for example in a browser session >> while watching a video stream, the mapping to CLOCK_MONOTONIC_FAST >> seems more appropriate than to CLOCK_MONOTONIC. > > I don't know how these programs use the clock, but 10-20 ms of jitter > in the UI is noticeable to even casual users. (In FreeBSD these A german DIY electronic magazine had once (about 20 years ago) a=20=20 little=20device with which you was able to test your sensitivity between=20= =20 two=20audio or visual events. It simply activated the left and right=20=20 device=20for a short moment of time (LED or a click in the headphone).=20= =20 It=20displayed how far in time the two events were apart (the scale was=20= =20 from=2010ms to 100ms in 10ms steps). I should have still this device=20=20 somehere... In=20my twenties, I tested it. I was able to distinguish 2 different=20=20 events=20which were 40-60ms apart (don't remember if I was able to=20=20 detect=20shorter pauses in the audio test or in the visual test, but=20=20 both=20weren't at the same level). They told with age your ability gets=20= =20 worse. This=20device was able to train your abilities in this regard. The=20=20 training=20mode did the same, but instead of only one type of test, you=20= =20 was=20testing both (audio + visual). This not onlxy brought the slower=20= =20 of=20both down to the level of the faster one (when testing afterwards=20= =20 only=20one of the types), but with some repetition you was able to=20=20 distinguish=20two different events which were too close in time to each=20= =20 other=20before. I was able to get down to 20ms (and sometimes 10ms). But=20= =20 I=20had to be concentrated on the test. So I have first hand experience of being able to notice two events=20=20 which=20are 20ms apart... 20 years ago, after some days of training. And this is the sole reason why I mentioned 10-20ms in the commit log.=20= =20 See=20further down before commenting on this sentence. Bring me 3 people which swear that they notice a difference when=20=20 running=20steam / linux-chrome (comparing MONOTONIC_FAST vs MONOTONIC),=20= =20 and=20which tell that it annoys them, and I fully agree to switch to=20=20 MONOTONIC.=20Please see below before commenting on this sentence. > functions are purportedly accurate to 1 timer tick, which is 1ms on > HZ=3D1000 (amd64) =E2=80=94 much better than 10-20ms.) However, I'm conc= erned Our MONOTONIC_FAST is documented to have an accuracy of one timer=20=20 tick.=20So we _are_ with this setting at 1ms (with HZ=3D1000). This=20=20 accuracy=20is a worst case accuracy. If your call to get the clock is=20=20 0.1ms=20after the update of the value MONOTONIC_FAST reads out, you are=20= =20 as=20accurate as 0.1ms... So the accuracy we achieve with the mapping to=20= =20 MONOTONIC_FAST=20is between 0ms and 1ms (with HZ=3D1000). To come back to= =20=20 what=20I said before and change it a little bit: if you bring 3 people=20= =20 which=20swear they notice a difference of upto 1ms in their use of steam=20= =20 /=20linux-chrome which annoys them, and if they switch to MONOTONIC and=20= =20 they=20do not notice a difference anymore, I fully agree to switch to=20=20 MONOTONIC.=20Until them I'm sceptical that this can be noticed. > this is still insufficient precision compared with the documented > behavior of the Linux functions. I think regular CLOCK_MONOTONIC is > the closest thing we've got to Linux's CLOCK_MONOTONIC_RAW. The Linux > analog of _FAST is _COARSE. I do not know which one is closer. I consider the linux man page I've=20=20 read=20online as not detailed enough to be able to judge that. I tried=20= =20 to=20find more info before the commit, but I haven't found more. By=20=20 looking=20at our man page, I understand the implementation detail=20=20 between=20MONOTONIC_FAST and MONOTONIC, and I assume the same rationale=20= =20 why=20it was done and why this is useful applies to the linux=20=20 MONOTONIC_COARSE=20and MONOTONIC. I can not say the same about the=20=20 MONOTONIC_RAW.=20From reading the linux man page I do not understand the=20= =20 rationale=20of _RAW and as such I do not understand where I want to use=20= =20 it=20and why steam/chrome is using it. As such I do not know if the use=20= =20 case=20has to do with access-speed, or time-precision or something else.=20= =20 The=20linux man page is simply too much underdocumented to be able to=20=20 tell=20if this is insufficient precision or not. My gut-feeling is that either of those timecounters work for _RAW. And=20= =20 I=20have my doubts that there were real blind-A/B-experiments/test=20=20 behind=20chosing the _RAW timecounter on linux. From a pure=20=20 thought-experiment=20point of view I think that both other options=20=20 MONOTONIC=20and MONOTONIC_COARSE would work as good as _RAW on linux=20=20 (for=20steam/chrome) and that there is no benefit of RAW in the=20=20 experience=20in the UI or with audio or with video. With all the above being said, I do not hold a lock on the current=20=20 code.=20If you want to change that part of the implementation of the=20=20 linuxulator,=20feel free to go ahead (but in this case I challenge you=20= =20 in=20advance to provide an example where it makes a difference ... can=20= =20 be=20a thought-experiment or a real-world example). Bye, Alexander. --=20 http://www.Leidinger.net=20Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF --=_UMX5_4lrr3cyWS9q7suIWav Content-Type: application/pgp-signature Content-Description: Digitale PGP-Signatur Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJfDGJVAAoJEBINsJsD+NiGZosP+wRSK5djf8PaJrxtf4EDMabd KHuFU+3kMi1ifpbynLgkNh4y8XDUBuBxgw8QmJWIxBKiTx/lLFYmHOILnRB8fRTi Dylzd+mnyE8DoU9iBT1rF4Je6zAL7ebrhuj0H6/KnJhSewHmL1vwIdIO8ChEQzQS LTm+axqi8WZWxB+UiDZjABy11zrPbfYCnPZijvWTZCFTgHj5uZ3gl8NO0Wmo3hMc z7sJJHTau1oxfPip4bwZbkCnOuo0kb7KWBsfqnvoFqcnxchQxJPDxrsNudRhXzjJ YMFsLYrPSCNOuKOLkiuRQjuhiwpITXc+7Fs6Y0syZIxxFaXvmLSnLVvt5MdifrzO vR/x9YH4yxR08SwKHbMa/j92gcft/cOtFIfJ4sRqVDtigndXGn4woCe5pB3Evdcd ULhVKZ9O1Ct1wrxFFKGq7HlImVhidipzp35X25Z7Y8tQfD1tEEaMhQewoEGh2g+o BjInn86PvdRnCm/oflwDiM674fko4HS4zr7fn11buQttCJ0seyCyM8SQVRt/4FDs rQENdJafeDwPHLhapw5oIpnPfEUaKnhbx7Uug+KFptFr6hVGYHSKBGEcGO0TkKSX pMw6o3JD+RhsxbVzFENqZNXxFGXfNH6qoH7Ttuqtr5HNixCcylrCS0aVUjoNeJgM CTZZxkVb0UiO8D8W1r92 =lxop -----END PGP SIGNATURE----- --=_UMX5_4lrr3cyWS9q7suIWav-- From owner-svn-src-head@freebsd.org Mon Jul 13 13:35:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 819BA364119; Mon, 13 Jul 2020 13:35:37 +0000 (UTC) (envelope-from thj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B54Qx2vtBz3fWH; Mon, 13 Jul 2020 13:35:37 +0000 (UTC) (envelope-from thj@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 432DA15A7D; Mon, 13 Jul 2020 13:35:37 +0000 (UTC) (envelope-from thj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06DDZb2T045871; Mon, 13 Jul 2020 13:35:37 GMT (envelope-from thj@FreeBSD.org) Received: (from thj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06DDZbhI045870; Mon, 13 Jul 2020 13:35:37 GMT (envelope-from thj@FreeBSD.org) Message-Id: <202007131335.06DDZbhI045870@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: thj set sender to thj@FreeBSD.org using -f From: Tom Jones Date: Mon, 13 Jul 2020 13:35:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363141 - head/sys/netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: thj X-SVN-Commit-Paths: head/sys/netpfil/ipfw X-SVN-Commit-Revision: 363141 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 13:35:37 -0000 Author: thj Date: Mon Jul 13 13:35:36 2020 New Revision: 363141 URL: https://svnweb.freebsd.org/changeset/base/363141 Log: Don't print VNET pointer when initializing dummynet When dummynet initializes it prints a debug message with the current VNET pointer unnecessarily revealing kernel memory layout. This appears to be left over from when the first pieces of vimage support were added. PR: 238658 Submitted by: huangfq.daxian@gmail.com Reviewed by: markj, bz, gnn, kp, melifaro Approved by: jtl (co-mentor), bz (co-mentor) Event: July 2020 Bugathon MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D25619 Modified: head/sys/netpfil/ipfw/ip_dummynet.c Modified: head/sys/netpfil/ipfw/ip_dummynet.c ============================================================================== --- head/sys/netpfil/ipfw/ip_dummynet.c Mon Jul 13 02:24:31 2020 (r363140) +++ head/sys/netpfil/ipfw/ip_dummynet.c Mon Jul 13 13:35:36 2020 (r363141) @@ -2511,7 +2511,6 @@ ip_dn_init(void) { if (dn_cfg.init_done) return; - printf("DUMMYNET %p with IPv6 initialized (100409)\n", curvnet); dn_cfg.init_done = 1; /* Set defaults here. MSVC does not accept initializers, * and this is also useful for vimages From owner-svn-src-head@freebsd.org Mon Jul 13 13:44:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A2CD3643A4; Mon, 13 Jul 2020 13:44:55 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B54dg39D1z3g7g; Mon, 13 Jul 2020 13:44:55 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51154162F2; Mon, 13 Jul 2020 13:44:55 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06DDitJE051695; Mon, 13 Jul 2020 13:44:55 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06DDit0E051694; Mon, 13 Jul 2020 13:44:55 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202007131344.06DDit0E051694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Mon, 13 Jul 2020 13:44:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363142 - head/libexec/rc/rc.d X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/libexec/rc/rc.d X-SVN-Commit-Revision: 363142 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 13:44:55 -0000 Author: allanjude Date: Mon Jul 13 13:44:54 2020 New Revision: 363142 URL: https://svnweb.freebsd.org/changeset/base/363142 Log: Remove excess spaces from rc.d scripts The space between words is already being echoed by the space between quoted strings: % echo 'foo' 'bar' foo bar % echo 'foo' ' baz' foo baz Found in `ipfw` and `mountlate` messages. PR: 247948 Submitted by: Jose Luis Duran MFC after: 2 weeks Sponsored by: Klara Inc. Modified: head/libexec/rc/rc.d/ipfw head/libexec/rc/rc.d/mountlate Modified: head/libexec/rc/rc.d/ipfw ============================================================================== --- head/libexec/rc/rc.d/ipfw Mon Jul 13 13:35:36 2020 (r363141) +++ head/libexec/rc/rc.d/ipfw Mon Jul 13 13:44:54 2020 (r363142) @@ -63,7 +63,7 @@ ipfw_start() echo 'Firewall rules loaded.' elif [ "`ipfw list 65535`" = "65535 deny ip from any to any" ]; then echo 'Warning: kernel has firewall functionality, but' \ - ' firewall rules are not enabled.' + 'firewall rules are not enabled.' echo ' All ip services are disabled.' fi Modified: head/libexec/rc/rc.d/mountlate ============================================================================== --- head/libexec/rc/rc.d/mountlate Mon Jul 13 13:35:36 2020 (r363141) +++ head/libexec/rc/rc.d/mountlate Mon Jul 13 13:44:54 2020 (r363142) @@ -32,7 +32,7 @@ mountlate_start() ;; *) echo 'Mounting /etc/fstab filesystems failed,' \ - ' startup aborted' + 'startup aborted' stop_boot true ;; esac From owner-svn-src-head@freebsd.org Mon Jul 13 13:51:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B0A7364465; Mon, 13 Jul 2020 13:51:50 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from tor1-11.mx.scaleengine.net (tor1-11.mx.scaleengine.net [IPv6:2001:470:1:474::25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B54nd4ZXRz3gYD; Mon, 13 Jul 2020 13:51:49 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (Seawolf.HML3.ScaleEngine.net [209.51.186.28]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by tor1-11.mx.scaleengine.net (Postfix) with ESMTPSA id A66841D37E; Mon, 13 Jul 2020 13:51:43 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.10.3 tor1-11.mx.scaleengine.net A66841D37E Subject: Re: svn commit: r363103 - head/usr.sbin/bsdinstall/scripts To: Enji Cooper Cc: src-committers , svn-src-all , svn-src-head@freebsd.org References: <202007111720.06BHKHUE005504@repo.freebsd.org> <3FAAA225-5092-4861-AC61-157417F8FB6F@gmail.com> From: Allan Jude Autocrypt: addr=allanjude@freebsd.org; prefer-encrypt=mutual; keydata= xsFNBFVwZcYBEADwrZDH0xe0ZVjc9ORCc6PcBLwS/RTXA6NkvpD6ea02pZ8lPOVgteuuugFc D34LdDbiWr+479vfrKBh+Y38GL0oZ0/13j10tIlDMHSa5BU0y6ACtnhupFvVlQ57+XaJAb/q 7qkfSiuxVwQ3FY3PL3cl1RrIP5eGHLA9hu4eVbu+FOX/q/XVKz49HaeIaxzo2Q54572VzIo6 C28McX9m65UL5fXMUGJDDLCItLmehZlHsQQ+uBxvODLFpVV2lUgDR/0rDa0B9zHZX8jY8qQ7 ZdCSy7CwClXI054CkXZCaBzgxYh/CotdI8ezmaw7NLs5vWNTxaDEFXaFMQtMVhvqQBpHkfOD 7rjjOmFw00nJL4FuPE5Yut0CPyx8vLjVmNJSt/Y8WxxmhutsqJYFgYfWl/vaWkrFLur/Zcmz IklwLw35HLsCZytCN5A3rGKdRbQjD6QPXOTJu0JPrJF6t2xFkWAT7oxnSV0ELhl2g+JfMMz2 Z1PDmS3NRnyEdqEm7NoRGXJJ7bgxDbN+9SXTyOletqGNXj/bSrBvhvZ0RQrzdHAPwQUfVSU2 qBhQEi2apSZstgVNMan0GUPqCdbE2zpysg+zT7Yhvf9EUQbzPL4LpdK1llT9fZbrdMzEXvEF oSvwJFdV3sqKmZc7b+E3PuxK6GTsKqaukd/3Cj8aLHG1T1im1QARAQABzSJBbGxhbiBKdWRl IDxhbGxhbmp1ZGVAZnJlZWJzZC5vcmc+wsF/BBMBAgApBQJVcGXGAhsjBQkSzAMABwsJCAcD AgEGFQgCCQoLBBYCAwECHgECF4AACgkQGZU1PhKYC34Muw/+JOKpSfhhysWFYiRXynGRDe07 Z6pVsn7DzrPUMRNZfHu8Uujmmy3p2nx9FelIY9yjd2UKHhug+whM54MiIFs90eCRVa4XEsPR 4FFAm0DAWrrb7qhZFcE/GhHdRWpZ341WAElWf6Puj2devtRjfYbikvj5+1V1QmDbju7cEw5D mEET44pTuD2VMRJpu2yZZzkM0i+wKFuPxlhqreufA1VNkZXI/rIfkYWK+nkXd9Efw3YdCyCQ zUgTUCb88ttSqcyhik/li1CDbXBpkzDCKI6I/8fAb7jjOC9LAtrZJrdgONywcVFoyK9ZN7EN AVA+xvYCmuYhR/3zHWH1g4hAm1v1+gIsufhajhfo8/wY1SetlzPaYkSkVQLqD8T6zZyhf+AN bC7ci44UsiKGAplB3phAXrtSPUEqM86kbnHg3fSx37kWKUiYNOnx4AC2VXvEiKsOBlpyt3dw WQbOtOYM+vkfbBwDtoGOOPYAKxc4LOIt9r+J8aD+gTooi9Eo5tvphATf9WkCpl9+aaGbSixB tUpvQMRnSMqTqq4Z7DeiG6VMRQIjsXDSLJEUqcfhnLFo0Ko/RiaHd5xyAQ4DhQ9QpkyQjjNf /3f/dYG7JAtoD30txaQ5V8uHrz210/77DRRX+HJjEj6xCxWUGvQgvEZf5XXyxeePvqZ+zQyT DX61bYw6w6bOwU0EVXBlxgEQAMy7YVnCCLN4oAOBVLZ5nUbVPvpUhsdA94/0/P+uqCIh28Cz ar56OCX0X19N/nAWecxL4H32zFbIRyDB2V/MEh4p9Qvyu/j4i1r3Ex5GhOT2hnit43Ng46z5 29Es4TijrHJP4/l/rB2VOqMKBS7Cq8zk1cWqaI9XZ59imxDNjtLLPPM+zQ1yE3OAMb475QwN UgWxTMw8rkA7CEaqeIn4sqpTSD5C7kT1Bh26+rbgJDZ77D6Uv1LaCZZOaW52okW3bFbdozV8 yM2u+xz2Qs8bHz67p+s+BlygryiOyYytpkiK6Iy4N7FTolyj5EIwCuqzfk0SaRHeOKX2ZRjC qatkgoD/t13PNT38V9tw3qZVOJDS0W6WM8VSg+F+bkM9LgJ8CmKV+Hj0k3pfGfYPOZJ/v18i +SmZmL/Uw2RghnwDWGAsPCKu4uZR777iw7n9Io6Vfxndw2dcS0e9klvFYoaGS6H2F13Asygr WBzFNGFQscN4mUW+ZYBzpTOcHkdT7w8WS55BmXYLna+dYer9/HaAuUrONjujukN4SPS1fMJ2 /CS/idAUKyyVVX5vozoNK2JVC1h1zUAVsdnmhEzNPsvBoqcVNfyqBFROEVLIPwq+lQMGNVjH ekLTKRWf59MEhUC2ztjSKkGmwdg73d6xSXMuq45EgIJV2wPvOgWQonoHH/kxABEBAAHCwWUE GAECAA8FAlVwZcYCGwwFCRLMAwAACgkQGZU1PhKYC34w5A//YViBtZyDV5O+SJT9FFO3lb9x Zdxf0trA3ooCt7gdBkdnBM6T5EmjgVZ3KYYyFfwXZVkteuCCycMF/zVw5eE9FL1+zz9gg663 nY9q2F77TZTKXVWOLlOV2bY+xaK94U4ytogOGhh9b4UnQ/Ct3+6aviCF78Go608BXbmF/GVT 7uhddemk7ItxM1gE5Hscx3saxGKlayaOsdPKeGTVJCDEtHDuOc7/+jGh5Zxpk/Hpi+DUt1ot 8e6hPYLIQa4uVx4f1xxxV858PQ7QysSLr9pTV7FAQ18JclCaMc7JWIa3homZQL/MNKOfST0S 2e+msuRwQo7AnnfFKBUtb02KwpA4GhWryhkjUh/kbVc1wmGxaU3DgXYQ5GV5+Zf4kk/wqr/7 KG0dkTz6NLCVLyDlmAzuFhf66DJ3zzz4yIo3pbDYi3HB/BwJXVSKB3Ko0oUo+6/qMrOIS02L s++QE/z7K12CCcs7WwOjfCYHK7VtE0Sr/PfybBdTbuDncOuAyAIeIKxdI2nmQHzl035hhvQX s4CSghsP319jAOQiIolCeSbTMD4QWMK8RL/Pe1FI1jC3Nw9s+jq8Dudtbcj2UwAP/STUEbJ9 5rznzuuhPjE0e++EU/RpWmcaIMK/z1zZDMN+ce2v1qzgV936ZhJ3iaVzyqbEE81gDxg3P+IM kiYh4ZtPB4Q= Message-ID: <06373f3c-bbe9-2c3b-19f8-b343852c86c9@freebsd.org> Date: Mon, 13 Jul 2020 09:51:39 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <3FAAA225-5092-4861-AC61-157417F8FB6F@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VkmLsv9haLxhkGeUVsdTFgWjlSNJ567xV" X-Rspamd-Queue-Id: 4B54nd4ZXRz3gYD X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; local_wl_from(0.00)[freebsd.org] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 13:51:50 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --VkmLsv9haLxhkGeUVsdTFgWjlSNJ567xV Content-Type: multipart/mixed; boundary="ECsWgFbKAW4urPtXhISgSMBXiO7wAWrqm"; protected-headers="v1" From: Allan Jude To: Enji Cooper Cc: src-committers , svn-src-all , svn-src-head@freebsd.org Message-ID: <06373f3c-bbe9-2c3b-19f8-b343852c86c9@freebsd.org> Subject: Re: svn commit: r363103 - head/usr.sbin/bsdinstall/scripts References: <202007111720.06BHKHUE005504@repo.freebsd.org> <3FAAA225-5092-4861-AC61-157417F8FB6F@gmail.com> In-Reply-To: <3FAAA225-5092-4861-AC61-157417F8FB6F@gmail.com> --ECsWgFbKAW4urPtXhISgSMBXiO7wAWrqm Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 2020-07-12 13:32, Enji Cooper wrote: >=20 >> On Jul 11, 2020, at 10:20 AM, Allan Jude wrote= : >> >> Author: allanjude >> Date: Sat Jul 11 17:20:17 2020 >> New Revision: 363103 >> URL: https://svnweb.freebsd.org/changeset/base/363103 >> >> Log: >> bsdinstall: only kill the dhclient for the interface we are restartin= g >> >> PR: 205821 >> Reported by: mjg >> MFC after: 2 weeks >> Sponsored by: Klara Inc. >> Event: July 2020 Bugathon >> >> Modified: >> head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 >=20 > Allan, > Thank you so very much for doing this!!! This has been an annoying nit= pick of mine with sysinstall/bsdinstall, for many moons :). > It looks like equivalent logic doesn=E2=80=99t need to be implemented = for IPv6. Yay :). > Cheers! > -Enji >=20 Someone else wrote the patch, although I had a similar idea previously. Mark Johnston came up with the pkill -F part, that made it only kill dhclient for the correct interface. --=20 Allan Jude --ECsWgFbKAW4urPtXhISgSMBXiO7wAWrqm-- --VkmLsv9haLxhkGeUVsdTFgWjlSNJ567xV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJfDGbuAAoJEBmVNT4SmAt+Xu0QAKzgTCEPBKzBALrmfdrhLixK O9Ag62OllBxwZRFFmNJme8gm3tISLsoxGZtD/2UHAtAcFhALYwEDSOAu+63qo38o Ft7PwX4d82rWZXyHdJN7r05DVH0zguVnISohR5duCrl39sgGBXv1roO3kJXlGRcs SI2YyEggc7iohJM6WWV8Ca7T6jhf60rMV5C09RoclDO/zz4A8YO/F4tiN1tVnCX0 O8xCP4UZS4+tN/O0s/gQdO6lkwPcBaOBzZ8JCJ0x0lpP1qS8kV9+grAmJkd8hMBM b2skDpEB6FQb6vq1nEgBBHYpPG3GBM2UU1Chn2vQFIDItLIzcyZLosk0nb/LF40z YIMhPjp8fInMbNKUVM0bfYw6z7IiWDGelMx7TUzc2TQIV3O7i+I3QkIZkgaYSeN6 fMidUu6GlPq1YXnc86CGuiIrnjRaS6WnjT6siYjZjC6ndLiSZkog4K3bOA7Sk7LE gQKROUqaPMq5lRh7NVMx8vhZ+pQUlJzDUbaYKn+5+cHIlFBgcpqE8qjLgOA3QnYw wr/GCLoFj+2xwHH4bne9SwWnlOH45N7/kAnmwmbGjwWNwDLIGwIiGxOAqJ3hWJR1 nARNoIjFq8ASI9KM1TtL8X0h3ZgM4zZdp59gecC8wBdaHjyBE4EGQH3opief3OGG wCGxbN5S/AfmlarjLuzD =i+Lb -----END PGP SIGNATURE----- --VkmLsv9haLxhkGeUVsdTFgWjlSNJ567xV-- From owner-svn-src-head@freebsd.org Mon Jul 13 14:25:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 427813655D2; Mon, 13 Jul 2020 14:25:26 +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 4B55XQ13j0z418P; Mon, 13 Jul 2020 14:25:26 +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 0797916B1A; Mon, 13 Jul 2020 14:25:26 +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 06DEPPmR077336; Mon, 13 Jul 2020 14:25:25 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06DEPPxQ077335; Mon, 13 Jul 2020 14:25:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202007131425.06DEPPxQ077335@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 13 Jul 2020 14:25:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363144 - head/lib/libpmc/pmu-events/arch/x86 X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/lib/libpmc/pmu-events/arch/x86 X-SVN-Commit-Revision: 363144 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 14:25:26 -0000 Author: mav Date: Mon Jul 13 14:25:25 2020 New Revision: 363144 URL: https://svnweb.freebsd.org/changeset/base/363144 Log: Minor textual fixes. MFC after: 1 week Modified: head/lib/libpmc/pmu-events/arch/x86/mapfile.csv Modified: head/lib/libpmc/pmu-events/arch/x86/mapfile.csv ============================================================================== --- head/lib/libpmc/pmu-events/arch/x86/mapfile.csv Mon Jul 13 13:58:21 2020 (r363143) +++ head/lib/libpmc/pmu-events/arch/x86/mapfile.csv Mon Jul 13 14:25:25 2020 (r363144) @@ -24,19 +24,15 @@ GenuineIntel-6-1E,v2,nehalemep,core GenuineIntel-6-1F,v2,nehalemep,core GenuineIntel-6-1A,v2,nehalemep,core GenuineIntel-6-2E,v2,nehalemex,core -GenuineIntel-6-4E,v24,skylake,core -GenuineIntel-6-5E,v24,skylake,core -GenuineIntel-6-8E,v24,skylake,core -GenuineIntel-6-9E,v24,skylake,core +GenuineIntel-6-[4589]E,v24,skylake,core GenuineIntel-6-37,v13,silvermont,core GenuineIntel-6-4D,v13,silvermont,core GenuineIntel-6-4C,v13,silvermont,core GenuineIntel-6-2A,v15,sandybridge,core GenuineIntel-6-2C,v2,westmereep-dp,core -GenuineIntel-6-2C,v2,westmereep-dp,core GenuineIntel-6-25,v2,westmereep-sp,core GenuineIntel-6-2F,v2,westmereex,core -GenuineIntel-6-55,v1,skylakex,core +GenuineIntel-6-55-[01234],v1,skylakex,core GenuineIntel-6-55-[56789ABCDEF],v1,cascadelakex,core GenuineIntel-6-7D,v1,icelake,core GenuineIntel-6-7E,v1,icelake,core From owner-svn-src-head@freebsd.org Mon Jul 13 15:06:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1FB7736663A; Mon, 13 Jul 2020 15:06:30 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B56Rn74CYz43WJ; Mon, 13 Jul 2020 15:06:29 +0000 (UTC) (envelope-from gbe@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 D5F7A17037; Mon, 13 Jul 2020 15:06:29 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06DF6Tf0002610; Mon, 13 Jul 2020 15:06:29 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06DF6TnB002609; Mon, 13 Jul 2020 15:06:29 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202007131506.06DF6TnB002609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Mon, 13 Jul 2020 15:06:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363146 - head/usr.sbin/arp X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/usr.sbin/arp X-SVN-Commit-Revision: 363146 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 15:06:30 -0000 Author: gbe (doc committer) Date: Mon Jul 13 15:06:29 2020 New Revision: 363146 URL: https://svnweb.freebsd.org/changeset/base/363146 Log: arp(8) clarify the use of the '-a flag' PR: 238146 Submitted by: Andrew Stevenson Reported by: Andrew Stevenson Reviewed by: bcr (mentor) Approved by: bcr (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25645 Modified: head/usr.sbin/arp/arp.8 Modified: head/usr.sbin/arp/arp.8 ============================================================================== --- head/usr.sbin/arp/arp.8 Mon Jul 13 14:30:08 2020 (r363145) +++ head/usr.sbin/arp/arp.8 Mon Jul 13 15:06:29 2020 (r363146) @@ -28,7 +28,7 @@ .\" @(#)arp.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd April 6, 2017 +.Dd July 13, 2020 .Dt ARP 8 .Os .Sh NAME @@ -87,7 +87,9 @@ See .Xr xo_parse_args 3 for details on command line arguments. .It Fl a -The program displays or deletes all of the current +The program displays or, if it is used with the +.Fl d +flag, deletes all of the current .Tn ARP entries. .It Fl d From owner-svn-src-head@freebsd.org Mon Jul 13 15:17:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 37A9A366AA7; Mon, 13 Jul 2020 15:17:30 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B56hV0g2yz43mv; Mon, 13 Jul 2020 15:17:30 +0000 (UTC) (envelope-from gbe@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 EE75E1714B; Mon, 13 Jul 2020 15:17:29 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06DFHTF5008684; Mon, 13 Jul 2020 15:17:29 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06DFHTrG008683; Mon, 13 Jul 2020 15:17:29 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202007131517.06DFHTrG008683@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Mon, 13 Jul 2020 15:17:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363147 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 363147 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 15:17:30 -0000 Author: gbe (doc committer) Date: Mon Jul 13 15:17:29 2020 New Revision: 363147 URL: https://svnweb.freebsd.org/changeset/base/363147 Log: gethostname(3): Correct the reference of the undefined value HOST_NAME_MAX PR: 143472 Submitted by: bcran@ Reported by: Jeremy Huddleston Reviewed by: bcr (mentor) Approved by: bcr (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25647 Modified: head/lib/libc/gen/gethostname.3 Modified: head/lib/libc/gen/gethostname.3 ============================================================================== --- head/lib/libc/gen/gethostname.3 Mon Jul 13 15:06:29 2020 (r363146) +++ head/lib/libc/gen/gethostname.3 Mon Jul 13 15:17:29 2020 (r363147) @@ -28,7 +28,7 @@ .\" @(#)gethostname.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 18, 2003 +.Dd July 13, 2020 .Dt GETHOSTNAME 3 .Os .Sh NAME @@ -68,9 +68,9 @@ which has length This call is restricted to the super-user and is normally used only when the system is bootstrapped. .Pp -Host names are limited to -.Brq Dv HOST_NAME_MAX -characters, not including the trailing null, currently 255. +Applications should use +.Fn sysconf _SC_HOST_NAME_MAX +to find the maximum length of a host name (not including the terminating null). .Sh RETURN VALUES .Rv -std .Sh ERRORS From owner-svn-src-head@freebsd.org Mon Jul 13 15:27:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DE7B936703E; Mon, 13 Jul 2020 15:27:30 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B56w15DlKz44kp; Mon, 13 Jul 2020 15:27:29 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id E78B326001C; Mon, 13 Jul 2020 17:27:27 +0200 (CEST) Subject: Re: svn commit: r362361 - in head/sys: compat/linuxkpi/common/src vm To: Mark Johnston , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006190332.05J3W53u006443@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <8f4a8ae3-03c8-01a4-faaf-2041993d4a82@selasky.org> Date: Mon, 13 Jul 2020 17:27:06 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <202006190332.05J3W53u006443@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: base64 X-Rspamd-Queue-Id: 4B56w15DlKz44kp X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-0.94 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; DMARC_NA(0.00)[selasky.org]; MIME_BASE64_TEXT_BOGUS(1.00)[]; NEURAL_SPAM_SHORT(0.31)[0.311]; NEURAL_HAM_LONG(-0.95)[-0.951]; NEURAL_HAM_MEDIUM(-1.10)[-1.100]; MIME_BASE64_TEXT(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 15:27:30 -0000 T24gMjAyMC0wNi0xOSAwNTozMiwgTWFyayBKb2huc3RvbiB3cm90ZToNCj4gKysrIGhlYWQv c3lzL3ZtL3ZtX21hcC5oCUZyaSBKdW4gMTkgMDM6MzI6MDQgMjAyMAkocjM2MjM2MSkNCj4g QEAgLTI1NSw2ICsyNTUsMTcgQEAgdm1fbWFwX21vZGZsYWdzKHZtX21hcF90IG1hcCwgdm1f ZmxhZ3NfdCBzZXQsIHZtX2ZsYWdzDQo+ICAgew0KPiAgIAltYXAtPmZsYWdzID0gKG1hcC0+ ZmxhZ3MgfCBzZXQpICYgfmNsZWFyOw0KPiAgIH0NCj4gKw0KPiArc3RhdGljIGlubGluZSBi b29sDQo+ICt2bV9tYXBfcmFuZ2VfdmFsaWQodm1fbWFwX3QgbWFwLCB2bV9vZmZzZXRfdCBz dGFydCwgdm1fb2Zmc2V0X3QgZW5kKQ0KPiArew0KDQpIaSBNYXJrLA0KDQpEb24ndCB5b3Ug YWxzbyBuZWVkIHRvIGFkZDoNCg0KI2RlZmluZSB2bV9tYXBfcmFuZ2VfdmFsaWQobWFwLCBz dGFydCwgZW5kKSAgICAgICAgdm1fbWFwX3BtYXBfS0JJKG1hcCwgDQpzdGFydCwgZW5kKQ0K DQpBbmQgaW1wbGVtZW50IHRoZSBfS0JJIGZ1bmN0aW9uPw0KDQpCdWlsZGluZyB0aGUgTGlu dXhLUEkgZnJvbSB0aGUgY29tbWFuZCBsaW5lIGlzIG5vdyBicm9rZW46DQoNCj4gZW52IEND PWB3aGljaCBjbGFuZzEwYCBtYWtlIC1tICRQV0Qvc2hhcmUvbWsvIC1DIHN5cy9tb2R1bGVz L2xpbnV4a3BpLyANCj4gL3Vzci9sb2NhbC9iaW4vY2xhbmcxMCAgLU8yIC1waXBlIC1mbm8t Y29tbW9uICAtZm5vLXN0cmljdC1hbGlhc2luZyAtV2Vycm9yIC1EX0tFUk5FTCAtREtMRF9N T0RVTEUgLW5vc3RkaW5jICAtSS91c3IvaW1nL2ZyZWVic2QuMTIvc3lzL2NvbXBhdC9saW51 eGtwaS9jb21tb24vaW5jbHVkZSAtSS91c3IvaW1nL2ZyZWVic2QuMTIvc3lzL2NvbnRyaWIv Y2svaW5jbHVkZSAtSS4gLUkvdXNyL2ltZy9mcmVlYnNkLjEyL3N5cyAtSS91c3IvaW1nL2Zy ZWVic2QuMTIvc3lzL2NvbnRyaWIvY2svaW5jbHVkZSAtZm5vLWNvbW1vbiAgLWZuby1vbWl0 LWZyYW1lLXBvaW50ZXIgLW1uby1vbWl0LWxlYWYtZnJhbWUtcG9pbnRlciAtZmRlYnVnLXBy ZWZpeC1tYXA9Li9tYWNoaW5lPS91c3IvaW1nL2ZyZWVic2QuMTIvc3lzL2FtZDY0L2luY2x1 ZGUgLWZkZWJ1Zy1wcmVmaXgtbWFwPS4veDg2PS91c3IvaW1nL2ZyZWVic2QuMTIvc3lzL3g4 Ni9pbmNsdWRlICAgLU1EICAtTUYuZGVwZW5kLmxpbnV4X3BhZ2UubyAtTVRsaW51eF9wYWdl Lm8gLW1jbW9kZWw9a2VybmVsIC1tbm8tcmVkLXpvbmUgLW1uby1tbXggLW1uby1zc2UgLW1z b2Z0LWZsb2F0ICAtZm5vLWFzeW5jaHJvbm91cy11bndpbmQtdGFibGVzIC1mZnJlZXN0YW5k aW5nIC1md3JhcHYgLWZzdGFjay1wcm90ZWN0b3IgLVdhbGwgLVdyZWR1bmRhbnQtZGVjbHMg LVduZXN0ZWQtZXh0ZXJucyAtV3N0cmljdC1wcm90b3R5cGVzIC1XbWlzc2luZy1wcm90b3R5 cGVzIC1XcG9pbnRlci1hcml0aCAtV2Nhc3QtcXVhbCAtV3VuZGVmIC1Xbm8tcG9pbnRlci1z aWduIC1EX19wcmludGZfXz1fX2ZyZWVic2Rfa3ByaW50Zl9fIC1XbWlzc2luZy1pbmNsdWRl LWRpcnMgLWZkaWFnbm9zdGljcy1zaG93LW9wdGlvbiAtV25vLXVua25vd24tcHJhZ21hcyAt V25vLWVycm9yLXRhdXRvbG9naWNhbC1jb21wYXJlIC1Xbm8tZXJyb3ItZW1wdHktYm9keSAt V25vLWVycm9yLXBhcmVudGhlc2VzLWVxdWFsaXR5IC1Xbm8tZXJyb3ItdW51c2VkLWZ1bmN0 aW9uIC1Xbm8tZXJyb3ItcG9pbnRlci1zaWduIC1Xbm8tZXJyb3Itc2hpZnQtbmVnYXRpdmUt dmFsdWUgLVduby1hZGRyZXNzLW9mLXBhY2tlZC1tZW1iZXIgIC1tbm8tYWVzIC1tbm8tYXZ4 ICAtc3RkPWlzbzk4OTk6MTk5OSAtYyAvdXNyL2ltZy9mcmVlYnNkLjEyL3N5cy9jb21wYXQv bGludXhrcGkvY29tbW9uL3NyYy9saW51eF9wYWdlLmMgLW8gbGludXhfcGFnZS5vDQo+IC91 c3IvaW1nL2ZyZWVic2QuMTIvc3lzL2NvbXBhdC9saW51eGtwaS9jb21tb24vc3JjL2xpbnV4 X3BhZ2UuYzoyMzc6NzogZXJyb3I6IGltcGxpY2l0IGRlY2xhcmF0aW9uIG9mIGZ1bmN0aW9u ICd2bV9tYXBfcmFuZ2VfdmFsaWQnIGlzIGludmFsaWQgaW4NCj4gICAgICAgQzk5IFstV2Vy cm9yLC1XaW1wbGljaXQtZnVuY3Rpb24tZGVjbGFyYXRpb25dDQo+ICAgICAgICAgaWYgKCF2 bV9tYXBfcmFuZ2VfdmFsaWQobWFwLCBzdGFydCwgZW5kKSkNCj4gICAgICAgICAgICAgIF4N Cj4gMSBlcnJvciBnZW5lcmF0ZWQuDQo+ICoqKiBFcnJvciBjb2RlIDENCg0KLS1IUFMNCg== From owner-svn-src-head@freebsd.org Mon Jul 13 15:52:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A20CB367E30; Mon, 13 Jul 2020 15:52:58 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B57TQ3qklz472f; Mon, 13 Jul 2020 15:52:58 +0000 (UTC) (envelope-from gbe@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 66B3217BD9; Mon, 13 Jul 2020 15:52:58 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06DFqwcU034047; Mon, 13 Jul 2020 15:52:58 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06DFqwoq034046; Mon, 13 Jul 2020 15:52:58 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202007131552.06DFqwoq034046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Mon, 13 Jul 2020 15:52:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363156 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 363156 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 15:52:58 -0000 Author: gbe (doc committer) Date: Mon Jul 13 15:52:57 2020 New Revision: 363156 URL: https://svnweb.freebsd.org/changeset/base/363156 Log: lseek(2): Document the seek behavior better and update the POSIX compliance In certain situations lseek(2) will return successful although if no seek was performed. This can happen when operating on devices that don't support seeking (older tape drives) or when operating on changeable media devices (such as DVD or Blu-ray devices) without a medium inserted. Document this within the man page and update the POSIX compliance while here. PR: 162765 Submitted by: arundel@ Reported by: arundel@ Reviewed by: bcr (mentor) Approved by: bcr (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25646 Modified: head/lib/libc/sys/lseek.2 Modified: head/lib/libc/sys/lseek.2 ============================================================================== --- head/lib/libc/sys/lseek.2 Mon Jul 13 15:41:55 2020 (r363155) +++ head/lib/libc/sys/lseek.2 Mon Jul 13 15:52:57 2020 (r363156) @@ -28,7 +28,7 @@ .\" @(#)lseek.2 8.3 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd February 18, 2016 +.Dd July 13, 2020 .Dt LSEEK 2 .Os .Sh NAME @@ -113,11 +113,10 @@ of the existing end-of-file of the file. If data is later written at this point, subsequent reads of the data in the gap return bytes of zeros (until data is actually written into the gap). +However, the +.Fn lseek +system call does not, by itself, extend the size of a file. .Pp -Some devices are incapable of seeking. -The value of the pointer -associated with such a device is undefined. -.Pp A .Qq hole is defined as a contiguous range of bytes in a file, all having the value of @@ -205,13 +204,43 @@ is associated with a pipe, socket, or FIFO. The .Fn lseek system call is expected to conform to -.St -p1003.1-90 . +.St -p1003.1-2008 . +.Pp +The +.Dv SEEK_HOLE +and +.Dv SEEK_DATA +directives, along with the +.Er ENXIO +error, are extensions to that specification. .Sh HISTORY The .Fn lseek function appeared in .At v7 . .Sh BUGS +If the +.Fn lseek +system call is operating on a device which is incapable of seeking, +it will request the seek operation and return successfully, +even though no seek was performed. +Because the +.Ar offset +argument will be stored unconditionally in the file descriptor of that device, +there is no way to confirm if the seek operation succeeded or not +(e.g. using the +.Fn ftell +function). +Device types which are known to be incapable of seeking include +tape drives. +.Pp +The +.Fn lseek +system call will not detect whether media are present in changeable +media devices such as DVD or Blu-ray devices. +A requested seek operation will therefore return sucessfully when no +medium is present. +.Pp This document's use of .Fa whence is incorrect English, but is maintained for historical reasons. From owner-svn-src-head@freebsd.org Mon Jul 13 16:23:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 043A4368C89; Mon, 13 Jul 2020 16:23: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 4B58876Y4Wz492H; Mon, 13 Jul 2020 16:23:03 +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 C3B9B1828D; Mon, 13 Jul 2020 16:23:03 +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 06DGN3xb052693; Mon, 13 Jul 2020 16:23:03 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06DGN3un052688; Mon, 13 Jul 2020 16:23:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202007131623.06DGN3un052688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 13 Jul 2020 16:23:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363157 - in head/lib/libpmc/pmu-events/arch/x86: . amdfam17h amdzen1 amdzen2 X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in head/lib/libpmc/pmu-events/arch/x86: . amdfam17h amdzen1 amdzen2 X-SVN-Commit-Revision: 363157 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 16:23:04 -0000 Author: mav Date: Mon Jul 13 16:23:02 2020 New Revision: 363157 URL: https://svnweb.freebsd.org/changeset/base/363157 Log: Update AMD Zen1 and add Zen2 events mapping. MFC after: 2 weeks Added: - copied from r363156, head/lib/libpmc/pmu-events/arch/x86/amdfam17h/ head/lib/libpmc/pmu-events/arch/x86/amdzen1/branch.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/amdzen2/branch.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/amdzen2/cache.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/amdzen2/core.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/amdzen2/floating-point.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/amdzen2/memory.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/amdzen2/other.json (contents, props changed) Directory Properties: head/lib/libpmc/pmu-events/arch/x86/amdzen1/ (props changed) head/lib/libpmc/pmu-events/arch/x86/amdzen2/ (props changed) Deleted: head/lib/libpmc/pmu-events/arch/x86/amdfam17h/ Modified: head/lib/libpmc/pmu-events/arch/x86/amdzen1/cache.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/amdzen1/core.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/amdzen1/floating-point.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/amdzen1/memory.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/amdzen1/other.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/mapfile.csv Added: head/lib/libpmc/pmu-events/arch/x86/amdzen1/branch.json ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpmc/pmu-events/arch/x86/amdzen1/branch.json Mon Jul 13 16:23:02 2020 (r363157) @@ -0,0 +1,23 @@ +[ + { + "EventName": "bp_l1_btb_correct", + "EventCode": "0x8a", + "BriefDescription": "L1 BTB Correction." + }, + { + "EventName": "bp_l2_btb_correct", + "EventCode": "0x8b", + "BriefDescription": "L2 BTB Correction." + }, + { + "EventName": "bp_dyn_ind_pred", + "EventCode": "0x8e", + "BriefDescription": "Dynamic Indirect Predictions.", + "PublicDescription": "Indirect Branch Prediction for potential multi-target branch (speculative)." + }, + { + "EventName": "bp_de_redirect", + "EventCode": "0x91", + "BriefDescription": "Decoder Overrides Existing Branch Prediction (speculative)." + } +] Modified: head/lib/libpmc/pmu-events/arch/x86/amdzen1/cache.json ============================================================================== --- head/lib/libpmc/pmu-events/arch/x86/amdfam17h/cache.json Mon Jul 13 15:52:57 2020 (r363156) +++ head/lib/libpmc/pmu-events/arch/x86/amdzen1/cache.json Mon Jul 13 16:23:02 2020 (r363157) @@ -1,332 +1,294 @@ [ - { - "EventName": "ic_fw32", - "EventCode": "0x80", - "BriefDescription": "The number of 32B fetch windows transferred from IC pipe to DE instruction decoder (includes non-cacheable and cacheable fill responses)." - }, - { - "EventName": "ic_fw32_miss", - "EventCode": "0x81", - "BriefDescription": "The number of 32B fetch windows tried to read the L1 IC and missed in the full tag." - }, - { - "EventName": "ic_cache_fill_l2", - "EventCode": "0x82", - "BriefDescription": "The number of 64 byte instruction cache line was fulfilled from the L2 cache." - }, - { - "EventName": "ic_cache_fill_sys", - "EventCode": "0x83", - "BriefDescription": "The number of 64 byte instruction cache line fulfilled from system memory or another cache." - }, - { - "EventName": "bp_l1_tlb_miss_l2_hit", - "EventCode": "0x84", - "BriefDescription": "The number of instruction fetches that miss in the L1 ITLB but hit in the L2 ITLB." - }, - { - "EventName": "bp_l1_tlb_miss_l2_miss", - "EventCode": "0x85", - "BriefDescription": "The number of instruction fetches that miss in both the L1 and L2 TLBs." - }, - { - "EventName": "bp_snp_re_sync", - "EventCode": "0x86", - "BriefDescription": "The number of pipeline restarts caused by invalidating probes that hit on the instruction stream currently being executed. This would happen if the active instruction stream was being modified by another processor in an MP system - typically a highly unlikely event." - }, - { - "EventName": "ic_fetch_stall.ic_stall_any", - "EventCode": "0x87", - "BriefDescription": "IC pipe was stalled during this clock cycle for any reason (nothing valid in pipe ICM1).", - "PublicDescription": "Instruction Pipe Stall. IC pipe was stalled during this clock cycle for any reason (nothing valid in pipe ICM1).", - "UMask": "0x4" - }, - { - "EventName": "ic_fetch_stall.ic_stall_dq_empty", - "EventCode": "0x87", - "BriefDescription": "IC pipe was stalled during this clock cycle (including IC to OC fetches) due to DQ empty.", - "PublicDescription": "Instruction Pipe Stall. IC pipe was stalled during this clock cycle (including IC to OC fetches) due to DQ empty.", - "UMask": "0x2" - }, - { - "EventName": "ic_fetch_stall.ic_stall_back_pressure", - "EventCode": "0x87", - "BriefDescription": "IC pipe was stalled during this clock cycle (including IC to OC fetches) due to back-pressure.", - "PublicDescription": "Instruction Pipe Stall. IC pipe was stalled during this clock cycle (including IC to OC fetches) due to back-pressure.", - "UMask": "0x1" - }, - { - "EventName": "bp_l1_btb_correct", - "EventCode": "0x8a", - "BriefDescription": "L1 BTB Correction." - }, - { - "EventName": "bp_l2_btb_correct", - "EventCode": "0x8b", - "BriefDescription": "L2 BTB Correction." - }, - { - "EventName": "ic_cache_inval.l2_invalidating_probe", - "EventCode": "0x8c", - "BriefDescription": "IC line invalidated due to L2 invalidating probe (external or LS).", - "PublicDescription": "The number of instruction cache lines invalidated. A non-SMC event is CMC (cross modifying code), either from the other thread of the core or another core. IC line invalidated due to L2 invalidating probe (external or LS).", - "UMask": "0x2" - }, - { - "EventName": "ic_cache_inval.fill_invalidated", - "EventCode": "0x8c", - "BriefDescription": "IC line invalidated due to overwriting fill response.", - "PublicDescription": "The number of instruction cache lines invalidated. A non-SMC event is CMC (cross modifying code), either from the other thread of the core or another core. IC line invalidated due to overwriting fill response.", - "UMask": "0x1" - }, - { - "EventName": "bp_tlb_rel", - "EventCode": "0x99", - "BriefDescription": "The number of ITLB reload requests." - }, - { - "EventName": "ic_oc_mode_switch.oc_ic_mode_switch", - "EventCode": "0x28a", - "BriefDescription": "OC to IC mode switch.", - "PublicDescription": "OC Mode Switch. OC to IC mode switch.", - "UMask": "0x2" - }, - { - "EventName": "ic_oc_mode_switch.ic_oc_mode_switch", - "EventCode": "0x28a", - "BriefDescription": "IC to OC mode switch.", - "PublicDescription": "OC Mode Switch. IC to OC mode switch.", - "UMask": "0x1" - }, - { - "EventName": "l2_request_g1.rd_blk_l", - "EventCode": "0x60", - "BriefDescription": "Requests to L2 Group1.", - "PublicDescription": "Requests to L2 Group1.", - "UMask": "0x80" - }, - { - "EventName": "l2_request_g1.rd_blk_x", - "EventCode": "0x60", - "BriefDescription": "Requests to L2 Group1.", - "PublicDescription": "Requests to L2 Group1.", - "UMask": "0x40" - }, - { - "EventName": "l2_request_g1.ls_rd_blk_c_s", - "EventCode": "0x60", - "BriefDescription": "Requests to L2 Group1.", - "PublicDescription": "Requests to L2 Group1.", - "UMask": "0x20" - }, - { - "EventName": "l2_request_g1.cacheable_ic_read", - "EventCode": "0x60", - "BriefDescription": "Requests to L2 Group1.", - "PublicDescription": "Requests to L2 Group1.", - "UMask": "0x10" - }, - { - "EventName": "l2_request_g1.change_to_x", - "EventCode": "0x60", - "BriefDescription": "Requests to L2 Group1.", - "PublicDescription": "Requests to L2 Group1.", - "UMask": "0x8" - }, - { - "EventName": "l2_request_g1.prefetch_l2", - "EventCode": "0x60", - "BriefDescription": "Requests to L2 Group1.", - "PublicDescription": "Requests to L2 Group1.", - "UMask": "0x4" - }, - { - "EventName": "l2_request_g1.l2_hw_pf", - "EventCode": "0x60", - "BriefDescription": "Requests to L2 Group1.", - "PublicDescription": "Requests to L2 Group1.", - "UMask": "0x2" - }, - { - "EventName": "l2_request_g1.other_requests", - "EventCode": "0x60", - "BriefDescription": "Events covered by l2_request_g2.", - "PublicDescription": "Requests to L2 Group1. Events covered by l2_request_g2.", - "UMask": "0x1" - }, - { - "EventName": "l2_request_g2.group1", - "EventCode": "0x61", - "BriefDescription": "All Group 1 commands not in unit0.", - "PublicDescription": "Multi-events in that LS and IF requests can be received simultaneous. All Group 1 commands not in unit0.", - "UMask": "0x80" - }, - { - "EventName": "l2_request_g2.ls_rd_sized", - "EventCode": "0x61", - "BriefDescription": "RdSized, RdSized32, RdSized64.", - "PublicDescription": "Multi-events in that LS and IF requests can be received simultaneous. RdSized, RdSized32, RdSized64.", - "UMask": "0x40" - }, - { - "EventName": "l2_request_g2.ls_rd_sized_nc", - "EventCode": "0x61", - "BriefDescription": "RdSizedNC, RdSized32NC, RdSized64NC.", - "PublicDescription": "Multi-events in that LS and IF requests can be received simultaneous. RdSizedNC, RdSized32NC, RdSized64NC.", - "UMask": "0x20" - }, - { - "EventName": "l2_request_g2.ic_rd_sized", - "EventCode": "0x61", - "BriefDescription": "Multi-events in that LS and IF requests can be received simultaneous.", - "PublicDescription": "Multi-events in that LS and IF requests can be received simultaneous.", - "UMask": "0x10" - }, - { - "EventName": "l2_request_g2.ic_rd_sized_nc", - "EventCode": "0x61", - "BriefDescription": "Multi-events in that LS and IF requests can be received simultaneous.", - "PublicDescription": "Multi-events in that LS and IF requests can be received simultaneous.", - "UMask": "0x8" - }, - { - "EventName": "l2_request_g2.smc_inval", - "EventCode": "0x61", - "BriefDescription": "Multi-events in that LS and IF requests can be received simultaneous.", - "PublicDescription": "Multi-events in that LS and IF requests can be received simultaneous.", - "UMask": "0x4" - }, - { - "EventName": "l2_request_g2.bus_locks_originator", - "EventCode": "0x61", - "BriefDescription": "Multi-events in that LS and IF requests can be received simultaneous.", - "PublicDescription": "Multi-events in that LS and IF requests can be received simultaneous.", - "UMask": "0x2" - }, - { - "EventName": "l2_request_g2.bus_locks_responses", - "EventCode": "0x61", - "BriefDescription": "Multi-events in that LS and IF requests can be received simultaneous.", - "PublicDescription": "Multi-events in that LS and IF requests can be received simultaneous.", - "UMask": "0x1" - }, - { - "EventName": "l2_latency.l2_cycles_waiting_on_fills", - "EventCode": "0x62", - "BriefDescription": "Total cycles spent waiting for L2 fills to complete from L3 or memory, divided by four. This may be used to calculate average latency by multiplying this count by four and then dividing by the total number of L2 fills (unit mask l2_request_g1 == FEh). Event counts are for both threads. To calculate average latency, the number of fills from both threads must be used.", - "PublicDescription": "Total cycles spent waiting for L2 fills to complete from L3 or memory, divided by four. This may be used to calculate average latency by multiplying this count by four and then dividing by the total number of L2 fills (unit mask l2_request_g1 == FEh). Event counts are for both threads. To calculate average latency, the number of fills from both threads must be used.", - "UMask": "0x1" - }, - { - "EventName": "l2_wbc_req.wcb_write", - "EventCode": "0x63", - "BriefDescription": "LS to L2 WBC requests.", - "PublicDescription": "LS to L2 WBC requests.", - "UMask": "0x40" - }, - { - "EventName": "l2_wbc_req.wcb_close", - "EventCode": "0x63", - "BriefDescription": "LS to L2 WBC requests.", - "PublicDescription": "LS to L2 WBC requests.", - "UMask": "0x20" - }, - { - "EventName": "l2_wbc_req.cache_line_flush", - "EventCode": "0x63", - "BriefDescription": "LS to L2 WBC requests.", - "PublicDescription": "LS to L2 WBC requests.", - "UMask": "0x10" - }, - { - "EventName": "l2_wbc_req.i_line_flush", - "EventCode": "0x63", - "BriefDescription": "LS to L2 WBC requests.", - "PublicDescription": "LS to L2 WBC requests.", - "UMask": "0x8" - }, - { - "EventName": "l2_wbc_req.zero_byte_store", - "EventCode": "0x63", - "BriefDescription": "This becomes WriteNoData at SDP; this count does not include DVM Sync Ops and bus locks which are counted in l2_request_g2.", - "PublicDescription": "LS to L2 WBC requests. This becomes WriteNoData at SDP; this count does not include DVM Sync Ops and bus locks which are counted in l2_request_g2.", - "UMask": "0x4" - }, - { - "EventName": "l2_wbc_req.local_ic_clr", - "EventCode": "0x63", - "BriefDescription": "Local IC Clear.", - "PublicDescription": "LS to L2 WBC requests. Local IC Clear.", - "UMask": "0x2" - }, - { - "EventName": "l2_wbc_req.cl_zero", - "EventCode": "0x63", - "BriefDescription": "Cache Line Zero.", - "PublicDescription": "LS to L2 WBC requests. Cache Line Zero.", - "UMask": "0x1" - }, - { - "EventName": "l2_cache_req_stat.ls_rd_blk_cs", - "EventCode": "0x64", - "BriefDescription": "LS ReadBlock C/S Hit.", - "PublicDescription": "This event does not count accesses to the L2 cache by the L2 prefetcher, but it does count accesses by the L1 prefetcher. LS ReadBlock C/S Hit.", - "UMask": "0x80" - }, - { - "EventName": "l2_cache_req_stat.ls_rd_blk_l_hit_x", - "EventCode": "0x64", - "BriefDescription": "LS Read Block L Hit X.", - "PublicDescription": "This event does not count accesses to the L2 cache by the L2 prefetcher, but it does count accesses by the L1 prefetcher. LS Read Block L Hit X.", - "UMask": "0x40" - }, - { - "EventName": "l2_cache_req_stat.ls_rd_blk_l_hit_s", - "EventCode": "0x64", - "BriefDescription": "LsRdBlkL Hit Shared.", - "PublicDescription": "This event does not count accesses to the L2 cache by the L2 prefetcher, but it does count accesses by the L1 prefetcher. LsRdBlkL Hit Shared.", - "UMask": "0x20" - }, - { - "EventName": "l2_cache_req_stat.ls_rd_blk_x", - "EventCode": "0x64", - "BriefDescription": "LsRdBlkX/ChgToX Hit X. Count RdBlkX finding Shared as a Miss.", - "PublicDescription": "This event does not count accesses to the L2 cache by the L2 prefetcher, but it does count accesses by the L1 prefetcher. LsRdBlkX/ChgToX Hit X. Count RdBlkX finding Shared as a Miss.", - "UMask": "0x10" - }, - { - "EventName": "l2_cache_req_stat.ls_rd_blk_c", - "EventCode": "0x64", - "BriefDescription": "LS Read Block C S L X Change to X Miss.", - "PublicDescription": "This event does not count accesses to the L2 cache by the L2 prefetcher, but it does count accesses by the L1 prefetcher. LS Read Block C S L X Change to X Miss.", - "UMask": "0x8" - }, - { - "EventName": "l2_cache_req_stat.ic_fill_hit_x", - "EventCode": "0x64", - "BriefDescription": "IC Fill Hit Exclusive Stale.", - "PublicDescription": "This event does not count accesses to the L2 cache by the L2 prefetcher, but it does count accesses by the L1 prefetcher. IC Fill Hit Exclusive Stale.", - "UMask": "0x4" - }, - { - "EventName": "l2_cache_req_stat.ic_fill_hit_s", - "EventCode": "0x64", - "BriefDescription": "IC Fill Hit Shared.", - "PublicDescription": "This event does not count accesses to the L2 cache by the L2 prefetcher, but it does count accesses by the L1 prefetcher. IC Fill Hit Shared.", - "UMask": "0x2" - }, - { - "EventName": "l2_cache_req_stat.ic_fill_miss", - "EventCode": "0x64", - "BriefDescription": "IC Fill Miss.", - "PublicDescription": "This event does not count accesses to the L2 cache by the L2 prefetcher, but it does count accesses by the L1 prefetcher. IC Fill Miss.", - "UMask": "0x1" - }, - { - "EventName": "l2_fill_pending.l2_fill_busy", - "EventCode": "0x6d", - "BriefDescription": "Total cycles spent with one or more fill requests in flight from L2.", - "PublicDescription": "Total cycles spent with one or more fill requests in flight from L2.", - "UMask": "0x1" - } + { + "EventName": "ic_fw32", + "EventCode": "0x80", + "BriefDescription": "The number of 32B fetch windows transferred from IC pipe to DE instruction decoder (includes non-cacheable and cacheable fill responses)." + }, + { + "EventName": "ic_fw32_miss", + "EventCode": "0x81", + "BriefDescription": "The number of 32B fetch windows tried to read the L1 IC and missed in the full tag." + }, + { + "EventName": "ic_cache_fill_l2", + "EventCode": "0x82", + "BriefDescription": "The number of 64 byte instruction cache line was fulfilled from the L2 cache." + }, + { + "EventName": "ic_cache_fill_sys", + "EventCode": "0x83", + "BriefDescription": "The number of 64 byte instruction cache line fulfilled from system memory or another cache." + }, + { + "EventName": "bp_l1_tlb_miss_l2_hit", + "EventCode": "0x84", + "BriefDescription": "The number of instruction fetches that miss in the L1 ITLB but hit in the L2 ITLB." + }, + { + "EventName": "bp_l1_tlb_miss_l2_miss", + "EventCode": "0x85", + "BriefDescription": "The number of instruction fetches that miss in both the L1 and L2 TLBs." + }, + { + "EventName": "bp_snp_re_sync", + "EventCode": "0x86", + "BriefDescription": "The number of pipeline restarts caused by invalidating probes that hit on the instruction stream currently being executed. This would happen if the active instruction stream was being modified by another processor in an MP system - typically a highly unlikely event." + }, + { + "EventName": "ic_fetch_stall.ic_stall_any", + "EventCode": "0x87", + "BriefDescription": "Instruction Pipe Stall. IC pipe was stalled during this clock cycle for any reason (nothing valid in pipe ICM1).", + "UMask": "0x4" + }, + { + "EventName": "ic_fetch_stall.ic_stall_dq_empty", + "EventCode": "0x87", + "BriefDescription": "Instruction Pipe Stall. IC pipe was stalled during this clock cycle (including IC to OC fetches) due to DQ empty.", + "UMask": "0x2" + }, + { + "EventName": "ic_fetch_stall.ic_stall_back_pressure", + "EventCode": "0x87", + "BriefDescription": "Instruction Pipe Stall. IC pipe was stalled during this clock cycle (including IC to OC fetches) due to back-pressure.", + "UMask": "0x1" + }, + { + "EventName": "ic_cache_inval.l2_invalidating_probe", + "EventCode": "0x8c", + "BriefDescription": "IC line invalidated due to L2 invalidating probe (external or LS). The number of instruction cache lines invalidated. A non-SMC event is CMC (cross modifying code), either from the other thread of the core or another core.", + "UMask": "0x2" + }, + { + "EventName": "ic_cache_inval.fill_invalidated", + "EventCode": "0x8c", + "BriefDescription": "IC line invalidated due to overwriting fill response. The number of instruction cache lines invalidated. A non-SMC event is CMC (cross modifying code), either from the other thread of the core or another core.", + "UMask": "0x1" + }, + { + "EventName": "bp_tlb_rel", + "EventCode": "0x99", + "BriefDescription": "The number of ITLB reload requests." + }, + { + "EventName": "l2_request_g1.rd_blk_l", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). Data cache reads (including hardware and software prefetch).", + "UMask": "0x80" + }, + { + "EventName": "l2_request_g1.rd_blk_x", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). Data cache stores.", + "UMask": "0x40" + }, + { + "EventName": "l2_request_g1.ls_rd_blk_c_s", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). Data cache shared reads.", + "UMask": "0x20" + }, + { + "EventName": "l2_request_g1.cacheable_ic_read", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). Instruction cache reads.", + "UMask": "0x10" + }, + { + "EventName": "l2_request_g1.change_to_x", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). Data cache state change requests. Request change to writable, check L2 for current state.", + "UMask": "0x8" + }, + { + "EventName": "l2_request_g1.prefetch_l2_cmd", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). PrefetchL2Cmd.", + "UMask": "0x4" + }, + { + "EventName": "l2_request_g1.l2_hw_pf", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). L2 Prefetcher. All prefetches accepted by L2 pipeline, hit or miss. Types of PF and L2 hit/miss broken out in a separate perfmon event.", + "UMask": "0x2" + }, + { + "EventName": "l2_request_g1.group2", + "EventCode": "0x60", + "BriefDescription": "Miscellaneous events covered in more detail by l2_request_g2 (PMCx061).", + "UMask": "0x1" + }, + { + "EventName": "l2_request_g2.group1", + "EventCode": "0x61", + "BriefDescription": "Miscellaneous events covered in more detail by l2_request_g1 (PMCx060).", + "UMask": "0x80" + }, + { + "EventName": "l2_request_g2.ls_rd_sized", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Data cache read sized.", + "UMask": "0x40" + }, + { + "EventName": "l2_request_g2.ls_rd_sized_nc", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Data cache read sized non-cacheable.", + "UMask": "0x20" + }, + { + "EventName": "l2_request_g2.ic_rd_sized", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Instruction cache read sized.", + "UMask": "0x10" + }, + { + "EventName": "l2_request_g2.ic_rd_sized_nc", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Instruction cache read sized non-cacheable.", + "UMask": "0x8" + }, + { + "EventName": "l2_request_g2.smc_inval", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Self-modifying code invalidates.", + "UMask": "0x4" + }, + { + "EventName": "l2_request_g2.bus_locks_originator", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Bus locks.", + "UMask": "0x2" + }, + { + "EventName": "l2_request_g2.bus_locks_responses", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Bus lock response.", + "UMask": "0x1" + }, + { + "EventName": "l2_latency.l2_cycles_waiting_on_fills", + "EventCode": "0x62", + "BriefDescription": "Total cycles spent waiting for L2 fills to complete from L3 or memory, divided by four. Event counts are for both threads. To calculate average latency, the number of fills from both threads must be used.", + "UMask": "0x1" + }, + { + "EventName": "l2_wcb_req.wcb_write", + "EventCode": "0x63", + "BriefDescription": "LS to L2 WCB write requests. LS (Load/Store unit) to L2 WCB (Write Combining Buffer) write requests.", + "UMask": "0x40" + }, + { + "EventName": "l2_wcb_req.wcb_close", + "EventCode": "0x63", + "BriefDescription": "LS to L2 WCB close requests. LS (Load/Store unit) to L2 WCB (Write Combining Buffer) close requests.", + "UMask": "0x20" + }, + { + "EventName": "l2_wcb_req.zero_byte_store", + "EventCode": "0x63", + "BriefDescription": "LS to L2 WCB zero byte store requests. LS (Load/Store unit) to L2 WCB (Write Combining Buffer) zero byte store requests.", + "UMask": "0x4" + }, + { + "EventName": "l2_wcb_req.cl_zero", + "EventCode": "0x63", + "BriefDescription": "LS to L2 WCB cache line zeroing requests. LS (Load/Store unit) to L2 WCB (Write Combining Buffer) cache line zeroing requests.", + "UMask": "0x1" + }, + { + "EventName": "l2_cache_req_stat.ls_rd_blk_cs", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Data cache shared read hit in L2", + "UMask": "0x80" + }, + { + "EventName": "l2_cache_req_stat.ls_rd_blk_l_hit_x", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Data cache read hit in L2.", + "UMask": "0x40" + }, + { + "EventName": "l2_cache_req_stat.ls_rd_blk_l_hit_s", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Data cache read hit on shared line in L2.", + "UMask": "0x20" + }, + { + "EventName": "l2_cache_req_stat.ls_rd_blk_x", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Data cache store or state change hit in L2.", + "UMask": "0x10" + }, + { + "EventName": "l2_cache_req_stat.ls_rd_blk_c", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Data cache request miss in L2 (all types).", + "UMask": "0x8" + }, + { + "EventName": "l2_cache_req_stat.ic_fill_hit_x", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache hit modifiable line in L2.", + "UMask": "0x4" + }, + { + "EventName": "l2_cache_req_stat.ic_fill_hit_s", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache hit clean line in L2.", + "UMask": "0x2" + }, + { + "EventName": "l2_cache_req_stat.ic_fill_miss", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache request miss in L2.", + "UMask": "0x1" + }, + { + "EventName": "l2_fill_pending.l2_fill_busy", + "EventCode": "0x6d", + "BriefDescription": "Cycles with fill pending from L2. Total cycles spent with one or more fill requests in flight from L2.", + "UMask": "0x1" + }, + { + "EventName": "l3_request_g1.caching_l3_cache_accesses", + "EventCode": "0x01", + "BriefDescription": "Caching: L3 cache accesses", + "UMask": "0x80", + "Unit": "L3PMC" + }, + { + "EventName": "l3_lookup_state.all_l3_req_typs", + "EventCode": "0x04", + "BriefDescription": "All L3 Request Types", + "UMask": "0xff", + "Unit": "L3PMC" + }, + { + "EventName": "l3_comb_clstr_state.other_l3_miss_typs", + "EventCode": "0x06", + "BriefDescription": "Other L3 Miss Request Types", + "UMask": "0xfe", + "Unit": "L3PMC" + }, + { + "EventName": "l3_comb_clstr_state.request_miss", + "EventCode": "0x06", + "BriefDescription": "L3 cache misses", + "UMask": "0x01", + "Unit": "L3PMC" + }, + { + "EventName": "xi_sys_fill_latency", + "EventCode": "0x90", + "BriefDescription": "L3 Cache Miss Latency. Total cycles for all transactions divided by 16. Ignores SliceMask and ThreadMask.", + "UMask": "0x00", + "Unit": "L3PMC" + }, + { + "EventName": "xi_ccx_sdp_req1.all_l3_miss_req_typs", + "EventCode": "0x9a", + "BriefDescription": "All L3 Miss Request Types. Ignores SliceMask and ThreadMask.", + "UMask": "0x3f", + "Unit": "L3PMC" + } ] Modified: head/lib/libpmc/pmu-events/arch/x86/amdzen1/core.json ============================================================================== --- head/lib/libpmc/pmu-events/arch/x86/amdfam17h/core.json Mon Jul 13 15:52:57 2020 (r363156) +++ head/lib/libpmc/pmu-events/arch/x86/amdzen1/core.json Mon Jul 13 16:23:02 2020 (r363157) @@ -1,127 +1,125 @@ [ - { - "EventName": "ex_ret_instr", - "EventCode": "0xc0", - "SampleAfterValue": "2000003", - "BriefDescription": "Retired Instructions." - }, - { - "EventName": "ex_ret_cops", - "EventCode": "0xc1", - "SampleAfterValue": "2000003", - "BriefDescription": "The number of uOps retired. This includes all processor activity (instructions, exceptions, interrupts, microcode assists, etc.). The number of events logged per cycle can vary from 0 to 4." - }, - { - "EventName": "ex_ret_brn", - "EventCode": "0xc2", - "SampleAfterValue": "2000003", - "BriefDescription": "The number of branch instructions retired. This includes all types of architectural control flow changes, including exceptions and interrupts." - }, - { - "EventName": "ex_ret_brn_misp", - "EventCode": "0xc3", - "BriefDescription": "The number of branch instructions retired, of any type, that were not correctly predicted. This includes those for which prediction is not attempted (far control transfers, exceptions and interrupts)." - }, - { - "EventName": "ex_ret_brn_tkn", - "EventCode": "0xc4", - "BriefDescription": "The number of taken branches that were retired. This includes all types of architectural control flow changes, including exceptions and interrupts." - }, - { - "EventName": "ex_ret_brn_tkn_misp", - "EventCode": "0xc5", - "BriefDescription": "The number of retired taken branch instructions that were mispredicted." - }, - { - "EventName": "ex_ret_brn_far", - "EventCode": "0xc6", - "BriefDescription": "The number of far control transfers retired including far call/jump/return, IRET, SYSCALL and SYSRET, plus exceptions and interrupts. Far control transfers are not subject to branch prediction." - }, - { - "EventName": "ex_ret_brn_resync", - "EventCode": "0xc7", - "BriefDescription": "The number of resync branches. These reflect pipeline restarts due to certain microcode assists and events such as writes to the active instruction stream, among other things. Each occurrence reflects a restart penalty similar to a branch mispredict. This is relatively rare." - }, - { - "EventName": "ex_ret_near_ret", - "EventCode": "0xc8", - "BriefDescription": "The number of near return instructions (RET or RET Iw) retired." - }, - { - "EventName": "ex_ret_near_ret_mispred", - "EventCode": "0xc9", - "BriefDescription": "The number of near returns retired that were not correctly predicted by the return address predictor. Each such mispredict incurs the same penalty as a mispredicted conditional branch instruction." - }, - { - "EventName": "ex_ret_brn_ind_misp", - "EventCode": "0xca", - "BriefDescription": "Retired Indirect Branch Instructions Mispredicted." - }, - { - "EventName": "ex_ret_mmx_fp_instr.sse_instr", - "EventCode": "0xcb", - "BriefDescription": "SSE instructions (SSE, SSE2, SSE3, SSSE3, SSE4A, SSE41, SSE42, AVX).", - "PublicDescription": "The number of MMX, SSE or x87 instructions retired. The UnitMask allows the selection of the individual classes of instructions as given in the table. Each increment represents one complete instruction. Since this event includes non-numeric instructions it is not suitable for measuring MFLOPS. SSE instructions (SSE, SSE2, SSE3, SSSE3, SSE4A, SSE41, SSE42, AVX).", - "UMask": "0x4" - }, - { - "EventName": "ex_ret_mmx_fp_instr.mmx_instr", - "EventCode": "0xcb", - "BriefDescription": "MMX instructions.", - "PublicDescription": "The number of MMX, SSE or x87 instructions retired. The UnitMask allows the selection of the individual classes of instructions as given in the table. Each increment represents one complete instruction. Since this event includes non-numeric instructions it is not suitable for measuring MFLOPS. MMX instructions.", - "UMask": "0x2" - }, - { - "EventName": "ex_ret_mmx_fp_instr.x87_instr", - "EventCode": "0xcb", - "BriefDescription": "x87 instructions.", - "PublicDescription": "The number of MMX, SSE or x87 instructions retired. The UnitMask allows the selection of the individual classes of instructions as given in the table. Each increment represents one complete instruction. Since this event includes non-numeric instructions it is not suitable for measuring MFLOPS. x87 instructions.", - "UMask": "0x1" - }, - { - "EventName": "ex_ret_cond", - "EventCode": "0xd1", - "BriefDescription": "Retired Conditional Branch Instructions." - }, - { - "EventName": "ex_ret_cond_misp", - "EventCode": "0xd2", - "BriefDescription": "Retired Conditional Branch Instructions Mispredicted." - }, - { - "EventName": "ex_div_busy", - "EventCode": "0xd3", - "BriefDescription": "Div Cycles Busy count." - }, - { - "EventName": "ex_div_count", - "EventCode": "0xd4", - "BriefDescription": "Div Op Count." - }, - { - "EventName": "ex_tagged_ibs_ops.ibs_count_rollover", - "EventCode": "0x1cf", - "BriefDescription": "Number of times an op could not be tagged by IBS because of a previous tagged op that has not retired.", - "PublicDescription": "Tagged IBS Ops. Number of times an op could not be tagged by IBS because of a previous tagged op that has not retired.", - "UMask": "0x4" - }, - { - "EventName": "ex_tagged_ibs_ops.ibs_tagged_ops_ret", - "EventCode": "0x1cf", - "BriefDescription": "Number of Ops tagged by IBS that retired.", - "PublicDescription": "Tagged IBS Ops. Number of Ops tagged by IBS that retired.", - "UMask": "0x2" - }, - { - "EventName": "ex_tagged_ibs_ops.ibs_tagged_ops", - "EventCode": "0x1cf", - "BriefDescription": "Number of Ops tagged by IBS.", - "PublicDescription": "Tagged IBS Ops. Number of Ops tagged by IBS.", - "UMask": "0x1" - }, - { - "EventName": "ex_ret_fus_brnch_inst", - "EventCode": "0x1d0", - "BriefDescription": "The number of fused retired branch instructions retired per cycle. The number of events logged per cycle can vary from 0 to 3." - } + { + "EventName": "ex_ret_instr", + "EventCode": "0xc0", + "BriefDescription": "Retired Instructions." + }, + { + "EventName": "ex_ret_cops", + "EventCode": "0xc1", + "BriefDescription": "Retired Uops.", + "PublicDescription": "The number of uOps retired. This includes all processor activity (instructions, exceptions, interrupts, microcode assists, etc.). The number of events logged per cycle can vary from 0 to 4." + }, + { + "EventName": "ex_ret_brn", + "EventCode": "0xc2", + "BriefDescription": "Retired Branch Instructions.", + "PublicDescription": "The number of branch instructions retired. This includes all types of architectural control flow changes, including exceptions and interrupts." + }, + { + "EventName": "ex_ret_brn_misp", + "EventCode": "0xc3", + "BriefDescription": "Retired Branch Instructions Mispredicted.", + "PublicDescription": "The number of branch instructions retired, of any type, that were not correctly predicted. This includes those for which prediction is not attempted (far control transfers, exceptions and interrupts)." + }, + { + "EventName": "ex_ret_brn_tkn", + "EventCode": "0xc4", + "BriefDescription": "Retired Taken Branch Instructions.", + "PublicDescription": "The number of taken branches that were retired. This includes all types of architectural control flow changes, including exceptions and interrupts." + }, + { + "EventName": "ex_ret_brn_tkn_misp", + "EventCode": "0xc5", + "BriefDescription": "Retired Taken Branch Instructions Mispredicted.", + "PublicDescription": "The number of retired taken branch instructions that were mispredicted." + }, + { + "EventName": "ex_ret_brn_far", + "EventCode": "0xc6", + "BriefDescription": "Retired Far Control Transfers.", + "PublicDescription": "The number of far control transfers retired including far call/jump/return, IRET, SYSCALL and SYSRET, plus exceptions and interrupts. Far control transfers are not subject to branch prediction." + }, + { + "EventName": "ex_ret_brn_resync", + "EventCode": "0xc7", + "BriefDescription": "Retired Branch Resyncs.", + "PublicDescription": "The number of resync branches. These reflect pipeline restarts due to certain microcode assists and events such as writes to the active instruction stream, among other things. Each occurrence reflects a restart penalty similar to a branch mispredict. This is relatively rare." + }, + { + "EventName": "ex_ret_near_ret", + "EventCode": "0xc8", + "BriefDescription": "Retired Near Returns.", + "PublicDescription": "The number of near return instructions (RET or RET Iw) retired." + }, + { + "EventName": "ex_ret_near_ret_mispred", + "EventCode": "0xc9", + "BriefDescription": "Retired Near Returns Mispredicted.", + "PublicDescription": "The number of near returns retired that were not correctly predicted by the return address predictor. Each such mispredict incurs the same penalty as a mispredicted conditional branch instruction." + }, + { + "EventName": "ex_ret_brn_ind_misp", + "EventCode": "0xca", + "BriefDescription": "Retired Indirect Branch Instructions Mispredicted.", + }, + { + "EventName": "ex_ret_mmx_fp_instr.sse_instr", + "EventCode": "0xcb", + "BriefDescription": "SSE instructions (SSE, SSE2, SSE3, SSSE3, SSE4A, SSE41, SSE42, AVX).", + "PublicDescription": "The number of MMX, SSE or x87 instructions retired. The UnitMask allows the selection of the individual classes of instructions as given in the table. Each increment represents one complete instruction. Since this event includes non-numeric instructions it is not suitable for measuring MFLOPS. SSE instructions (SSE, SSE2, SSE3, SSSE3, SSE4A, SSE41, SSE42, AVX).", + "UMask": "0x4" + }, + { + "EventName": "ex_ret_mmx_fp_instr.mmx_instr", + "EventCode": "0xcb", + "BriefDescription": "MMX instructions.", + "PublicDescription": "The number of MMX, SSE or x87 instructions retired. The UnitMask allows the selection of the individual classes of instructions as given in the table. Each increment represents one complete instruction. Since this event includes non-numeric instructions it is not suitable for measuring MFLOPS. MMX instructions.", + "UMask": "0x2" + }, + { + "EventName": "ex_ret_mmx_fp_instr.x87_instr", + "EventCode": "0xcb", + "BriefDescription": "x87 instructions.", + "PublicDescription": "The number of MMX, SSE or x87 instructions retired. The UnitMask allows the selection of the individual classes of instructions as given in the table. Each increment represents one complete instruction. Since this event includes non-numeric instructions it is not suitable for measuring MFLOPS. x87 instructions.", + "UMask": "0x1" + }, + { + "EventName": "ex_ret_cond", + "EventCode": "0xd1", + "BriefDescription": "Retired Conditional Branch Instructions." + }, + { + "EventName": "ex_div_busy", + "EventCode": "0xd3", + "BriefDescription": "Div Cycles Busy count." + }, + { + "EventName": "ex_div_count", + "EventCode": "0xd4", + "BriefDescription": "Div Op Count." + }, + { + "EventName": "ex_tagged_ibs_ops.ibs_count_rollover", + "EventCode": "0x1cf", + "BriefDescription": "Tagged IBS Ops. Number of times an op could not be tagged by IBS because of a previous tagged op that has not retired.", + "UMask": "0x4" + }, + { + "EventName": "ex_tagged_ibs_ops.ibs_tagged_ops_ret", + "EventCode": "0x1cf", + "BriefDescription": "Tagged IBS Ops. Number of Ops tagged by IBS that retired.", + "UMask": "0x2" + }, + { + "EventName": "ex_tagged_ibs_ops.ibs_tagged_ops", + "EventCode": "0x1cf", + "BriefDescription": "Tagged IBS Ops. Number of Ops tagged by IBS.", + "UMask": "0x1" + }, + { + "EventName": "ex_ret_fus_brnch_inst", + "EventCode": "0x1d0", + "BriefDescription": "The number of fused retired branch instructions retired per cycle. The number of events logged per cycle can vary from 0 to 3." + } ] Modified: head/lib/libpmc/pmu-events/arch/x86/amdzen1/floating-point.json ============================================================================== --- head/lib/libpmc/pmu-events/arch/x86/amdfam17h/floating-point.json Mon Jul 13 15:52:57 2020 (r363156) +++ head/lib/libpmc/pmu-events/arch/x86/amdzen1/floating-point.json Mon Jul 13 16:23:02 2020 (r363157) @@ -1,196 +1,224 @@ [ - { - "EventName": "fpu_pipe_assignment.dual3", - "EventCode": "0x00", - "BriefDescription": "Total number multi-pipe uOps assigned to Pipe 3.", - "PublicDescription": "The number of operations (uOps) and dual-pipe uOps dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMXTM, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number multi-pipe uOps assigned to Pipe 3.", - "UMask": "0x80" - }, - { - "EventName": "fpu_pipe_assignment.dual2", - "EventCode": "0x00", - "BriefDescription": "Total number multi-pipe uOps assigned to Pipe 2.", - "PublicDescription": "The number of operations (uOps) and dual-pipe uOps dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMXTM, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number multi-pipe uOps assigned to Pipe 2.", - "UMask": "0x40" - }, - { - "EventName": "fpu_pipe_assignment.dual1", - "EventCode": "0x00", - "BriefDescription": "Total number multi-pipe uOps assigned to Pipe 1.", - "PublicDescription": "The number of operations (uOps) and dual-pipe uOps dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMXTM, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number multi-pipe uOps assigned to Pipe 1.", - "UMask": "0x20" - }, - { - "EventName": "fpu_pipe_assignment.dual0", - "EventCode": "0x00", - "BriefDescription": "Total number multi-pipe uOps assigned to Pipe 0.", - "PublicDescription": "The number of operations (uOps) and dual-pipe uOps dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMXTM, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number multi-pipe uOps assigned to Pipe 0.", - "UMask": "0x10" - }, - { - "EventName": "fpu_pipe_assignment.total3", - "EventCode": "0x00", - "BriefDescription": "Total number uOps assigned to Pipe 3.", - "PublicDescription": "The number of operations (uOps) and dual-pipe uOps dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMXTM, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number uOps assigned to Pipe 3.", - "UMask": "0x8" - }, - { - "EventName": "fpu_pipe_assignment.total2", - "EventCode": "0x00", - "BriefDescription": "Total number uOps assigned to Pipe 2.", - "PublicDescription": "The number of operations (uOps) and dual-pipe uOps dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMXTM, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number uOps assigned to Pipe 2.", - "UMask": "0x4" - }, - { - "EventName": "fpu_pipe_assignment.total1", - "EventCode": "0x00", - "BriefDescription": "Total number uOps assigned to Pipe 1.", - "PublicDescription": "The number of operations (uOps) and dual-pipe uOps dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMXTM, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number uOps assigned to Pipe 1.", - "UMask": "0x2" - }, - { - "EventName": "fpu_pipe_assignment.total0", - "EventCode": "0x00", - "BriefDescription": "Total number uOps assigned to Pipe 0.", - "PublicDescription": "The number of operations (uOps) and dual-pipe uOps dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMXTM, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number uOps assigned to Pipe 0.", - "UMask": "0x1" - }, - { - "EventName": "fp_sched_empty", - "EventCode": "0x01", - "BriefDescription": "This is a speculative event. The number of cycles in which the FPU scheduler is empty. Note that some Ops like FP loads bypass the scheduler." - }, - { - "EventName": "fp_retx87_fp_ops.div_sqr_r_ops", - "EventCode": "0x02", - "BriefDescription": "Divide and square root Ops.", - "PublicDescription": "The number of x87 floating-point Ops that have retired. The number of events logged per cycle can vary from 0 to 8. Divide and square root Ops.", - "UMask": "0x4" - }, - { - "EventName": "fp_retx87_fp_ops.mul_ops", - "EventCode": "0x02", - "BriefDescription": "Multiply Ops.", - "PublicDescription": "The number of x87 floating-point Ops that have retired. The number of events logged per cycle can vary from 0 to 8. Multiply Ops.", - "UMask": "0x2" - }, - { - "EventName": "fp_retx87_fp_ops.add_sub_ops", - "EventCode": "0x02", - "BriefDescription": "Add/subtract Ops.", - "PublicDescription": "The number of x87 floating-point Ops that have retired. The number of events logged per cycle can vary from 0 to 8. Add/subtract Ops.", - "UMask": "0x1" - }, - { - "EventName": "fp_ret_sse_avx_ops.dp_mult_add_flops", - "EventCode": "0x03", - "BriefDescription": "Double precision multiply-add FLOPS. Multiply-add counts as 2 FLOPS.", - "PublicDescription": "This is a retire-based event. The number of retired SSE/AVX FLOPS. The number of events logged per cycle can vary from 0 to 64. This event can count above 15. Double precision multiply-add FLOPS. Multiply-add counts as 2 FLOPS.", - "UMask": "0x80" - }, - { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon Jul 13 16:39:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9A7F53690E6; Mon, 13 Jul 2020 16:39:28 +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 4B58W43JLbz49hm; Mon, 13 Jul 2020 16:39:28 +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 5060018496; Mon, 13 Jul 2020 16:39:28 +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 06DGdSVM058847; Mon, 13 Jul 2020 16:39:28 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06DGdRXl058845; Mon, 13 Jul 2020 16:39:27 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007131639.06DGdRXl058845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 13 Jul 2020 16:39:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363158 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 363158 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 16:39:28 -0000 Author: markj Date: Mon Jul 13 16:39:27 2020 New Revision: 363158 URL: https://svnweb.freebsd.org/changeset/base/363158 Log: Add vm_map_valid_range_KBI(). This is required for standalone module builds. Reported by: hselasky Reviewed by: dougm, hselasky, kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D25650 Modified: head/sys/vm/vm_map.c head/sys/vm/vm_map.h Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Mon Jul 13 16:23:02 2020 (r363157) +++ head/sys/vm/vm_map.c Mon Jul 13 16:39:27 2020 (r363158) @@ -5014,6 +5014,13 @@ vm_map_pmap_KBI(vm_map_t map) return (map->pmap); } +bool +vm_map_range_valid_KBI(vm_map_t map, vm_offset_t start, vm_offset_t end) +{ + + return (vm_map_range_valid(map, start, end)); +} + #ifdef INVARIANTS static void _vm_map_assert_consistent(vm_map_t map, int check) Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Mon Jul 13 16:23:02 2020 (r363157) +++ head/sys/vm/vm_map.h Mon Jul 13 16:39:27 2020 (r363158) @@ -229,6 +229,8 @@ struct vm_map { #define vm_map_max(map) vm_map_max_KBI((map)) #define vm_map_min(map) vm_map_min_KBI((map)) #define vm_map_pmap(map) vm_map_pmap_KBI((map)) +#define vm_map_range_valid(map, start, end) \ + vm_map_range_valid_KBI((map), (start), (end)) #else static __inline vm_offset_t vm_map_max(const struct vm_map *map) @@ -330,6 +332,7 @@ void vm_map_wait_busy(vm_map_t map); vm_offset_t vm_map_max_KBI(const struct vm_map *map); vm_offset_t vm_map_min_KBI(const struct vm_map *map); pmap_t vm_map_pmap_KBI(vm_map_t map); +bool vm_map_range_valid_KBI(vm_map_t map, vm_offset_t start, vm_offset_t end); #define vm_map_lock(map) _vm_map_lock(map, LOCK_FILE, LOCK_LINE) #define vm_map_unlock(map) _vm_map_unlock(map, LOCK_FILE, LOCK_LINE) From owner-svn-src-head@freebsd.org Mon Jul 13 16:40:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 560C2369409; Mon, 13 Jul 2020 16:40:01 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B58Wh4Nzjz4B4G; Mon, 13 Jul 2020 16:40:00 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qv1-xf34.google.com with SMTP id h18so6070341qvl.3; Mon, 13 Jul 2020 09:40:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=hkGaO+i5YFYqdsGfAjwvWPk1L0fHwVAbXGQMA6tlqXA=; b=n5DP+dUpsPL+MvLuvsrO3ZNMGeqLVBsHr3wSBy0QKUHcEevad+NjRLwAsSeYhpakDW uguZBlzQz2kcC61mRon2LPfdqmz0M7i/MtlKtTKcaW3SmbFP7quX5bnFTpKa1zJC4Q0/ Ob0kmah4qWXih4rpX+AA6MUC9I4WAZzLhcA7EdWQOjNMoZIlO5D+wFu6D2q7cXCgCKzW bPGgDNHc0AB5lnHn54p+UP8NMeDblt8cUM7+TVD46WsDnyMcOE9M5DnPNVZ+ymUhZwBe oWvLAWQhWMiydlqL5OFQIFEC3TtKqLu8urVKXoMkMKH4/imZ+8aNQL8bXyq0nuiOKkvl 8DuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=hkGaO+i5YFYqdsGfAjwvWPk1L0fHwVAbXGQMA6tlqXA=; b=PYsQ/aqoWPuxET6Dvd91yofjC2gwY4i1s2ng8aVtZZZfTu4UaMC8yptWk4vony9m8v 1OB0IXZzHAmrSHFD6Vni3YgDrosvig9rKXz5l0RmgDFJ63sGwGq6ro4VutKMAIOgPy/I AlzvWPHHTZt4OsCzFaFBjXe3TZ4K+rvg1IZyjPrTeBR1JiCgcrgnqA5LBifOYKjYYqRs Fjfl1RNPAUvqFAEyUq5T5Zunrpyho3cW2Tg+q6KRalJeTL1CH4Zo+KZqDs/rR25l9vwH /FooGoJTYTLq3MPMoDV/kTZKNzyMIVZmQu/nQu7vDFhIPOKTE7VQG4fyX1zSPMFiX8Rl 4UDQ== X-Gm-Message-State: AOAM531rB1c/R2OSwAjZbsUKWRxj4tXO7RSSClJ4nFdZ0fq5SE5IM7QL ZJh+DVZvJzUfy7bosm4ZpCsCkO8VLeg= X-Google-Smtp-Source: ABdhPJytL+LwNJq8n/jaBJANFW05CPME/nM9tRweI3zz5WrH/sa61SZEqFunxkIpaFlnVoGGw8E4fA== X-Received: by 2002:a0c:f281:: with SMTP id k1mr273904qvl.219.1594658399709; Mon, 13 Jul 2020 09:39:59 -0700 (PDT) Received: from raichu (toroon0560w-lp130-14-174-91-9-204.dsl.bell.ca. [174.91.9.204]) by smtp.gmail.com with ESMTPSA id c24sm21262102qtd.82.2020.07.13.09.39.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 09:39:58 -0700 (PDT) Sender: Mark Johnston Date: Mon, 13 Jul 2020 12:39:54 -0400 From: Mark Johnston To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362361 - in head/sys: compat/linuxkpi/common/src vm Message-ID: <20200713163954.GA70590@raichu> References: <202006190332.05J3W53u006443@repo.freebsd.org> <8f4a8ae3-03c8-01a4-faaf-2041993d4a82@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8f4a8ae3-03c8-01a4-faaf-2041993d4a82@selasky.org> X-Rspamd-Queue-Id: 4B58Wh4Nzjz4B4G X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=n5DP+dUp; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::f34 as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-2.16 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.09)[-1.087]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; NEURAL_HAM_LONG(-1.03)[-1.034]; MIME_GOOD(-0.10)[text/plain]; MID_RHS_NOT_FQDN(0.50)[]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_HAM_SHORT(-0.34)[-0.342]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f34:from]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[174.91.9.204:received]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 16:40:01 -0000 On Mon, Jul 13, 2020 at 05:27:06PM +0200, Hans Petter Selasky wrote: > On 2020-06-19 05:32, Mark Johnston wrote: > > +++ head/sys/vm/vm_map.h Fri Jun 19 03:32:04 2020 (r362361) > > @@ -255,6 +255,17 @@ vm_map_modflags(vm_map_t map, vm_flags_t set, vm_flags > > { > > map->flags = (map->flags | set) & ~clear; > > } > > + > > +static inline bool > > +vm_map_range_valid(vm_map_t map, vm_offset_t start, vm_offset_t end) > > +{ > > Hi Mark, > > Don't you also need to add: > > #define vm_map_range_valid(map, start, end) vm_map_pmap_KBI(map, > start, end) > > And implement the _KBI function? > > Building the LinuxKPI from the command line is now broken: Thanks, fixed in r363158. From owner-svn-src-head@freebsd.org Mon Jul 13 17:05:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A6DED369CA1; Mon, 13 Jul 2020 17:05:45 +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 4B595P3yF8z4CvF; Mon, 13 Jul 2020 17:05:45 +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 667481889F; Mon, 13 Jul 2020 17:05:45 +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 06DH5jhW077315; Mon, 13 Jul 2020 17:05:45 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06DH5j0Q077314; Mon, 13 Jul 2020 17:05:45 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007131705.06DH5j0Q077314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 13 Jul 2020 17:05:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363162 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 363162 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 17:05:45 -0000 Author: markj Date: Mon Jul 13 17:05:44 2020 New Revision: 363162 URL: https://svnweb.freebsd.org/changeset/base/363162 Log: Print arm64 physmem info during boot. PR: 243682 Reviewed by: andrew, emaste MFC after: 1 week Event: July 2020 Bugathon Differential Revision: https://reviews.freebsd.org/D25625 Modified: head/sys/arm64/arm64/machdep.c Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Mon Jul 13 16:43:23 2020 (r363161) +++ head/sys/arm64/arm64/machdep.c Mon Jul 13 17:05:44 2020 (r363162) @@ -62,11 +62,14 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include +#include #include #include #include @@ -170,6 +173,26 @@ has_hyp(void) static void cpu_startup(void *dummy) { + vm_paddr_t size; + int i; + + printf("real memory = %ju (%ju MB)\n", ptoa((uintmax_t)realmem), + ptoa((uintmax_t)realmem) / 1024 / 1024); + + if (bootverbose) { + printf("Physical memory chunk(s):\n"); + for (i = 0; phys_avail[i + 1] != 0; i += 2) { + size = phys_avail[i + 1] - phys_avail[i]; + printf("%#016jx - %#016jx, %ju bytes (%ju pages)\n", + (uintmax_t)phys_avail[i], + (uintmax_t)phys_avail[i + 1] - 1, + (uintmax_t)size, (uintmax_t)size / PAGE_SIZE); + } + } + + printf("avail memory = %ju (%ju MB)\n", + ptoa((uintmax_t)vm_free_count()), + ptoa((uintmax_t)vm_free_count()) / 1024 / 1024); undef_init(); install_cpu_errata(); From owner-svn-src-head@freebsd.org Mon Jul 13 17:51:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8BA5E36C00F; Mon, 13 Jul 2020 17:51:06 +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 4B5B5k3KJ7z4J4m; Mon, 13 Jul 2020 17:51:06 +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 55EBC18EF8; Mon, 13 Jul 2020 17:51:06 +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 06DHp63o002367; Mon, 13 Jul 2020 17:51:06 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06DHp4KX002359; Mon, 13 Jul 2020 17:51:04 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007131751.06DHp4KX002359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 13 Jul 2020 17:51:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363164 - head/sbin/ipfw X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sbin/ipfw X-SVN-Commit-Revision: 363164 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 17:51:06 -0000 Author: markj Date: Mon Jul 13 17:51:04 2020 New Revision: 363164 URL: https://svnweb.freebsd.org/changeset/base/363164 Log: ipfw(8): Fix most warnings with the default WARNS level. - Add missing const and static qualifiers. - Avoid shadowing the global "co" by renaming it to "g_co". - Avoid mixing signedness in loop bound checks. - Leave -Wcast-align warnings disabled for now. Reviewed by: ae, melifaro MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25456 Modified: head/sbin/ipfw/Makefile head/sbin/ipfw/altq.c head/sbin/ipfw/dummynet.c head/sbin/ipfw/ipfw2.c head/sbin/ipfw/ipfw2.h head/sbin/ipfw/ipv6.c head/sbin/ipfw/main.c head/sbin/ipfw/nat.c head/sbin/ipfw/nat64clat.c head/sbin/ipfw/nat64lsn.c head/sbin/ipfw/nat64stl.c head/sbin/ipfw/nptv6.c head/sbin/ipfw/tables.c Modified: head/sbin/ipfw/Makefile ============================================================================== --- head/sbin/ipfw/Makefile Mon Jul 13 17:20:20 2020 (r363163) +++ head/sbin/ipfw/Makefile Mon Jul 13 17:51:04 2020 (r363164) @@ -6,7 +6,6 @@ PACKAGE=ipfw PROG= ipfw SRCS= ipfw2.c dummynet.c ipv6.c main.c nat.c tables.c SRCS+= nat64clat.c nat64lsn.c nat64stl.c nptv6.c -WARNS?= 2 .if ${MK_PF} != "no" SRCS+= altq.c @@ -17,3 +16,5 @@ LIBADD= jail util MAN= ipfw.8 .include + +CWARNFLAGS+= -Wno-cast-align Modified: head/sbin/ipfw/altq.c ============================================================================== --- head/sbin/ipfw/altq.c Mon Jul 13 17:20:20 2020 (r363163) +++ head/sbin/ipfw/altq.c Mon Jul 13 17:51:04 2020 (r363164) @@ -140,7 +140,7 @@ altq_qid_to_name(u_int32_t qid) } void -print_altq_cmd(struct buf_pr *bp, ipfw_insn_altq *altqptr) +print_altq_cmd(struct buf_pr *bp, const ipfw_insn_altq *altqptr) { if (altqptr) { const char *qname; Modified: head/sbin/ipfw/dummynet.c ============================================================================== --- head/sbin/ipfw/dummynet.c Mon Jul 13 17:20:20 2020 (r363163) +++ head/sbin/ipfw/dummynet.c Mon Jul 13 17:51:04 2020 (r363164) @@ -166,8 +166,8 @@ enum { #define PIE_SCALE (1L<type, oid->id); break; case DN_SCH: { @@ -636,7 +636,7 @@ list_pipes(struct dn_id *oid, struct dn_id *end) sprintf(bwbuf, "%7.3f bit/s ", b); if (humanize_number(burst, sizeof(burst), p->burst, - "", HN_AUTOSCALE, 0) < 0 || co.verbose) + "", HN_AUTOSCALE, 0) < 0 || g_co.verbose) sprintf(burst, "%d", (int)p->burst); sprintf(buf, "%05d: %s %4d ms burst %s", p->link_nr % DN_MAX_ID, bwbuf, p->delay, burst); @@ -1317,7 +1317,7 @@ ipfw_config_pipe(int ac, char **av) o_next(&buf, sizeof(struct dn_id), DN_CMD_CONFIG); base->id = DN_API_VERSION; - switch (co.do_pipe) { + switch (g_co.do_pipe) { case 1: /* "pipe N config ..." */ /* Allocate space for the WF2Q+ scheduler, its link * and the FIFO flowset. Set the number, but leave @@ -1893,7 +1893,7 @@ parse_range(int ac, char *av[], uint32_t *v, int len) } n++; /* translate if 'pipe list' */ - if (co.do_pipe == 1) { + if (g_co.do_pipe == 1) { v[0] += DN_MAX_ID; v[1] += DN_MAX_ID; } @@ -1947,7 +1947,7 @@ dummynet_list(int ac, char *av[], int show_counters) if (max_size < sizeof(struct dn_flow)) max_size = sizeof(struct dn_flow); - switch (co.do_pipe) { + switch (g_co.do_pipe) { case 1: oid->subtype = DN_LINK; /* list pipe */ break; Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Mon Jul 13 17:20:20 2020 (r363163) +++ head/sbin/ipfw/ipfw2.c Mon Jul 13 17:51:04 2020 (r363164) @@ -57,7 +57,7 @@ #include #include -struct cmdline_opts co; /* global options */ +struct cmdline_opts g_co; /* global options */ struct format_opts { int bcwidth; @@ -74,7 +74,7 @@ struct format_opts { int resvd_set_number = RESVD_SET; -int ipfw_socket = -1; +static int ipfw_socket = -1; #define CHECK_LENGTH(v, len) do { \ if ((v) < (len)) \ @@ -395,8 +395,8 @@ static int ipfw_show_config(struct cmdline_opts *co, s static void ipfw_list_tifaces(void); struct tidx; -static uint16_t pack_object(struct tidx *tstate, char *name, int otype); -static uint16_t pack_table(struct tidx *tstate, char *name); +static uint16_t pack_object(struct tidx *tstate, const char *name, int otype); +static uint16_t pack_table(struct tidx *tstate, const char *name); static char *table_search_ctlv(ipfw_obj_ctlv *ctlv, uint16_t idx); static void object_sort_ctlv(ipfw_obj_ctlv *ctlv); @@ -456,7 +456,7 @@ bp_flush(struct buf_pr *b) * Returns number of bytes that should have been printed. */ int -bprintf(struct buf_pr *b, char *format, ...) +bprintf(struct buf_pr *b, const char *format, ...) { va_list args; int i; @@ -466,7 +466,7 @@ bprintf(struct buf_pr *b, char *format, ...) i = vsnprintf(b->ptr, b->avail, format, args); va_end(args); - if (i > b->avail || i < 0) { + if (i < 0 || (size_t)i > b->avail) { /* Overflow or print error */ b->avail = 0; } else { @@ -569,7 +569,7 @@ do_cmd(int optname, void *optval, uintptr_t optlen) { int i; - if (co.test_only) + if (g_co.test_only) return 0; if (ipfw_socket == -1) @@ -606,7 +606,7 @@ int do_set3(int optname, ip_fw3_opheader *op3, size_t optlen) { - if (co.test_only) + if (g_co.test_only) return (0); if (ipfw_socket == -1) @@ -635,7 +635,7 @@ do_get3(int optname, ip_fw3_opheader *op3, size_t *opt int error; socklen_t len; - if (co.test_only) + if (g_co.test_only) return (0); if (ipfw_socket == -1) @@ -725,7 +725,8 @@ match_value(struct _s_x *p, int value) } size_t -concat_tokens(char *buf, size_t bufsize, struct _s_x *table, char *delimiter) +concat_tokens(char *buf, size_t bufsize, struct _s_x *table, + const char *delimiter) { struct _s_x *pt; int l; @@ -788,7 +789,7 @@ print_flags_buffer(char *buf, size_t sz, struct _s_x * set &= ~list[i].x; l = snprintf(buf, sz, "%s%s", comma, list[i].s); - if (l >= sz) + if (l < 0 || (size_t)l >= sz) return; comma = ","; buf += l; @@ -856,13 +857,13 @@ print_port(struct buf_pr *bp, int proto, uint16_t port if (proto == IPPROTO_ETHERTYPE) { char const *s; - if (co.do_resolv && (s = match_value(ether_types, port)) ) + if (g_co.do_resolv && (s = match_value(ether_types, port)) ) bprintf(bp, "%s", s); else bprintf(bp, "0x%04x", port); } else { struct servent *se = NULL; - if (co.do_resolv) { + if (g_co.do_resolv) { struct protoent *pe = getprotobynumber(proto); se = getservbyport(htons(port), pe ? pe->p_name : NULL); @@ -893,9 +894,9 @@ static struct _s_x _port_name[] = { * XXX todo: add support for mask. */ static void -print_newports(struct buf_pr *bp, ipfw_insn_u16 *cmd, int proto, int opcode) +print_newports(struct buf_pr *bp, const ipfw_insn_u16 *cmd, int proto, int opcode) { - uint16_t *p = cmd->ports; + const uint16_t *p = cmd->ports; int i; char const *sep; @@ -906,7 +907,7 @@ print_newports(struct buf_pr *bp, ipfw_insn_u16 *cmd, bprintf(bp, " %s", sep); } sep = " "; - for (i = F_LEN((ipfw_insn *)cmd) - 1; i > 0; i--, p += 2) { + for (i = F_LEN((const ipfw_insn *)cmd) - 1; i > 0; i--, p += 2) { bprintf(bp, "%s", sep); print_port(bp, proto, p[0]); if (p[0] != p[1]) { @@ -1134,7 +1135,7 @@ print_reject_code(struct buf_pr *bp, uint16_t code) * len is the max length in bits. */ int -contigmask(uint8_t *p, int len) +contigmask(const uint8_t *p, int len) { int i, n; @@ -1152,7 +1153,7 @@ contigmask(uint8_t *p, int len) * There is a specialized check for f_tcpflags. */ static void -print_flags(struct buf_pr *bp, char const *name, ipfw_insn *cmd, +print_flags(struct buf_pr *bp, char const *name, const ipfw_insn *cmd, struct _s_x *list) { char const *comma = ""; @@ -1185,12 +1186,13 @@ print_flags(struct buf_pr *bp, char const *name, ipfw_ * Print the ip address contained in a command. */ static void -print_ip(struct buf_pr *bp, const struct format_opts *fo, ipfw_insn_ip *cmd) +print_ip(struct buf_pr *bp, const struct format_opts *fo, + const ipfw_insn_ip *cmd) { struct hostent *he = NULL; - struct in_addr *ia; - uint32_t len = F_LEN((ipfw_insn *)cmd); - uint32_t *a = ((ipfw_insn_u32 *)cmd)->d; + const struct in_addr *ia; + const uint32_t *a = ((const ipfw_insn_u32 *)cmd)->d; + uint32_t len = F_LEN((const ipfw_insn *)cmd); char *t; bprintf(bp, " "); @@ -1200,7 +1202,8 @@ print_ip(struct buf_pr *bp, const struct format_opts * if (d < sizeof(lookup_key)/sizeof(lookup_key[0])) arg = match_value(rule_options, lookup_key[d]); - t = table_search_ctlv(fo->tstate, ((ipfw_insn *)cmd)->arg1); + t = table_search_ctlv(fo->tstate, + ((const ipfw_insn *)cmd)->arg1); bprintf(bp, "lookup %s %s", arg, t); return; } @@ -1210,7 +1213,8 @@ print_ip(struct buf_pr *bp, const struct format_opts * } if (cmd->o.opcode == O_IP_SRC_LOOKUP || cmd->o.opcode == O_IP_DST_LOOKUP) { - t = table_search_ctlv(fo->tstate, ((ipfw_insn *)cmd)->arg1); + t = table_search_ctlv(fo->tstate, + ((const ipfw_insn *)cmd)->arg1); bprintf(bp, "table(%s", t); if (len == F_INSN_SIZE(ipfw_insn_u32)) bprintf(bp, ",%u", *a); @@ -1218,16 +1222,18 @@ print_ip(struct buf_pr *bp, const struct format_opts * return; } if (cmd->o.opcode == O_IP_SRC_SET || cmd->o.opcode == O_IP_DST_SET) { - uint32_t x, *map = (uint32_t *)&(cmd->mask); + const uint32_t *map = (const uint32_t *)&cmd->mask; + struct in_addr addr; + uint32_t x; int i, j; char comma = '{'; x = cmd->o.arg1 - 1; - x = htonl( ~x ); - cmd->addr.s_addr = htonl(cmd->addr.s_addr); - bprintf(bp, "%s/%d", inet_ntoa(cmd->addr), - contigmask((uint8_t *)&x, 32)); - x = cmd->addr.s_addr = htonl(cmd->addr.s_addr); + x = htonl(~x); + addr.s_addr = htonl(cmd->addr.s_addr); + bprintf(bp, "%s/%d", inet_ntoa(addr), + contigmask((uint8_t *)&x, 32)); + x = cmd->addr.s_addr; x &= 0xff; /* base */ /* * Print bits and ranges. @@ -1258,19 +1264,19 @@ print_ip(struct buf_pr *bp, const struct format_opts * for (len = len / 2; len > 0; len--, a += 2) { int mb = /* mask length */ (cmd->o.opcode == O_IP_SRC || cmd->o.opcode == O_IP_DST) ? - 32 : contigmask((uint8_t *)&(a[1]), 32); - if (mb == 32 && co.do_resolv) - he = gethostbyaddr((char *)&(a[0]), sizeof(in_addr_t), + 32 : contigmask((const uint8_t *)&(a[1]), 32); + if (mb == 32 && g_co.do_resolv) + he = gethostbyaddr((const char *)&(a[0]), sizeof(in_addr_t), AF_INET); if (he != NULL) /* resolved to name */ bprintf(bp, "%s", he->h_name); else if (mb == 0) /* any */ bprintf(bp, "any"); else { /* numeric IP followed by some kind of mask */ - ia = (struct in_addr *)&a[0]; + ia = (const struct in_addr *)&a[0]; bprintf(bp, "%s", inet_ntoa(*ia)); if (mb < 0) { - ia = (struct in_addr *)&a[1]; + ia = (const struct in_addr *)&a[1]; bprintf(bp, ":%s", inet_ntoa(*ia)); } else if (mb < 32) bprintf(bp, "/%d", mb); @@ -1284,7 +1290,7 @@ print_ip(struct buf_pr *bp, const struct format_opts * * prints a MAC address/mask pair */ static void -format_mac(struct buf_pr *bp, uint8_t *addr, uint8_t *mask) +format_mac(struct buf_pr *bp, const uint8_t *addr, const uint8_t *mask) { int l = contigmask(mask, 48); @@ -1303,7 +1309,7 @@ format_mac(struct buf_pr *bp, uint8_t *addr, uint8_t * } static void -print_mac(struct buf_pr *bp, ipfw_insn_mac *mac) +print_mac(struct buf_pr *bp, const ipfw_insn_mac *mac) { bprintf(bp, " MAC"); @@ -1336,7 +1342,7 @@ fill_icmptypes(ipfw_insn_u32 *cmd, char *av) } static void -print_icmptypes(struct buf_pr *bp, ipfw_insn_u32 *cmd) +print_icmptypes(struct buf_pr *bp, const ipfw_insn_u32 *cmd) { int i; char sep= ' '; @@ -1351,12 +1357,12 @@ print_icmptypes(struct buf_pr *bp, ipfw_insn_u32 *cmd) } static void -print_dscp(struct buf_pr *bp, ipfw_insn_u32 *cmd) +print_dscp(struct buf_pr *bp, const ipfw_insn_u32 *cmd) { + const uint32_t *v; + const char *code; int i = 0; - uint32_t *v; char sep= ' '; - const char *code; bprintf(bp, " dscp"); v = cmd->d; @@ -1374,7 +1380,7 @@ print_dscp(struct buf_pr *bp, ipfw_insn_u32 *cmd) } } -#define insntod(cmd, type) ((ipfw_insn_ ## type *)(cmd)) +#define insntod(cmd, type) ((const ipfw_insn_ ## type *)(cmd)) struct show_state { struct ip_fw_rule *rule; const ipfw_insn *eaction; @@ -1443,7 +1449,7 @@ print_limit_mask(struct buf_pr *bp, const ipfw_insn_li static int print_instruction(struct buf_pr *bp, const struct format_opts *fo, - struct show_state *state, ipfw_insn *cmd) + struct show_state *state, const ipfw_insn *cmd) { struct protoent *pe; struct passwd *pwd; @@ -1685,7 +1691,7 @@ print_instruction(struct buf_pr *bp, const struct form bprintf(bp, " ipsec"); break; case O_NOP: - bprintf(bp, " // %s", (char *)(cmd + 1)); + bprintf(bp, " // %s", (const char *)(cmd + 1)); break; case O_KEEP_STATE: if (state->flags & HAVE_PROBE_STATE) @@ -1777,8 +1783,8 @@ static void print_fwd(struct buf_pr *bp, const ipfw_insn *cmd) { char buf[INET6_ADDRSTRLEN + IF_NAMESIZE + 2]; - ipfw_insn_sa6 *sa6; - ipfw_insn_sa *sa; + const ipfw_insn_sa6 *sa6; + const ipfw_insn_sa *sa; uint16_t port; if (cmd->opcode == O_FORWARD_IP) { @@ -2056,7 +2062,7 @@ print_proto(struct buf_pr *bp, struct format_opts *fo, static int match_opcode(int opcode, const int opcodes[], size_t nops) { - int i; + size_t i; for (i = 0; i < nops; i++) if (opcode == opcodes[i]) @@ -2138,10 +2144,10 @@ static void show_static_rule(struct cmdline_opts *co, struct format_opts *fo, struct buf_pr *bp, struct ip_fw_rule *rule, struct ip_fw_bcounter *cntr) { + static int twidth = 0; struct show_state state; ipfw_insn *cmd; - static int twidth = 0; - int i; + size_t i; /* Print # DISABLED or skip the rule */ if ((fo->set_mask & (1 << rule->set)) == 0) { @@ -2361,7 +2367,7 @@ void ipfw_sets_handler(char *av[]) { ipfw_range_tlv rt; - char *msg; + const char *msg; size_t size; uint32_t masks[2]; int i; @@ -2378,7 +2384,7 @@ ipfw_sets_handler(char *av[]) ipfw_cfg_lheader *cfg; memset(&fo, 0, sizeof(fo)); - if (ipfw_get_config(&co, &fo, &cfg, &size) != 0) + if (ipfw_get_config(&g_co, &fo, &cfg, &size) != 0) err(EX_OSERR, "requesting config failed"); for (i = 0, msg = "disable"; i < RESVD_SET; i++) @@ -2507,7 +2513,7 @@ typedef void state_cb(struct cmdline_opts *co, struct static void prepare_format_dyn(struct cmdline_opts *co, struct format_opts *fo, - void *arg, void *_state) + void *arg __unused, void *_state) { ipfw_dyn_rule *d; int width; @@ -2701,11 +2707,11 @@ ipfw_list(int ac, char *av[], int show_counters) uint32_t rnum; char *endptr; - if (co.test_only) { + if (g_co.test_only) { fprintf(stderr, "Testing only, list disabled\n"); return; } - if (co.do_pipe) { + if (g_co.do_pipe) { dummynet_list(ac, av, show_counters); return; } @@ -2731,17 +2737,17 @@ ipfw_list(int ac, char *av[], int show_counters) /* get configuraion from kernel */ cfg = NULL; sfo.show_counters = show_counters; - sfo.show_time = co.do_time; - if (co.do_dynamic != 2) + sfo.show_time = g_co.do_time; + if (g_co.do_dynamic != 2) sfo.flags |= IPFW_CFG_GET_STATIC; - if (co.do_dynamic != 0) + if (g_co.do_dynamic != 0) sfo.flags |= IPFW_CFG_GET_STATES; if ((sfo.show_counters | sfo.show_time) != 0) sfo.flags |= IPFW_CFG_GET_COUNTERS; - if (ipfw_get_config(&co, &sfo, &cfg, &sz) != 0) + if (ipfw_get_config(&g_co, &sfo, &cfg, &sz) != 0) err(EX_OSERR, "retrieving config failed"); - error = ipfw_show_config(&co, &sfo, cfg, sz, ac, av); + error = ipfw_show_config(&g_co, &sfo, cfg, sz, ac, av); free(cfg); @@ -2974,7 +2980,8 @@ ipfw_check_object_name(const char *name) return (0); } -static char *default_state_name = "default"; +static const char *default_state_name = "default"; + static int state_check_name(const char *name) { @@ -3000,10 +3007,10 @@ eaction_check_name(const char *name) } static uint16_t -pack_object(struct tidx *tstate, char *name, int otype) +pack_object(struct tidx *tstate, const char *name, int otype) { - int i; ipfw_obj_ntlv *ntlv; + uint32_t i; for (i = 0; i < tstate->count; i++) { if (strcmp(tstate->idx[i].name, name) != 0) @@ -3037,7 +3044,7 @@ pack_object(struct tidx *tstate, char *name, int otype } static uint16_t -pack_table(struct tidx *tstate, char *name) +pack_table(struct tidx *tstate, const char *name) { if (table_check_name(name) != 0) @@ -3116,7 +3123,7 @@ fill_ip(ipfw_insn_ip *cmd, char *av, int cblen, struct int masklen; char md, nd = '\0'; - CHECK_LENGTH(cblen, F_INSN_SIZE(ipfw_insn) + 2 + len); + CHECK_LENGTH(cblen, (int)F_INSN_SIZE(ipfw_insn) + 2 + len); if (p) { md = *p; @@ -3314,7 +3321,7 @@ ipfw_delete(char *av[]) /* Do not allow using the following syntax: * ipfw set N delete set M */ - if (co.use_set) + if (g_co.use_set) errx(EX_DATAERR, "invalid syntax"); do_set = 1; /* delete set */ av++; @@ -3327,10 +3334,10 @@ ipfw_delete(char *av[]) if (*sep== '-') j = strtol(sep + 1, NULL, 10); av++; - if (co.do_nat) { + if (g_co.do_nat) { exitval = ipfw_delete_nat(i); - } else if (co.do_pipe) { - exitval = ipfw_delete_pipe(co.do_pipe, i); + } else if (g_co.do_pipe) { + exitval = ipfw_delete_pipe(g_co.do_pipe, i); } else { memset(&rt, 0, sizeof(rt)); if (do_set != 0) { @@ -3343,24 +3350,24 @@ ipfw_delete(char *av[]) rt.flags |= IPFW_RCFLAG_ALL; else rt.flags |= IPFW_RCFLAG_RANGE; - if (co.use_set != 0) { - rt.set = co.use_set - 1; + if (g_co.use_set != 0) { + rt.set = g_co.use_set - 1; rt.flags |= IPFW_RCFLAG_SET; } } - if (co.do_dynamic == 2) + if (g_co.do_dynamic == 2) rt.flags |= IPFW_RCFLAG_DYNAMIC; i = do_range_cmd(IP_FW_XDEL, &rt); if (i != 0) { exitval = EX_UNAVAILABLE; - if (co.do_quiet) + if (g_co.do_quiet) continue; warn("rule %u: setsockopt(IP_FW_XDEL)", rt.start_rule); } else if (rt.new_set == 0 && do_set == 0 && - co.do_dynamic != 2) { + g_co.do_dynamic != 2) { exitval = EX_UNAVAILABLE; - if (co.do_quiet) + if (g_co.do_quiet) continue; if (rt.start_rule != rt.end_rule) warnx("no rules rules in %u-%u range", @@ -3371,7 +3378,7 @@ ipfw_delete(char *av[]) } } } - if (exitval != EX_OK && co.do_force == 0) + if (exitval != EX_OK && g_co.do_force == 0) exit(exitval); } @@ -3696,7 +3703,7 @@ add_src(ipfw_insn *cmd, char *av, u_char proto, int cb struct in6_addr a; char *host, *ch, buf[INET6_ADDRSTRLEN]; ipfw_insn *ret = NULL; - int len; + size_t len; /* Copy first address in set if needed */ if ((ch = strpbrk(av, "/,")) != NULL) { @@ -3727,7 +3734,7 @@ add_dst(ipfw_insn *cmd, char *av, u_char proto, int cb struct in6_addr a; char *host, *ch, buf[INET6_ADDRSTRLEN]; ipfw_insn *ret = NULL; - int len; + size_t len; /* Copy first address in set if needed */ if ((ch = strpbrk(av, "/,")) != NULL) { @@ -3764,7 +3771,7 @@ add_dst(ipfw_insn *cmd, char *av, u_char proto, int cb * various match patterns, log/altq actions, and the actual action. * */ -void +static void compile_rule(char *av[], uint32_t *rbuf, int *rbufsize, struct tidx *tstate) { /* @@ -4250,7 +4257,7 @@ chkarg: len = sizeof(c->max_log); if (sysctlbyname("net.inet.ip.fw.verbose_limit", &c->max_log, &len, NULL, 0) == -1) { - if (co.test_only) { + if (g_co.test_only) { c->max_log = 0; break; } @@ -5138,10 +5145,10 @@ done: static int compare_ntlv(const void *_a, const void *_b) { - ipfw_obj_ntlv *a, *b; + const ipfw_obj_ntlv *a, *b; - a = (ipfw_obj_ntlv *)_a; - b = (ipfw_obj_ntlv *)_b; + a = (const ipfw_obj_ntlv *)_a; + b = (const ipfw_obj_ntlv *)_b; if (a->set < b->set) return (-1); @@ -5178,11 +5185,11 @@ struct object_kt { static int compare_object_kntlv(const void *k, const void *v) { - ipfw_obj_ntlv *ntlv; + const ipfw_obj_ntlv *ntlv; struct object_kt key; - key = *((struct object_kt *)k); - ntlv = (ipfw_obj_ntlv *)v; + key = *((const struct object_kt *)k); + ntlv = (const ipfw_obj_ntlv *)v; if (key.uidx < ntlv->idx) return (-1); @@ -5318,14 +5325,14 @@ ipfw_add(char *av[]) if (do_get3(IP_FW_XADD, op3, &sz) != 0) err(EX_UNAVAILABLE, "getsockopt(%s)", "IP_FW_XADD"); - if (!co.do_quiet) { + if (!g_co.do_quiet) { struct format_opts sfo; struct buf_pr bp; memset(&sfo, 0, sizeof(sfo)); sfo.tstate = tstate; sfo.set_mask = (uint32_t)(-1); bp_alloc(&bp, 4096); - show_static_rule(&co, &sfo, &bp, rule, NULL); + show_static_rule(&g_co, &sfo, &bp, rule, NULL); printf("%s", bp.buf); bp_free(&bp); } @@ -5361,7 +5368,7 @@ ipfw_zero(int ac, char *av[], int optname) rt.flags = IPFW_RCFLAG_ALL; if (do_range_cmd(optname, &rt) < 0) err(EX_UNAVAILABLE, "setsockopt(IP_FW_X%s)", name); - if (!co.do_quiet) + if (!g_co.do_quiet) printf("%s.\n", optname == IP_FW_XZERO ? "Accounting cleared":"Logging counts reset"); @@ -5379,8 +5386,8 @@ ipfw_zero(int ac, char *av[], int optname) rt.start_rule = arg; rt.end_rule = arg; rt.flags |= IPFW_RCFLAG_RANGE; - if (co.use_set != 0) { - rt.set = co.use_set - 1; + if (g_co.use_set != 0) { + rt.set = g_co.use_set - 1; rt.flags |= IPFW_RCFLAG_SET; } if (do_range_cmd(optname, &rt) != 0) { @@ -5390,7 +5397,7 @@ ipfw_zero(int ac, char *av[], int optname) } else if (rt.new_set == 0) { printf("Entry %d not found\n", arg); failed = EX_UNAVAILABLE; - } else if (!co.do_quiet) + } else if (!g_co.do_quiet) printf("Entry %d %s.\n", arg, optname == IP_FW_XZERO ? "cleared" : "logging count reset"); @@ -5408,7 +5415,7 @@ ipfw_flush(int force) { ipfw_range_tlv rt; - if (!force && !co.do_quiet) { /* need to ask user */ + if (!force && !g_co.do_quiet) { /* need to ask user */ int c; printf("Are you sure? [yn] "); @@ -5423,21 +5430,21 @@ ipfw_flush(int force) if (c == 'N') /* user said no */ return; } - if (co.do_pipe) { + if (g_co.do_pipe) { dummynet_flush(); return; } /* `ipfw set N flush` - is the same that `ipfw delete set N` */ memset(&rt, 0, sizeof(rt)); - if (co.use_set != 0) { - rt.set = co.use_set - 1; + if (g_co.use_set != 0) { + rt.set = g_co.use_set - 1; rt.flags = IPFW_RCFLAG_SET; } else rt.flags = IPFW_RCFLAG_ALL; if (do_range_cmd(IP_FW_XDEL, &rt) != 0) err(EX_UNAVAILABLE, "setsockopt(IP_FW_XDEL)"); - if (!co.do_quiet) - printf("Flushed all %s.\n", co.do_pipe ? "pipes" : "rules"); + if (!g_co.do_quiet) + printf("Flushed all %s.\n", g_co.do_pipe ? "pipes" : "rules"); } static struct _s_x intcmds[] = { @@ -5473,13 +5480,13 @@ lookup_eaction_name(ipfw_obj_ntlv *ntlv, int cnt, uint } static void -ipfw_list_objects(int ac, char *av[]) +ipfw_list_objects(int ac __unused, char *av[] __unused) { ipfw_obj_lheader req, *olh; ipfw_obj_ntlv *ntlv; const char *name; size_t sz; - int i; + uint32_t i; memset(&req, 0, sizeof(req)); sz = sizeof(req); @@ -5577,10 +5584,10 @@ ipfw_get_tracked_ifaces(ipfw_obj_lheader **polh) static int ifinfo_cmp(const void *a, const void *b) { - ipfw_iface_info *ia, *ib; + const ipfw_iface_info *ia, *ib; - ia = (ipfw_iface_info *)a; - ib = (ipfw_iface_info *)b; + ia = (const ipfw_iface_info *)a; + ib = (const ipfw_iface_info *)b; return (stringnum_cmp(ia->ifname, ib->ifname)); } @@ -5591,11 +5598,12 @@ ifinfo_cmp(const void *a, const void *b) * Returns 0 on success. */ static void -ipfw_list_tifaces() +ipfw_list_tifaces(void) { ipfw_obj_lheader *olh; ipfw_iface_info *info; - int i, error; + uint32_t i; + int error; if ((error = ipfw_get_tracked_ifaces(&olh)) != 0) err(EX_OSERR, "Unable to request ipfw tracked interface list"); Modified: head/sbin/ipfw/ipfw2.h ============================================================================== --- head/sbin/ipfw/ipfw2.h Mon Jul 13 17:20:20 2020 (r363163) +++ head/sbin/ipfw/ipfw2.h Mon Jul 13 17:51:04 2020 (r363164) @@ -51,7 +51,7 @@ struct cmdline_opts { int do_sort; /* field to sort results (0 = no) */ /* valid fields are 1 and above */ - int use_set; /* work with specified set number */ + uint32_t use_set; /* work with specified set number */ /* 0 means all sets, otherwise apply to set use_set - 1 */ }; @@ -62,7 +62,7 @@ enum { TIMESTAMP_NUMERIC, }; -extern struct cmdline_opts co; +extern struct cmdline_opts g_co; /* * _s_x is a structure that stores a string <-> token pairs, used in @@ -331,7 +331,7 @@ struct buf_pr { int pr_u64(struct buf_pr *bp, uint64_t *pd, int width); int bp_alloc(struct buf_pr *b, size_t size); void bp_free(struct buf_pr *b); -int bprintf(struct buf_pr *b, char *format, ...); +int bprintf(struct buf_pr *b, const char *format, ...); /* memory allocation support */ @@ -349,7 +349,7 @@ int match_token_relaxed(struct _s_x *table, const char int get_token(struct _s_x *table, const char *string, const char *errbase); char const *match_value(struct _s_x *p, int value); size_t concat_tokens(char *buf, size_t bufsize, struct _s_x *table, - char *delimiter); + const char *delimiter); int fill_flags(struct _s_x *flags, char *p, char **e, uint32_t *set, uint32_t *clear); void print_flags_buffer(char *buf, size_t sz, struct _s_x *list, uint32_t set); @@ -361,7 +361,7 @@ int do_get3(int optname, struct _ip_fw3_opheader *op3, struct in6_addr; void n2mask(struct in6_addr *mask, int n); -int contigmask(uint8_t *p, int len); +int contigmask(const uint8_t *p, int len); /* * Forward declarations to avoid include way too many headers. @@ -409,7 +409,7 @@ int ipfw_check_nat64prefix(const struct in6_addr *pref /* altq.c */ void altq_set_enabled(int enabled); u_int32_t altq_name_to_qid(const char *name); -void print_altq_cmd(struct buf_pr *bp, struct _ipfw_insn_altq *altqptr); +void print_altq_cmd(struct buf_pr *bp, const struct _ipfw_insn_altq *altqptr); #else #define NO_ALTQ #endif @@ -421,10 +421,10 @@ int ipfw_delete_pipe(int pipe_or_queue, int n); /* ipv6.c */ void print_unreach6_code(struct buf_pr *bp, uint16_t code); -void print_ip6(struct buf_pr *bp, struct _ipfw_insn_ip6 *cmd); -void print_flow6id(struct buf_pr *bp, struct _ipfw_insn_u32 *cmd); -void print_icmp6types(struct buf_pr *bp, struct _ipfw_insn_u32 *cmd); -void print_ext6hdr(struct buf_pr *bp, struct _ipfw_insn *cmd ); +void print_ip6(struct buf_pr *bp, const struct _ipfw_insn_ip6 *cmd); +void print_flow6id(struct buf_pr *bp, const struct _ipfw_insn_u32 *cmd); +void print_icmp6types(struct buf_pr *bp, const struct _ipfw_insn_u32 *cmd); +void print_ext6hdr(struct buf_pr *bp, const struct _ipfw_insn *cmd); struct tidx; struct _ipfw_insn *add_srcip6(struct _ipfw_insn *cmd, char *av, int cblen, Modified: head/sbin/ipfw/ipv6.c ============================================================================== --- head/sbin/ipfw/ipv6.c Mon Jul 13 17:20:20 2020 (r363163) +++ head/sbin/ipfw/ipv6.c Mon Jul 13 17:51:04 2020 (r363164) @@ -85,14 +85,14 @@ print_unreach6_code(struct buf_pr *bp, uint16_t code) * Print the ip address contained in a command. */ void -print_ip6(struct buf_pr *bp, ipfw_insn_ip6 *cmd) +print_ip6(struct buf_pr *bp, const ipfw_insn_ip6 *cmd) { char trad[255]; struct hostent *he = NULL; - struct in6_addr *a = &(cmd->addr6); + const struct in6_addr *a = &(cmd->addr6); int len, mb; - len = F_LEN((ipfw_insn *) cmd) - 1; + len = F_LEN((const ipfw_insn *)cmd) - 1; if (cmd->o.opcode == O_IP6_SRC_ME || cmd->o.opcode == O_IP6_DST_ME) { bprintf(bp, " me6"); return; @@ -112,10 +112,11 @@ print_ip6(struct buf_pr *bp, ipfw_insn_ip6 *cmd) /* mask length */ mb = (cmd->o.opcode == O_IP6_SRC || cmd->o.opcode == O_IP6_DST) ? 128: - contigmask((uint8_t *)&(a[1]), 128); + contigmask((const uint8_t *)&(a[1]), 128); - if (mb == 128 && co.do_resolv) - he = gethostbyaddr((char *)a, sizeof(*a), AF_INET6); + if (mb == 128 && g_co.do_resolv) + he = gethostbyaddr((const char *)a, sizeof(*a), + AF_INET6); if (he != NULL) /* resolved to name */ bprintf(bp, "%s", he->h_name); @@ -142,7 +143,7 @@ fill_icmp6types(ipfw_insn_icmp6 *cmd, char *av, int cb { uint8_t type; - CHECK_LENGTH(cblen, F_INSN_SIZE(ipfw_insn_icmp6)); + CHECK_LENGTH(cblen, (int)F_INSN_SIZE(ipfw_insn_icmp6)); memset(cmd, 0, sizeof(*cmd)); while (*av) { if (*av == ',') @@ -165,7 +166,7 @@ fill_icmp6types(ipfw_insn_icmp6 *cmd, char *av, int cb } void -print_icmp6types(struct buf_pr *bp, ipfw_insn_u32 *cmd) +print_icmp6types(struct buf_pr *bp, const ipfw_insn_u32 *cmd) { int i, j; char sep= ' '; @@ -181,7 +182,7 @@ print_icmp6types(struct buf_pr *bp, ipfw_insn_u32 *cmd } void -print_flow6id(struct buf_pr *bp, ipfw_insn_u32 *cmd) +print_flow6id(struct buf_pr *bp, const ipfw_insn_u32 *cmd) { uint16_t i, limit = cmd->o.arg1; char sep = ','; @@ -257,7 +258,7 @@ fill_ext6hdr( ipfw_insn *cmd, char *av) } void -print_ext6hdr(struct buf_pr *bp, ipfw_insn *cmd ) +print_ext6hdr(struct buf_pr *bp, const ipfw_insn *cmd ) { char sep = ' '; @@ -364,7 +365,8 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, int cblen, stru int masklen; char md = '\0'; - CHECK_LENGTH(cblen, 1 + len + 2 * F_INSN_SIZE(struct in6_addr)); + CHECK_LENGTH(cblen, + 1 + len + 2 * (int)F_INSN_SIZE(struct in6_addr)); if ((q = strchr(av, ',')) ) { *q = '\0'; @@ -453,7 +455,8 @@ fill_flow6( ipfw_insn_u32 *cmd, char *av, int cblen) cmd->d[0] = 0; /* Initializing the base number*/ while (s) { - CHECK_LENGTH(cblen, F_INSN_SIZE(ipfw_insn_u32) + nflow + 1); + CHECK_LENGTH(cblen, + (int)F_INSN_SIZE(ipfw_insn_u32) + nflow + 1); av = strsep( &s, ",") ; type = strtoul(av, &av, 0); Modified: head/sbin/ipfw/main.c ============================================================================== --- head/sbin/ipfw/main.c Mon Jul 13 17:20:20 2020 (r363163) +++ head/sbin/ipfw/main.c Mon Jul 13 17:51:04 2020 (r363164) @@ -226,8 +226,8 @@ ipfw_main(int oldac, char **oldav) av[ac] = NULL; /* Set the force flag for non-interactive processes */ - if (!co.do_force) - co.do_force = !isatty(STDIN_FILENO); + if (!g_co.do_force) + g_co.do_force = !isatty(STDIN_FILENO); #ifdef EMULATE_SYSCTL /* sysctl emulation */ if ( ac >= 2 && !strcmp(av[1], "sysctl")) { @@ -269,20 +269,20 @@ ipfw_main(int oldac, char **oldav) break; case 'b': - co.comment_only = 1; - co.do_compact = 1; + g_co.comment_only = 1; + g_co.do_compact = 1; break; case 'c': - co.do_compact = 1; + g_co.do_compact = 1; break; case 'd': - co.do_dynamic = 1; + g_co.do_dynamic = 1; break; case 'D': - co.do_dynamic = 2; + g_co.do_dynamic = 2; break; case 'e': @@ -290,7 +290,7 @@ ipfw_main(int oldac, char **oldav) break; case 'f': *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon Jul 13 18:19:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A234336CAE3; Mon, 13 Jul 2020 18:19:03 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5Bjz3gd2z4KSt; Mon, 13 Jul 2020 18:19:03 +0000 (UTC) (envelope-from lwhsu@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 62248194B8; Mon, 13 Jul 2020 18:19:03 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06DIJ3CH020799; Mon, 13 Jul 2020 18:19:03 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06DIJ33k020798; Mon, 13 Jul 2020 18:19:03 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202007131819.06DIJ33k020798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Mon, 13 Jul 2020 18:19:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363165 - head/lib/libc/tests/gen X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/lib/libc/tests/gen X-SVN-Commit-Revision: 363165 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 18:19:03 -0000 Author: lwhsu Date: Mon Jul 13 18:19:02 2020 New Revision: 363165 URL: https://svnweb.freebsd.org/changeset/base/363165 Log: Revert r351416 to let lib.libc.gen.getmntinfo_test.getmntinfo_test get more test This is supposed to be fixed by r363068 PR: 240049 Sponsored by: The FreeBSD Foundation Modified: head/lib/libc/tests/gen/getmntinfo_test.c Modified: head/lib/libc/tests/gen/getmntinfo_test.c ============================================================================== --- head/lib/libc/tests/gen/getmntinfo_test.c Mon Jul 13 17:51:04 2020 (r363164) +++ head/lib/libc/tests/gen/getmntinfo_test.c Mon Jul 13 18:19:02 2020 (r363165) @@ -57,9 +57,6 @@ ATF_TC_BODY(getmntinfo_test, tc) int nmnts; struct statfs *mntinfo; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/240049"); - /* Test bogus mode */ nmnts = getmntinfo(&mntinfo, 199); ATF_REQUIRE_MSG(nmnts == 0 && errno == EINVAL, From owner-svn-src-head@freebsd.org Mon Jul 13 19:10:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BA89036E0A6; Mon, 13 Jul 2020 19:10:17 +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 4B5Cs53xCrz4Nhn; Mon, 13 Jul 2020 19:10:17 +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 6A4C719CE9; Mon, 13 Jul 2020 19:10:17 +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 06DJAHCL051918; Mon, 13 Jul 2020 19:10:17 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06DJAG1p051916; Mon, 13 Jul 2020 19:10:16 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007131910.06DJAG1p051916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 13 Jul 2020 19:10:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363166 - head/sbin/ipfw X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sbin/ipfw X-SVN-Commit-Revision: 363166 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 19:10:17 -0000 Author: markj Date: Mon Jul 13 19:10:16 2020 New Revision: 363166 URL: https://svnweb.freebsd.org/changeset/base/363166 Log: ipfw(8): Handle unaligned pointers in pr_u64. struct _ipfw_dyn_rule is defined as packed, and as a result, its uint64_t fields are misaligned on some 32-bit platforms. Since pr_u64() is explicitly supposed to handle this case, avoid using a uint64_t * for the input pointer to make sure that the compiler won't (correctly) warn about the misalignment. Reported by: jenkins MFC with: r363164 Modified: head/sbin/ipfw/ipfw2.c head/sbin/ipfw/ipfw2.h Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Mon Jul 13 18:19:02 2020 (r363165) +++ head/sbin/ipfw/ipfw2.c Mon Jul 13 19:10:16 2020 (r363166) @@ -501,7 +501,7 @@ bprint_uint_arg(struct buf_pr *bp, const char *str, ui * otherwise, return the required width. */ int -pr_u64(struct buf_pr *b, uint64_t *pd, int width) +pr_u64(struct buf_pr *b, void *pd, int width) { #ifdef TCC #define U64_FMT "I64" Modified: head/sbin/ipfw/ipfw2.h ============================================================================== --- head/sbin/ipfw/ipfw2.h Mon Jul 13 18:19:02 2020 (r363165) +++ head/sbin/ipfw/ipfw2.h Mon Jul 13 19:10:16 2020 (r363166) @@ -328,7 +328,7 @@ struct buf_pr { size_t needed; /* length needed */ }; -int pr_u64(struct buf_pr *bp, uint64_t *pd, int width); +int pr_u64(struct buf_pr *bp, void *pd, int width); int bp_alloc(struct buf_pr *b, size_t size); void bp_free(struct buf_pr *b); int bprintf(struct buf_pr *b, const char *format, ...); From owner-svn-src-head@freebsd.org Mon Jul 13 19:15:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A43BE36DF58; Mon, 13 Jul 2020 19:15:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5Cz63ZzZz4P4S; Mon, 13 Jul 2020 19:15:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A2F919FD8; Mon, 13 Jul 2020 19:15:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06DJFUFR057737; Mon, 13 Jul 2020 19:15:30 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06DJFUCZ057736; Mon, 13 Jul 2020 19:15:30 GMT (envelope-from np@FreeBSD.org) Message-Id: <202007131915.06DJFUCZ057736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 13 Jul 2020 19:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363167 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 363167 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 19:15:30 -0000 Author: np Date: Mon Jul 13 19:15:29 2020 New Revision: 363167 URL: https://svnweb.freebsd.org/changeset/base/363167 Log: cxgbev(4): Compare at most 16 bytes of the Ethernet header when trying to coalesce tx work requests. Note that Coverity will still treat this as an out-of-bounds access. We do want to compare 16B starting from ethmacdst but cmp_l2hdr was was going beyond that by 2B. cmp_l2hdr was introduced in r362905. Reported by: Coverity (CID 1430284) Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Mon Jul 13 19:10:16 2020 (r363166) +++ head/sys/dev/cxgbe/t4_sge.c Mon Jul 13 19:15:29 2020 (r363167) @@ -4700,6 +4700,8 @@ csum_to_ctrl(struct adapter *sc, struct mbuf *m) return (ctrl); } +#define VM_TX_L2HDR_LEN 16 /* ethmacdst to vlantci */ + /* * Write a VM txpkt WR for this packet to the hardware descriptors, update the * software descriptor, and advance the pidx. It is guaranteed that enough @@ -4748,7 +4750,7 @@ write_txpkt_vm_wr(struct adapter *sc, struct sge_txq * * conditional. Also, it seems that we do not have to set * vlantci or fake the ethtype when doing VLAN tag insertion. */ - m_copydata(m0, 0, sizeof(struct ether_header) + 2, wr->ethmacdst); + m_copydata(m0, 0, VM_TX_L2HDR_LEN, wr->ethmacdst); if (needs_tso(m0)) { struct cpl_tx_pkt_lso_core *lso = (void *)(wr + 1); @@ -4985,10 +4987,10 @@ cmp_l2hdr(struct txpkts *txp, struct mbuf *m) int len; MPASS(txp->npkt > 0); - MPASS(m->m_len >= 16); /* type1 implies 1 GL with all of the frame. */ + MPASS(m->m_len >= VM_TX_L2HDR_LEN); if (txp->ethtype == be16toh(ETHERTYPE_VLAN)) - len = sizeof(struct ether_vlan_header); + len = VM_TX_L2HDR_LEN; else len = sizeof(struct ether_header); @@ -4998,9 +5000,9 @@ cmp_l2hdr(struct txpkts *txp, struct mbuf *m) static inline void save_l2hdr(struct txpkts *txp, struct mbuf *m) { - MPASS(m->m_len >= 16); /* type1 implies 1 GL with all of the frame. */ + MPASS(m->m_len >= VM_TX_L2HDR_LEN); - memcpy(&txp->ethmacdst[0], mtod(m, const void *), 16); + memcpy(&txp->ethmacdst[0], mtod(m, const void *), VM_TX_L2HDR_LEN); } static int From owner-svn-src-head@freebsd.org Tue Jul 14 00:46:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B5C03774E2; Tue, 14 Jul 2020 00:46:21 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5MJr680Qz3Wv9; Tue, 14 Jul 2020 00:46:20 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B59CF1DA67; Tue, 14 Jul 2020 00:46:20 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06E0kK9c060106; Tue, 14 Jul 2020 00:46:20 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06E0kKlu060105; Tue, 14 Jul 2020 00:46:20 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202007140046.06E0kKlu060105@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 14 Jul 2020 00:46:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363169 - head/usr.sbin/periodic/etc/daily X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/usr.sbin/periodic/etc/daily X-SVN-Commit-Revision: 363169 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 00:46:21 -0000 Author: allanjude Date: Tue Jul 14 00:46:20 2020 New Revision: 363169 URL: https://svnweb.freebsd.org/changeset/base/363169 Log: Actually install the new 221.backup-gpart periodic script Submitted by: Rob Fairbanks Reported by: Michael Butler MFC with: r363110 Sponsored by: Klara Inc. Modified: head/usr.sbin/periodic/etc/daily/Makefile Modified: head/usr.sbin/periodic/etc/daily/Makefile ============================================================================== --- head/usr.sbin/periodic/etc/daily/Makefile Mon Jul 13 19:28:10 2020 (r363168) +++ head/usr.sbin/periodic/etc/daily/Makefile Tue Jul 14 00:46:20 2020 (r363169) @@ -10,6 +10,7 @@ CONFS= 100.clean-disks \ 140.clean-rwho \ 200.backup-passwd \ 210.backup-aliases \ + 221.backup-gpart \ 330.news \ 400.status-disks \ 401.status-graid \ From owner-svn-src-head@freebsd.org Tue Jul 14 01:54:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7072A350DF9; Tue, 14 Jul 2020 01:54:25 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5NqP2dQgz3byY; Tue, 14 Jul 2020 01:54:25 +0000 (UTC) (envelope-from jkim@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 3C47A1E7D4; Tue, 14 Jul 2020 01:54:25 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06E1sP7C003431; Tue, 14 Jul 2020 01:54:25 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06E1sOjN003426; Tue, 14 Jul 2020 01:54:24 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202007140154.06E1sOjN003426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 14 Jul 2020 01:54:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363170 - in head: contrib/byacc contrib/byacc/package contrib/byacc/package/debian contrib/byacc/package/pkgsrc contrib/byacc/test contrib/byacc/test/btyacc contrib/byacc/test/yacc usr... X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head: contrib/byacc contrib/byacc/package contrib/byacc/package/debian contrib/byacc/package/pkgsrc contrib/byacc/test contrib/byacc/test/btyacc contrib/byacc/test/yacc usr.bin/yacc usr.bin/yacc/te... X-SVN-Commit-Revision: 363170 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 01:54:25 -0000 Author: jkim Date: Tue Jul 14 01:54:24 2020 New Revision: 363170 URL: https://svnweb.freebsd.org/changeset/base/363170 Log: MFV: r362513 Update byacc to 20200330. Added: head/contrib/byacc/test/btyacc/calc_code_all.error - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/calc_code_all.error head/contrib/byacc/test/btyacc/calc_code_all.output - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/calc_code_all.output head/contrib/byacc/test/btyacc/calc_code_all.tab.c - copied, changed from r362513, vendor/byacc/dist/test/btyacc/calc_code_all.tab.c head/contrib/byacc/test/btyacc/calc_code_all.tab.h - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/calc_code_all.tab.h head/contrib/byacc/test/btyacc/calc_code_default.error - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/calc_code_default.error head/contrib/byacc/test/btyacc/calc_code_default.output - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/calc_code_default.output head/contrib/byacc/test/btyacc/calc_code_default.tab.c - copied, changed from r362513, vendor/byacc/dist/test/btyacc/calc_code_default.tab.c head/contrib/byacc/test/btyacc/calc_code_default.tab.h - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/calc_code_default.tab.h head/contrib/byacc/test/btyacc/calc_code_imports.error - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/calc_code_imports.error head/contrib/byacc/test/btyacc/calc_code_imports.output - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/calc_code_imports.output head/contrib/byacc/test/btyacc/calc_code_imports.tab.c - copied, changed from r362513, vendor/byacc/dist/test/btyacc/calc_code_imports.tab.c head/contrib/byacc/test/btyacc/calc_code_imports.tab.h - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/calc_code_imports.tab.h head/contrib/byacc/test/btyacc/calc_code_provides.error - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/calc_code_provides.error head/contrib/byacc/test/btyacc/calc_code_provides.output - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/calc_code_provides.output head/contrib/byacc/test/btyacc/calc_code_provides.tab.c - copied, changed from r362513, vendor/byacc/dist/test/btyacc/calc_code_provides.tab.c head/contrib/byacc/test/btyacc/calc_code_provides.tab.h - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/calc_code_provides.tab.h head/contrib/byacc/test/btyacc/calc_code_requires.error - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/calc_code_requires.error head/contrib/byacc/test/btyacc/calc_code_requires.output - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/calc_code_requires.output head/contrib/byacc/test/btyacc/calc_code_requires.tab.c - copied, changed from r362513, vendor/byacc/dist/test/btyacc/calc_code_requires.tab.c head/contrib/byacc/test/btyacc/calc_code_requires.tab.h - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/calc_code_requires.tab.h head/contrib/byacc/test/btyacc/calc_code_top.error - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/calc_code_top.error head/contrib/byacc/test/btyacc/calc_code_top.output - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/calc_code_top.output head/contrib/byacc/test/btyacc/calc_code_top.tab.c - copied, changed from r362513, vendor/byacc/dist/test/btyacc/calc_code_top.tab.c head/contrib/byacc/test/btyacc/calc_code_top.tab.h - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/calc_code_top.tab.h head/contrib/byacc/test/btyacc/defines1.calc.c - copied, changed from r362513, vendor/byacc/dist/test/btyacc/defines1.calc.c head/contrib/byacc/test/btyacc/defines1.calc.h - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/defines1.calc.h head/contrib/byacc/test/btyacc/defines1.error - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/defines1.error head/contrib/byacc/test/btyacc/defines1.output - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/defines1.output head/contrib/byacc/test/btyacc/defines2.calc.c - copied, changed from r362513, vendor/byacc/dist/test/btyacc/defines2.calc.c head/contrib/byacc/test/btyacc/defines2.calc.h - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/defines2.calc.h head/contrib/byacc/test/btyacc/defines2.error - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/defines2.error head/contrib/byacc/test/btyacc/defines2.output - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/defines2.output head/contrib/byacc/test/btyacc/defines3.calc.c - copied, changed from r362513, vendor/byacc/dist/test/btyacc/defines3.calc.c head/contrib/byacc/test/btyacc/defines3.calc.h - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/defines3.calc.h head/contrib/byacc/test/btyacc/defines3.error - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/defines3.error head/contrib/byacc/test/btyacc/defines3.output - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/defines3.output head/contrib/byacc/test/btyacc/stdin1.calc.c - copied, changed from r362513, vendor/byacc/dist/test/btyacc/stdin1.calc.c head/contrib/byacc/test/btyacc/stdin1.error - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/stdin1.error head/contrib/byacc/test/btyacc/stdin1.output - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/stdin1.output head/contrib/byacc/test/btyacc/stdin2.calc.c - copied, changed from r362513, vendor/byacc/dist/test/btyacc/stdin2.calc.c head/contrib/byacc/test/btyacc/stdin2.error - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/stdin2.error head/contrib/byacc/test/btyacc/stdin2.output - copied unchanged from r362513, vendor/byacc/dist/test/btyacc/stdin2.output head/contrib/byacc/test/calc.tab.c - copied unchanged from r362513, vendor/byacc/dist/test/calc.tab.c head/contrib/byacc/test/calc_code_all.y - copied unchanged from r362513, vendor/byacc/dist/test/calc_code_all.y head/contrib/byacc/test/calc_code_default.y - copied unchanged from r362513, vendor/byacc/dist/test/calc_code_default.y head/contrib/byacc/test/calc_code_imports.y - copied unchanged from r362513, vendor/byacc/dist/test/calc_code_imports.y head/contrib/byacc/test/calc_code_provides.y - copied unchanged from r362513, vendor/byacc/dist/test/calc_code_provides.y head/contrib/byacc/test/calc_code_requires.y - copied unchanged from r362513, vendor/byacc/dist/test/calc_code_requires.y head/contrib/byacc/test/calc_code_top.y - copied unchanged from r362513, vendor/byacc/dist/test/calc_code_top.y head/contrib/byacc/test/yacc/calc_code_all.error - copied unchanged from r362513, vendor/byacc/dist/test/yacc/calc_code_all.error head/contrib/byacc/test/yacc/calc_code_all.output - copied unchanged from r362513, vendor/byacc/dist/test/yacc/calc_code_all.output head/contrib/byacc/test/yacc/calc_code_all.tab.c - copied, changed from r362513, vendor/byacc/dist/test/yacc/calc_code_all.tab.c head/contrib/byacc/test/yacc/calc_code_all.tab.h - copied unchanged from r362513, vendor/byacc/dist/test/yacc/calc_code_all.tab.h head/contrib/byacc/test/yacc/calc_code_default.error - copied unchanged from r362513, vendor/byacc/dist/test/yacc/calc_code_default.error head/contrib/byacc/test/yacc/calc_code_default.output - copied unchanged from r362513, vendor/byacc/dist/test/yacc/calc_code_default.output head/contrib/byacc/test/yacc/calc_code_default.tab.c - copied, changed from r362513, vendor/byacc/dist/test/yacc/calc_code_default.tab.c head/contrib/byacc/test/yacc/calc_code_default.tab.h - copied unchanged from r362513, vendor/byacc/dist/test/yacc/calc_code_default.tab.h head/contrib/byacc/test/yacc/calc_code_imports.error - copied unchanged from r362513, vendor/byacc/dist/test/yacc/calc_code_imports.error head/contrib/byacc/test/yacc/calc_code_imports.output - copied unchanged from r362513, vendor/byacc/dist/test/yacc/calc_code_imports.output head/contrib/byacc/test/yacc/calc_code_imports.tab.c - copied, changed from r362513, vendor/byacc/dist/test/yacc/calc_code_imports.tab.c head/contrib/byacc/test/yacc/calc_code_imports.tab.h - copied unchanged from r362513, vendor/byacc/dist/test/yacc/calc_code_imports.tab.h head/contrib/byacc/test/yacc/calc_code_provides.error - copied unchanged from r362513, vendor/byacc/dist/test/yacc/calc_code_provides.error head/contrib/byacc/test/yacc/calc_code_provides.output - copied unchanged from r362513, vendor/byacc/dist/test/yacc/calc_code_provides.output head/contrib/byacc/test/yacc/calc_code_provides.tab.c - copied, changed from r362513, vendor/byacc/dist/test/yacc/calc_code_provides.tab.c head/contrib/byacc/test/yacc/calc_code_provides.tab.h - copied unchanged from r362513, vendor/byacc/dist/test/yacc/calc_code_provides.tab.h head/contrib/byacc/test/yacc/calc_code_requires.error - copied unchanged from r362513, vendor/byacc/dist/test/yacc/calc_code_requires.error head/contrib/byacc/test/yacc/calc_code_requires.output - copied unchanged from r362513, vendor/byacc/dist/test/yacc/calc_code_requires.output head/contrib/byacc/test/yacc/calc_code_requires.tab.c - copied, changed from r362513, vendor/byacc/dist/test/yacc/calc_code_requires.tab.c head/contrib/byacc/test/yacc/calc_code_requires.tab.h - copied unchanged from r362513, vendor/byacc/dist/test/yacc/calc_code_requires.tab.h head/contrib/byacc/test/yacc/calc_code_top.error - copied unchanged from r362513, vendor/byacc/dist/test/yacc/calc_code_top.error head/contrib/byacc/test/yacc/calc_code_top.output - copied unchanged from r362513, vendor/byacc/dist/test/yacc/calc_code_top.output head/contrib/byacc/test/yacc/calc_code_top.tab.c - copied, changed from r362513, vendor/byacc/dist/test/yacc/calc_code_top.tab.c head/contrib/byacc/test/yacc/calc_code_top.tab.h - copied unchanged from r362513, vendor/byacc/dist/test/yacc/calc_code_top.tab.h head/contrib/byacc/test/yacc/defines1.calc.c - copied, changed from r362513, vendor/byacc/dist/test/yacc/defines1.calc.c head/contrib/byacc/test/yacc/defines1.calc.h - copied unchanged from r362513, vendor/byacc/dist/test/yacc/defines1.calc.h head/contrib/byacc/test/yacc/defines1.error - copied unchanged from r362513, vendor/byacc/dist/test/yacc/defines1.error head/contrib/byacc/test/yacc/defines1.output - copied unchanged from r362513, vendor/byacc/dist/test/yacc/defines1.output head/contrib/byacc/test/yacc/defines2.calc.c - copied, changed from r362513, vendor/byacc/dist/test/yacc/defines2.calc.c head/contrib/byacc/test/yacc/defines2.calc.h - copied unchanged from r362513, vendor/byacc/dist/test/yacc/defines2.calc.h head/contrib/byacc/test/yacc/defines2.error - copied unchanged from r362513, vendor/byacc/dist/test/yacc/defines2.error head/contrib/byacc/test/yacc/defines2.output - copied unchanged from r362513, vendor/byacc/dist/test/yacc/defines2.output head/contrib/byacc/test/yacc/defines3.calc.c - copied, changed from r362513, vendor/byacc/dist/test/yacc/defines3.calc.c head/contrib/byacc/test/yacc/defines3.calc.h - copied unchanged from r362513, vendor/byacc/dist/test/yacc/defines3.calc.h head/contrib/byacc/test/yacc/defines3.error - copied unchanged from r362513, vendor/byacc/dist/test/yacc/defines3.error head/contrib/byacc/test/yacc/defines3.output - copied unchanged from r362513, vendor/byacc/dist/test/yacc/defines3.output head/contrib/byacc/test/yacc/stdin1.calc.c - copied, changed from r362513, vendor/byacc/dist/test/yacc/stdin1.calc.c head/contrib/byacc/test/yacc/stdin1.error - copied unchanged from r362513, vendor/byacc/dist/test/yacc/stdin1.error head/contrib/byacc/test/yacc/stdin1.output - copied unchanged from r362513, vendor/byacc/dist/test/yacc/stdin1.output head/contrib/byacc/test/yacc/stdin2.calc.c - copied, changed from r362513, vendor/byacc/dist/test/yacc/stdin2.calc.c head/contrib/byacc/test/yacc/stdin2.error - copied unchanged from r362513, vendor/byacc/dist/test/yacc/stdin2.error head/contrib/byacc/test/yacc/stdin2.output - copied unchanged from r362513, vendor/byacc/dist/test/yacc/stdin2.output head/usr.bin/yacc/config.h (contents, props changed) Deleted: head/contrib/byacc/test/btyacc/btyacc_demo2.error head/contrib/byacc/test/btyacc/btyacc_demo2.output head/contrib/byacc/test/btyacc/btyacc_demo2.tab.c head/contrib/byacc/test/btyacc/btyacc_demo2.tab.h head/contrib/byacc/test/btyacc/code_debug.c head/contrib/byacc/test/btyacc/code_debug.error head/contrib/byacc/test/btyacc/code_debug.h head/contrib/byacc/test/btyacc/code_debug.i head/contrib/byacc/test/btyacc/code_debug.output Modified: head/contrib/byacc/CHANGES head/contrib/byacc/MANIFEST head/contrib/byacc/VERSION head/contrib/byacc/aclocal.m4 head/contrib/byacc/btyaccpar.c head/contrib/byacc/btyaccpar.skel head/contrib/byacc/config.guess head/contrib/byacc/config.sub head/contrib/byacc/config_h.in head/contrib/byacc/configure head/contrib/byacc/configure.in head/contrib/byacc/defs.h head/contrib/byacc/main.c head/contrib/byacc/mkpar.c head/contrib/byacc/mstring.c head/contrib/byacc/output.c head/contrib/byacc/package/byacc.spec head/contrib/byacc/package/debian/changelog head/contrib/byacc/package/debian/control head/contrib/byacc/package/debian/copyright head/contrib/byacc/package/debian/rules head/contrib/byacc/package/debian/watch head/contrib/byacc/package/mingw-byacc.spec head/contrib/byacc/package/pkgsrc/Makefile head/contrib/byacc/reader.c head/contrib/byacc/test/btyacc/big_b.error head/contrib/byacc/test/btyacc/big_b.output head/contrib/byacc/test/btyacc/big_l.error head/contrib/byacc/test/btyacc/big_l.output head/contrib/byacc/test/btyacc/btyacc_calc1.tab.c head/contrib/byacc/test/btyacc/btyacc_calc1.tab.h head/contrib/byacc/test/btyacc/btyacc_demo.tab.c head/contrib/byacc/test/btyacc/btyacc_demo.tab.h head/contrib/byacc/test/btyacc/btyacc_destroy1.tab.c head/contrib/byacc/test/btyacc/btyacc_destroy2.tab.c head/contrib/byacc/test/btyacc/btyacc_destroy3.tab.c head/contrib/byacc/test/btyacc/calc.tab.c head/contrib/byacc/test/btyacc/calc1.tab.c head/contrib/byacc/test/btyacc/calc2.tab.c head/contrib/byacc/test/btyacc/calc3.tab.c head/contrib/byacc/test/btyacc/code_calc.code.c head/contrib/byacc/test/btyacc/code_calc.tab.c head/contrib/byacc/test/btyacc/code_error.code.c head/contrib/byacc/test/btyacc/code_error.tab.c head/contrib/byacc/test/btyacc/empty.tab.c head/contrib/byacc/test/btyacc/err_inherit3.tab.c head/contrib/byacc/test/btyacc/err_inherit4.tab.c head/contrib/byacc/test/btyacc/err_inherit4.tab.h head/contrib/byacc/test/btyacc/err_syntax10.tab.c head/contrib/byacc/test/btyacc/err_syntax11.tab.c head/contrib/byacc/test/btyacc/err_syntax12.tab.c head/contrib/byacc/test/btyacc/err_syntax18.tab.c head/contrib/byacc/test/btyacc/err_syntax20.tab.c head/contrib/byacc/test/btyacc/error.tab.c head/contrib/byacc/test/btyacc/expr.oxout.tab.c head/contrib/byacc/test/btyacc/grammar.tab.c head/contrib/byacc/test/btyacc/help.error head/contrib/byacc/test/btyacc/help.output head/contrib/byacc/test/btyacc/inherit0.tab.c head/contrib/byacc/test/btyacc/inherit1.tab.c head/contrib/byacc/test/btyacc/inherit2.tab.c head/contrib/byacc/test/btyacc/no_b_opt.error head/contrib/byacc/test/btyacc/no_b_opt.output head/contrib/byacc/test/btyacc/no_b_opt1.error head/contrib/byacc/test/btyacc/no_b_opt1.output head/contrib/byacc/test/btyacc/no_code_c.error head/contrib/byacc/test/btyacc/no_code_c.output head/contrib/byacc/test/btyacc/no_defines.error head/contrib/byacc/test/btyacc/no_defines.output head/contrib/byacc/test/btyacc/no_graph.error head/contrib/byacc/test/btyacc/no_graph.output head/contrib/byacc/test/btyacc/no_include.error head/contrib/byacc/test/btyacc/no_include.output head/contrib/byacc/test/btyacc/no_opts.error head/contrib/byacc/test/btyacc/no_opts.output head/contrib/byacc/test/btyacc/no_output.error head/contrib/byacc/test/btyacc/no_output.output head/contrib/byacc/test/btyacc/no_output1.error head/contrib/byacc/test/btyacc/no_output1.output head/contrib/byacc/test/btyacc/no_output2.error head/contrib/byacc/test/btyacc/no_output2.output head/contrib/byacc/test/btyacc/no_p_opt.error head/contrib/byacc/test/btyacc/no_p_opt.output head/contrib/byacc/test/btyacc/no_p_opt1.error head/contrib/byacc/test/btyacc/no_p_opt1.output head/contrib/byacc/test/btyacc/no_verbose.error head/contrib/byacc/test/btyacc/no_verbose.output head/contrib/byacc/test/btyacc/nostdin.error head/contrib/byacc/test/btyacc/nostdin.output head/contrib/byacc/test/btyacc/ok_syntax1.tab.c head/contrib/byacc/test/btyacc/ok_syntax1.tab.h head/contrib/byacc/test/btyacc/pure_calc.tab.c head/contrib/byacc/test/btyacc/pure_error.tab.c head/contrib/byacc/test/btyacc/quote_calc-s.tab.c head/contrib/byacc/test/btyacc/quote_calc.tab.c head/contrib/byacc/test/btyacc/quote_calc2-s.tab.c head/contrib/byacc/test/btyacc/quote_calc2.tab.c head/contrib/byacc/test/btyacc/quote_calc3-s.tab.c head/contrib/byacc/test/btyacc/quote_calc3.tab.c head/contrib/byacc/test/btyacc/quote_calc4-s.tab.c head/contrib/byacc/test/btyacc/quote_calc4.tab.c head/contrib/byacc/test/btyacc/rename_debug.c head/contrib/byacc/test/btyacc/rename_debug.i head/contrib/byacc/test/btyacc/varsyntax_calc1.tab.c head/contrib/byacc/test/grammar.y head/contrib/byacc/test/run_make.sh head/contrib/byacc/test/run_test.sh head/contrib/byacc/test/yacc/big_b.error head/contrib/byacc/test/yacc/big_b.output head/contrib/byacc/test/yacc/big_l.error head/contrib/byacc/test/yacc/big_l.output head/contrib/byacc/test/yacc/calc.tab.c head/contrib/byacc/test/yacc/calc1.tab.c head/contrib/byacc/test/yacc/calc2.tab.c head/contrib/byacc/test/yacc/calc3.tab.c head/contrib/byacc/test/yacc/code_calc.code.c head/contrib/byacc/test/yacc/code_error.code.c head/contrib/byacc/test/yacc/empty.tab.c head/contrib/byacc/test/yacc/err_syntax10.tab.c head/contrib/byacc/test/yacc/err_syntax11.tab.c head/contrib/byacc/test/yacc/err_syntax12.tab.c head/contrib/byacc/test/yacc/err_syntax18.tab.c head/contrib/byacc/test/yacc/err_syntax20.tab.c head/contrib/byacc/test/yacc/error.tab.c head/contrib/byacc/test/yacc/expr.oxout.tab.c head/contrib/byacc/test/yacc/grammar.tab.c head/contrib/byacc/test/yacc/help.error head/contrib/byacc/test/yacc/help.output head/contrib/byacc/test/yacc/no_b_opt.error head/contrib/byacc/test/yacc/no_b_opt.output head/contrib/byacc/test/yacc/no_b_opt1.error head/contrib/byacc/test/yacc/no_b_opt1.output head/contrib/byacc/test/yacc/no_code_c.error head/contrib/byacc/test/yacc/no_code_c.output head/contrib/byacc/test/yacc/no_defines.error head/contrib/byacc/test/yacc/no_defines.output head/contrib/byacc/test/yacc/no_graph.error head/contrib/byacc/test/yacc/no_graph.output head/contrib/byacc/test/yacc/no_include.error head/contrib/byacc/test/yacc/no_include.output head/contrib/byacc/test/yacc/no_opts.error head/contrib/byacc/test/yacc/no_opts.output head/contrib/byacc/test/yacc/no_output.error head/contrib/byacc/test/yacc/no_output.output head/contrib/byacc/test/yacc/no_output1.error head/contrib/byacc/test/yacc/no_output1.output head/contrib/byacc/test/yacc/no_output2.error head/contrib/byacc/test/yacc/no_output2.output head/contrib/byacc/test/yacc/no_p_opt.error head/contrib/byacc/test/yacc/no_p_opt.output head/contrib/byacc/test/yacc/no_p_opt1.error head/contrib/byacc/test/yacc/no_p_opt1.output head/contrib/byacc/test/yacc/no_verbose.error head/contrib/byacc/test/yacc/no_verbose.output head/contrib/byacc/test/yacc/nostdin.error head/contrib/byacc/test/yacc/nostdin.output head/contrib/byacc/test/yacc/ok_syntax1.tab.c head/contrib/byacc/test/yacc/ok_syntax1.tab.h head/contrib/byacc/test/yacc/pure_calc.tab.c head/contrib/byacc/test/yacc/pure_error.tab.c head/contrib/byacc/test/yacc/quote_calc-s.tab.c head/contrib/byacc/test/yacc/quote_calc.tab.c head/contrib/byacc/test/yacc/quote_calc2-s.tab.c head/contrib/byacc/test/yacc/quote_calc2.tab.c head/contrib/byacc/test/yacc/quote_calc3-s.tab.c head/contrib/byacc/test/yacc/quote_calc3.tab.c head/contrib/byacc/test/yacc/quote_calc4-s.tab.c head/contrib/byacc/test/yacc/quote_calc4.tab.c head/contrib/byacc/test/yacc/rename_debug.c head/contrib/byacc/test/yacc/rename_debug.i head/contrib/byacc/test/yacc/varsyntax_calc1.tab.c head/contrib/byacc/yacc.1 head/contrib/byacc/yaccpar.c head/contrib/byacc/yaccpar.skel head/usr.bin/yacc/Makefile head/usr.bin/yacc/tests/Makefile Directory Properties: head/contrib/byacc/ (props changed) Modified: head/contrib/byacc/CHANGES ============================================================================== --- head/contrib/byacc/CHANGES Tue Jul 14 00:46:20 2020 (r363169) +++ head/contrib/byacc/CHANGES Tue Jul 14 01:54:24 2020 (r363170) @@ -1,3 +1,423 @@ +2020-03-30 Thomas E. Dickey + + * package/debian/copyright: bump + + * test/yacc/grammar.tab.c, test/btyacc/grammar.tab.c, test/grammar.y, reader.c: + typo found with codespell + + * yacc.1: fixes noted in the original report, overlooked in followup + +2020-03-30 Bjarni.Ingi.Gislason + + * yacc.1: typography/spelling fixes - Debian #955175 + +2020-03-30 Thomas E. Dickey + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2020-03-10 Thomas E. Dickey + + * configure: regen + + * aclocal.m4: + resync with my-autoconf, mostly fixes for compiler-warnings + + * configure.in: use macro to suppress X-dependency from newer macros + +2019-12-20 Thomas E. Dickey + + * config.guess: 2019-12-21 + +2019-11-25 Tom.Shields + + * main.c: + fix an inconsistency between the getopt and non-getopt configuration. + In the former, getopt always used "yacc", not the name of the executable. + +2019-11-25 Thomas E. Dickey + + * test/run_make.sh: + suppress bison's -Wyacc warning, which is not useful. + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2019-11-19 Thomas E. Dickey + + * yacc.1: new version of manpage + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + + * yacc.1: document %code + + * test/btyacc/calc_code_all.error, test/btyacc/calc_code_all.output, test/btyacc/calc_code_all.tab.c, test/btyacc/calc_code_all.tab.h, test/btyacc/calc_code_default.error, test/btyacc/calc_code_default.output, test/btyacc/calc_code_default.tab.c, test/btyacc/calc_code_default.tab.h, test/btyacc/calc_code_imports.error, test/btyacc/calc_code_imports.output, test/btyacc/calc_code_imports.tab.c, test/btyacc/calc_code_imports.tab.h, test/btyacc/calc_code_provides.error, test/btyacc/calc_code_provides.output, test/btyacc/calc_code_provides.tab.c, test/btyacc/calc_code_provides.tab.h, test/btyacc/calc_code_requires.error, test/btyacc/calc_code_requires.output, test/btyacc/calc_code_requires.tab.c, test/btyacc/calc_code_requires.tab.h, test/btyacc/calc_code_top.error, test/btyacc/calc_code_top.output, test/btyacc/calc_code_top.tab.c, test/btyacc/calc_code_top.tab.h, test/yacc/calc_code_all.tab.c, test/yacc/calc_code_all.tab.h, test/yacc/calc_code_default.tab.c, test/yacc/calc_code_provide s.tab.c, test/yacc/calc_code_provides.tab.h, test/yacc/calc_code_requires.tab.c, test/yacc/calc_code_requires.tab.h, test/yacc/calc_code_top.tab.c: + RCS_BASE + + * output.c: + amend updates for 'outline' when processing "%code" in code-file + + * output.c: + modify output_code_lines() to show begin/end block comments which were in + reader.c, and to generate a #line for the code-file. + + * reader.c: + modify copy_code() to allow for multiple %code directives for a given + section, recording the input line-number for each directive as a #line + in the resulting string. remove the block start/end comments, since those + will be done for a whole section in output.c + + * mstring.c, defs.h: add msrenew() + + * test/yacc/calc_code_all.error, test/yacc/calc_code_all.output, test/yacc/calc_code_default.error, test/yacc/calc_code_default.output, test/yacc/calc_code_default.tab.h, test/yacc/calc_code_imports.error, test/yacc/calc_code_imports.output, test/yacc/calc_code_imports.tab.c, test/yacc/calc_code_imports.tab.h, test/yacc/calc_code_provides.error, test/yacc/calc_code_provides.output, test/yacc/calc_code_requires.error, test/yacc/calc_code_requires.output, test/yacc/calc_code_top.error, test/yacc/calc_code_top.output, test/yacc/calc_code_top.tab.h: + RCS_BASE + +2019-11-18 Thomas E. Dickey + + * test/calc_code_imports.y, test/calc_code_all.y, test/calc_code_default.y, test/calc_code_top.y, test/calc_code_provides.y, test/calc_code_requires.y: + RCS_BASE + +2019-11-04 Michael.Forney + + * defs.h: add missing "extern" for new variable "code_lines" + +2019-11-03 Thomas E. Dickey + + * main.c: build-fix for MinGW cross-compiling + + * output.c, reader.c: gcc-warnings + + * output.c: check validity of text_file before rewind + remove redundant check of iflag + + * main.c: fix memory-leak reported by clang + + * mkpar.c: guard against a null-reference reported by clang (unlikely) + + * reader.c: fix two coverity warnings: + a) resource leak on malloc-failure + b) possible null-pointer dereference on parse-error + + * test/btyacc/err_inherit4.tab.h, test/btyacc/btyacc_demo.tab.h: regen + + * defs.h: use enum's to simplify recent change + + * mstring.c: + enable mstring() in regular byacc, since Zoulas' change relies upon it + +2019-11-03 Christos.Zoulas + + * defs.h, reader.c, output.c: add support for bison's "%code" feature + also fix a small bug: declare YYLTYPE externally when producing locations + +2019-11-03 Thomas E. Dickey + + * test/btyacc/help.error, test/btyacc/no_b_opt.error, test/btyacc/no_output2.error, test/btyacc/no_p_opt.error, test/yacc/help.error, test/yacc/no_b_opt.error, test/yacc/no_output2.error, test/yacc/no_p_opt.error: + regen + + * test/run_test.sh: + there's no standard wording for the options-errors from getopt; + filter that to "error message" in the test reference files. + + * main.c: + provide for using getopt(), to accommodate a case where developers have + relied upon non-POSIX behavior. + + * test/run_test.sh: + getopt's messages do not print the full pathname of yacc in some cases; + adjust the sed-script which changes those to "YACC" + + * configure: regen + + * config_h.in: regen, using autoheader-252 + + * configure.in: add configure check for getopt + + * configure: regen + + * aclocal.m4: + resync with my-autoconf adds a fix which accommodates a difference in + warning options between gcc/clang when --enable-warnings is not set. + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2019-09-11 Thomas E. Dickey + + * config.guess, config.sub: 2019-09-10 + +2019-06-17 Thomas E. Dickey + + * test/btyacc/big_b.error, test/btyacc/big_l.error, test/btyacc/help.error, test/btyacc/no_b_opt.error, test/btyacc/no_output2.error, test/btyacc/no_p_opt.error, test/btyacc/nostdin.error, test/yacc/big_b.error, test/yacc/big_l.error, test/yacc/help.error, test/yacc/no_b_opt.error, test/yacc/no_output2.error, test/yacc/no_p_opt.error, test/yacc/nostdin.error: + regen + + * test/run_test.sh: test "-H" rather than "-D" + +2019-06-16 Thomas E. Dickey + + * main.c, yacc.1: + change "-D" option to "-H" (discussion with Ethan Sommer) + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + + * test/btyacc/defines1.calc.c, test/btyacc/defines2.calc.c, test/btyacc/defines3.calc.c: + RCS_BASE + + * test/run_test.sh: in test_defines, save the ".c" file too + + * test/yacc/defines3.calc.c, test/yacc/defines2.calc.c, test/yacc/defines1.calc.c: + RCS_BASE + + * test/run_test.sh: + output of test_defines should be a header ".h", not ".c" + + * test/btyacc/defines1.calc.h, test/btyacc/defines1.error, test/btyacc/defines1.output, test/btyacc/defines2.calc.h, test/btyacc/defines2.error, test/btyacc/defines2.output, test/btyacc/defines3.calc.h, test/btyacc/defines3.error, test/btyacc/defines3.output: + RCS_BASE + + * main.c: however, a subsequent -d cancels -D + + * test/yacc/defines1.calc.h, test/yacc/defines3.calc.h: RCS_BASE + + * main.c: -D option implies -d + + * test/yacc/defines1.error, test/yacc/defines1.output, test/yacc/defines2.calc.h, test/yacc/defines2.error, test/yacc/defines2.output, test/yacc/defines3.error, test/yacc/defines3.output: + RCS_BASE + + * yacc.1: align macro definitions with my other manpages + + * test/run_test.sh: add test for -D after -d or -b options + + * test/btyacc/stdin1.calc.c, test/btyacc/stdin1.error, test/btyacc/stdin1.output, test/btyacc/stdin2.calc.c, test/btyacc/stdin2.error, test/btyacc/stdin2.output: + RCS_BASE + + * test/btyacc/big_b.error, test/btyacc/big_b.output, test/btyacc/big_l.error, test/btyacc/big_l.output, test/btyacc/help.error, test/btyacc/help.output, test/btyacc/no_b_opt.error, test/btyacc/no_b_opt.output, test/btyacc/no_b_opt1.error, test/btyacc/no_b_opt1.output, test/btyacc/no_code_c.error, test/btyacc/no_code_c.output, test/btyacc/no_defines.error, test/btyacc/no_defines.output, test/btyacc/no_graph.error, test/btyacc/no_graph.output, test/btyacc/no_include.error, test/btyacc/no_include.output, test/btyacc/no_opts.error, test/btyacc/no_opts.output, test/btyacc/no_output.error, test/btyacc/no_output.output, test/btyacc/no_output1.error, test/btyacc/no_output1.output, test/btyacc/no_output2.error, test/btyacc/no_output2.output, test/btyacc/no_p_opt.error, test/btyacc/no_p_opt.output, test/btyacc/no_p_opt1.error, test/btyacc/no_p_opt1.output, test/btyacc/no_verbose.error, test/btyacc/no_verbose.output, test/btyacc/nostdin.error, test/btyacc/nostdin.output, test/yacc/big_b.error , test/yacc/big_b.output, test/yacc/big_l.error, test/yacc/big_l.output, test/yacc/help.error, test/yacc/help.output, test/yacc/no_b_opt.error, test/yacc/no_b_opt.output, test/yacc/no_b_opt1.error, test/yacc/no_b_opt1.output, test/yacc/no_code_c.error, test/yacc/no_code_c.output, test/yacc/no_defines.error, test/yacc/no_defines.output, test/yacc/no_graph.error, test/yacc/no_graph.output, test/yacc/no_include.error, test/yacc/no_include.output, test/yacc/no_opts.error, test/yacc/no_opts.output, test/yacc/no_output.error, test/yacc/no_output.output, test/yacc/no_output1.error, test/yacc/no_output1.output, test/yacc/no_output2.error, test/yacc/no_output2.output, test/yacc/no_p_opt.error, test/yacc/no_p_opt.output, test/yacc/no_p_opt1.error, test/yacc/no_p_opt1.output, test/yacc/no_verbose.error, test/yacc/no_verbose.output, test/yacc/nostdin.error, test/yacc/nostdin.output: + regen + + * test/run_test.sh: + add a test for stdin "-" vs end-options "--", and correct a redirection + of stderr in test_flags + + * test/yacc/stdin2.output, test/yacc/stdin2.calc.c, test/yacc/stdin1.calc.c, test/yacc/stdin1.error, test/yacc/stdin1.output, test/yacc/stdin2.error: + RCS_BASE + + * test/btyacc/big_b.output, test/btyacc/big_l.output, test/btyacc/help.output, test/btyacc/no_b_opt.output, test/btyacc/no_output2.output, test/btyacc/no_p_opt.output, test/btyacc/nostdin.output, test/yacc/big_b.output, test/yacc/big_l.output, test/yacc/help.output, test/yacc/no_b_opt.output, test/yacc/no_output2.output, test/yacc/no_p_opt.output, test/yacc/nostdin.output: + regen + + * main.c: add -D option, to specify filename vs y.tab.h for -d + + * defs.h: add dflag2, for -D option + + * yacc.1: document -D option + + * config_h.in: updated with autoheader-252 + + * configure: regen + + * package/debian/copyright: bump + + * aclocal.m4: add CF_GETOPT_HEADER + + * aclocal.m4: Improved autoconf macros: + + CF_CC_ENV_FLAGS + putting preprocessor flags in CFLAGS also is a nuisance, which can be + addressed in the same way. + + CF_GCC_WARNINGS + factor out workaround for XTSTRINGDEFINES as CF_CONST_X_STRING + + CF_GNU_SOURCE + The check for _DEFAULT_SOURCE should apply to "recent" Cygwin (since early 2016), + and except for "NEWLIB" vs "GLIBC" in the test, acts the same if I pretend + that "newlib" is the GNU C library. Without this, the check falls through + to the _XOPEN_SOURCE test, which breaks the pseudoterminal checks for xterm. + + CF_POSIX_C_SOURCE + add/use CF_POSIX_VISIBLE + + CF_TRY_XOPEN_SOURCE + use CF_APPEND_TEXT + + CF_WITH_MAN2HTML + use sed to work around non-POSIX tail utility + + CF_XOPEN_SOURCE + use CF_APPEND_TEXT + add/use CF_POSIX_VISIBLE + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2019-06-10 Thomas E. Dickey + + * config.guess: 2019-06-10 + +2019-05-22 Thomas E. Dickey + + * config.sub: 2019-05-22 + +2018-06-09 Thomas E. Dickey + + * yacc.1: minor typographical fixes + + * test/btyacc/err_syntax20.tab.c, test/btyacc/error.tab.c, test/btyacc/expr.oxout.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, t est/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/rename_debug.c, btyaccpar.c: + regen + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2018-06-09 Tom.Shields + + * btyaccpar.skel: + add casts to fix g++ (clang++) compile errors in the backtracking skeleton + due to assignment of ‘void *’ to another pointer type. + +2018-05-25 Thomas E. Dickey + + * test/run_make.sh: + check if this is bison 3+ before adding options to suppress warnings + + * package/byacc.spec: build-fix for Mageia 6 + + * package/byacc.spec: add btyacc package + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + + * package/debian/control: add a package for btyacc + + * package/debian/rules: generate a package for btyacc + +2018-05-24 Thomas E. Dickey + + * test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/error.tab.c, test/btyacc/expr.oxout.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, btyaccpar.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destr oy3.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/rename_debug.c: + regen + + * btyaccpar.skel: fix typo + +2018-05-21 Thomas E. Dickey + + * test/run_make.sh: + ignore case for "%" directives to skip with old-yacc, and add %token-table + to the list + + * btyaccpar.c: regen + +2018-05-21 Christos.Zoulas + + * btyaccpar.skel: + improve compatibility with bison by changing the YYLLOC_DEFAULT macro to use + YYRHSLOC() macro, and adjusting the array indices of yyerror_loc_range[] for + consistency. + +2018-05-10 Thomas E. Dickey + + * output.c: + add a fallback definition for YYDEBUG to the -i externs file. + + * test/btyacc/rename_debug.i, test/yacc/rename_debug.i: regen + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2018-05-09 Thomas E. Dickey + + * configure: regen + + * aclocal.m4: resync with my-autoconf + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + + * test/btyacc/rename_debug.i, btyaccpar.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/error.tab.c, test/btyacc/expr.oxout.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.ta b.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/rename_debug.c, test/btyacc/varsyntax_calc1.tab.c: + regen + + * btyaccpar.skel: apply Guy Harris' changes here as well + + * test/btyacc/rename_debug.i, test/yacc/rename_debug.i: regen + + * output.c: correct/improve fallback prototype for yylex() + + * test/btyacc/rename_debug.i, test/yacc/rename_debug.i: regen + +2018-05-08 Thomas E. Dickey + + * test/btyacc/grammar.tab.c, test/yacc/grammar.tab.c: regen + + * test/grammar.y: + quiet some warnings from gcc 7 when doing "make check_make" + + * package/debian/watch, package/pkgsrc/Makefile: update ftp-url + + * test/btyacc/ok_syntax1.tab.h, test/btyacc/btyacc_calc1.tab.h: regen + + * output.c: + provide yylex() declaration for simple case (request by "Mutiny") + + * test/yacc/err_syntax20.tab.c, test/yacc/error.tab.c, test/yacc/expr.oxout.tab.c, test/yacc/grammar.tab.c, test/yacc/ok_syntax1.tab.c, test/yacc/ok_syntax1.tab.h, test/yacc/pure_calc.tab.c, test/yacc/pure_error.tab.c, test/yacc/quote_calc-s.tab.c, test/yacc/quote_calc.tab.c, test/yacc/quote_calc2-s.tab.c, test/yacc/quote_calc2.tab.c, test/yacc/quote_calc3-s.tab.c, test/yacc/quote_calc3.tab.c, test/yacc/quote_calc4-s.tab.c, test/yacc/quote_calc4.tab.c, test/yacc/varsyntax_calc1.tab.c, test/yacc/calc.tab.c, test/yacc/calc1.tab.c, test/yacc/calc2.tab.c, test/yacc/calc3.tab.c, test/yacc/code_calc.code.c, test/yacc/code_error.code.c, test/yacc/empty.tab.c, test/yacc/err_syntax10.tab.c, test/yacc/err_syntax11.tab.c, test/yacc/err_syntax12.tab.c, test/yacc/err_syntax18.tab.c, test/yacc/rename_debug.c, test/yacc/rename_debug.i, yaccpar.c: + regen + + * VERSION, package/byacc.spec, package/debian/changelog, package/debian/copyright, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2018-05-06 Guy.Harris + + * yaccpar.skel: two fixes: + 1) define yydebug only if YYDEBUG is defined and + 2) make yynerrs a parser-local variable if the parser is reentrant. + +2018-02-24 Guy.Harris + + * output.c: do not emit "extern YYSTYPE yylval;" for pure parsers + +2018-02-05 Thomas E. Dickey + + * config.sub: 2018-01-15 + + * config.guess: 2018-01-26 + +2017-12-04 erik.b.andersen + + * main.c: A proper path for temporary files is needed by byacc under + Windows commandline, otherwise there's a risk of empty files. + The TEMP environment variable is always defined in Windows. + + * defs.h: The noreturn attribute needs to be specified before function + to be portable among compilers (gcc, clang, msvc). + +2017-12-04 Thomas E. Dickey + + * reader.c: adapted fix by Erik B: + a) increase the length of name[] to account for a trailing null + b) note that calling syntax_error() from get_number() does not return + +2017-09-14 Tom.Shields + + * yacc.1: fix typo + +2017-07-09 Thomas E. Dickey + + * package/byacc.spec, package/mingw-byacc.spec: + use predefined "configure" + + * reader.c: remove unused assignment + + * package/debian/rules: use dpkg-buildflags + + * configure: regen + + * aclocal.m4: resync with my-autoconf + + * reader.c, output.c, defs.h: + add/use IS_NAME1() and IS_NAME2() to reduce clutter + + * reader.c, output.c, defs.h: + guard against sign-extension in ctype-macros + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + + * reader.c: check for numeric overflow in get_number() + + * reader.c: + correct limit-checks for input filename and line-number, in case no valid + filename and/or number was found. + 2017-04-30 Thomas E. Dickey * test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/error.tab.c, test/btyacc/expr.oxout.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, t est/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/rename_debug.c, btyaccpar.c, btyaccpar.skel: @@ -22,6 +442,10 @@ * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: bump +2017-04-29 Thomas E. Dickey + + * config.sub: 2017-04-02 + 2017-03-18 Thomas E. Dickey * config.sub: 2017-02-07 @@ -2558,7 +2982,7 @@ * vmsbuild.com: original version -2000-02-23 dickey@clark.net +2000-02-23 Thomas E. Dickey * test/RCS, RCS: PERMIT FILE @@ -2597,7 +3021,7 @@ * test/ftp.output, test/ftp.tab.c, test/ftp.tab.h: RCS_BASE -1993-02-22 Thomas E. Dickey +1993-02-22 dickey@software.org * test/yacc/error.output, test/yacc/error.tab.h: reference output for testing @@ -2637,7 +3061,7 @@ * symtab.c, lalr.c, error.c: original version -1990-01-16 Thomas E. Dickey +1990-01-16 dickey@software.org * test/code_error.y, test/pure_error.y: RCS_BASE Modified: head/contrib/byacc/MANIFEST ============================================================================== --- head/contrib/byacc/MANIFEST Tue Jul 14 00:46:20 2020 (r363169) +++ head/contrib/byacc/MANIFEST Tue Jul 14 01:54:24 2020 (r363170) @@ -1,4 +1,4 @@ -MANIFEST for byacc-20170430, version t20170430 +MANIFEST for byacc-20200330, version t20200330 -------------------------------------------------------------------------------- MANIFEST this file ACKNOWLEDGEMENTS original version of byacc - 1993 @@ -77,10 +77,6 @@ test/btyacc/btyacc_demo.error reference output for t test/btyacc/btyacc_demo.output reference output for testing test/btyacc/btyacc_demo.tab.c reference output for testing test/btyacc/btyacc_demo.tab.h reference output for testing -test/btyacc/btyacc_demo2.error reference output for testing -test/btyacc/btyacc_demo2.output reference output for testing -test/btyacc/btyacc_demo2.tab.c reference output for testing -test/btyacc/btyacc_demo2.tab.h reference output for testing test/btyacc/btyacc_destroy1.error reference output for testing test/btyacc/btyacc_destroy1.output reference output for testing test/btyacc/btyacc_destroy1.tab.c reference output for testing @@ -114,11 +110,6 @@ test/btyacc/code_calc.error reference output for t test/btyacc/code_calc.output reference output for testing test/btyacc/code_calc.tab.c reference output for testing test/btyacc/code_calc.tab.h reference output for testing -test/btyacc/code_debug.c reference for test-output -test/btyacc/code_debug.error reference for test-output -test/btyacc/code_debug.h reference for test-output -test/btyacc/code_debug.i reference for test-output -test/btyacc/code_debug.output reference for test-output test/btyacc/code_error.code.c reference output for testing test/btyacc/code_error.error reference output for testing test/btyacc/code_error.output reference output for testing @@ -382,6 +373,7 @@ test/btyacc_demo.y testcase for btyacc test/btyacc_destroy1.y btyacc test-case for %parse-param test/btyacc_destroy2.y btyacc test-case for %parse-param test/btyacc_destroy3.y btyacc test-case for %parse-param +test/calc.tab.c c-file for calc.y test/calc.y example from VMS freeware version of byacc test/calc1.y advanced example from Steve Johnson's paper. test/calc2.y test-cases and reference files for %lex-param / %parse-param Modified: head/contrib/byacc/VERSION ============================================================================== --- head/contrib/byacc/VERSION Tue Jul 14 00:46:20 2020 (r363169) +++ head/contrib/byacc/VERSION Tue Jul 14 01:54:24 2020 (r363170) @@ -1 +1 @@ -20170430 +20200330 Modified: head/contrib/byacc/aclocal.m4 ============================================================================== --- head/contrib/byacc/aclocal.m4 Tue Jul 14 00:46:20 2020 (r363169) +++ head/contrib/byacc/aclocal.m4 Tue Jul 14 01:54:24 2020 (r363170) @@ -1,7 +1,7 @@ -dnl $Id: aclocal.m4,v 1.42 2017/02/01 10:12:21 tom Exp $ +dnl $Id: aclocal.m4,v 1.48 2020/03/10 22:53:47 tom Exp $ dnl Macros for byacc configure script (Thomas E. Dickey) dnl --------------------------------------------------------------------------- -dnl Copyright 2004-2016,2017 Thomas E. Dickey +dnl Copyright 2004-2019,2020 Thomas E. Dickey dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the @@ -54,7 +54,7 @@ define([CF_ACVERSION_COMPARE], [ifelse([$8], , ,[$8])], [ifelse([$9], , ,[$9])])])dnl dnl --------------------------------------------------------------------------- -dnl CF_ADD_CFLAGS version: 12 updated: 2015/04/12 15:39:00 +dnl CF_ADD_CFLAGS version: 13 updated: 2017/02/25 18:57:40 dnl ------------- dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS dnl The second parameter if given makes this macro verbose. @@ -84,10 +84,10 @@ case $cf_fix_cppflags in && cf_fix_cppflags=yes if test $cf_fix_cppflags = yes ; then - cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" + CF_APPEND_TEXT(cf_new_extra_cppflags,$cf_add_cflags) continue elif test "${cf_tst_cflags}" = "\"'" ; then - cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" + CF_APPEND_TEXT(cf_new_extra_cppflags,$cf_add_cflags) continue fi ;; @@ -102,17 +102,17 @@ case $cf_fix_cppflags in CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,$cf_tst_cppflags) ;; esac - cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" + CF_APPEND_TEXT(cf_new_cppflags,$cf_add_cflags) ;; esac ;; (*) - cf_new_cflags="$cf_new_cflags $cf_add_cflags" + CF_APPEND_TEXT(cf_new_cflags,$cf_add_cflags) ;; esac ;; (yes) - cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" + CF_APPEND_TEXT(cf_new_extra_cppflags,$cf_add_cflags) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[[^"]]*"'\''//'` @@ -125,23 +125,33 @@ done if test -n "$cf_new_cflags" ; then ifelse([$2],,,[CF_VERBOSE(add to \$CFLAGS $cf_new_cflags)]) - CFLAGS="$CFLAGS $cf_new_cflags" + CF_APPEND_TEXT(CFLAGS,$cf_new_cflags) fi if test -n "$cf_new_cppflags" ; then ifelse([$2],,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)]) - CPPFLAGS="$CPPFLAGS $cf_new_cppflags" + CF_APPEND_TEXT(CPPFLAGS,$cf_new_cppflags) fi if test -n "$cf_new_extra_cppflags" ; then ifelse([$2],,,[CF_VERBOSE(add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags)]) - EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" + CF_APPEND_TEXT(EXTRA_CPPFLAGS,$cf_new_extra_cppflags) fi AC_SUBST(EXTRA_CPPFLAGS) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_APPEND_TEXT version: 1 updated: 2017/02/25 18:58:55 +dnl -------------- +dnl use this macro for appending text without introducing an extra blank at +dnl the beginning +define([CF_APPEND_TEXT], +[ + test -n "[$]$1" && $1="[$]$1 " + $1="[$]{$1}$2" +])dnl +dnl --------------------------------------------------------------------------- dnl CF_ARG_DISABLE version: 3 updated: 1999/03/30 17:24:31 dnl -------------- dnl Allow user to disable a normally-on option. @@ -171,7 +181,7 @@ ifelse([$3],,[ :]dnl ])dnl ])])dnl dnl --------------------------------------------------------------------------- -dnl CF_CC_ENV_FLAGS version: 6 updated: 2016/08/29 20:57:00 +dnl CF_CC_ENV_FLAGS version: 9 updated: 2018/07/29 18:03:26 dnl --------------- dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content dnl into CC. This will not help with broken scripts that wrap the compiler @@ -188,19 +198,37 @@ AC_DEFUN([CF_CC_ENV_FLAGS], # This should have been defined by AC_PROG_CC : ${CC:=cc} +AC_MSG_CHECKING(\$CFLAGS variable) +case "x$CFLAGS" in +(*-[[IUD]]*) + AC_MSG_RESULT(broken) + AC_MSG_WARN(your environment uses the CFLAGS variable to hold CPPFLAGS options) + cf_flags="$CFLAGS" + CFLAGS= + for cf_arg in $cf_flags + do + CF_ADD_CFLAGS($cf_arg) + done + ;; +(*) + AC_MSG_RESULT(ok) + ;; +esac + AC_MSG_CHECKING(\$CC variable) case "$CC" in (*[[\ \ ]]-*) AC_MSG_RESULT(broken) - AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options) + AC_MSG_WARN(your environment uses the CC variable to hold CFLAGS/CPPFLAGS options) # humor him... - cf_flags=`echo "$CC" | sed -e 's/^.*[[ ]]\(-[[^ ]]\)/\1/'` - CC=`echo "$CC " | sed -e 's/[[ ]]-[[^ ]].*$//' -e 's/[[ ]]*$//'` + cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[[ ]]* / /g' -e 's/[[ ]]*[[ ]]-[[^ ]].*//'` + cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", [substr]([$]0,1+length(prog))); }'` + CC="$cf_prog" for cf_arg in $cf_flags do case "x$cf_arg" in (x-[[IUDfgOW]]*) - CF_ADD_CFLAGS($cf_flags) + CF_ADD_CFLAGS($cf_arg) ;; (*) CC="$CC $cf_arg" @@ -285,6 +313,66 @@ cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments" fi ]) dnl --------------------------------------------------------------------------- +dnl CF_CONST_X_STRING version: 4 updated: 2020/03/10 18:53:47 +dnl ----------------- +dnl The X11R4-X11R6 Xt specification uses an ambiguous String type for most +dnl character-strings. +dnl +dnl It is ambiguous because the specification accommodated the pre-ANSI +dnl compilers bundled by more than one vendor in lieu of providing a standard C +dnl compiler other than by costly add-ons. Because of this, the specification +dnl did not take into account the use of const for telling the compiler that +dnl string literals would be in readonly memory. +dnl +dnl As a workaround, one could (starting with X11R5) define XTSTRINGDEFINES, to +dnl let the compiler decide how to represent Xt's strings which were #define'd. +dnl That does not solve the problem of using the block of Xt's strings which +dnl are compiled into the library (and is less efficient than one might want). +dnl +dnl Xt specification 7 introduces the _CONST_X_STRING symbol which is used both +dnl when compiling the library and compiling using the library, to tell the +dnl compiler that String is const. +AC_DEFUN([CF_CONST_X_STRING], +[ +AC_REQUIRE([AC_PATH_XTRA]) + +CF_SAVE_XTRA_FLAGS([CF_CONST_X_STRING]) + +AC_TRY_COMPILE( +[ +#include +#include +], +[String foo = malloc(1); (void)foo],[ + +AC_CACHE_CHECK(for X11/Xt const-feature,cf_cv_const_x_string,[ + AC_TRY_COMPILE( + [ +#define _CONST_X_STRING /* X11R7.8 (perhaps) */ +#undef XTSTRINGDEFINES /* X11R5 and later */ +#include +#include + ],[String foo = malloc(1); *foo = 0],[ + cf_cv_const_x_string=no + ],[ + cf_cv_const_x_string=yes + ]) +]) + +CF_RESTORE_XTRA_FLAGS([CF_CONST_X_STRING]) + +case $cf_cv_const_x_string in +(no) + CF_APPEND_TEXT(CPPFLAGS,-DXTSTRINGDEFINES) + ;; +(*) + CF_APPEND_TEXT(CPPFLAGS,-D_CONST_X_STRING) + ;; +esac + +]) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_DISABLE_ECHO version: 13 updated: 2015/04/18 08:56:57 dnl --------------- dnl You can always use "make -n" to see the actual options, but it's hard to @@ -345,7 +433,7 @@ if test "$with_no_leaks" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_ATTRIBUTES version: 17 updated: 2015/04/12 15:39:00 +dnl CF_GCC_ATTRIBUTES version: 18 updated: 2020/03/10 18:53:47 dnl ----------------- dnl Test for availability of useful gcc __attribute__ directives to quiet dnl compiler warnings. Though useful, not all are supported -- and contrary @@ -389,7 +477,7 @@ cat > conftest.$ac_ext < conftest.$ac_ext <], +[int x = optind; char *y = optarg], +[cf_cv_getopt_header=$cf_header + break]) +done +]) +if test $cf_cv_getopt_header != none ; then + AC_DEFINE(HAVE_GETOPT_HEADER,1,[Define to 1 if getopt variables are declared in header]) +fi +if test $cf_cv_getopt_header = getopt.h ; then + AC_DEFINE(NEED_GETOPT_H,1,[Define to 1 if we must include getopt.h]) +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_GNU_SOURCE version: 10 updated: 2018/12/10 20:09:41 dnl ------------- dnl Check if we must define _GNU_SOURCE to get a reasonable value for dnl _XOPEN_SOURCE, upon which many POSIX definitions depend. This is a defect @@ -598,38 +709,106 @@ dnl (or misfeature) of glibc2, which breaks portabilit dnl since it is interwoven with GNU extensions. dnl dnl Well, yes we could work around it... +dnl +dnl Parameters: +dnl $1 is the nominal value for _XOPEN_SOURCE AC_DEFUN([CF_GNU_SOURCE], [ -AC_CACHE_CHECK(if we must define _GNU_SOURCE,cf_cv_gnu_source,[ +cf_gnu_xopen_source=ifelse($1,,500,$1) + +AC_CACHE_CHECK(if this is the GNU C library,cf_cv_gnu_library,[ AC_TRY_COMPILE([#include ],[ -#ifndef _XOPEN_SOURCE -make an error -#endif], - [cf_cv_gnu_source=no], - [cf_save="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" - AC_TRY_COMPILE([#include ],[ -#ifdef _XOPEN_SOURCE -make an error -#endif], - [cf_cv_gnu_source=no], - [cf_cv_gnu_source=yes]) - CPPFLAGS="$cf_save" - ]) + #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0 + return 0; + #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0 + return 0; + #else + # error not GNU C library + #endif], + [cf_cv_gnu_library=yes], + [cf_cv_gnu_library=no]) ]) -if test "$cf_cv_gnu_source" = yes -then -AC_CACHE_CHECK(if we should also define _DEFAULT_SOURCE,cf_cv_default_source,[ -CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" - AC_TRY_COMPILE([#include ],[ -#ifdef _DEFAULT_SOURCE -make an error -#endif], - [cf_cv_default_source=no], - [cf_cv_default_source=yes]) +if test x$cf_cv_gnu_library = xyes; then + + # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE + # was changed to help a little. newlib incorporated the change about 4 + # years later. + AC_CACHE_CHECK(if _DEFAULT_SOURCE can be used as a basis,cf_cv_gnu_library_219,[ + cf_save="$CPPFLAGS" + CF_APPEND_TEXT(CPPFLAGS,-D_DEFAULT_SOURCE) + AC_TRY_COMPILE([#include ],[ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2) + return 0; + #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3) + return 0; + #else + # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old + #endif], + [cf_cv_gnu_library_219=yes], + [cf_cv_gnu_library_219=no]) + CPPFLAGS="$cf_save" ]) -test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE" + + if test "x$cf_cv_gnu_library_219" = xyes; then + cf_save="$CPPFLAGS" + AC_CACHE_CHECK(if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE,cf_cv_gnu_dftsrc_219,[ + CF_ADD_CFLAGS(-D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source) + AC_TRY_COMPILE([ + #include + #include + ],[ + #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1) + return 0; + #else + # error GNU C library is too old + #endif], + [cf_cv_gnu_dftsrc_219=yes], + [cf_cv_gnu_dftsrc_219=no]) + ]) + test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save" + else + cf_cv_gnu_dftsrc_219=maybe + fi + + if test "x$cf_cv_gnu_dftsrc_219" != xyes; then + + AC_CACHE_CHECK(if we must define _GNU_SOURCE,cf_cv_gnu_source,[ + AC_TRY_COMPILE([#include ],[ + #ifndef _XOPEN_SOURCE + #error expected _XOPEN_SOURCE to be defined + #endif], + [cf_cv_gnu_source=no], + [cf_save="$CPPFLAGS" + CF_ADD_CFLAGS(-D_GNU_SOURCE) + AC_TRY_COMPILE([#include ],[ + #ifdef _XOPEN_SOURCE + #error expected _XOPEN_SOURCE to be undefined + #endif], + [cf_cv_gnu_source=no], + [cf_cv_gnu_source=yes]) + CPPFLAGS="$cf_save" + ]) + ]) + + if test "$cf_cv_gnu_source" = yes + then + AC_CACHE_CHECK(if we should also define _DEFAULT_SOURCE,cf_cv_default_source,[ + CF_APPEND_TEXT(CPPFLAGS,-D_GNU_SOURCE) + AC_TRY_COMPILE([#include ],[ + #ifdef _DEFAULT_SOURCE + #error expected _DEFAULT_SOURCE to be undefined + #endif], + [cf_cv_default_source=no], + [cf_cv_default_source=yes]) + ]) + if test "$cf_cv_default_source" = yes + then + CF_APPEND_TEXT(CPPFLAGS,-D_DEFAULT_SOURCE) + fi + fi + fi + fi ])dnl dnl --------------------------------------------------------------------------- @@ -935,7 +1114,7 @@ case ".[$]$1" in esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_POSIX_C_SOURCE version: 9 updated: 2015/04/12 15:39:00 +dnl CF_POSIX_C_SOURCE version: 11 updated: 2018/12/31 20:46:17 dnl ----------------- dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed. dnl @@ -950,7 +1129,10 @@ dnl dnl Parameters: dnl $1 is the nominal value for _POSIX_C_SOURCE AC_DEFUN([CF_POSIX_C_SOURCE], -[ +[AC_REQUIRE([CF_POSIX_VISIBLE])dnl + +if test "$cf_cv_posix_visible" = no; then + cf_POSIX_C_SOURCE=ifelse([$1],,199506L,[$1]) cf_save_CFLAGS="$CFLAGS" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Jul 14 05:00:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF0C9355383; Tue, 14 Jul 2020 05:00:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5Sxh5gyrz4KvC; Tue, 14 Jul 2020 05:00:08 +0000 (UTC) (envelope-from adrian@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 A5AAE20E83; Tue, 14 Jul 2020 05:00:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06E508YJ016929; Tue, 14 Jul 2020 05:00:08 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06E508mV016928; Tue, 14 Jul 2020 05:00:08 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <202007140500.06E508mV016928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 14 Jul 2020 05:00:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363171 - head/contrib/flex/src X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/contrib/flex/src X-SVN-Commit-Revision: 363171 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 05:00:09 -0000 Author: adrian Date: Tue Jul 14 05:00:08 2020 New Revision: 363171 URL: https://svnweb.freebsd.org/changeset/base/363171 Log: [flex] Fix compilation issue under mips-gcc-6.4 This was triggering a pointer-losing-constness error. Modified: head/contrib/flex/src/main.c Modified: head/contrib/flex/src/main.c ============================================================================== --- head/contrib/flex/src/main.c Tue Jul 14 01:54:24 2020 (r363170) +++ head/contrib/flex/src/main.c Tue Jul 14 05:00:08 2020 (r363171) @@ -342,7 +342,7 @@ void check_options (void) /* Setup the filter chain. */ output_chain = filter_create_int(NULL, filter_tee_header, headerfilename); if ( !(m4 = getenv("M4"))) { - char *slash; + const char *slash; m4 = M4; if ((slash = strrchr(M4, '/')) != NULL) { m4 = slash+1; From owner-svn-src-head@freebsd.org Tue Jul 14 05:02:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E0328355B30; Tue, 14 Jul 2020 05:02:18 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5T0B5hkNz4LYC; Tue, 14 Jul 2020 05:02:18 +0000 (UTC) (envelope-from adrian@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 A7F3C20E9A; Tue, 14 Jul 2020 05:02:18 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06E52I2U022860; Tue, 14 Jul 2020 05:02:18 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06E52IZn022859; Tue, 14 Jul 2020 05:02:18 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <202007140502.06E52IZn022859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 14 Jul 2020 05:02:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363172 - head/contrib/bc/src X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/contrib/bc/src X-SVN-Commit-Revision: 363172 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 05:02:18 -0000 Author: adrian Date: Tue Jul 14 05:02:18 2020 New Revision: 363172 URL: https://svnweb.freebsd.org/changeset/base/363172 Log: [bc] Fix a "maybe uninitialized" compiler warning under mips-gcc-6.3.0. I guess this didn't like the case statements.. ? But this does quieten the compiler error. Modified: head/contrib/bc/src/program.c Modified: head/contrib/bc/src/program.c ============================================================================== --- head/contrib/bc/src/program.c Tue Jul 14 05:00:08 2020 (r363171) +++ head/contrib/bc/src/program.c Tue Jul 14 05:02:18 2020 (r363172) @@ -180,7 +180,7 @@ static inline BcVec* bc_program_vec(const BcProgram *p static BcNum* bc_program_num(BcProgram *p, BcResult *r) { - BcNum *n; + BcNum *n = NULL; switch (r->t) { From owner-svn-src-head@freebsd.org Tue Jul 14 05:07:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BF472355DAD; Tue, 14 Jul 2020 05:07:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5T5x1Rm5z4MZ0; Tue, 14 Jul 2020 05:07:17 +0000 (UTC) (envelope-from adrian@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 14EC820E9E; Tue, 14 Jul 2020 05:07:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06E57GCd023128; Tue, 14 Jul 2020 05:07:16 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06E57Gb7023123; Tue, 14 Jul 2020 05:07:16 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <202007140507.06E57Gb7023123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 14 Jul 2020 05:07:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363173 - head/sbin/ipfw X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/sbin/ipfw X-SVN-Commit-Revision: 363173 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 05:07:19 -0000 Author: adrian Date: Tue Jul 14 05:07:16 2020 New Revision: 363173 URL: https://svnweb.freebsd.org/changeset/base/363173 Log: [ipfw] quieten maybe-uninitialized errors in ipfw when compiled under mips-gcc-6.3.0. This is mostly an exercise to set variables to NULL/0 when declared, but one was ensuring a string variable was set before printing it. We should never see "" in a printed rule; if we do then this code definitely has some bugs that need addressing. Modified: head/sbin/ipfw/dummynet.c head/sbin/ipfw/ipfw2.c head/sbin/ipfw/nat64lsn.c head/sbin/ipfw/tables.c Modified: head/sbin/ipfw/dummynet.c ============================================================================== --- head/sbin/ipfw/dummynet.c Tue Jul 14 05:02:18 2020 (r363172) +++ head/sbin/ipfw/dummynet.c Tue Jul 14 05:07:16 2020 (r363173) @@ -1279,8 +1279,8 @@ ipfw_config_pipe(int ac, char **av) struct dn_profile *pf = NULL; struct ipfw_flow_id *mask = NULL; #ifdef NEW_AQM - struct dn_extra_parms *aqm_extra; - struct dn_extra_parms *sch_extra; + struct dn_extra_parms *aqm_extra = NULL; + struct dn_extra_parms *sch_extra = NULL; int lmax_extra; #endif Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Tue Jul 14 05:02:18 2020 (r363172) +++ head/sbin/ipfw/ipfw2.c Tue Jul 14 05:07:16 2020 (r363173) @@ -1618,6 +1618,9 @@ print_instruction(struct buf_pr *bp, const struct form case O_TCPWIN: s = "tcpwin"; break; + default: + s = ""; + break; } bprintf(bp, " %s %u", s, cmd->arg1); } else @@ -4003,7 +4006,7 @@ chkarg: struct addrinfo *res; char *s, *end; int family; - u_short port_number; + u_short port_number = 0; NEED1("missing forward address[:port]"); @@ -5600,7 +5603,7 @@ ifinfo_cmp(const void *a, const void *b) static void ipfw_list_tifaces(void) { - ipfw_obj_lheader *olh; + ipfw_obj_lheader *olh = NULL; ipfw_iface_info *info; uint32_t i; int error; @@ -5608,7 +5611,6 @@ ipfw_list_tifaces(void) if ((error = ipfw_get_tracked_ifaces(&olh)) != 0) err(EX_OSERR, "Unable to request ipfw tracked interface list"); - qsort(olh + 1, olh->count, olh->objsize, ifinfo_cmp); info = (ipfw_iface_info *)(olh + 1); @@ -5625,7 +5627,3 @@ ipfw_list_tifaces(void) free(olh); } - - - - Modified: head/sbin/ipfw/nat64lsn.c ============================================================================== --- head/sbin/ipfw/nat64lsn.c Tue Jul 14 05:02:18 2020 (r363172) +++ head/sbin/ipfw/nat64lsn.c Tue Jul 14 05:07:16 2020 (r363173) @@ -99,6 +99,7 @@ nat64lsn_print_states(void *buf) stg = (ipfw_nat64lsn_stg_v1 *)(od + 1); sz = od->head.length - sizeof(*od); next_idx = 0; + proto = NULL; while (sz > 0 && next_idx != 0xFF) { next_idx = stg->next.index; sz -= sizeof(*stg); Modified: head/sbin/ipfw/tables.c ============================================================================== --- head/sbin/ipfw/tables.c Tue Jul 14 05:02:18 2020 (r363172) +++ head/sbin/ipfw/tables.c Tue Jul 14 05:07:16 2020 (r363173) @@ -847,7 +847,7 @@ table_show_info(ipfw_xtable_info *i, void *arg) static int table_show_one(ipfw_xtable_info *i, void *arg) { - ipfw_obj_header *oh; + ipfw_obj_header *oh = NULL; int error; int is_all; @@ -1179,7 +1179,7 @@ tentry_fill_key_type(char *arg, ipfw_obj_tentry *tentr struct servent *sent; int masklen; - masklen = 0; + mask = masklen = 0; af = 0; paddr = (struct in6_addr *)&tentry->k; From owner-svn-src-head@freebsd.org Tue Jul 14 05:10:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 07EAF355D4C; Tue, 14 Jul 2020 05:10:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5TB34NGVz4NFd; Tue, 14 Jul 2020 05:10:51 +0000 (UTC) (envelope-from adrian@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 7A0C621065; Tue, 14 Jul 2020 05:10:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06E5ApNq023350; Tue, 14 Jul 2020 05:10:51 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06E5Apfl023349; Tue, 14 Jul 2020 05:10:51 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <202007140510.06E5Apfl023349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 14 Jul 2020 05:10:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363174 - head/usr.sbin X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/usr.sbin X-SVN-Commit-Revision: 363174 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 05:10:52 -0000 Author: adrian Date: Tue Jul 14 05:10:50 2020 New Revision: 363174 URL: https://svnweb.freebsd.org/changeset/base/363174 Log: [hwpmc] Compile 'pmc' only if we have C++11. I noticed when compiling with ye olde gcc-6.3.0 on mips that it tripped over a lack of C++11 bits. This allows it to compile fine. Modified: head/usr.sbin/Makefile Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Tue Jul 14 05:07:16 2020 (r363173) +++ head/usr.sbin/Makefile Tue Jul 14 05:10:50 2020 (r363174) @@ -186,9 +186,9 @@ SUBDIR.${MK_NTP}+= ntp SUBDIR.${MK_OPENSSL}+= keyserv SUBDIR.${MK_PF}+= ftp-proxy SUBDIR.${MK_PKGBOOTSTRAP}+= pkg -.if ${COMPILER_FEATURES:Mc++11} -SUBDIR.${MK_PMC}+= pmc -.endif +#.if ${COMPILER_FEATURES:Mc++11} +#SUBDIR.${MK_PMC}+= pmc +#.endif SUBDIR.${MK_PMC}+= pmcannotate pmccontrol pmcstat pmcstudy SUBDIR.${MK_PORTSNAP}+= portsnap SUBDIR.${MK_PPP}+= ppp From owner-svn-src-head@freebsd.org Tue Jul 14 05:33:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 913913566F2; Tue, 14 Jul 2020 05:33:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5Th43P4jz4RR5; Tue, 14 Jul 2020 05:33:24 +0000 (UTC) (envelope-from adrian@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 57BE5210DB; Tue, 14 Jul 2020 05:33:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06E5XOg0040943; Tue, 14 Jul 2020 05:33:24 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06E5XObE040942; Tue, 14 Jul 2020 05:33:24 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <202007140533.06E5XObE040942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 14 Jul 2020 05:33:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363176 - head/usr.sbin X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/usr.sbin X-SVN-Commit-Revision: 363176 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 05:33:24 -0000 Author: adrian Date: Tue Jul 14 05:33:23 2020 New Revision: 363176 URL: https://svnweb.freebsd.org/changeset/base/363176 Log: [pmc] whoops, remove spurious #'s pointed out by gonzo@, thanks! Modified: head/usr.sbin/Makefile Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Tue Jul 14 05:24:07 2020 (r363175) +++ head/usr.sbin/Makefile Tue Jul 14 05:33:23 2020 (r363176) @@ -186,9 +186,9 @@ SUBDIR.${MK_NTP}+= ntp SUBDIR.${MK_OPENSSL}+= keyserv SUBDIR.${MK_PF}+= ftp-proxy SUBDIR.${MK_PKGBOOTSTRAP}+= pkg -#.if ${COMPILER_FEATURES:Mc++11} -#SUBDIR.${MK_PMC}+= pmc -#.endif +.if ${COMPILER_FEATURES:Mc++11} +SUBDIR.${MK_PMC}+= pmc +.endif SUBDIR.${MK_PMC}+= pmcannotate pmccontrol pmcstat pmcstudy SUBDIR.${MK_PORTSNAP}+= portsnap SUBDIR.${MK_PPP}+= ppp From owner-svn-src-head@freebsd.org Tue Jul 14 10:01:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5DF1735D10A; Tue, 14 Jul 2020 10:01:42 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from wnew2-smtp.messagingengine.com (wnew2-smtp.messagingengine.com [64.147.123.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5bdd6ys4z3bDM; Tue, 14 Jul 2020 10:01:41 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.west.internal (Postfix) with ESMTP id C16DFA01; Tue, 14 Jul 2020 06:01:39 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 14 Jul 2020 06:01:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.dev; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=T 9IzldwOgtKNKswALBx6Mss1+ESIlQmNkXIy/kZHH4E=; b=tsx5KN7R2ZbwZNmIO 0f9bHs0aLY+otLPhQ3pAODdQ2T7CyavpMrPCXbtgLNkRJQXiD3pNOclWk2/jURi/ 6cPg4Sam4SHv3x4XBnDEI2jMJPCFwduSNClemrIdRwxPM5UgvudjBGYOGJ/J+u02 1X7YtT71cl2CC4s2ixRBRtOsRl8uHLJB1jcofZe+YyYLxlopCcfs5Z3V7EWcgv6x aqr0ifB3HaEdAfNT2rxmOgFZhMMMcKe+bORMQdhIIeM61PGVksBEpezbX7GgaiwM chtp1XAdK/9fmHUWnfMfIjRvywTU8+tocOpeyklpF1cdeGze9JJAtCjf2UPEi9MP KrSHg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=T9IzldwOgtKNKswALBx6Mss1+ESIlQmNkXIy/kZHH 4E=; b=cs9aDWYsrkFW2JdkcSgfmwDacBKO3W5sj30+gISdm6SyFu+Q669lKInaH 3/E+qzSEJCgmRjQSx4Ka3eXwEWfnbPi5oGaTAfL7iddVUzODtOawTX8DeTzjyrOw DY2QybjaVBhQL2CJJTpBwHcD2j69Hi90GKUS5wf1amaLSYjHeYZD8hLYmftk+arN 5QcOrZncZOjFVYIGJFqOAdcB+dsGNqIfVasTCEZ4XdSR9fA4K5T/jzyFchWKPWbz ZotknE7he+z/tfgo5f8lLbRk/QxwMKPdINDZeI6f3KqdrTsp+rwMDEuijvY5Y3Ft KLkxSfG7gY4riW9ftxduxTjpFsSig== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrfedtgddvfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpegjuhhrihcu rfgrnhhkohhvuceohihurhhiphhvseihuhhrihhpvhdruggvvheqnecuggftrfgrthhtvg hrnhepieekteeftdeftdekhfffueeljeeffffgffffuefhhefgheejvdegfeehieevudfg necuffhomhgrihhnpehfrhgvvggsshgurdhorhhgnecukfhppeeluddrvdegtddruddvge drudefjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm peihuhhrihhpvheshihurhhiphhvrdguvghv X-ME-Proxy: Received: from [192.168.1.6] (unknown [91.240.124.137]) by mail.messagingengine.com (Postfix) with ESMTPA id 20B9730600B9; Tue, 14 Jul 2020 06:01:37 -0400 (EDT) Subject: Re: svn commit: r363176 - head/usr.sbin To: Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202007140533.06E5XObE040942@repo.freebsd.org> From: Yuri Pankov Message-ID: <8d6e73ce-0190-b1ff-3578-9aff9eb72d9a@yuripv.dev> Date: Tue, 14 Jul 2020 13:01:36 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <202007140533.06E5XObE040942@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4B5bdd6ys4z3bDM X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:11403, ipnet:64.147.123.0/24, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 10:01:42 -0000 Adrian Chadd wrote: > Author: adrian > Date: Tue Jul 14 05:33:23 2020 > New Revision: 363176 > URL: https://svnweb.freebsd.org/changeset/base/363176 > > Log: > [pmc] whoops, remove spurious #'s > > pointed out by gonzo@, thanks! > > Modified: > head/usr.sbin/Makefile Now after r363174 and r363176: $ svn diff -r 363173:363176 usr.sbin/Makefile (empty) Did you mean to do something else here? From owner-svn-src-head@freebsd.org Tue Jul 14 10:55:20 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B5E5335E310; Tue, 14 Jul 2020 10:55:20 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5cqX4f81z3V7b; Tue, 14 Jul 2020 10:55:20 +0000 (UTC) (envelope-from br@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 80AA92513F; Tue, 14 Jul 2020 10:55:20 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06EAtK11038461; Tue, 14 Jul 2020 10:55:20 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06EAtKHp038459; Tue, 14 Jul 2020 10:55:20 GMT (envelope-from br@FreeBSD.org) Message-Id: <202007141055.06EAtKHp038459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 14 Jul 2020 10:55:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363177 - in head/sys: sys x86/iommu X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: in head/sys: sys x86/iommu X-SVN-Commit-Revision: 363177 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 10:55:20 -0000 Author: br Date: Tue Jul 14 10:55:19 2020 New Revision: 363177 URL: https://svnweb.freebsd.org/changeset/base/363177 Log: Start splitting-out the Intel DMAR busdma backend to a generic place, so it can be used on other IOMMU systems. Provide MI iommu_unit, iommu_domain and iommu_ctx structs in sys/iommu.h; use them as a first member of MD dmar_unit, dmar_domain and dmar_ctx. Change the namespace in DMAR backend: use iommu_ prefix instead of dmar_. Move some macroses and function prototypes to sys/iommu.h. Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D25574 Added: head/sys/sys/iommu.h (contents, props changed) Modified: head/sys/x86/iommu/busdma_dmar.c head/sys/x86/iommu/busdma_dmar.h head/sys/x86/iommu/intel_ctx.c head/sys/x86/iommu/intel_dmar.h head/sys/x86/iommu/intel_drv.c head/sys/x86/iommu/intel_fault.c head/sys/x86/iommu/intel_gas.c head/sys/x86/iommu/intel_idpgtbl.c head/sys/x86/iommu/intel_intrmap.c head/sys/x86/iommu/intel_qi.c head/sys/x86/iommu/intel_quirks.c head/sys/x86/iommu/intel_utils.c Added: head/sys/sys/iommu.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/iommu.h Tue Jul 14 10:55:19 2020 (r363177) @@ -0,0 +1,155 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2013 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_IOMMU_H_ +#define _SYS_IOMMU_H_ + +#include +#include +#include + +/* Host or physical memory address, after translation. */ +typedef uint64_t iommu_haddr_t; +/* Guest or bus address, before translation. */ +typedef uint64_t iommu_gaddr_t; + +struct iommu_map_entry; +TAILQ_HEAD(iommu_map_entries_tailq, iommu_map_entry); + +struct iommu_qi_genseq { + u_int gen; + uint32_t seq; +}; + +struct iommu_map_entry { + iommu_gaddr_t start; + iommu_gaddr_t end; + iommu_gaddr_t first; /* Least start in subtree */ + iommu_gaddr_t last; /* Greatest end in subtree */ + iommu_gaddr_t free_down; /* Max free space below the + current R/B tree node */ + u_int flags; + TAILQ_ENTRY(iommu_map_entry) dmamap_link; /* Link for dmamap entries */ + RB_ENTRY(iommu_map_entry) rb_entry; /* Links for domain entries */ + TAILQ_ENTRY(iommu_map_entry) unroll_link; /* Link for unroll after + dmamap_load failure */ + struct iommu_domain *domain; + struct iommu_qi_genseq gseq; +}; + +#define IOMMU_MAP_ENTRY_PLACE 0x0001 /* Fake entry */ +#define IOMMU_MAP_ENTRY_RMRR 0x0002 /* Permanent, not linked by + dmamap_link */ +#define IOMMU_MAP_ENTRY_MAP 0x0004 /* Busdma created, linked by + dmamap_link */ +#define IOMMU_MAP_ENTRY_UNMAPPED 0x0010 /* No backing pages */ +#define IOMMU_MAP_ENTRY_QI_NF 0x0020 /* qi task, do not free entry */ +#define IOMMU_MAP_ENTRY_READ 0x1000 /* Read permitted */ +#define IOMMU_MAP_ENTRY_WRITE 0x2000 /* Write permitted */ +#define IOMMU_MAP_ENTRY_SNOOP 0x4000 /* Snoop */ +#define IOMMU_MAP_ENTRY_TM 0x8000 /* Transient */ + +struct iommu_unit { + struct mtx lock; + int unit; + + int dma_enabled; + + /* Busdma delayed map load */ + struct task dmamap_load_task; + TAILQ_HEAD(, bus_dmamap_iommu) delayed_maps; + struct taskqueue *delayed_taskqueue; +}; + +/* + * Locking annotations: + * (u) - Protected by iommu unit lock + * (d) - Protected by domain lock + * (c) - Immutable after initialization + */ + +struct iommu_domain { + struct iommu_unit *iommu; /* (c) */ + struct mtx lock; /* (c) */ + struct task unload_task; /* (c) */ + struct iommu_map_entries_tailq unload_entries; /* (d) Entries to + unload */ +}; + +struct iommu_ctx { + struct iommu_domain *domain; /* (c) */ + struct bus_dma_tag_iommu *tag; /* (c) Root tag */ + u_long loads; /* atomic updates, for stat only */ + u_long unloads; /* same */ + u_int flags; /* (u) */ +}; + +/* struct iommu_ctx flags */ +#define IOMMU_CTX_FAULTED 0x0001 /* Fault was reported, + last_fault_rec is valid */ +#define IOMMU_CTX_DISABLED 0x0002 /* Device is disabled, the + ephemeral reference is kept + to prevent context destruction */ + +#define IOMMU_LOCK(unit) mtx_lock(&(unit)->lock) +#define IOMMU_UNLOCK(unit) mtx_unlock(&(unit)->lock) +#define IOMMU_ASSERT_LOCKED(unit) mtx_assert(&(unit)->lock, MA_OWNED) + +#define IOMMU_DOMAIN_LOCK(dom) mtx_lock(&(dom)->lock) +#define IOMMU_DOMAIN_UNLOCK(dom) mtx_unlock(&(dom)->lock) +#define IOMMU_DOMAIN_ASSERT_LOCKED(dom) mtx_assert(&(dom)->lock, MA_OWNED) + +void iommu_free_ctx(struct iommu_ctx *ctx); +void iommu_free_ctx_locked(struct iommu_unit *iommu, struct iommu_ctx *ctx); +struct iommu_ctx *iommu_get_ctx(struct iommu_unit *, device_t dev, + uint16_t rid, bool id_mapped, bool rmrr_init); +struct iommu_unit *iommu_find(device_t dev, bool verbose); +void iommu_domain_unload_entry(struct iommu_map_entry *entry, bool free); +void iommu_domain_unload(struct iommu_domain *domain, + struct iommu_map_entries_tailq *entries, bool cansleep); + +struct iommu_ctx *iommu_instantiate_ctx(struct iommu_unit *iommu, + device_t dev, bool rmrr); +device_t iommu_get_requester(device_t dev, uint16_t *rid); +int iommu_init_busdma(struct iommu_unit *unit); +void iommu_fini_busdma(struct iommu_unit *unit); +struct iommu_map_entry *iommu_map_alloc_entry(struct iommu_domain *iodom, + u_int flags); +void iommu_map_free_entry(struct iommu_domain *, struct iommu_map_entry *); +int iommu_map(struct iommu_domain *iodom, + const struct bus_dma_tag_common *common, iommu_gaddr_t size, int offset, + u_int eflags, u_int flags, vm_page_t *ma, struct iommu_map_entry **res); +int iommu_map_region(struct iommu_domain *domain, + struct iommu_map_entry *entry, u_int eflags, u_int flags, vm_page_t *ma); + +#endif /* !_SYS_IOMMU_H_ */ Modified: head/sys/x86/iommu/busdma_dmar.c ============================================================================== --- head/sys/x86/iommu/busdma_dmar.c Tue Jul 14 05:33:23 2020 (r363176) +++ head/sys/x86/iommu/busdma_dmar.c Tue Jul 14 10:55:19 2020 (r363177) @@ -74,20 +74,22 @@ __FBSDID("$FreeBSD$"); */ static bool -dmar_bus_dma_is_dev_disabled(int domain, int bus, int slot, int func) +iommu_bus_dma_is_dev_disabled(int domain, int bus, int slot, int func) { char str[128], *env; int default_bounce; bool ret; static const char bounce_str[] = "bounce"; - static const char dmar_str[] = "dmar"; + static const char iommu_str[] = "iommu"; + static const char dmar_str[] = "dmar"; /* compatibility */ default_bounce = 0; env = kern_getenv("hw.busdma.default"); if (env != NULL) { if (strcmp(env, bounce_str) == 0) default_bounce = 1; - else if (strcmp(env, dmar_str) == 0) + else if (strcmp(env, iommu_str) == 0 || + strcmp(env, dmar_str) == 0) default_bounce = 0; freeenv(env); } @@ -99,7 +101,8 @@ dmar_bus_dma_is_dev_disabled(int domain, int bus, int return (default_bounce != 0); if (strcmp(env, bounce_str) == 0) ret = true; - else if (strcmp(env, dmar_str) == 0) + else if (strcmp(env, iommu_str) == 0 || + strcmp(env, dmar_str) == 0) ret = false; else ret = default_bounce != 0; @@ -117,7 +120,7 @@ dmar_bus_dma_is_dev_disabled(int domain, int bus, int * bounce mapping. */ device_t -dmar_get_requester(device_t dev, uint16_t *rid) +iommu_get_requester(device_t dev, uint16_t *rid) { devclass_t pci_class; device_t l, pci, pcib, pcip, pcibp, requester; @@ -137,15 +140,15 @@ dmar_get_requester(device_t dev, uint16_t *rid) */ for (;;) { pci = device_get_parent(l); - KASSERT(pci != NULL, ("dmar_get_requester(%s): NULL parent " + KASSERT(pci != NULL, ("iommu_get_requester(%s): NULL parent " "for %s", device_get_name(dev), device_get_name(l))); KASSERT(device_get_devclass(pci) == pci_class, - ("dmar_get_requester(%s): non-pci parent %s for %s", + ("iommu_get_requester(%s): non-pci parent %s for %s", device_get_name(dev), device_get_name(pci), device_get_name(l))); pcib = device_get_parent(pci); - KASSERT(pcib != NULL, ("dmar_get_requester(%s): NULL bridge " + KASSERT(pcib != NULL, ("iommu_get_requester(%s): NULL bridge " "for %s", device_get_name(dev), device_get_name(pci))); /* @@ -228,15 +231,15 @@ dmar_get_requester(device_t dev, uint16_t *rid) return (requester); } -struct dmar_ctx * -dmar_instantiate_ctx(struct dmar_unit *dmar, device_t dev, bool rmrr) +struct iommu_ctx * +iommu_instantiate_ctx(struct iommu_unit *unit, device_t dev, bool rmrr) { device_t requester; - struct dmar_ctx *ctx; + struct iommu_ctx *ctx; bool disabled; uint16_t rid; - requester = dmar_get_requester(dev, &rid); + requester = iommu_get_requester(dev, &rid); /* * If the user requested the IOMMU disabled for the device, we @@ -245,10 +248,10 @@ dmar_instantiate_ctx(struct dmar_unit *dmar, device_t * Instead provide the identity mapping for the device * context. */ - disabled = dmar_bus_dma_is_dev_disabled(pci_get_domain(requester), + disabled = iommu_bus_dma_is_dev_disabled(pci_get_domain(requester), pci_get_bus(requester), pci_get_slot(requester), pci_get_function(requester)); - ctx = dmar_get_ctx_for_dev(dmar, requester, rid, disabled, rmrr); + ctx = iommu_get_ctx(unit, requester, rid, disabled, rmrr); if (ctx == NULL) return (NULL); if (disabled) { @@ -256,12 +259,12 @@ dmar_instantiate_ctx(struct dmar_unit *dmar, device_t * Keep the first reference on context, release the * later refs. */ - DMAR_LOCK(dmar); - if ((ctx->flags & DMAR_CTX_DISABLED) == 0) { - ctx->flags |= DMAR_CTX_DISABLED; - DMAR_UNLOCK(dmar); + IOMMU_LOCK(unit); + if ((ctx->flags & IOMMU_CTX_DISABLED) == 0) { + ctx->flags |= IOMMU_CTX_DISABLED; + IOMMU_UNLOCK(unit); } else { - dmar_free_ctx_locked(dmar, ctx); + iommu_free_ctx_locked(unit, ctx); } ctx = NULL; } @@ -271,36 +274,36 @@ dmar_instantiate_ctx(struct dmar_unit *dmar, device_t bus_dma_tag_t acpi_iommu_get_dma_tag(device_t dev, device_t child) { - struct dmar_unit *dmar; - struct dmar_ctx *ctx; + struct iommu_unit *unit; + struct iommu_ctx *ctx; bus_dma_tag_t res; - dmar = dmar_find(child, bootverbose); + unit = iommu_find(child, bootverbose); /* Not in scope of any DMAR ? */ - if (dmar == NULL) + if (unit == NULL) return (NULL); - if (!dmar->dma_enabled) + if (!unit->dma_enabled) return (NULL); - dmar_quirks_pre_use(dmar); - dmar_instantiate_rmrr_ctxs(dmar); + dmar_quirks_pre_use(unit); + dmar_instantiate_rmrr_ctxs(unit); - ctx = dmar_instantiate_ctx(dmar, child, false); - res = ctx == NULL ? NULL : (bus_dma_tag_t)&ctx->ctx_tag; + ctx = iommu_instantiate_ctx(unit, child, false); + res = ctx == NULL ? NULL : (bus_dma_tag_t)ctx->tag; return (res); } bool bus_dma_dmar_set_buswide(device_t dev) { - struct dmar_unit *dmar; + struct iommu_unit *unit; device_t parent; u_int busno, slot, func; parent = device_get_parent(dev); if (device_get_devclass(parent) != devclass_find("pci")) return (false); - dmar = dmar_find(dev, bootverbose); - if (dmar == NULL) + unit = iommu_find(dev, bootverbose); + if (unit == NULL) return (false); busno = pci_get_bus(dev); slot = pci_get_slot(dev); @@ -309,40 +312,40 @@ bus_dma_dmar_set_buswide(device_t dev) if (bootverbose) { device_printf(dev, "dmar%d pci%d:%d:%d requested buswide busdma\n", - dmar->unit, busno, slot, func); + unit->unit, busno, slot, func); } return (false); } - dmar_set_buswide_ctx(dmar, busno); + dmar_set_buswide_ctx(unit, busno); return (true); } -static MALLOC_DEFINE(M_DMAR_DMAMAP, "dmar_dmamap", "Intel DMAR DMA Map"); +static MALLOC_DEFINE(M_IOMMU_DMAMAP, "iommu_dmamap", "IOMMU DMA Map"); -static void dmar_bus_schedule_dmamap(struct dmar_unit *unit, - struct bus_dmamap_dmar *map); +static void iommu_bus_schedule_dmamap(struct iommu_unit *unit, + struct bus_dmamap_iommu *map); static int -dmar_bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, +iommu_bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, bus_addr_t boundary, bus_addr_t lowaddr, bus_addr_t highaddr, bus_dma_filter_t *filter, void *filterarg, bus_size_t maxsize, int nsegments, bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc, void *lockfuncarg, bus_dma_tag_t *dmat) { - struct bus_dma_tag_dmar *newtag, *oldtag; + struct bus_dma_tag_iommu *newtag, *oldtag; int error; *dmat = NULL; error = common_bus_dma_tag_create(parent != NULL ? - &((struct bus_dma_tag_dmar *)parent)->common : NULL, alignment, + &((struct bus_dma_tag_iommu *)parent)->common : NULL, alignment, boundary, lowaddr, highaddr, filter, filterarg, maxsize, nsegments, maxsegsz, flags, lockfunc, lockfuncarg, - sizeof(struct bus_dma_tag_dmar), (void **)&newtag); + sizeof(struct bus_dma_tag_iommu), (void **)&newtag); if (error != 0) goto out; - oldtag = (struct bus_dma_tag_dmar *)parent; - newtag->common.impl = &bus_dma_dmar_impl; + oldtag = (struct bus_dma_tag_iommu *)parent; + newtag->common.impl = &bus_dma_iommu_impl; newtag->ctx = oldtag->ctx; newtag->owner = oldtag->owner; @@ -355,20 +358,20 @@ out: } static int -dmar_bus_dma_tag_set_domain(bus_dma_tag_t dmat) +iommu_bus_dma_tag_set_domain(bus_dma_tag_t dmat) { return (0); } static int -dmar_bus_dma_tag_destroy(bus_dma_tag_t dmat1) +iommu_bus_dma_tag_destroy(bus_dma_tag_t dmat1) { - struct bus_dma_tag_dmar *dmat, *dmat_copy, *parent; + struct bus_dma_tag_iommu *dmat, *dmat_copy, *parent; int error; error = 0; - dmat_copy = dmat = (struct bus_dma_tag_dmar *)dmat1; + dmat_copy = dmat = (struct bus_dma_tag_iommu *)dmat1; if (dmat != NULL) { if (dmat->map_count != 0) { @@ -376,12 +379,12 @@ dmar_bus_dma_tag_destroy(bus_dma_tag_t dmat1) goto out; } while (dmat != NULL) { - parent = (struct bus_dma_tag_dmar *)dmat->common.parent; + parent = (struct bus_dma_tag_iommu *)dmat->common.parent; if (atomic_fetchadd_int(&dmat->common.ref_count, -1) == 1) { - if (dmat == &dmat->ctx->ctx_tag) - dmar_free_ctx(dmat->ctx); - free_domain(dmat->segments, M_DMAR_DMAMAP); + if (dmat == dmat->ctx->tag) + iommu_free_ctx(dmat->ctx); + free_domain(dmat->segments, M_IOMMU_DMAMAP); free(dmat, M_DEVBUF); dmat = parent; } else @@ -394,20 +397,20 @@ out: } static bool -dmar_bus_dma_id_mapped(bus_dma_tag_t dmat, vm_paddr_t buf, bus_size_t buflen) +iommu_bus_dma_id_mapped(bus_dma_tag_t dmat, vm_paddr_t buf, bus_size_t buflen) { return (false); } static int -dmar_bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp) +iommu_bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp) { - struct bus_dma_tag_dmar *tag; - struct bus_dmamap_dmar *map; + struct bus_dma_tag_iommu *tag; + struct bus_dmamap_iommu *map; - tag = (struct bus_dma_tag_dmar *)dmat; - map = malloc_domainset(sizeof(*map), M_DMAR_DMAMAP, + tag = (struct bus_dma_tag_iommu *)dmat; + map = malloc_domainset(sizeof(*map), M_IOMMU_DMAMAP, DOMAINSET_PREF(tag->common.domain), M_NOWAIT | M_ZERO); if (map == NULL) { *mapp = NULL; @@ -415,10 +418,10 @@ dmar_bus_dmamap_create(bus_dma_tag_t dmat, int flags, } if (tag->segments == NULL) { tag->segments = malloc_domainset(sizeof(bus_dma_segment_t) * - tag->common.nsegments, M_DMAR_DMAMAP, + tag->common.nsegments, M_IOMMU_DMAMAP, DOMAINSET_PREF(tag->common.domain), M_NOWAIT); if (tag->segments == NULL) { - free_domain(map, M_DMAR_DMAMAP); + free_domain(map, M_IOMMU_DMAMAP); *mapp = NULL; return (ENOMEM); } @@ -434,23 +437,23 @@ dmar_bus_dmamap_create(bus_dma_tag_t dmat, int flags, } static int -dmar_bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map1) +iommu_bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map1) { - struct bus_dma_tag_dmar *tag; - struct bus_dmamap_dmar *map; - struct dmar_domain *domain; + struct bus_dma_tag_iommu *tag; + struct bus_dmamap_iommu *map; + struct iommu_domain *domain; - tag = (struct bus_dma_tag_dmar *)dmat; - map = (struct bus_dmamap_dmar *)map1; + tag = (struct bus_dma_tag_iommu *)dmat; + map = (struct bus_dmamap_iommu *)map1; if (map != NULL) { domain = tag->ctx->domain; - DMAR_DOMAIN_LOCK(domain); + IOMMU_DOMAIN_LOCK(domain); if (!TAILQ_EMPTY(&map->map_entries)) { - DMAR_DOMAIN_UNLOCK(domain); + IOMMU_DOMAIN_UNLOCK(domain); return (EBUSY); } - DMAR_DOMAIN_UNLOCK(domain); - free_domain(map, M_DMAR_DMAMAP); + IOMMU_DOMAIN_UNLOCK(domain); + free_domain(map, M_IOMMU_DMAMAP); } tag->map_count--; return (0); @@ -458,15 +461,15 @@ dmar_bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap static int -dmar_bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, +iommu_bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, bus_dmamap_t *mapp) { - struct bus_dma_tag_dmar *tag; - struct bus_dmamap_dmar *map; + struct bus_dma_tag_iommu *tag; + struct bus_dmamap_iommu *map; int error, mflags; vm_memattr_t attr; - error = dmar_bus_dmamap_create(dmat, flags, mapp); + error = iommu_bus_dmamap_create(dmat, flags, mapp); if (error != 0) return (error); @@ -475,23 +478,23 @@ dmar_bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr attr = (flags & BUS_DMA_NOCACHE) != 0 ? VM_MEMATTR_UNCACHEABLE : VM_MEMATTR_DEFAULT; - tag = (struct bus_dma_tag_dmar *)dmat; - map = (struct bus_dmamap_dmar *)*mapp; + tag = (struct bus_dma_tag_iommu *)dmat; + map = (struct bus_dmamap_iommu *)*mapp; if (tag->common.maxsize < PAGE_SIZE && tag->common.alignment <= tag->common.maxsize && attr == VM_MEMATTR_DEFAULT) { *vaddr = malloc_domainset(tag->common.maxsize, M_DEVBUF, DOMAINSET_PREF(tag->common.domain), mflags); - map->flags |= BUS_DMAMAP_DMAR_MALLOC; + map->flags |= BUS_DMAMAP_IOMMU_MALLOC; } else { *vaddr = (void *)kmem_alloc_attr_domainset( DOMAINSET_PREF(tag->common.domain), tag->common.maxsize, mflags, 0ul, BUS_SPACE_MAXADDR, attr); - map->flags |= BUS_DMAMAP_DMAR_KMEM_ALLOC; + map->flags |= BUS_DMAMAP_IOMMU_KMEM_ALLOC; } if (*vaddr == NULL) { - dmar_bus_dmamap_destroy(dmat, *mapp); + iommu_bus_dmamap_destroy(dmat, *mapp); *mapp = NULL; return (ENOMEM); } @@ -499,37 +502,37 @@ dmar_bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr } static void -dmar_bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map1) +iommu_bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map1) { - struct bus_dma_tag_dmar *tag; - struct bus_dmamap_dmar *map; + struct bus_dma_tag_iommu *tag; + struct bus_dmamap_iommu *map; - tag = (struct bus_dma_tag_dmar *)dmat; - map = (struct bus_dmamap_dmar *)map1; + tag = (struct bus_dma_tag_iommu *)dmat; + map = (struct bus_dmamap_iommu *)map1; - if ((map->flags & BUS_DMAMAP_DMAR_MALLOC) != 0) { + if ((map->flags & BUS_DMAMAP_IOMMU_MALLOC) != 0) { free_domain(vaddr, M_DEVBUF); - map->flags &= ~BUS_DMAMAP_DMAR_MALLOC; + map->flags &= ~BUS_DMAMAP_IOMMU_MALLOC; } else { - KASSERT((map->flags & BUS_DMAMAP_DMAR_KMEM_ALLOC) != 0, - ("dmar_bus_dmamem_free for non alloced map %p", map)); + KASSERT((map->flags & BUS_DMAMAP_IOMMU_KMEM_ALLOC) != 0, + ("iommu_bus_dmamem_free for non alloced map %p", map)); kmem_free((vm_offset_t)vaddr, tag->common.maxsize); - map->flags &= ~BUS_DMAMAP_DMAR_KMEM_ALLOC; + map->flags &= ~BUS_DMAMAP_IOMMU_KMEM_ALLOC; } - dmar_bus_dmamap_destroy(dmat, map1); + iommu_bus_dmamap_destroy(dmat, map1); } static int -dmar_bus_dmamap_load_something1(struct bus_dma_tag_dmar *tag, - struct bus_dmamap_dmar *map, vm_page_t *ma, int offset, bus_size_t buflen, +iommu_bus_dmamap_load_something1(struct bus_dma_tag_iommu *tag, + struct bus_dmamap_iommu *map, vm_page_t *ma, int offset, bus_size_t buflen, int flags, bus_dma_segment_t *segs, int *segp, - struct dmar_map_entries_tailq *unroll_list) + struct iommu_map_entries_tailq *unroll_list) { - struct dmar_ctx *ctx; - struct dmar_domain *domain; - struct dmar_map_entry *entry; - dmar_gaddr_t size; + struct iommu_ctx *ctx; + struct iommu_domain *domain; + struct iommu_map_entry *entry; + iommu_gaddr_t size; bus_size_t buflen1; int error, idx, gas_flags, seg; @@ -555,17 +558,17 @@ dmar_bus_dmamap_load_something1(struct bus_dma_tag_dma * (Too) optimistically allow split if there are more * then one segments left. */ - gas_flags = map->cansleep ? DMAR_GM_CANWAIT : 0; + gas_flags = map->cansleep ? IOMMU_MF_CANWAIT : 0; if (seg + 1 < tag->common.nsegments) - gas_flags |= DMAR_GM_CANSPLIT; + gas_flags |= IOMMU_MF_CANSPLIT; - error = dmar_gas_map(domain, &tag->common, size, offset, - DMAR_MAP_ENTRY_READ | - ((flags & BUS_DMA_NOWRITE) == 0 ? DMAR_MAP_ENTRY_WRITE : 0), + error = iommu_map(domain, &tag->common, size, offset, + IOMMU_MAP_ENTRY_READ | + ((flags & BUS_DMA_NOWRITE) == 0 ? IOMMU_MAP_ENTRY_WRITE : 0), gas_flags, ma + idx, &entry); if (error != 0) break; - if ((gas_flags & DMAR_GM_CANSPLIT) != 0) { + if ((gas_flags & IOMMU_MF_CANSPLIT) != 0) { KASSERT(size >= entry->end - entry->start, ("split increased entry size %jx %jx %jx", (uintmax_t)size, (uintmax_t)entry->start, @@ -596,7 +599,7 @@ dmar_bus_dmamap_load_something1(struct bus_dma_tag_dma (uintmax_t)entry->start, (uintmax_t)entry->end, (uintmax_t)tag->common.lowaddr, (uintmax_t)tag->common.highaddr)); - KASSERT(dmar_test_boundary(entry->start + offset, buflen1, + KASSERT(iommu_test_boundary(entry->start + offset, buflen1, tag->common.boundary), ("boundary failed: ctx %p start 0x%jx end 0x%jx " "boundary 0x%jx", ctx, (uintmax_t)entry->start, @@ -607,10 +610,10 @@ dmar_bus_dmamap_load_something1(struct bus_dma_tag_dma (uintmax_t)entry->start, (uintmax_t)entry->end, (uintmax_t)buflen1, (uintmax_t)tag->common.maxsegsz)); - DMAR_DOMAIN_LOCK(domain); + IOMMU_DOMAIN_LOCK(domain); TAILQ_INSERT_TAIL(&map->map_entries, entry, dmamap_link); - entry->flags |= DMAR_MAP_ENTRY_MAP; - DMAR_DOMAIN_UNLOCK(domain); + entry->flags |= IOMMU_MAP_ENTRY_MAP; + IOMMU_DOMAIN_UNLOCK(domain); TAILQ_INSERT_TAIL(unroll_list, entry, unroll_link); segs[seg].ds_addr = entry->start + offset; @@ -627,14 +630,14 @@ dmar_bus_dmamap_load_something1(struct bus_dma_tag_dma } static int -dmar_bus_dmamap_load_something(struct bus_dma_tag_dmar *tag, - struct bus_dmamap_dmar *map, vm_page_t *ma, int offset, bus_size_t buflen, +iommu_bus_dmamap_load_something(struct bus_dma_tag_iommu *tag, + struct bus_dmamap_iommu *map, vm_page_t *ma, int offset, bus_size_t buflen, int flags, bus_dma_segment_t *segs, int *segp) { - struct dmar_ctx *ctx; - struct dmar_domain *domain; - struct dmar_map_entry *entry, *entry1; - struct dmar_map_entries_tailq unroll_list; + struct iommu_ctx *ctx; + struct iommu_domain *domain; + struct iommu_map_entry *entry, *entry1; + struct iommu_map_entries_tailq unroll_list; int error; ctx = tag->ctx; @@ -642,7 +645,7 @@ dmar_bus_dmamap_load_something(struct bus_dma_tag_dmar atomic_add_long(&ctx->loads, 1); TAILQ_INIT(&unroll_list); - error = dmar_bus_dmamap_load_something1(tag, map, ma, offset, + error = iommu_bus_dmamap_load_something1(tag, map, ma, offset, buflen, flags, segs, segp, &unroll_list); if (error != 0) { /* @@ -650,7 +653,7 @@ dmar_bus_dmamap_load_something(struct bus_dma_tag_dmar * partial buffer load, so unfortunately we have to * revert all work done. */ - DMAR_DOMAIN_LOCK(domain); + IOMMU_DOMAIN_LOCK(domain); TAILQ_FOREACH_SAFE(entry, &unroll_list, unroll_link, entry1) { /* @@ -664,8 +667,8 @@ dmar_bus_dmamap_load_something(struct bus_dma_tag_dmar TAILQ_INSERT_TAIL(&domain->unload_entries, entry, dmamap_link); } - DMAR_DOMAIN_UNLOCK(domain); - taskqueue_enqueue(domain->dmar->delayed_taskqueue, + IOMMU_DOMAIN_UNLOCK(domain); + taskqueue_enqueue(domain->iommu->delayed_taskqueue, &domain->unload_task); } @@ -673,37 +676,37 @@ dmar_bus_dmamap_load_something(struct bus_dma_tag_dmar !map->cansleep) error = EINPROGRESS; if (error == EINPROGRESS) - dmar_bus_schedule_dmamap(domain->dmar, map); + iommu_bus_schedule_dmamap(domain->iommu, map); return (error); } static int -dmar_bus_dmamap_load_ma(bus_dma_tag_t dmat, bus_dmamap_t map1, +iommu_bus_dmamap_load_ma(bus_dma_tag_t dmat, bus_dmamap_t map1, struct vm_page **ma, bus_size_t tlen, int ma_offs, int flags, bus_dma_segment_t *segs, int *segp) { - struct bus_dma_tag_dmar *tag; - struct bus_dmamap_dmar *map; + struct bus_dma_tag_iommu *tag; + struct bus_dmamap_iommu *map; - tag = (struct bus_dma_tag_dmar *)dmat; - map = (struct bus_dmamap_dmar *)map1; - return (dmar_bus_dmamap_load_something(tag, map, ma, ma_offs, tlen, + tag = (struct bus_dma_tag_iommu *)dmat; + map = (struct bus_dmamap_iommu *)map1; + return (iommu_bus_dmamap_load_something(tag, map, ma, ma_offs, tlen, flags, segs, segp)); } static int -dmar_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map1, +iommu_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map1, vm_paddr_t buf, bus_size_t buflen, int flags, bus_dma_segment_t *segs, int *segp) { - struct bus_dma_tag_dmar *tag; - struct bus_dmamap_dmar *map; + struct bus_dma_tag_iommu *tag; + struct bus_dmamap_iommu *map; vm_page_t *ma, fma; vm_paddr_t pstart, pend, paddr; int error, i, ma_cnt, mflags, offset; - tag = (struct bus_dma_tag_dmar *)dmat; - map = (struct bus_dmamap_dmar *)map1; + tag = (struct bus_dma_tag_iommu *)dmat; + map = (struct bus_dmamap_iommu *)map1; pstart = trunc_page(buf); pend = round_page(buf + buflen); offset = buf & PAGE_MASK; @@ -735,7 +738,7 @@ dmar_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmam ma[i] = &fma[i]; } } - error = dmar_bus_dmamap_load_something(tag, map, ma, offset, buflen, + error = iommu_bus_dmamap_load_something(tag, map, ma, offset, buflen, flags, segs, segp); free(fma, M_DEVBUF); free(ma, M_DEVBUF); @@ -743,18 +746,18 @@ dmar_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmam } static int -dmar_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map1, void *buf, +iommu_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map1, void *buf, bus_size_t buflen, pmap_t pmap, int flags, bus_dma_segment_t *segs, int *segp) { - struct bus_dma_tag_dmar *tag; - struct bus_dmamap_dmar *map; + struct bus_dma_tag_iommu *tag; + struct bus_dmamap_iommu *map; vm_page_t *ma, fma; vm_paddr_t pstart, pend, paddr; int error, i, ma_cnt, mflags, offset; - tag = (struct bus_dma_tag_dmar *)dmat; - map = (struct bus_dmamap_dmar *)map1; + tag = (struct bus_dma_tag_iommu *)dmat; + map = (struct bus_dmamap_iommu *)map1; pstart = trunc_page((vm_offset_t)buf); pend = round_page((vm_offset_t)buf + buflen); offset = (vm_offset_t)buf & PAGE_MASK; @@ -788,7 +791,7 @@ dmar_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dm ma[i] = &fma[i]; } } - error = dmar_bus_dmamap_load_something(tag, map, ma, offset, buflen, + error = iommu_bus_dmamap_load_something(tag, map, ma, offset, buflen, flags, segs, segp); free(ma, M_DEVBUF); free(fma, M_DEVBUF); @@ -796,29 +799,29 @@ dmar_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dm } static void -dmar_bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map1, +iommu_bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map1, struct memdesc *mem, bus_dmamap_callback_t *callback, void *callback_arg) { - struct bus_dmamap_dmar *map; + struct bus_dmamap_iommu *map; if (map1 == NULL) return; - map = (struct bus_dmamap_dmar *)map1; + map = (struct bus_dmamap_iommu *)map1; map->mem = *mem; - map->tag = (struct bus_dma_tag_dmar *)dmat; + map->tag = (struct bus_dma_tag_iommu *)dmat; map->callback = callback; map->callback_arg = callback_arg; } static bus_dma_segment_t * -dmar_bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t map1, +iommu_bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t map1, bus_dma_segment_t *segs, int nsegs, int error) { - struct bus_dma_tag_dmar *tag; - struct bus_dmamap_dmar *map; + struct bus_dma_tag_iommu *tag; + struct bus_dmamap_iommu *map; - tag = (struct bus_dma_tag_dmar *)dmat; - map = (struct bus_dmamap_dmar *)map1; + tag = (struct bus_dma_tag_iommu *)dmat; + map = (struct bus_dmamap_iommu *)map1; if (!map->locked) { KASSERT(map->cansleep, @@ -848,76 +851,76 @@ dmar_bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmama * On amd64, we assume that sf allocation cannot fail. */ static void -dmar_bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map1) +iommu_bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map1) { - struct bus_dma_tag_dmar *tag; - struct bus_dmamap_dmar *map; - struct dmar_ctx *ctx; - struct dmar_domain *domain; + struct bus_dma_tag_iommu *tag; + struct bus_dmamap_iommu *map; + struct iommu_ctx *ctx; + struct iommu_domain *domain; #if defined(__amd64__) - struct dmar_map_entries_tailq entries; + struct iommu_map_entries_tailq entries; #endif - tag = (struct bus_dma_tag_dmar *)dmat; - map = (struct bus_dmamap_dmar *)map1; + tag = (struct bus_dma_tag_iommu *)dmat; + map = (struct bus_dmamap_iommu *)map1; ctx = tag->ctx; domain = ctx->domain; atomic_add_long(&ctx->unloads, 1); #if defined(__i386__) - DMAR_DOMAIN_LOCK(domain); + IOMMU_DOMAIN_LOCK(domain); TAILQ_CONCAT(&domain->unload_entries, &map->map_entries, dmamap_link); - DMAR_DOMAIN_UNLOCK(domain); - taskqueue_enqueue(domain->dmar->delayed_taskqueue, + IOMMU_DOMAIN_UNLOCK(domain); + taskqueue_enqueue(domain->iommu->delayed_taskqueue, &domain->unload_task); #else /* defined(__amd64__) */ TAILQ_INIT(&entries); - DMAR_DOMAIN_LOCK(domain); + IOMMU_DOMAIN_LOCK(domain); TAILQ_CONCAT(&entries, &map->map_entries, dmamap_link); - DMAR_DOMAIN_UNLOCK(domain); + IOMMU_DOMAIN_UNLOCK(domain); THREAD_NO_SLEEPING(); - dmar_domain_unload(domain, &entries, false); + iommu_domain_unload(domain, &entries, false); THREAD_SLEEPING_OK(); - KASSERT(TAILQ_EMPTY(&entries), ("lazy dmar_ctx_unload %p", ctx)); + KASSERT(TAILQ_EMPTY(&entries), ("lazy iommu_ctx_unload %p", ctx)); #endif } static void -dmar_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, +iommu_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) { } -struct bus_dma_impl bus_dma_dmar_impl = { - .tag_create = dmar_bus_dma_tag_create, - .tag_destroy = dmar_bus_dma_tag_destroy, - .tag_set_domain = dmar_bus_dma_tag_set_domain, - .id_mapped = dmar_bus_dma_id_mapped, - .map_create = dmar_bus_dmamap_create, - .map_destroy = dmar_bus_dmamap_destroy, - .mem_alloc = dmar_bus_dmamem_alloc, - .mem_free = dmar_bus_dmamem_free, - .load_phys = dmar_bus_dmamap_load_phys, - .load_buffer = dmar_bus_dmamap_load_buffer, - .load_ma = dmar_bus_dmamap_load_ma, - .map_waitok = dmar_bus_dmamap_waitok, - .map_complete = dmar_bus_dmamap_complete, - .map_unload = dmar_bus_dmamap_unload, - .map_sync = dmar_bus_dmamap_sync, +struct bus_dma_impl bus_dma_iommu_impl = { + .tag_create = iommu_bus_dma_tag_create, + .tag_destroy = iommu_bus_dma_tag_destroy, + .tag_set_domain = iommu_bus_dma_tag_set_domain, + .id_mapped = iommu_bus_dma_id_mapped, + .map_create = iommu_bus_dmamap_create, + .map_destroy = iommu_bus_dmamap_destroy, + .mem_alloc = iommu_bus_dmamem_alloc, + .mem_free = iommu_bus_dmamem_free, + .load_phys = iommu_bus_dmamap_load_phys, + .load_buffer = iommu_bus_dmamap_load_buffer, + .load_ma = iommu_bus_dmamap_load_ma, + .map_waitok = iommu_bus_dmamap_waitok, + .map_complete = iommu_bus_dmamap_complete, + .map_unload = iommu_bus_dmamap_unload, + .map_sync = iommu_bus_dmamap_sync, }; static void -dmar_bus_task_dmamap(void *arg, int pending) +iommu_bus_task_dmamap(void *arg, int pending) { - struct bus_dma_tag_dmar *tag; - struct bus_dmamap_dmar *map; - struct dmar_unit *unit; + struct bus_dma_tag_iommu *tag; + struct bus_dmamap_iommu *map; + struct iommu_unit *unit; unit = arg; - DMAR_LOCK(unit); + IOMMU_LOCK(unit); while ((map = TAILQ_FIRST(&unit->delayed_maps)) != NULL) { TAILQ_REMOVE(&unit->delayed_maps, map, delay_link); - DMAR_UNLOCK(unit); + IOMMU_UNLOCK(unit); tag = map->tag; map->cansleep = true; map->locked = false; @@ -931,39 +934,42 @@ dmar_bus_task_dmamap(void *arg, int pending) } else map->locked = true; map->cansleep = false; - DMAR_LOCK(unit); + IOMMU_LOCK(unit); } - DMAR_UNLOCK(unit); + IOMMU_UNLOCK(unit); } static void -dmar_bus_schedule_dmamap(struct dmar_unit *unit, struct bus_dmamap_dmar *map) +iommu_bus_schedule_dmamap(struct iommu_unit *unit, struct bus_dmamap_iommu *map) { map->locked = false; - DMAR_LOCK(unit); + IOMMU_LOCK(unit); TAILQ_INSERT_TAIL(&unit->delayed_maps, map, delay_link); - DMAR_UNLOCK(unit); + IOMMU_UNLOCK(unit); taskqueue_enqueue(unit->delayed_taskqueue, &unit->dmamap_load_task); } int -dmar_init_busdma(struct dmar_unit *unit) +iommu_init_busdma(struct iommu_unit *unit) { + int error; unit->dma_enabled = 1; - TUNABLE_INT_FETCH("hw.dmar.dma", &unit->dma_enabled); + error = TUNABLE_INT_FETCH("hw.iommu.dma", &unit->dma_enabled); + if (error == 0) /* compatibility */ + TUNABLE_INT_FETCH("hw.dmar.dma", &unit->dma_enabled); TAILQ_INIT(&unit->delayed_maps); - TASK_INIT(&unit->dmamap_load_task, 0, dmar_bus_task_dmamap, unit); - unit->delayed_taskqueue = taskqueue_create("dmar", M_WAITOK, + TASK_INIT(&unit->dmamap_load_task, 0, iommu_bus_task_dmamap, unit); + unit->delayed_taskqueue = taskqueue_create("iommu", M_WAITOK, taskqueue_thread_enqueue, &unit->delayed_taskqueue); taskqueue_start_threads(&unit->delayed_taskqueue, 1, PI_DISK, - "dmar%d busdma taskq", unit->unit); + "iommu%d busdma taskq", unit->unit); return (0); } void -dmar_fini_busdma(struct dmar_unit *unit) +iommu_fini_busdma(struct iommu_unit *unit) { if (unit->delayed_taskqueue == NULL) @@ -979,11 +985,11 @@ bus_dma_dmar_load_ident(bus_dma_tag_t dmat, bus_dmamap vm_paddr_t start, vm_size_t length, int flags) { struct bus_dma_tag_common *tc; - struct bus_dma_tag_dmar *tag; - struct bus_dmamap_dmar *map; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Jul 14 12:02:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1F34436060C; Tue, 14 Jul 2020 12:02:32 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5fK35SyFz3XCB; Tue, 14 Jul 2020 12:02:31 +0000 (UTC) (envelope-from gbe@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 9B4EA25F05; Tue, 14 Jul 2020 12:02:31 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06EC2V0F080845; Tue, 14 Jul 2020 12:02:31 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06EC2VTA080844; Tue, 14 Jul 2020 12:02:31 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202007141202.06EC2VTA080844@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Tue, 14 Jul 2020 12:02:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363178 - head/contrib/mandoc X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/contrib/mandoc X-SVN-Commit-Revision: 363178 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 12:02:32 -0000 Author: gbe (doc committer) Date: Tue Jul 14 12:02:30 2020 New Revision: 363178 URL: https://svnweb.freebsd.org/changeset/base/363178 Log: Revert r362809: Mention FreeBSD in the HISTORY sections of apropos(1) and makewhatis(8). We don't mention the first appearance of a utility in FreeBSD, when it first appeared in a BSD version that predates FreeBSD. PR: 223520, 223521 Reported by: rgrimes, imp Reviewed by: bcr (mentor) Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D25521 Modified: head/contrib/mandoc/apropos.1 head/contrib/mandoc/makewhatis.8 Modified: head/contrib/mandoc/apropos.1 ============================================================================== --- head/contrib/mandoc/apropos.1 Tue Jul 14 10:55:19 2020 (r363177) +++ head/contrib/mandoc/apropos.1 Tue Jul 14 12:02:30 2020 (r363178) @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: June 30 2020 $ +.Dd $Mdocdate: November 22 2018 $ .Dt APROPOS 1 .Os .Sh NAME @@ -493,12 +493,6 @@ The options .Fl acfhIKklOTWw appeared in .Ox 5.7 . -.Pp -The -.Nm -utility was integrated into -.Fx 11.1 -as part of the switch to mandoc. .Sh AUTHORS .An -nosplit .An Bill Joy Modified: head/contrib/mandoc/makewhatis.8 ============================================================================== --- head/contrib/mandoc/makewhatis.8 Tue Jul 14 10:55:19 2020 (r363177) +++ head/contrib/mandoc/makewhatis.8 Tue Jul 14 12:02:30 2020 (r363178) @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: June 30 2020 $ +.Dd $Mdocdate: May 17 2017 $ .Dt MAKEWHATIS 8 .Os .Sh NAME @@ -211,12 +211,6 @@ and the options .Fl aCDnQT in .Ox 5.6 . -.Pp -The -.Nm -utility was integrated into -.Fx 11.1 -as part of the switch to mandoc. .Sh AUTHORS .An -nosplit .An Bill Joy From owner-svn-src-head@freebsd.org Tue Jul 14 13:38:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A785E363347; Tue, 14 Jul 2020 13:38:52 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5hSD0wHyz4dcr; Tue, 14 Jul 2020 13:38:52 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id E871618F0B; Tue, 14 Jul 2020 13:38:51 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f171.google.com with SMTP id j80so15570894qke.0; Tue, 14 Jul 2020 06:38:51 -0700 (PDT) X-Gm-Message-State: AOAM5317YNHf4rre4N3Njislck39QGxcUC1a1xEYhxzFSMVfhQ2O2tgN W1YDCYJuJFpGzKEYWepNIuDYzqO8mqgg8JrKUL0= X-Google-Smtp-Source: ABdhPJzBVn3XxNlmtup/r4z+dmoCMBmCgmRRqbXvyTqDJN7DYSoMLtUuhMOnkm26mDM8hmU6Q5Fi38WtcnKB6fhnvLo= X-Received: by 2002:a37:40e:: with SMTP id 14mr4519320qke.493.1594733931149; Tue, 14 Jul 2020 06:38:51 -0700 (PDT) MIME-Version: 1.0 References: <201910071905.x97J56t0039812@repo.freebsd.org> In-Reply-To: <201910071905.x97J56t0039812@repo.freebsd.org> From: Kyle Evans Date: Tue, 14 Jul 2020 08:38:39 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r353283 - in head: lib lib/libstats share/man/man3 share/mk sys/amd64/conf sys/conf sys/kern sys/sys tools/build/options To: Edward Tomasz Napierala Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 13:38:52 -0000 On Mon, Oct 7, 2019 at 2:05 PM Edward Tomasz Napierala wrote: > > Author: trasz > Date: Mon Oct 7 19:05:05 2019 > New Revision: 353283 > URL: https://svnweb.freebsd.org/changeset/base/353283 > > Log: > Introduce stats(3), a flexible statistics gathering API. > > This provides a framework to define a template describing > a set of "variables of interest" and the intended way for > the framework to maintain them (for example the maximum, sum, > t-digest, or a combination thereof). Afterwards the user > code feeds in the raw data, and the framework maintains > these variables inside a user-provided, opaque stats blobs. > The framework also provides a way to selectively extract the > stats from the blobs. The stats(3) framework can be used in > both userspace and the kernel. > > See the stats(3) manual page for details. > > This will be used by the upcoming TCP statistics gathering code, > https://reviews.freebsd.org/D20655. > > The stats(3) framework is disabled by default for now, except > in the NOTES kernel (for QA); it is expected to be enabled > in amd64 GENERIC after a cool down period. > > Reviewed by: sef (earlier version) > Obtained from: Netflix > Relnotes: yes > Sponsored by: Klara Inc, Netflix > Differential Revision: https://reviews.freebsd.org/D20477 > > Added: > head/lib/libstats/ > head/lib/libstats/Makefile (contents, props changed) > head/share/man/man3/stats.3 (contents, props changed) > head/sys/kern/subr_stats.c (contents, props changed) > head/sys/sys/stats.h (contents, props changed) > head/tools/build/options/WITHOUT_STATS (contents, props changed) > head/tools/build/options/WITH_STATS (contents, props changed) > Modified: > head/lib/Makefile > head/share/man/man3/Makefile > head/share/man/man3/arb.3 > head/share/mk/bsd.libnames.mk > head/share/mk/src.libnames.mk > head/share/mk/src.opts.mk > head/sys/amd64/conf/NOTES > head/sys/conf/files > head/sys/conf/options > head/sys/sys/arb.h > > Modified: head/lib/Makefile > ============================================================================== > --- head/lib/Makefile Mon Oct 7 18:55:40 2019 (r353282) > +++ head/lib/Makefile Mon Oct 7 19:05:05 2019 (r353283) > @@ -152,6 +152,7 @@ SUBDIR.${MK_GSSAPI}+= libgssapi librpcsec_gss > SUBDIR.${MK_ICONV}+= libiconv_modules > SUBDIR.${MK_KERBEROS_SUPPORT}+= libcom_err > SUBDIR.${MK_LDNS}+= libldns > +SUBDIR.${MK_STATS}+= libstats > > # The libraries under libclang_rt can only be built by clang, and only make > # sense to build when clang is enabled at all. Furthermore, they can only be > > Added: head/lib/libstats/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/lib/libstats/Makefile Mon Oct 7 19:05:05 2019 (r353283) > @@ -0,0 +1,14 @@ > +# $FreeBSD$ > + > +LIB= stats > +SHLIBDIR?= /lib > +SHLIB_MAJOR= 0 > +SRCS= subr_stats.c > + > +# To debug, comment WITHOUT_ASSERT_DEBUG= and uncomment CFLAGS:= > +WITHOUT_ASSERT_DEBUG= > +#CFLAGS:=${CFLAGS:C/-O[0-9]/-O0 -g3/} -DDIAGNOSTIC > + Hi, What exactly is going on here? mjg pointed this out when we were looking at some runtime assertion related stuff. This looks like it's imposing an opinion of how it should be built and circumvent the normal way of doing things. Ideally, this would something more like with the following patch to just make sure that the CFLAGS manipulations properly happen when ASSERT_DEBUG is flipped on, and interested parties that don't want the assertions should turn ASSERT_DEBUG off. If there's a really really solid reason for libstats having its own knob, that should be considered as a formal knob rather than the ad-hockery that appears above. I'm not sure that the following patch is entirely correct, though; -DDIAGNOSTIC seems to be needed for assertions, but the -O$n replacement with -O0 -g3 looks like it should perhaps be split out to a different knob or.. something. diff --git a/lib/libstats/Makefile b/lib/libstats/Makefile index 89e10aa64c5..12345d1a61f 100644 --- a/lib/libstats/Makefile +++ b/lib/libstats/Makefile @@ -1,13 +1,16 @@ # $FreeBSD$ +.include + LIB= stats SHLIBDIR?= /lib SHLIB_MAJOR= 0 SRCS= subr_stats.c tcp_stats.c # To debug, comment WITHOUT_ASSERT_DEBUG= and uncomment CFLAGS:= -WITHOUT_ASSERT_DEBUG= -#CFLAGS:=${CFLAGS:C/-O[0-9]/-O0 -g3/} -DDIAGNOSTIC +.if ${MK_ASSERT_DEBUG} != "no" +CFLAGS:=${CFLAGS:C/-O[0-9]/-O0 -g3/} -DDIAGNOSTIC +.endif .PATH: ${.CURDIR}/../../sys/kern ${.CURDIR}/../../sys/netinet From owner-svn-src-head@freebsd.org Tue Jul 14 13:42:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AE79C363360 for ; Tue, 14 Jul 2020 13:42:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5hXK4j1rz3SP0 for ; Tue, 14 Jul 2020 13:42:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf31.google.com with SMTP id el4so7442629qvb.13 for ; Tue, 14 Jul 2020 06:42:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Y9TuZ6+yUpvdQ/7/GS6Om8Ywn1NnO9xGJIZBPjp2eo0=; b=t+LBRUURYoDs0Kp+VwKRuxjNF4AqhTAGkX6A9A7f0mXHhCKsuvnI80+oMyu68lYho6 Gz0XHB+EFG72jkbgYq7AsFaAgQGXJetMUhbq9gDCfqGXT+A9x1Bu1bXZ0YCcXBXU0LU7 gHY4flcsHZLntL0a8amPtvzv8pxkNgsPaaQbMZgTtVPDWtPIYJVrR7NXKROIAH6/9SwN F/+0qhiIsLACvVo+A//fYZhjhqMtCJM+Tga832EeYeh9l9wsHvDmFDrnlyglnDuDgrGY uXMbrcNStnfXf9bNvd84amJPQe3ff8KSBwYI97n+SVEK4T12uZYqWFUW9Vd0gEhJHa/U 0bfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Y9TuZ6+yUpvdQ/7/GS6Om8Ywn1NnO9xGJIZBPjp2eo0=; b=pX7XV9s2eMUpB/x4f2PbDbze7+goTUWE+gKDD9h0paZ/glmOj3v1wUPrAWZm71LaUF tcLj1NoQqgFI+iiR5dSe6vMnxV61vC7/RWb/WyaT4Cxy3DdsJ8nBBp2OIJJt/UE8hUg3 1iLVJHTcmYp1QyDNect8ZlL3fiOIzHGWykLwMIYA6vdzUOsqRnVTzUsjPOy5rMyQCMHD +C64Kk/MrlDizzurQ6soNr9CUrqMIAcyWvaoGdUeQp1y1EhJYlp1727AjCBlchGTgSAn FR0OY4ar7Q39PU3QUItExt3O+8/vBgG88PkufDdbJz3Ptdc084upukdZmaTKRjShIjc6 8mSA== X-Gm-Message-State: AOAM532Qwa2GBa1DO5dT2jGFzW80AXfhHhfdUs8OSu0RKHZLZCltogkK O12zf+p3KR+ipYJ8UIPt8jdovlVxv3rb6t/v2xyR7g== X-Google-Smtp-Source: ABdhPJyYqtgBPpbdYi+7PhylZpYCswKjOg+nqTxxRBikzSc2DLJYPbihiMD6Pr/mVkE73hYSWat9aDsY5gKyM0FL+V4= X-Received: by 2002:a05:6214:d4d:: with SMTP id 13mr4519395qvr.22.1594734144491; Tue, 14 Jul 2020 06:42:24 -0700 (PDT) MIME-Version: 1.0 References: <202007140502.06E52IZn022859@repo.freebsd.org> In-Reply-To: <202007140502.06E52IZn022859@repo.freebsd.org> From: Warner Losh Date: Tue, 14 Jul 2020 07:42:12 -0600 Message-ID: Subject: Re: svn commit: r363172 - head/contrib/bc/src To: Adrian Chadd Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4B5hXK4j1rz3SP0 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=t+LBRUUR; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f31) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.74 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.65)[-0.652]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-0.94)[-0.941]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.14)[-0.144]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f31:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 13:42:26 -0000 Did you intend to commit to contrib software that has an active upstream? This is going to cause conflicts in the future. Maybe you can submit it to the new upstream instead? Warner On Mon, Jul 13, 2020 at 11:02 PM Adrian Chadd wrote: > Author: adrian > Date: Tue Jul 14 05:02:18 2020 > New Revision: 363172 > URL: https://svnweb.freebsd.org/changeset/base/363172 > > Log: > [bc] Fix a "maybe uninitialized" compiler warning under mips-gcc-6.3.0. > > I guess this didn't like the case statements.. ? But this does quieten > the compiler error. > > Modified: > head/contrib/bc/src/program.c > > Modified: head/contrib/bc/src/program.c > > ============================================================================== > --- head/contrib/bc/src/program.c Tue Jul 14 05:00:08 2020 > (r363171) > +++ head/contrib/bc/src/program.c Tue Jul 14 05:02:18 2020 > (r363172) > @@ -180,7 +180,7 @@ static inline BcVec* bc_program_vec(const BcProgram *p > > static BcNum* bc_program_num(BcProgram *p, BcResult *r) { > > - BcNum *n; > + BcNum *n = NULL; > > switch (r->t) { > > From owner-svn-src-head@freebsd.org Tue Jul 14 14:09:31 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F37173640AA; Tue, 14 Jul 2020 14:09:30 +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 4B5j7Z4gXhz4FdY; Tue, 14 Jul 2020 14:09:30 +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 7353C27461; Tue, 14 Jul 2020 14:09:30 +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 06EE9UaX055972; Tue, 14 Jul 2020 14:09:30 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06EE9TiD055966; Tue, 14 Jul 2020 14:09:29 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007141409.06EE9TiD055966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 14 Jul 2020 14:09:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363180 - in head: share/man/man4 sys/arm64/conf sys/conf sys/dev/safexcel sys/modules sys/modules/safexcel X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head: share/man/man4 sys/arm64/conf sys/conf sys/dev/safexcel sys/modules sys/modules/safexcel X-SVN-Commit-Revision: 363180 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 14:09:31 -0000 Author: markj Date: Tue Jul 14 14:09:29 2020 New Revision: 363180 URL: https://svnweb.freebsd.org/changeset/base/363180 Log: Add a driver for the SafeXcel EIP-97. The EIP-97 is a packet processing module found on the ESPRESSObin. This commit adds a crypto(9) driver for the crypto and hash engine in this device. An initial skeleton driver that could attach and submit requests was written by loos and others at Netgate, and the driver was finished by me. Support for separate AAD and output buffers will be added in a separate commit, to simplify merging to stable/12 (where those features don't exist). Reviewed by: gnn, jhb Feedback from: andrew, cem, manu MFC after: 1 week Sponsored by: Rubicon Communications, LLC (Netgate) Differential Revision: https://reviews.freebsd.org/D25417 Added: head/share/man/man4/safexcel.4 (contents, props changed) head/sys/dev/safexcel/ head/sys/dev/safexcel/safexcel.c (contents, props changed) head/sys/dev/safexcel/safexcel_reg.h (contents, props changed) head/sys/dev/safexcel/safexcel_var.h (contents, props changed) head/sys/modules/safexcel/ head/sys/modules/safexcel/Makefile (contents, props changed) Modified: head/share/man/man4/Makefile head/sys/arm64/conf/GENERIC head/sys/conf/files.arm64 head/sys/modules/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Tue Jul 14 13:21:09 2020 (r363179) +++ head/share/man/man4/Makefile Tue Jul 14 14:09:29 2020 (r363180) @@ -449,6 +449,7 @@ MAN= aac.4 \ rue.4 \ sa.4 \ safe.4 \ + safexcel.4 \ sbp.4 \ sbp_targ.4 \ scc.4 \ Added: head/share/man/man4/safexcel.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/safexcel.4 Tue Jul 14 14:09:29 2020 (r363180) @@ -0,0 +1,84 @@ +.\"- +.\" Copyright (c) 2020 Rubicon Communications, LLC (Netgate) +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 23, 2020 +.Dt SAFEXCEL 4 +.Os +.Sh NAME +.Nm safexcel +.Nd Inside Secure SafeXcel-IP-97 security packet engine +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device crypto" +.Cd "device cryptodev" +.Cd "device safexcel" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +safexcel_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver implements +.Xr crypto 4 +support for the cryptographic acceleration functions of the EIP-97 device +found on some Marvell systems-on-chip. +The driver can accelerate the following AES modes: +.Pp +.Bl -bullet -compact +.It +AES-CBC +.It +AES-CTR +.It +AES-XTS +.It +AES-GCM +.It +AES-CCM +.El +.Pp +.Nm +also implements SHA1 and SHA2 transforms, and can combine AES-CBC and AES-CTR +with SHA1-HMAC and SHA2-HMAC for encrypt-then-authenticate operations. +.Sh SEE ALSO +.Xr crypto 4 , +.Xr ipsec 4 , +.Xr random 4 , +.Xr geli 8 , +.Xr crypto 9 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 13.0 . Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Tue Jul 14 13:21:09 2020 (r363179) +++ head/sys/arm64/conf/GENERIC Tue Jul 14 14:09:29 2020 (r363180) @@ -283,6 +283,9 @@ device mv_ap806_sei # Marvell AP806 SEI device aw_rtc # Allwinner Real-time Clock device mv_rtc # Marvell Real-time Clock +# Crypto accelerators +device safexcel # Inside Secure EIP-97 + # Watchdog controllers device aw_wdog # Allwinner Watchdog Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Tue Jul 14 13:21:09 2020 (r363179) +++ head/sys/conf/files.arm64 Tue Jul 14 14:09:29 2020 (r363180) @@ -324,6 +324,7 @@ dev/pci/pci_dw_if.m optional pci fdt dev/psci/psci.c standard dev/psci/smccc_arm64.S standard dev/psci/smccc.c standard +dev/safexcel/safexcel.c optional safexcel fdt dev/sdhci/sdhci_xenon.c optional sdhci_xenon sdhci fdt dev/uart/uart_cpu_arm64.c optional uart dev/uart/uart_dev_mu.c optional uart uart_mu Added: head/sys/dev/safexcel/safexcel.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/safexcel/safexcel.c Tue Jul 14 14:09:29 2020 (r363180) @@ -0,0 +1,2637 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Rubicon Communications, LLC (Netgate) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include +#include + +#include "cryptodev_if.h" + +#include "safexcel_reg.h" +#include "safexcel_var.h" + +static MALLOC_DEFINE(M_SAFEXCEL, "safexcel_req", "safexcel request buffers"); + +/* + * We only support the EIP97 for now. + */ +static struct ofw_compat_data safexcel_compat[] = { + { "inside-secure,safexcel-eip97ies", (uintptr_t)97 }, + { "inside-secure,safexcel-eip97", (uintptr_t)97 }, + { NULL, 0 } +}; + +const struct safexcel_reg_offsets eip97_regs_offset = { + .hia_aic = SAFEXCEL_EIP97_HIA_AIC_BASE, + .hia_aic_g = SAFEXCEL_EIP97_HIA_AIC_G_BASE, + .hia_aic_r = SAFEXCEL_EIP97_HIA_AIC_R_BASE, + .hia_aic_xdr = SAFEXCEL_EIP97_HIA_AIC_xDR_BASE, + .hia_dfe = SAFEXCEL_EIP97_HIA_DFE_BASE, + .hia_dfe_thr = SAFEXCEL_EIP97_HIA_DFE_THR_BASE, + .hia_dse = SAFEXCEL_EIP97_HIA_DSE_BASE, + .hia_dse_thr = SAFEXCEL_EIP97_HIA_DSE_THR_BASE, + .hia_gen_cfg = SAFEXCEL_EIP97_HIA_GEN_CFG_BASE, + .pe = SAFEXCEL_EIP97_PE_BASE, +}; + +const struct safexcel_reg_offsets eip197_regs_offset = { + .hia_aic = SAFEXCEL_EIP197_HIA_AIC_BASE, + .hia_aic_g = SAFEXCEL_EIP197_HIA_AIC_G_BASE, + .hia_aic_r = SAFEXCEL_EIP197_HIA_AIC_R_BASE, + .hia_aic_xdr = SAFEXCEL_EIP197_HIA_AIC_xDR_BASE, + .hia_dfe = SAFEXCEL_EIP197_HIA_DFE_BASE, + .hia_dfe_thr = SAFEXCEL_EIP197_HIA_DFE_THR_BASE, + .hia_dse = SAFEXCEL_EIP197_HIA_DSE_BASE, + .hia_dse_thr = SAFEXCEL_EIP197_HIA_DSE_THR_BASE, + .hia_gen_cfg = SAFEXCEL_EIP197_HIA_GEN_CFG_BASE, + .pe = SAFEXCEL_EIP197_PE_BASE, +}; + +static struct safexcel_cmd_descr * +safexcel_cmd_descr_next(struct safexcel_cmd_descr_ring *ring) +{ + struct safexcel_cmd_descr *cdesc; + + if (ring->write == ring->read) + return (NULL); + cdesc = &ring->desc[ring->read]; + ring->read = (ring->read + 1) % SAFEXCEL_RING_SIZE; + return (cdesc); +} + +static struct safexcel_res_descr * +safexcel_res_descr_next(struct safexcel_res_descr_ring *ring) +{ + struct safexcel_res_descr *rdesc; + + if (ring->write == ring->read) + return (NULL); + rdesc = &ring->desc[ring->read]; + ring->read = (ring->read + 1) % SAFEXCEL_RING_SIZE; + return (rdesc); +} + +static struct safexcel_request * +safexcel_alloc_request(struct safexcel_softc *sc, struct safexcel_ring *ring) +{ + struct safexcel_request *req; + + mtx_assert(&ring->mtx, MA_OWNED); + + if ((req = STAILQ_FIRST(&ring->free_requests)) != NULL) + STAILQ_REMOVE_HEAD(&ring->free_requests, link); + return (req); +} + +static void +safexcel_free_request(struct safexcel_ring *ring, struct safexcel_request *req) +{ + struct safexcel_context_record *ctx; + + mtx_assert(&ring->mtx, MA_OWNED); + + if (req->dmap_loaded) { + bus_dmamap_unload(ring->data_dtag, req->dmap); + req->dmap_loaded = false; + } + ctx = (struct safexcel_context_record *)req->ctx.vaddr; + explicit_bzero(ctx->data, sizeof(ctx->data)); + explicit_bzero(req->iv, sizeof(req->iv)); + STAILQ_INSERT_TAIL(&ring->free_requests, req, link); +} + +static void +safexcel_enqueue_request(struct safexcel_softc *sc, struct safexcel_ring *ring, + struct safexcel_request *req) +{ + mtx_assert(&ring->mtx, MA_OWNED); + + STAILQ_INSERT_TAIL(&ring->ready_requests, req, link); +} + +static void +safexcel_rdr_intr(struct safexcel_softc *sc, int ringidx) +{ + struct safexcel_cmd_descr *cdesc; + struct safexcel_res_descr *rdesc; + struct safexcel_request *req; + struct safexcel_ring *ring; + uint32_t error, i, ncdescs, nrdescs, nreqs; + + ring = &sc->sc_ring[ringidx]; + + mtx_lock(&ring->mtx); + nreqs = SAFEXCEL_READ(sc, + SAFEXCEL_HIA_RDR(sc, ringidx) + SAFEXCEL_HIA_xDR_PROC_COUNT); + nreqs >>= SAFEXCEL_xDR_PROC_xD_PKT_OFFSET; + nreqs &= SAFEXCEL_xDR_PROC_xD_PKT_MASK; + if (nreqs == 0) { + SAFEXCEL_DPRINTF(sc, 1, + "zero pending requests on ring %d\n", ringidx); + goto out; + } + + ring = &sc->sc_ring[ringidx]; + bus_dmamap_sync(ring->rdr.dma.tag, ring->rdr.dma.map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + bus_dmamap_sync(ring->cdr.dma.tag, ring->cdr.dma.map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + bus_dmamap_sync(ring->dma_atok.tag, ring->dma_atok.map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + + ncdescs = nrdescs = 0; + for (i = 0; i < nreqs; i++) { + req = STAILQ_FIRST(&ring->queued_requests); + KASSERT(req != NULL, ("%s: expected %d pending requests", + __func__, nreqs)); + STAILQ_REMOVE_HEAD(&ring->queued_requests, link); + mtx_unlock(&ring->mtx); + + bus_dmamap_sync(req->ctx.tag, req->ctx.map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + bus_dmamap_sync(ring->data_dtag, req->dmap, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + + ncdescs += req->cdescs; + while (req->cdescs-- > 0) { + cdesc = safexcel_cmd_descr_next(&ring->cdr); + KASSERT(cdesc != NULL, + ("%s: missing control descriptor", __func__)); + if (req->cdescs == 0) + KASSERT(cdesc->last_seg, + ("%s: chain is not terminated", __func__)); + } + nrdescs += req->rdescs; + while (req->rdescs-- > 0) { + rdesc = safexcel_res_descr_next(&ring->rdr); + error = rdesc->result_data.error_code; + if (error != 0) { + if (error == SAFEXCEL_RESULT_ERR_AUTH_FAILED && + req->crp->crp_etype == 0) { + req->crp->crp_etype = EBADMSG; + } else { + SAFEXCEL_DPRINTF(sc, 1, + "error code %#x\n", error); + req->crp->crp_etype = EIO; + } + } + } + + crypto_done(req->crp); + mtx_lock(&ring->mtx); + safexcel_free_request(ring, req); + } + + if (nreqs != 0) { + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, ringidx) + SAFEXCEL_HIA_xDR_PROC_COUNT, + SAFEXCEL_xDR_PROC_xD_PKT(nreqs) | + (sc->sc_config.rd_offset * nrdescs * sizeof(uint32_t))); + } +out: + if (!STAILQ_EMPTY(&ring->queued_requests)) { + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, ringidx) + SAFEXCEL_HIA_xDR_THRESH, + SAFEXCEL_HIA_CDR_THRESH_PKT_MODE | 1); + } + mtx_unlock(&ring->mtx); +} + +static void +safexcel_ring_intr(void *arg) +{ + struct safexcel_softc *sc; + struct safexcel_intr_handle *ih; + uint32_t status, stat; + int ring; + bool blocked, rdrpending; + + ih = arg; + sc = ih->sc; + ring = ih->ring; + + status = SAFEXCEL_READ(sc, SAFEXCEL_HIA_AIC_R(sc) + + SAFEXCEL_HIA_AIC_R_ENABLED_STAT(ring)); + /* CDR interrupts */ + if (status & SAFEXCEL_CDR_IRQ(ring)) { + stat = SAFEXCEL_READ(sc, + SAFEXCEL_HIA_CDR(sc, ring) + SAFEXCEL_HIA_xDR_STAT); + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_CDR(sc, ring) + SAFEXCEL_HIA_xDR_STAT, + stat & SAFEXCEL_CDR_INTR_MASK); + } + /* RDR interrupts */ + rdrpending = false; + if (status & SAFEXCEL_RDR_IRQ(ring)) { + stat = SAFEXCEL_READ(sc, + SAFEXCEL_HIA_RDR(sc, ring) + SAFEXCEL_HIA_xDR_STAT); + if ((stat & SAFEXCEL_xDR_ERR) == 0) + rdrpending = true; + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, ring) + SAFEXCEL_HIA_xDR_STAT, + stat & SAFEXCEL_RDR_INTR_MASK); + } + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_AIC_R(sc) + SAFEXCEL_HIA_AIC_R_ACK(ring), + status); + + if (rdrpending) + safexcel_rdr_intr(sc, ring); + + mtx_lock(&sc->sc_mtx); + blocked = sc->sc_blocked; + sc->sc_blocked = 0; + mtx_unlock(&sc->sc_mtx); + + if (blocked) + crypto_unblock(sc->sc_cid, blocked); +} + +static int +safexcel_configure(struct safexcel_softc *sc) +{ + uint32_t i, mask, pemask, reg; + device_t dev; + + if (sc->sc_type == 197) { + sc->sc_offsets = eip197_regs_offset; + pemask = SAFEXCEL_N_PES_MASK; + } else { + sc->sc_offsets = eip97_regs_offset; + pemask = EIP97_N_PES_MASK; + } + + dev = sc->sc_dev; + + /* Scan for valid ring interrupt controllers. */ + for (i = 0; i < SAFEXCEL_MAX_RING_AIC; i++) { + reg = SAFEXCEL_READ(sc, SAFEXCEL_HIA_AIC_R(sc) + + SAFEXCEL_HIA_AIC_R_VERSION(i)); + if (SAFEXCEL_REG_LO16(reg) != EIP201_VERSION_LE) + break; + } + sc->sc_config.aic_rings = i; + if (sc->sc_config.aic_rings == 0) + return (-1); + + reg = SAFEXCEL_READ(sc, SAFEXCEL_HIA_AIC_G(sc) + SAFEXCEL_HIA_OPTIONS); + /* Check for 64bit addressing. */ + if ((reg & SAFEXCEL_OPT_ADDR_64) == 0) + return (-1); + /* Check alignment constraints (which we do not support). */ + if (((reg & SAFEXCEL_OPT_TGT_ALIGN_MASK) >> + SAFEXCEL_OPT_TGT_ALIGN_OFFSET) != 0) + return (-1); + + sc->sc_config.hdw = + (reg & SAFEXCEL_xDR_HDW_MASK) >> SAFEXCEL_xDR_HDW_OFFSET; + mask = (1 << sc->sc_config.hdw) - 1; + + sc->sc_config.rings = reg & SAFEXCEL_N_RINGS_MASK; + /* Limit the number of rings to the number of the AIC Rings. */ + sc->sc_config.rings = MIN(sc->sc_config.rings, sc->sc_config.aic_rings); + + sc->sc_config.pes = (reg & pemask) >> SAFEXCEL_N_PES_OFFSET; + + sc->sc_config.cd_size = + sizeof(struct safexcel_cmd_descr) / sizeof(uint32_t); + sc->sc_config.cd_offset = (sc->sc_config.cd_size + mask) & ~mask; + + sc->sc_config.rd_size = + sizeof(struct safexcel_res_descr) / sizeof(uint32_t); + sc->sc_config.rd_offset = (sc->sc_config.rd_size + mask) & ~mask; + + sc->sc_config.atok_offset = + (SAFEXCEL_MAX_ATOKENS * sizeof(struct safexcel_instr) + mask) & + ~mask; + + return (0); +} + +static void +safexcel_init_hia_bus_access(struct safexcel_softc *sc) +{ + uint32_t version, val; + + /* Determine endianness and configure byte swap. */ + version = SAFEXCEL_READ(sc, + SAFEXCEL_HIA_AIC(sc) + SAFEXCEL_HIA_VERSION); + val = SAFEXCEL_READ(sc, SAFEXCEL_HIA_AIC(sc) + SAFEXCEL_HIA_MST_CTRL); + if (SAFEXCEL_REG_HI16(version) == SAFEXCEL_HIA_VERSION_BE) { + val = SAFEXCEL_READ(sc, + SAFEXCEL_HIA_AIC(sc) + SAFEXCEL_HIA_MST_CTRL); + val = val ^ (SAFEXCEL_MST_CTRL_NO_BYTE_SWAP >> 24); + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_AIC(sc) + SAFEXCEL_HIA_MST_CTRL, + val); + } + + /* Configure wr/rd cache values. */ + SAFEXCEL_WRITE(sc, SAFEXCEL_HIA_GEN_CFG(sc) + SAFEXCEL_HIA_MST_CTRL, + SAFEXCEL_MST_CTRL_RD_CACHE(RD_CACHE_4BITS) | + SAFEXCEL_MST_CTRL_WD_CACHE(WR_CACHE_4BITS)); +} + +static void +safexcel_disable_global_interrupts(struct safexcel_softc *sc) +{ + /* Disable and clear pending interrupts. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_AIC_G(sc) + SAFEXCEL_HIA_AIC_G_ENABLE_CTRL, 0); + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_AIC_G(sc) + SAFEXCEL_HIA_AIC_G_ACK, + SAFEXCEL_AIC_G_ACK_ALL_MASK); +} + +/* + * Configure the data fetch engine. This component parses command descriptors + * and sets up DMA transfers from host memory to the corresponding processing + * engine. + */ +static void +safexcel_configure_dfe_engine(struct safexcel_softc *sc, int pe) +{ + /* Reset all DFE threads. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_DFE_THR(sc) + SAFEXCEL_HIA_DFE_THR_CTRL(pe), + SAFEXCEL_DxE_THR_CTRL_RESET_PE); + + /* Deassert the DFE reset. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_DFE_THR(sc) + SAFEXCEL_HIA_DFE_THR_CTRL(pe), 0); + + /* DMA transfer size to use. */ + SAFEXCEL_WRITE(sc, SAFEXCEL_HIA_DFE(sc) + SAFEXCEL_HIA_DFE_CFG(pe), + SAFEXCEL_HIA_DFE_CFG_DIS_DEBUG | + SAFEXCEL_HIA_DxE_CFG_MIN_DATA_SIZE(6) | + SAFEXCEL_HIA_DxE_CFG_MAX_DATA_SIZE(9) | + SAFEXCEL_HIA_DxE_CFG_MIN_CTRL_SIZE(6) | + SAFEXCEL_HIA_DxE_CFG_MAX_CTRL_SIZE(7) | + SAFEXCEL_HIA_DxE_CFG_DATA_CACHE_CTRL(RD_CACHE_3BITS) | + SAFEXCEL_HIA_DxE_CFG_CTRL_CACHE_CTRL(RD_CACHE_3BITS)); + + /* Configure the PE DMA transfer thresholds. */ + SAFEXCEL_WRITE(sc, SAFEXCEL_PE(sc) + SAFEXCEL_PE_IN_DBUF_THRES(pe), + SAFEXCEL_PE_IN_xBUF_THRES_MIN(6) | + SAFEXCEL_PE_IN_xBUF_THRES_MAX(9)); + SAFEXCEL_WRITE(sc, SAFEXCEL_PE(sc) + SAFEXCEL_PE_IN_TBUF_THRES(pe), + SAFEXCEL_PE_IN_xBUF_THRES_MIN(6) | + SAFEXCEL_PE_IN_xBUF_THRES_MAX(7)); +} + +/* + * Configure the data store engine. This component parses result descriptors + * and sets up DMA transfers from the processing engine to host memory. + */ +static int +safexcel_configure_dse(struct safexcel_softc *sc, int pe) +{ + uint32_t val; + int count; + + /* Disable and reset all DSE threads. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_DSE_THR(sc) + SAFEXCEL_HIA_DSE_THR_CTRL(pe), + SAFEXCEL_DxE_THR_CTRL_RESET_PE); + + /* Wait for a second for threads to go idle. */ + for (count = 0;;) { + val = SAFEXCEL_READ(sc, + SAFEXCEL_HIA_DSE_THR(sc) + SAFEXCEL_HIA_DSE_THR_STAT(pe)); + if ((val & SAFEXCEL_DSE_THR_RDR_ID_MASK) == + SAFEXCEL_DSE_THR_RDR_ID_MASK) + break; + if (count++ > 10000) { + device_printf(sc->sc_dev, "DSE reset timeout\n"); + return (-1); + } + DELAY(100); + } + + /* Exit the reset state. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_DSE_THR(sc) + SAFEXCEL_HIA_DSE_THR_CTRL(pe), 0); + + /* DMA transfer size to use */ + SAFEXCEL_WRITE(sc, SAFEXCEL_HIA_DSE(sc) + SAFEXCEL_HIA_DSE_CFG(pe), + SAFEXCEL_HIA_DSE_CFG_DIS_DEBUG | + SAFEXCEL_HIA_DxE_CFG_MIN_DATA_SIZE(7) | + SAFEXCEL_HIA_DxE_CFG_MAX_DATA_SIZE(8) | + SAFEXCEL_HIA_DxE_CFG_DATA_CACHE_CTRL(WR_CACHE_3BITS) | + SAFEXCEL_HIA_DSE_CFG_ALLWAYS_BUFFERABLE); + + /* Configure the procesing engine thresholds */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_PE(sc) + SAFEXCEL_PE_OUT_DBUF_THRES(pe), + SAFEXCEL_PE_OUT_DBUF_THRES_MIN(7) | + SAFEXCEL_PE_OUT_DBUF_THRES_MAX(8)); + + return (0); +} + +static void +safexcel_hw_prepare_rings(struct safexcel_softc *sc) +{ + int i; + + for (i = 0; i < sc->sc_config.rings; i++) { + /* + * Command descriptors. + */ + + /* Clear interrupts for this ring. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_AIC_R(sc) + SAFEXCEL_HIA_AIC_R_ENABLE_CLR(i), + SAFEXCEL_HIA_AIC_R_ENABLE_CLR_ALL_MASK); + + /* Disable external triggering. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_CDR(sc, i) + SAFEXCEL_HIA_xDR_CFG, 0); + + /* Clear the pending prepared counter. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_CDR(sc, i) + SAFEXCEL_HIA_xDR_PREP_COUNT, + SAFEXCEL_xDR_PREP_CLR_COUNT); + + /* Clear the pending processed counter. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_CDR(sc, i) + SAFEXCEL_HIA_xDR_PROC_COUNT, + SAFEXCEL_xDR_PROC_CLR_COUNT); + + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_CDR(sc, i) + SAFEXCEL_HIA_xDR_PREP_PNTR, 0); + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_CDR(sc, i) + SAFEXCEL_HIA_xDR_PROC_PNTR, 0); + + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_CDR(sc, i) + SAFEXCEL_HIA_xDR_RING_SIZE, + SAFEXCEL_RING_SIZE * sc->sc_config.cd_offset * + sizeof(uint32_t)); + + /* + * Result descriptors. + */ + + /* Disable external triggering. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, i) + SAFEXCEL_HIA_xDR_CFG, 0); + + /* Clear the pending prepared counter. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, i) + SAFEXCEL_HIA_xDR_PREP_COUNT, + SAFEXCEL_xDR_PREP_CLR_COUNT); + + /* Clear the pending processed counter. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, i) + SAFEXCEL_HIA_xDR_PROC_COUNT, + SAFEXCEL_xDR_PROC_CLR_COUNT); + + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, i) + SAFEXCEL_HIA_xDR_PREP_PNTR, 0); + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, i) + SAFEXCEL_HIA_xDR_PROC_PNTR, 0); + + /* Ring size. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, i) + SAFEXCEL_HIA_xDR_RING_SIZE, + SAFEXCEL_RING_SIZE * sc->sc_config.rd_offset * + sizeof(uint32_t)); + } +} + +static void +safexcel_hw_setup_rings(struct safexcel_softc *sc) +{ + struct safexcel_ring *ring; + uint32_t cd_size_rnd, mask, rd_size_rnd, val; + int i; + + mask = (1 << sc->sc_config.hdw) - 1; + cd_size_rnd = (sc->sc_config.cd_size + mask) >> sc->sc_config.hdw; + val = (sizeof(struct safexcel_res_descr) - + sizeof(struct safexcel_res_data)) / sizeof(uint32_t); + rd_size_rnd = (val + mask) >> sc->sc_config.hdw; + + for (i = 0; i < sc->sc_config.rings; i++) { + ring = &sc->sc_ring[i]; + + /* + * Command descriptors. + */ + + /* Ring base address. */ + SAFEXCEL_WRITE(sc, SAFEXCEL_HIA_CDR(sc, i) + + SAFEXCEL_HIA_xDR_RING_BASE_ADDR_LO, + SAFEXCEL_ADDR_LO(ring->cdr.dma.paddr)); + SAFEXCEL_WRITE(sc, SAFEXCEL_HIA_CDR(sc, i) + + SAFEXCEL_HIA_xDR_RING_BASE_ADDR_HI, + SAFEXCEL_ADDR_HI(ring->cdr.dma.paddr)); + + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_CDR(sc, i) + SAFEXCEL_HIA_xDR_DESC_SIZE, + SAFEXCEL_xDR_DESC_MODE_64BIT | SAFEXCEL_CDR_DESC_MODE_ADCP | + (sc->sc_config.cd_offset << SAFEXCEL_xDR_DESC_xD_OFFSET) | + sc->sc_config.cd_size); + + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_CDR(sc, i) + SAFEXCEL_HIA_xDR_CFG, + ((SAFEXCEL_FETCH_COUNT * (cd_size_rnd << sc->sc_config.hdw)) << + SAFEXCEL_xDR_xD_FETCH_THRESH) | + (SAFEXCEL_FETCH_COUNT * sc->sc_config.cd_offset)); + + /* Configure DMA tx control. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_CDR(sc, i) + SAFEXCEL_HIA_xDR_DMA_CFG, + SAFEXCEL_HIA_xDR_CFG_WR_CACHE(WR_CACHE_3BITS) | + SAFEXCEL_HIA_xDR_CFG_RD_CACHE(RD_CACHE_3BITS)); + + /* Clear any pending interrupt. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_CDR(sc, i) + SAFEXCEL_HIA_xDR_STAT, + SAFEXCEL_CDR_INTR_MASK); + + /* + * Result descriptors. + */ + + /* Ring base address. */ + SAFEXCEL_WRITE(sc, SAFEXCEL_HIA_RDR(sc, i) + + SAFEXCEL_HIA_xDR_RING_BASE_ADDR_LO, + SAFEXCEL_ADDR_LO(ring->rdr.dma.paddr)); + SAFEXCEL_WRITE(sc, SAFEXCEL_HIA_RDR(sc, i) + + SAFEXCEL_HIA_xDR_RING_BASE_ADDR_HI, + SAFEXCEL_ADDR_HI(ring->rdr.dma.paddr)); + + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, i) + SAFEXCEL_HIA_xDR_DESC_SIZE, + SAFEXCEL_xDR_DESC_MODE_64BIT | + (sc->sc_config.rd_offset << SAFEXCEL_xDR_DESC_xD_OFFSET) | + sc->sc_config.rd_size); + + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, i) + SAFEXCEL_HIA_xDR_CFG, + ((SAFEXCEL_FETCH_COUNT * (rd_size_rnd << sc->sc_config.hdw)) << + SAFEXCEL_xDR_xD_FETCH_THRESH) | + (SAFEXCEL_FETCH_COUNT * sc->sc_config.rd_offset)); + + /* Configure DMA tx control. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, i) + SAFEXCEL_HIA_xDR_DMA_CFG, + SAFEXCEL_HIA_xDR_CFG_WR_CACHE(WR_CACHE_3BITS) | + SAFEXCEL_HIA_xDR_CFG_RD_CACHE(RD_CACHE_3BITS) | + SAFEXCEL_HIA_xDR_WR_RES_BUF | SAFEXCEL_HIA_xDR_WR_CTRL_BUF); + + /* Clear any pending interrupt. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, i) + SAFEXCEL_HIA_xDR_STAT, + SAFEXCEL_RDR_INTR_MASK); + + /* Enable ring interrupt. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_AIC_R(sc) + SAFEXCEL_HIA_AIC_R_ENABLE_CTRL(i), + SAFEXCEL_RDR_IRQ(i)); + } +} + +/* Reset the command and result descriptor rings. */ +static void +safexcel_hw_reset_rings(struct safexcel_softc *sc) +{ + int i; + + for (i = 0; i < sc->sc_config.rings; i++) { + /* + * Result descriptor ring operations. + */ + + /* Reset ring base address. */ + SAFEXCEL_WRITE(sc, SAFEXCEL_HIA_RDR(sc, i) + + SAFEXCEL_HIA_xDR_RING_BASE_ADDR_LO, 0); + SAFEXCEL_WRITE(sc, SAFEXCEL_HIA_RDR(sc, i) + + SAFEXCEL_HIA_xDR_RING_BASE_ADDR_HI, 0); + + /* Clear the pending prepared counter. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, i) + SAFEXCEL_HIA_xDR_PREP_COUNT, + SAFEXCEL_xDR_PREP_CLR_COUNT); + + /* Clear the pending processed counter. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, i) + SAFEXCEL_HIA_xDR_PROC_COUNT, + SAFEXCEL_xDR_PROC_CLR_COUNT); + + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, i) + SAFEXCEL_HIA_xDR_PREP_PNTR, 0); + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, i) + SAFEXCEL_HIA_xDR_PROC_PNTR, 0); + + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, i) + SAFEXCEL_HIA_xDR_RING_SIZE, 0); + + /* Clear any pending interrupt. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, i) + SAFEXCEL_HIA_xDR_STAT, + SAFEXCEL_RDR_INTR_MASK); + + /* Disable ring interrupt. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_AIC_R(sc) + SAFEXCEL_HIA_AIC_R_ENABLE_CLR(i), + SAFEXCEL_RDR_IRQ(i)); + + /* + * Command descriptor ring operations. + */ + + /* Reset ring base address. */ + SAFEXCEL_WRITE(sc, SAFEXCEL_HIA_CDR(sc, i) + + SAFEXCEL_HIA_xDR_RING_BASE_ADDR_LO, 0); + SAFEXCEL_WRITE(sc, SAFEXCEL_HIA_CDR(sc, i) + + SAFEXCEL_HIA_xDR_RING_BASE_ADDR_HI, 0); + + /* Clear the pending prepared counter. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_CDR(sc, i) + SAFEXCEL_HIA_xDR_PREP_COUNT, + SAFEXCEL_xDR_PREP_CLR_COUNT); + + /* Clear the pending processed counter. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_CDR(sc, i) + SAFEXCEL_HIA_xDR_PROC_COUNT, + SAFEXCEL_xDR_PROC_CLR_COUNT); + + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_CDR(sc, i) + SAFEXCEL_HIA_xDR_PREP_PNTR, 0); + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_CDR(sc, i) + SAFEXCEL_HIA_xDR_PROC_PNTR, 0); + + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_CDR(sc, i) + SAFEXCEL_HIA_xDR_RING_SIZE, 0); + + /* Clear any pending interrupt. */ + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_CDR(sc, i) + SAFEXCEL_HIA_xDR_STAT, + SAFEXCEL_CDR_INTR_MASK); + } +} + +static void +safexcel_enable_pe_engine(struct safexcel_softc *sc, int pe) +{ + int i, ring_mask; + + for (ring_mask = 0, i = 0; i < sc->sc_config.rings; i++) { + ring_mask <<= 1; + ring_mask |= 1; + } + + /* Enable command descriptor rings. */ + SAFEXCEL_WRITE(sc, SAFEXCEL_HIA_DFE_THR(sc) + SAFEXCEL_HIA_DFE_THR_CTRL(pe), + SAFEXCEL_DxE_THR_CTRL_EN | ring_mask); + + /* Enable result descriptor rings. */ + SAFEXCEL_WRITE(sc, SAFEXCEL_HIA_DSE_THR(sc) + SAFEXCEL_HIA_DSE_THR_CTRL(pe), + SAFEXCEL_DxE_THR_CTRL_EN | ring_mask); + + /* Clear any HIA interrupt. */ + SAFEXCEL_WRITE(sc, SAFEXCEL_HIA_AIC_G(sc) + SAFEXCEL_HIA_AIC_G_ACK, + SAFEXCEL_AIC_G_ACK_HIA_MASK); +} + +static void +safexcel_execute(struct safexcel_softc *sc, struct safexcel_ring *ring, + struct safexcel_request *req) +{ + uint32_t ncdescs, nrdescs, nreqs; + int ringidx; + bool busy; + + mtx_assert(&ring->mtx, MA_OWNED); + + ringidx = req->sess->ringidx; + if (STAILQ_EMPTY(&ring->ready_requests)) + return; + busy = !STAILQ_EMPTY(&ring->queued_requests); + ncdescs = nrdescs = nreqs = 0; + while ((req = STAILQ_FIRST(&ring->ready_requests)) != NULL && + req->cdescs + ncdescs <= SAFEXCEL_MAX_BATCH_SIZE && + req->rdescs + nrdescs <= SAFEXCEL_MAX_BATCH_SIZE) { + STAILQ_REMOVE_HEAD(&ring->ready_requests, link); + STAILQ_INSERT_TAIL(&ring->queued_requests, req, link); + ncdescs += req->cdescs; + nrdescs += req->rdescs; + nreqs++; + } + + if (!busy) { + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, ringidx) + SAFEXCEL_HIA_xDR_THRESH, + SAFEXCEL_HIA_CDR_THRESH_PKT_MODE | nreqs); + } + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_RDR(sc, ringidx) + SAFEXCEL_HIA_xDR_PREP_COUNT, + nrdescs * sc->sc_config.rd_offset * sizeof(uint32_t)); + SAFEXCEL_WRITE(sc, + SAFEXCEL_HIA_CDR(sc, ringidx) + SAFEXCEL_HIA_xDR_PREP_COUNT, + ncdescs * sc->sc_config.cd_offset * sizeof(uint32_t)); +} + +static void +safexcel_init_rings(struct safexcel_softc *sc) +{ + struct safexcel_cmd_descr *cdesc; + struct safexcel_ring *ring; + char buf[32]; + uint64_t atok; + int i, j; + + for (i = 0; i < sc->sc_config.rings; i++) { + ring = &sc->sc_ring[i]; + + snprintf(buf, sizeof(buf), "safexcel_ring%d", i); + mtx_init(&ring->mtx, buf, NULL, MTX_DEF); + STAILQ_INIT(&ring->free_requests); + STAILQ_INIT(&ring->ready_requests); + STAILQ_INIT(&ring->queued_requests); + + ring->cdr.read = ring->cdr.write = 0; + ring->rdr.read = ring->rdr.write = 0; + for (j = 0; j < SAFEXCEL_RING_SIZE; j++) { + cdesc = &ring->cdr.desc[j]; + atok = ring->dma_atok.paddr + + sc->sc_config.atok_offset * j; + cdesc->atok_lo = SAFEXCEL_ADDR_LO(atok); + cdesc->atok_hi = SAFEXCEL_ADDR_HI(atok); + } + } +} + +static void +safexcel_dma_alloc_mem_cb(void *arg, bus_dma_segment_t *segs, int nseg, + int error) +{ + struct safexcel_dma_mem *sdm; + + if (error != 0) + return; + + KASSERT(nseg == 1, ("%s: nsegs is %d", __func__, nseg)); + sdm = arg; + sdm->paddr = segs->ds_addr; +} + +static int +safexcel_dma_alloc_mem(struct safexcel_softc *sc, struct safexcel_dma_mem *sdm, + bus_size_t size) +{ + int error; + + KASSERT(sdm->vaddr == NULL, + ("%s: DMA memory descriptor in use.", __func__)); + + error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), /* parent */ + PAGE_SIZE, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filtfunc, filtfuncarg */ + size, 1, /* maxsize, nsegments */ + size, BUS_DMA_COHERENT, /* maxsegsz, flags */ + NULL, NULL, /* lockfunc, lockfuncarg */ + &sdm->tag); /* dmat */ + if (error != 0) { + device_printf(sc->sc_dev, + "failed to allocate busdma tag, error %d\n", error); + goto err1; + } + + error = bus_dmamem_alloc(sdm->tag, (void **)&sdm->vaddr, + BUS_DMA_WAITOK | BUS_DMA_ZERO | BUS_DMA_COHERENT, &sdm->map); + if (error != 0) { + device_printf(sc->sc_dev, + "failed to allocate DMA safe memory, error %d\n", error); + goto err2; + } + + error = bus_dmamap_load(sdm->tag, sdm->map, sdm->vaddr, size, + safexcel_dma_alloc_mem_cb, sdm, BUS_DMA_NOWAIT); + if (error != 0) { + device_printf(sc->sc_dev, + "cannot get address of the DMA memory, error %d\n", error); + goto err3; + } + + return (0); +err3: + bus_dmamem_free(sdm->tag, sdm->vaddr, sdm->map); +err2: + bus_dma_tag_destroy(sdm->tag); +err1: + sdm->vaddr = NULL; + + return (error); +} + +static void +safexcel_dma_free_mem(struct safexcel_dma_mem *sdm) +{ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Jul 14 14:11:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2518E36430D; Tue, 14 Jul 2020 14:11: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 4B5jBL6zZ6z4JTW; Tue, 14 Jul 2020 14:11:54 +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 BCA5127806; Tue, 14 Jul 2020 14:11:54 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06EEBsgZ060850; Tue, 14 Jul 2020 14:11:54 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06EEBsCn060849; Tue, 14 Jul 2020 14:11:54 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007141411.06EEBsCn060849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 14 Jul 2020 14:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363181 - head/tests/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/tests/sys/opencrypto X-SVN-Commit-Revision: 363181 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 14:11:55 -0000 Author: markj Date: Tue Jul 14 14:11:54 2020 New Revision: 363181 URL: https://svnweb.freebsd.org/changeset/base/363181 Log: Add safexcel(4) to cryptotest. MFC after: 1 week Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/tests/sys/opencrypto/cryptotest.py Modified: head/tests/sys/opencrypto/cryptotest.py ============================================================================== --- head/tests/sys/opencrypto/cryptotest.py Tue Jul 14 14:09:29 2020 (r363180) +++ head/tests/sys/opencrypto/cryptotest.py Tue Jul 14 14:11:54 2020 (r363181) @@ -50,8 +50,8 @@ def katg(base, glob): raise unittest.SkipTest("Missing %s test vectors" % (base)) return iglob(os.path.join(katdir, base, glob)) -aesmodules = [ 'cryptosoft0', 'aesni0', 'armv8crypto0', 'ccr0', 'ccp0' ] -shamodules = [ 'cryptosoft0', 'aesni0', 'armv8crypto0', 'ccr0', 'ccp0' ] +aesmodules = [ 'cryptosoft0', 'aesni0', 'armv8crypto0', 'ccr0', 'ccp0', 'safexcel0' ] +shamodules = [ 'cryptosoft0', 'aesni0', 'armv8crypto0', 'ccr0', 'ccp0', 'safexcel0' ] def GenTestCase(cname): try: @@ -456,6 +456,7 @@ aesni = GenTestCase('aesni0') armv8crypto = GenTestCase('armv8crypto0') ccr = GenTestCase('ccr0') ccp = GenTestCase('ccp0') +safexcel = GenTestCase('safexcel0') if __name__ == '__main__': unittest.main() From owner-svn-src-head@freebsd.org Tue Jul 14 15:00:34 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC0E13656D8; Tue, 14 Jul 2020 15:00:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5kGV4B0kz4NXW; Tue, 14 Jul 2020 15:00:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 622D41978D; Tue, 14 Jul 2020 15:00:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r363171 - head/contrib/flex/src To: Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202007140500.06E508mV016928@repo.freebsd.org> From: Jung-uk Kim Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAG0Hkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPokBPQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9uQENBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAGJASUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Cc: Kyle Evans Message-ID: <953fd975-215b-2d53-23e6-58faa6af9c96@FreeBSD.org> Date: Tue, 14 Jul 2020 11:00:26 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <202007140500.06E508mV016928@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 15:00:34 -0000 On 20. 7. 14., Adrian Chadd wrote: > Author: adrian > Date: Tue Jul 14 05:00:08 2020 > New Revision: 363171 > URL: https://svnweb.freebsd.org/changeset/base/363171 > > Log: > [flex] Fix compilation issue under mips-gcc-6.4 > > This was triggering a pointer-losing-constness error. > > Modified: > head/contrib/flex/src/main.c > > Modified: head/contrib/flex/src/main.c > ============================================================================== > --- head/contrib/flex/src/main.c Tue Jul 14 01:54:24 2020 (r363170) > +++ head/contrib/flex/src/main.c Tue Jul 14 05:00:08 2020 (r363171) > @@ -342,7 +342,7 @@ void check_options (void) > /* Setup the filter chain. */ > output_chain = filter_create_int(NULL, filter_tee_header, headerfilename); > if ( !(m4 = getenv("M4"))) { > - char *slash; > + const char *slash; > m4 = M4; > if ((slash = strrchr(M4, '/')) != NULL) { > m4 = slash+1; > It was discussed in this ML. https://lists.freebsd.org/pipermail/svn-src-head/2020-June/137432.html kevans even filed an upstream pull request. https://github.com/westes/flex/pull/449 Why did you commit it without asking us? Jung-uk Kim From owner-svn-src-head@freebsd.org Tue Jul 14 15:05:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 44D53365AEF; Tue, 14 Jul 2020 15:05:25 +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 4B5kN473s8z4QPK; Tue, 14 Jul 2020 15:05:24 +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 C354527E9F; Tue, 14 Jul 2020 15:05:24 +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 06EF5OPM092474; Tue, 14 Jul 2020 15:05:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06EF5OC5092473; Tue, 14 Jul 2020 15:05:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007141505.06EF5OC5092473@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 14 Jul 2020 15:05:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363182 - head/sys/dev/safexcel X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/dev/safexcel X-SVN-Commit-Revision: 363182 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 15:05:25 -0000 Author: markj Date: Tue Jul 14 15:05:24 2020 New Revision: 363182 URL: https://svnweb.freebsd.org/changeset/base/363182 Log: safexcel(4): Fix the INVARIANTS build after a last-second change. Reported by: Jenkins MFC with: r363180 Modified: head/sys/dev/safexcel/safexcel.c Modified: head/sys/dev/safexcel/safexcel.c ============================================================================== --- head/sys/dev/safexcel/safexcel.c Tue Jul 14 14:11:54 2020 (r363181) +++ head/sys/dev/safexcel/safexcel.c Tue Jul 14 15:05:24 2020 (r363182) @@ -1896,8 +1896,8 @@ safexcel_cmd_descr_add(struct safexcel_ring *ring, boo struct safexcel_cmd_descr *cdesc; struct safexcel_cmd_descr_ring *cring; - KASSERT(full_data_len <= SAFEXCEL_MAX_REQUEST_SIZE, - ("%s: request length %u too long", __func__, full_data_len)); + KASSERT(reqlen <= SAFEXCEL_MAX_REQUEST_SIZE, + ("%s: request length %u too long", __func__, reqlen)); mtx_assert(&ring->mtx, MA_OWNED); cring = &ring->cdr; From owner-svn-src-head@freebsd.org Tue Jul 14 15:05:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ABA5E365B32; Tue, 14 Jul 2020 15:05:39 +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 4B5kNM2VStz4QXB; Tue, 14 Jul 2020 15:05:38 +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 C4C3627D9E; Tue, 14 Jul 2020 15:05:38 +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 06EF5cui092527; Tue, 14 Jul 2020 15:05:38 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06EF5coM092526; Tue, 14 Jul 2020 15:05:38 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007141505.06EF5coM092526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 14 Jul 2020 15:05:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363183 - head X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 363183 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 15:05:39 -0000 Author: markj Date: Tue Jul 14 15:05:38 2020 New Revision: 363183 URL: https://svnweb.freebsd.org/changeset/base/363183 Log: Add a RELNOTES entry for safexcel(4). Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/RELNOTES Modified: head/RELNOTES ============================================================================== --- head/RELNOTES Tue Jul 14 15:05:24 2020 (r363182) +++ head/RELNOTES Tue Jul 14 15:05:38 2020 (r363183) @@ -10,6 +10,9 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +r363180: + The safexcel(4) crypto offload driver has been added. + r363084: nc(1) now implements SCTP mode, enabled by specifying the --sctp option. From owner-svn-src-head@freebsd.org Tue Jul 14 15:26:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E06AF366893; Tue, 14 Jul 2020 15:26:42 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5krd5yfMz3SHT; Tue, 14 Jul 2020 15:26:41 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-qv1-f43.google.com with SMTP id e3so7633433qvo.10; Tue, 14 Jul 2020 08:26:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AkfDginwQr2FIESCfikWN+fp0SOzXnYypGrRd+YHfaM=; b=LD1EUZd9lhAFGxUYBZX/baIUwDIdXcNSa8wfwCxEOFTOSEsZPkNtt8PkLcLpG29d+m CcxB2Tr79MPsCawVY0mpbYWQZo6qsMdzRYBx/i9r3ubISU9Ij9lRQtfGPYoXpGjfFU8b B6aSLkEU8wBJD9PR0UmGYQgJ6BAGTUnmEVW74Zq9uzqn2SakvlVe0OXTkzf6nm0d9Iur k1ng30Dv894J5DtWF0T3BUpjQQw+x9SJFJ1rlQNZLdyt4SDxNTZ1TcHC+a7Fcdo1h+Hp q1UvDfAc1YfULnbtAweTiTItt7+hSm9muKXiP7wZ5i4d8YembSVueGBxBD8Jpcdsob+m +HfA== X-Gm-Message-State: AOAM533hBpnhjJTBEpEX76FGd8HzsEVyfG6lpWmc9WkgQNeCCyRwlnDO JQkLPY6WrDJH0COyNCtZigkKowLNLCAMPAJ/pQo= X-Google-Smtp-Source: ABdhPJy6SkK+mRh2kBg5+TxtUQ4nb8ZxSGWqiHUjvKAG6IxWu5osF+1poMNBvFsOeV3/rGu8LpkRbm3NWAIPEoS2Uhw= X-Received: by 2002:ad4:4812:: with SMTP id g18mr5078832qvy.56.1594740399847; Tue, 14 Jul 2020 08:26:39 -0700 (PDT) MIME-Version: 1.0 References: <202007140502.06E52IZn022859@repo.freebsd.org> In-Reply-To: From: Adrian Chadd Date: Tue, 14 Jul 2020 08:26:28 -0700 Message-ID: Subject: Re: svn commit: r363172 - head/contrib/bc/src To: Warner Losh Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4B5krd5yfMz3SHT X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of adrianchadd@gmail.com designates 209.85.219.43 as permitted sender) smtp.mailfrom=adrianchadd@gmail.com X-Spamd-Result: default: False [-1.52 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.58)[-0.578]; FROM_NEQ_ENVFROM(0.00)[adrian@freebsd.org,adrianchadd@gmail.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; RCVD_TLS_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-0.80)[-0.797]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.15)[-0.147]; RCVD_IN_DNSWL_NONE(0.00)[209.85.219.43:from]; FORGED_SENDER(0.30)[adrian@freebsd.org,adrianchadd@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.219.43:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TAGGED_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 15:26:43 -0000 On Tue, 14 Jul 2020 at 06:42, Warner Losh wrote: > Did you intend to commit to contrib software that has an active upstream? > This is going to cause conflicts in the future. Maybe you can submit it to > the new upstream instead? > i was going to do both, for the changes to both flex and bc. -adrian > > Warner > > On Mon, Jul 13, 2020 at 11:02 PM Adrian Chadd wrote: > >> Author: adrian >> Date: Tue Jul 14 05:02:18 2020 >> New Revision: 363172 >> URL: https://svnweb.freebsd.org/changeset/base/363172 >> >> Log: >> [bc] Fix a "maybe uninitialized" compiler warning under mips-gcc-6.3.0. >> >> I guess this didn't like the case statements.. ? But this does quieten >> the compiler error. >> >> Modified: >> head/contrib/bc/src/program.c >> >> Modified: head/contrib/bc/src/program.c >> >> ============================================================================== >> --- head/contrib/bc/src/program.c Tue Jul 14 05:00:08 2020 >> (r363171) >> +++ head/contrib/bc/src/program.c Tue Jul 14 05:02:18 2020 >> (r363172) >> @@ -180,7 +180,7 @@ static inline BcVec* bc_program_vec(const BcProgram *p >> >> static BcNum* bc_program_num(BcProgram *p, BcResult *r) { >> >> - BcNum *n; >> + BcNum *n = NULL; >> >> switch (r->t) { >> >> From owner-svn-src-head@freebsd.org Tue Jul 14 15:31:16 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E7095366ADC; Tue, 14 Jul 2020 15:31:16 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5kxw3WTSz3ZJj; Tue, 14 Jul 2020 15:31:16 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-qk1-f193.google.com with SMTP id q198so15943753qka.2; Tue, 14 Jul 2020 08:31:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BxEi0GXaPo3VWjAjS5PH7zKcdK8/w1+i79oRPpY33W4=; b=MIt3jdpDLi5xobDAYM1sP3xuoOOxBc6Y1v82lemK3A54Y1I824cZqbDetDRxv2c8jf ZGQhaSf8UTelLZmz0p2QltwKKnVeyW1oQ36AQsqyEFuuWepzaan+ynui7ZpVd+Y4FphI UkJkDARwt650V1y8ebn4nQgS/jNLJhGovcrcP57KN1CElwyLWin+klepHQQlZYcZLNVw jMGKTqcXygGA3N2iixpUuFsIPJsHaUbK5KHdQCVWA0MMg8/RMsvv9InY4O4VcWSPQqSB 7wbzHma33Spf0w+ANdwE3sFYuVNHYvvXlgoLtB5gSLrpitSHdluXCPa4tS+ttnqhthgc /qyw== X-Gm-Message-State: AOAM532AdZWEPnR3y5b9vZRnGphLgXu1+ZFDWHJjWSQb+v/qBDgEaETN QQpuxOnkAMhoNlLffEKCJfYxCmM+aDiMh+ZJIgi7ag== X-Google-Smtp-Source: ABdhPJziKv/P+JfWc4b+iqzkZ6z7r/X+YktAkIm1f+kTANfxiUI5V8V0vWLLHzEXKO0rWsow7vOS6E0YKDT73WibvpQ= X-Received: by 2002:a05:620a:40d:: with SMTP id 13mr4722609qkp.304.1594740674488; Tue, 14 Jul 2020 08:31:14 -0700 (PDT) MIME-Version: 1.0 References: <202007140500.06E508mV016928@repo.freebsd.org> <953fd975-215b-2d53-23e6-58faa6af9c96@FreeBSD.org> In-Reply-To: <953fd975-215b-2d53-23e6-58faa6af9c96@FreeBSD.org> From: Adrian Chadd Date: Tue, 14 Jul 2020 08:31:02 -0700 Message-ID: Subject: Re: svn commit: r363171 - head/contrib/flex/src To: Jung-uk Kim Cc: src-committers , svn-src-all , svn-src-head , Kyle Evans X-Rspamd-Queue-Id: 4B5kxw3WTSz3ZJj X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 15:31:17 -0000 Hi! On Tue, 14 Jul 2020 at 08:00, Jung-uk Kim wrote: > On 20. 7. 14., Adrian Chadd wrote: > > Author: adrian > > Date: Tue Jul 14 05:00:08 2020 > > New Revision: 363171 > > URL: https://svnweb.freebsd.org/changeset/base/363171 > > > > Log: > > [flex] Fix compilation issue under mips-gcc-6.4 > > > > This was triggering a pointer-losing-constness error. > > It was discussed in this ML. > > https://lists.freebsd.org/pipermail/svn-src-head/2020-June/137432.html > > kevans even filed an upstream pull request. > > https://github.com/westes/flex/pull/449 Oh good! > > > Why did you commit it without asking us? > Oh I'm sorry! I didn't realise you were already doing the work to get it fixed upstream. I just saw things broken when building my test wifi setups here at home and saw they were small fixes that could be submitted upstream. I'm personally not a huge fan of sitting on patches that fix builds/functionality whilst waiting for upstream - this was one of the many reasons for migrating from CVS to SVN in the long distant past! - so I figured it would be easy to commit. I'll make sure I ask around a little more next time! -adrian > Jung-uk Kim > From owner-svn-src-head@freebsd.org Tue Jul 14 15:33:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 06EF1366E24; Tue, 14 Jul 2020 15:33:22 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5l0J46dhz3cvV; Tue, 14 Jul 2020 15:33:20 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr1-x432.google.com with SMTP id q5so22527617wru.6; Tue, 14 Jul 2020 08:33:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Q2OR9t8pMxZodySmz0g3zi0dXOcRpaXYLdY/YY+T/eQ=; b=Y48kG+FNEiacUt6vslX44Z723wu6+jcHJ29SLeH8KK2HB+Ulinyqp/X4nfnOQC02MP JsuaUxHyEN9ogpP0mTWHLNO72/AXZ2s8osrjcMhl8Nvav0OittSBfrPpjfwwI9fTttN2 P7o2hHnIt8MaLpYGmYwcL832plJ0MKTQR9sJXJ7DjOzMflaxGIAsor2Wdw9EoBAdZKm+ +ghZ44lpqNwAsAeTvLe64PW9NM0cScuKgCW0RuC/QOxqREG9/va58F1sk6oiJEQgNGOD bjyt8NK/N50oLeAN/C/vwPCFSnOvSA3Jexgo8WtzXNAaQ9DWcSPNk7EciI5NJhky+LMt rDAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Q2OR9t8pMxZodySmz0g3zi0dXOcRpaXYLdY/YY+T/eQ=; b=gB9qUymBomD7UVHLVKmuqslz3Pn6E+0wJJO7+mOOluKpnjTtTwbtpm28K91znjCCvw 7cT/KlkIcAL1nBCZn8pS+pG8rk66GuObUemZvo7yAp6ObTFYy70/U3fJYT5nQMQUFGTq HDyBnsTj4HnD+iQ8jVNv5MjZk2B6GmCXcHozCYQfPzkLbFFiBaNt6ctC+VsWXBm47Plj L5ZTxTQTp4zDQfgxYUW0IMsmQiA+OGjpShQGUNZOBClY55BcKI8Jrcqw1jTG3foRmiy6 xAtsgNQktV/0iJj9mCgetp+vUKwhH/NaRHMRF/P6v5L3btiqfE4wONdZRo3vOcsnstTC F5Og== X-Gm-Message-State: AOAM531ebhjwytmHMKhO8z0D6bqLYgXjaO3Ni0B6Uv1tmkOJLmIB6YBx 73/5QEMG8m3ZIFawM89MS3gjJG4G8juV/4bEoXxjRA== X-Google-Smtp-Source: ABdhPJz8Aps28BFblwEueZNaGoDrRCpPshCp9VlHtdtF8kTFsXgB26m1fX9tHDn+shoQreJ3Fk7jTleg/DOs47B6P0s= X-Received: by 2002:a05:6000:1290:: with SMTP id f16mr6885563wrx.66.1594740797991; Tue, 14 Jul 2020 08:33:17 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:9d84:0:0:0:0:0 with HTTP; Tue, 14 Jul 2020 08:33:17 -0700 (PDT) In-Reply-To: <202007131425.06DEPPxQ077335@repo.freebsd.org> References: <202007131425.06DEPPxQ077335@repo.freebsd.org> From: Mateusz Guzik Date: Tue, 14 Jul 2020 17:33:17 +0200 Message-ID: Subject: Re: svn commit: r363144 - head/lib/libpmc/pmu-events/arch/x86 To: Alexander Motin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4B5l0J46dhz3cvV X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=Y48kG+FN; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2a00:1450:4864:20::432 as permitted sender) smtp.mailfrom=mjguzik@gmail.com X-Spamd-Result: default: False [-2.85 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.987]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.03)[-1.030]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.17)[0.167]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::432:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 15:33:22 -0000 On 7/13/20, Alexander Motin wrote: > Author: mav > Date: Mon Jul 13 14:25:25 2020 > New Revision: 363144 > URL: https://svnweb.freebsd.org/changeset/base/363144 > > Log: > Minor textual fixes. > > MFC after: 1 week > > Modified: > head/lib/libpmc/pmu-events/arch/x86/mapfile.csv > > Modified: head/lib/libpmc/pmu-events/arch/x86/mapfile.csv > ============================================================================== > --- head/lib/libpmc/pmu-events/arch/x86/mapfile.csv Mon Jul 13 13:58:21 > 2020 (r363143) > +++ head/lib/libpmc/pmu-events/arch/x86/mapfile.csv Mon Jul 13 14:25:25 > 2020 (r363144) > @@ -24,19 +24,15 @@ GenuineIntel-6-1E,v2,nehalemep,core > GenuineIntel-6-1F,v2,nehalemep,core > GenuineIntel-6-1A,v2,nehalemep,core > GenuineIntel-6-2E,v2,nehalemex,core > -GenuineIntel-6-4E,v24,skylake,core > -GenuineIntel-6-5E,v24,skylake,core > -GenuineIntel-6-8E,v24,skylake,core > -GenuineIntel-6-9E,v24,skylake,core > +GenuineIntel-6-[4589]E,v24,skylake,core > GenuineIntel-6-37,v13,silvermont,core > GenuineIntel-6-4D,v13,silvermont,core > GenuineIntel-6-4C,v13,silvermont,core > GenuineIntel-6-2A,v15,sandybridge,core > GenuineIntel-6-2C,v2,westmereep-dp,core > -GenuineIntel-6-2C,v2,westmereep-dp,core > GenuineIntel-6-25,v2,westmereep-sp,core > GenuineIntel-6-2F,v2,westmereex,core > -GenuineIntel-6-55,v1,skylakex,core > +GenuineIntel-6-55-[01234],v1,skylakex,core This breaks hwpmc for me as it no longer recognizes the cpu. kern.hwpmc.cpuid: GenuineIntel-6-55 > GenuineIntel-6-55-[56789ABCDEF],v1,cascadelakex,core > GenuineIntel-6-7D,v1,icelake,core > GenuineIntel-6-7E,v1,icelake,core > -- Mateusz Guzik From owner-svn-src-head@freebsd.org Tue Jul 14 16:47:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4D52B368734; Tue, 14 Jul 2020 16:47:06 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5mdP0fBCz4Qtl; Tue, 14 Jul 2020 16:47:04 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 06EGkuFD013704; Tue, 14 Jul 2020 09:46:56 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 06EGku9q013703; Tue, 14 Jul 2020 09:46:56 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202007141646.06EGku9q013703@gndrsh.dnsmgr.net> Subject: Re: svn commit: r363178 - head/contrib/mandoc In-Reply-To: <202007141202.06EC2VTA080844@repo.freebsd.org> To: Gordon Bergling Date: Tue, 14 Jul 2020 09:46:56 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4B5mdP0fBCz4Qtl X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 16:47:06 -0000 > Author: gbe (doc committer) > Date: Tue Jul 14 12:02:30 2020 > New Revision: 363178 > URL: https://svnweb.freebsd.org/changeset/base/363178 > > Log: > Revert r362809: Mention FreeBSD in the HISTORY sections of apropos(1) and makewhatis(8). > Thank you > We don't mention the first appearance of a utility in FreeBSD, when it first > appeared in a BSD version that predates FreeBSD. > > PR: 223520, 223521 > Reported by: rgrimes, imp > Reviewed by: bcr (mentor) > Approved by: bcr (mentor) > Differential Revision: https://reviews.freebsd.org/D25521 > > Modified: > head/contrib/mandoc/apropos.1 > head/contrib/mandoc/makewhatis.8 > > Modified: head/contrib/mandoc/apropos.1 > ============================================================================== > --- head/contrib/mandoc/apropos.1 Tue Jul 14 10:55:19 2020 (r363177) > +++ head/contrib/mandoc/apropos.1 Tue Jul 14 12:02:30 2020 (r363178) > @@ -15,7 +15,7 @@ > .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF > .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > .\" > -.Dd $Mdocdate: June 30 2020 $ > +.Dd $Mdocdate: November 22 2018 $ > .Dt APROPOS 1 > .Os > .Sh NAME > @@ -493,12 +493,6 @@ The options > .Fl acfhIKklOTWw > appeared in > .Ox 5.7 . > -.Pp > -The > -.Nm > -utility was integrated into > -.Fx 11.1 > -as part of the switch to mandoc. > .Sh AUTHORS > .An -nosplit > .An Bill Joy > > Modified: head/contrib/mandoc/makewhatis.8 > ============================================================================== > --- head/contrib/mandoc/makewhatis.8 Tue Jul 14 10:55:19 2020 (r363177) > +++ head/contrib/mandoc/makewhatis.8 Tue Jul 14 12:02:30 2020 (r363178) > @@ -15,7 +15,7 @@ > .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF > .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > .\" > -.Dd $Mdocdate: June 30 2020 $ > +.Dd $Mdocdate: May 17 2017 $ > .Dt MAKEWHATIS 8 > .Os > .Sh NAME > @@ -211,12 +211,6 @@ and the options > .Fl aCDnQT > in > .Ox 5.6 . > -.Pp > -The > -.Nm > -utility was integrated into > -.Fx 11.1 > -as part of the switch to mandoc. > .Sh AUTHORS > .An -nosplit > .An Bill Joy > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Tue Jul 14 17:31:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 47B983698F9; Tue, 14 Jul 2020 17:31:58 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5nd95K1Vz4JtS; Tue, 14 Jul 2020 17:31:57 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id BC23D3C0199; Tue, 14 Jul 2020 17:31:51 +0000 (UTC) Date: Tue, 14 Jul 2020 17:31:51 +0000 From: Brooks Davis To: Adrian Chadd Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r363172 - head/contrib/bc/src Message-ID: <20200714173151.GB23830@spindle.one-eyed-alien.net> References: <202007140502.06E52IZn022859@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gj572EiMnwbLXET9" Content-Disposition: inline In-Reply-To: <202007140502.06E52IZn022859@repo.freebsd.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: 4B5nd95K1Vz4JtS X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 17:31:58 -0000 --gj572EiMnwbLXET9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 14, 2020 at 05:02:18AM +0000, Adrian Chadd wrote: > Author: adrian > Date: Tue Jul 14 05:02:18 2020 > New Revision: 363172 > URL: https://svnweb.freebsd.org/changeset/base/363172 >=20 > Log: > [bc] Fix a "maybe uninitialized" compiler warning under mips-gcc-6.3.0. > =20 > I guess this didn't like the case statements.. ? But this does quieten > the compiler error. IMO it would be better to disable this warning for this (old) compiler on this file rather than making a change here (in general we should be removing these sorts of changes). That being said, we need to write down some guidance on this so we have a clear set of principles and we can figure out how we decided which compilers are on which side of the line. -- Brooks --gj572EiMnwbLXET9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJfDewGAAoJEKzQXbSebgfADhkIAIO5tY2875RqsG1Ci2JAX0AH /zhJ8Jl4YSH+4dtzngUopIErLyEiFnL49A/k4q/Fzc/9jxjwDHxGctFluaH2McJZ nPxo8RKJASw4Q/esZfUrVD/A9lkGnFCjUCZKweRphYHgXoq5cOdZMyqDLsfkGzcs sivYDV78BDwn6ygFJ2tQyuwIVg5WfAPR8gWu4cbPn30dYea1ZiV/tHWa8peCLgW2 EAl2/Y6z4Srn99znJl2ji8TqnNLWALLm9e7nJ9IlMG6m1stORws8NhNtriBY7PGZ s6qDWpnCIeRNv5M+AYkRZc1AgVkoNNdPdMLEG/qWa685fpqWTnJ9w3mO7ODhExc= =iDcv -----END PGP SIGNATURE----- --gj572EiMnwbLXET9-- From owner-svn-src-head@freebsd.org Tue Jul 14 18:02:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7827036A917; Tue, 14 Jul 2020 18:02:25 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5pJK2dVHz46jv; Tue, 14 Jul 2020 18:02:25 +0000 (UTC) (envelope-from gonzo@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 3DCDF9FEB; Tue, 14 Jul 2020 18:02:25 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06EI2Pd3003023; Tue, 14 Jul 2020 18:02:25 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06EI2PJH003009; Tue, 14 Jul 2020 18:02:25 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <202007141802.06EI2PJH003009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 14 Jul 2020 18:02:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363187 - head/release/tools X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/release/tools X-SVN-Commit-Revision: 363187 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 18:02:25 -0000 Author: gonzo Date: Tue Jul 14 18:02:24 2020 New Revision: 363187 URL: https://svnweb.freebsd.org/changeset/base/363187 Log: Enable EFI system partition on amd64 and i386 VM images EFI support is a hard requirement for generating Hyper-V Gen2 VM images. Reviewed by: gjb MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25655 Modified: head/release/tools/vmimage.subr Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Tue Jul 14 17:46:40 2020 (r363186) +++ head/release/tools/vmimage.subr Tue Jul 14 18:02:24 2020 (r363187) @@ -24,12 +24,17 @@ write_partition_layout() { case "${TARGET}:${TARGET_ARCH}" in amd64:amd64 | i386:i386) + # Create an ESP + espfilename=$(mktemp /tmp/efiboot.XXXXXX) + make_esp_file ${espfilename} ${fat32min} ${BOOTFILES}/efi/loader_lua/loader_lua.efi mkimg -s gpt -f ${VMFORMAT} \ -b ${BOOTFILES}/i386/pmbr/pmbr \ -p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot \ + -p efi:=${espfilename} \ ${SWAPOPT} \ -p freebsd-ufs/rootfs:=${VMBASE} \ -o ${VMIMAGE} + rm ${espfilename} ;; arm64:aarch64) # Create an ESP From owner-svn-src-head@freebsd.org Tue Jul 14 18:11:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 32B9736ACDC; Tue, 14 Jul 2020 18:11:07 +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 4B5pVL5qJqz4GsY; Tue, 14 Jul 2020 18:11:06 +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 9B8C6A2ED; Tue, 14 Jul 2020 18:11:06 +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 06EIB6wh008173; Tue, 14 Jul 2020 18:11:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06EIB6b3008168; Tue, 14 Jul 2020 18:11:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202007141811.06EIB6b3008168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 14 Jul 2020 18:11:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363188 - in head: lib/libpmc sys/dev/hwpmc X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in head: lib/libpmc sys/dev/hwpmc X-SVN-Commit-Revision: 363188 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 18:11:07 -0000 Author: mav Date: Tue Jul 14 18:11:05 2020 New Revision: 363188 URL: https://svnweb.freebsd.org/changeset/base/363188 Log: Add stepping to the kern.hwpmc.cpuid string on x86. It follows the equivalent Linux change to be able to differentiate skylakex and cascadelakex, sharing the same model but not stepping. This fixes skylakex handling broken by r363144. MFC after: 6 days Modified: head/lib/libpmc/libpmc_pmu_util.c head/sys/dev/hwpmc/hwpmc_amd.c head/sys/dev/hwpmc/hwpmc_intel.c Modified: head/lib/libpmc/libpmc_pmu_util.c ============================================================================== --- head/lib/libpmc/libpmc_pmu_util.c Tue Jul 14 18:02:24 2020 (r363187) +++ head/lib/libpmc/libpmc_pmu_util.c Tue Jul 14 18:11:05 2020 (r363188) @@ -169,7 +169,7 @@ pmu_events_map_get(const char *cpuid) { regex_t re; regmatch_t pmatch[1]; - size_t s, len; + size_t s; char buf[64]; int match; const struct pmu_events_map *pme; @@ -193,8 +193,8 @@ pmu_events_map_get(const char *cpuid) match = regexec(&re, buf, 1, pmatch, 0); regfree(&re); if (match == 0) { - len = pmatch[0].rm_eo - pmatch[0].rm_so; - if(len == strlen(buf)) + if (pmatch[0].rm_so == 0 && (buf[pmatch[0].rm_eo] == 0 + || buf[pmatch[0].rm_eo] == '-')) return (pme); } } Modified: head/sys/dev/hwpmc/hwpmc_amd.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_amd.c Tue Jul 14 18:02:24 2020 (r363187) +++ head/sys/dev/hwpmc/hwpmc_amd.c Tue Jul 14 18:11:05 2020 (r363188) @@ -1073,7 +1073,7 @@ pmc_amd_initialize(void) enum pmc_cputype cputype; struct pmc_mdep *pmc_mdep; enum pmc_class class; - int model; + int model, stepping; char *name; /* @@ -1086,12 +1086,13 @@ pmc_amd_initialize(void) name = NULL; model = ((cpu_id & 0xF0000) >> 12) | ((cpu_id & 0xF0) >> 4); + stepping = cpu_id & 0xF; if (CPUID_TO_FAMILY(cpu_id) == 0x17) - snprintf(pmc_cpuid, sizeof(pmc_cpuid), "AuthenticAMD-%d-%02X", - CPUID_TO_FAMILY(cpu_id), model); + snprintf(pmc_cpuid, sizeof(pmc_cpuid), "AuthenticAMD-%d-%02X-%X", + CPUID_TO_FAMILY(cpu_id), model, stepping); if (CPUID_TO_FAMILY(cpu_id) == 0x18) - snprintf(pmc_cpuid, sizeof(pmc_cpuid), "HygonGenuine-%d-%02X", - CPUID_TO_FAMILY(cpu_id), model); + snprintf(pmc_cpuid, sizeof(pmc_cpuid), "HygonGenuine-%d-%02X-%X", + CPUID_TO_FAMILY(cpu_id), model, stepping); switch (cpu_id & 0xF00) { #if defined(__i386__) Modified: head/sys/dev/hwpmc/hwpmc_intel.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_intel.c Tue Jul 14 18:02:24 2020 (r363187) +++ head/sys/dev/hwpmc/hwpmc_intel.c Tue Jul 14 18:11:05 2020 (r363188) @@ -94,8 +94,8 @@ pmc_intel_initialize(void) model = ((cpu_id & 0xF0000) >> 12) | ((cpu_id & 0xF0) >> 4); stepping = cpu_id & 0xF; - snprintf(pmc_cpuid, sizeof(pmc_cpuid), "GenuineIntel-%d-%02X", - (cpu_id & 0xF00) >> 8, model); + snprintf(pmc_cpuid, sizeof(pmc_cpuid), "GenuineIntel-%d-%02X-%X", + (cpu_id & 0xF00) >> 8, model, stepping); switch (cpu_id & 0xF00) { case 0x600: /* Pentium Pro, Celeron, Pentium II & III */ switch (model) { From owner-svn-src-head@freebsd.org Tue Jul 14 18:12:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B5AE936B49F; Tue, 14 Jul 2020 18:12:19 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5pWj4l2Pz4HhJ; Tue, 14 Jul 2020 18:12:16 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-qt1-x829.google.com with SMTP id d27so13555887qtg.4; Tue, 14 Jul 2020 11:12:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=uem0kf/DbR0Gf4MnBmlA7AzuPBbN46u9HhDsRzTj4VU=; b=kYu8s3ipsBVRRTmJKnu3c9uAa4cXoCKGPuMj36VF30pUI8qJ0MkLWGjJuZ/MOKvBO8 A25aNphNQJzuXRbtEui5x0emx8T87vcne6dKYUyg2gCvKmXl6pFPNzuktE2GQ90K9qmo jxZk8aaw/j9AyKu5DAcz+8fDwyF6WmkDraU6PZrMrnVW8P930fNb4Fhjr66zcpigbdwD F/8O8HE3qzNCaTBFfPwVd31pza6zBPVg/4mdwTbb4hb5y2lGZkiZ0O5ttSPRU0ge20fO ev9ikhbf52eI0UmkbmSLW3f18c7ZZNleRrlU633mIjQW+YzKLZGoW1wrwkQV3uRqEHWq R89g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=uem0kf/DbR0Gf4MnBmlA7AzuPBbN46u9HhDsRzTj4VU=; b=hLes9q7ts5qDlqQcPxtUgmkBwMBkZfNIEZ8ph/PZihb6FwgM9y6BtZivwi3Bosx4xE /JdHph5oUOnp2Zf43OxnPDZfbJQkMVpNFhr3q6kqoFaRuM14tvFjq4p2xsMwXxzEW1w8 1a1U9cmaoRtpDMkVTu6MRvyv0ocyA68vEzbKlxsKQRXHSPO7xtVmz7bQ1H2qrmTmLYrJ 7G9+L47knGHr0Dd04K/94+EmLo9gS1GnMXLyxkq+CfbuSPUMIF2x3jjvGgkeOxITo9/m MUCq+zlnh7XSEIxXTQRd1fK7mULBjpvxnQkmkV05KWU0R687FyFz70JvoUT13rOykubh 1YHg== X-Gm-Message-State: AOAM5317yCNowN3T1YHR2vdUcpvIzENAWU54hCXuQWrtgSEHvpcx/5xp 2YaXhjr39sfdzFzkuTJoQO0bpe1wsvw= X-Google-Smtp-Source: ABdhPJw4Jfr0oKv3VR6D03K+Uzq+/DDAbdUa0UrJc74CeDl+5yD342QXm9bY/afph35yqQRoCxZ0dA== X-Received: by 2002:ac8:6bc8:: with SMTP id b8mr5909267qtt.198.1594750335663; Tue, 14 Jul 2020 11:12:15 -0700 (PDT) Received: from spectre.mavhome.dp.ua ([2600:1700:3580:3560:228:f8ff:fe04:d12]) by smtp.gmail.com with ESMTPSA id v28sm21083728qkv.31.2020.07.14.11.12.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Jul 2020 11:12:14 -0700 (PDT) Sender: Alexander Motin Subject: Re: svn commit: r363144 - head/lib/libpmc/pmu-events/arch/x86 To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202007131425.06DEPPxQ077335@repo.freebsd.org> From: Alexander Motin Autocrypt: addr=mav@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFOzxAwBCADkPrax0pI2W/ig0CK9nRJJwsHitAGEZ2HZiFEuti+6/4UVxj81yr4ak/4g 9bKUyC7rMEAp/ZHNhd+MFCPAAcHPvtovnfykqE/vuosCS3wlSLloix2iKVLks0CwbLHGAyne 46lTQW74Xl/33c3W1Z6d8jD9gVFT/xaVzZ0U9xdzOmsYAZaAj4ki0tuxO9F7L+ct9grRe7iP g8t9hai7BL4ee3VRwk2JXnKb7UvBiVITKYWKz1jRvZIrjPokgEcCLOSlv7x/1kjuFnj3xWZU 7HSFFT8J93epBbrSSCsYsppIk2fZH41kaaFXsMQfTPH8wkeM6qwrvOh4HiQM08R+9tThABEB AAG0IUFsZXhhbmRlciBNb3RpbiA8bWF2QEZyZWVCU0Qub3JnPokBVwQTAQoAQQIbAwULCQgH AwUVCgkICwUWAwIBAAIeAQIXgAIZARYhBOmM88TmnMPNDledVYMYw5VbqyJ/BQJZYMKuBQkN McyiAAoJEIMYw5VbqyJ/tuUIAOG3ONOSNYqjK4eTZ1TVh9jdUBAhWk5nhDFnODN49Wj0AbYm 7aIqy8O1hnCDSZG5LttjSAo3UfXJZDKQM0BLb0gpRMBnAYqO6tdolLNqAbPGJBnGoPjsh24y 6KcbDaNnis+lD4GwPXwQM+92wZGhCUFElPV9NciZGVS65TNIgk7X+yEjjhD1MSWKKijZ1r9Z zIt4OzUTxxNOvzdlABZS88nNRdJkatOQJPmFdd1mpP6UzTNCiLUo1pIqOEtJgvVVDYq5WHY6 tciWWYdmZG/tIBexJmv2mV2OLVjXR6ZeKmntVH14H72/wRHJuYHQC+r5SVRcWWayrThsY6jZ Yr4+raS5AQ0EU7PEDAEIAOZgWf2cJIu+58IzP2dkXE/urj3tr4OqrB/yHGWUf71Lz6D0Fi6Z AXgDtmcFLGPfMyWuLAvSM+xmoguk7zC4hRBYvQycmIhuqBq1jO1Wp/Z+lpoPM/1cDYLn8Flv mI/c40MhUZh345DA4jYWWaZNjQHUWVQ1fPf595vdVVMPT/abE8E5DaF6fSkRmqFTmfYRkfbt 3ytU8NdUapDcJVY7cEP2nJBVNZPnOIObR/ZIgSxjjrG5o34yXoqeup8JvwEv+/NylzzuyXEZ R1EdEIzQ/a1nh/0j4NXtzZEqKW4aTWlmSqb6wN8jh1OSOOqkYsfnE3nfxcZbxi4IRoNQYlm5 9R8AEQEAAYkBPAQYAQoAJgIbDBYhBOmM88TmnMPNDledVYMYw5VbqyJ/BQJZYMLYBQkNMczM AAoJEIMYw5VbqyJ/TqgH/RQHClkvecE0262lwKoP/m0Mh4I5TLRgoJJn8S7G1BnqohYJkiLq A6xe6urGD7OqdNAl12UbrjWbdJV+zvea3vJoM4MZuYiYrGaXWxzFXqWJcPwMU9sAh8MRghHu uC5vgPb45Tnftw9/+n0i8GfVhQhOqepUGdQg4NPcXviSkoAvig6pp9Lcxisn0groUQKt15Gc sS9YcQWg3j9Hnipc6Mu416HX98Fb113NHJqc2geTHLkRyuBFOoyIqB6N9GKjzOAIzxxsVdl9 TevwGsrp4M4/RFzWbSgsbOnbE7454lmuVZGfReEjnUm8RHp9Q2UWKXlp3exlZjvOp/uVEpCg lz65AQ0EU7PEDAEIAOZgWf2cJIu+58IzP2dkXE/urj3tr4OqrB/yHGWUf71Lz6D0Fi6ZAXgD tmcFLGPfMyWuLAvSM+xmoguk7zC4hRBYvQycmIhuqBq1jO1Wp/Z+lpoPM/1cDYLn8FlvmI/c 40MhUZh345DA4jYWWaZNjQHUWVQ1fPf595vdVVMPT/abE8E5DaF6fSkRmqFTmfYRkfbt3ytU 8NdUapDcJVY7cEP2nJBVNZPnOIObR/ZIgSxjjrG5o34yXoqeup8JvwEv+/NylzzuyXEZR1Ed EIzQ/a1nh/0j4NXtzZEqKW4aTWlmSqb6wN8jh1OSOOqkYsfnE3nfxcZbxi4IRoNQYlm59R8A EQEAAYkBPAQYAQoAJgIbDBYhBOmM88TmnMPNDledVYMYw5VbqyJ/BQJZYMLYBQkNMczMAAoJ EIMYw5VbqyJ/TqgH/RQHClkvecE0262lwKoP/m0Mh4I5TLRgoJJn8S7G1BnqohYJkiLqA6xe 6urGD7OqdNAl12UbrjWbdJV+zvea3vJoM4MZuYiYrGaXWxzFXqWJcPwMU9sAh8MRghHuuC5v gPb45Tnftw9/+n0i8GfVhQhOqepUGdQg4NPcXviSkoAvig6pp9Lcxisn0groUQKt15GcsS9Y cQWg3j9Hnipc6Mu416HX98Fb113NHJqc2geTHLkRyuBFOoyIqB6N9GKjzOAIzxxsVdl9Tevw Gsrp4M4/RFzWbSgsbOnbE7454lmuVZGfReEjnUm8RHp9Q2UWKXlp3exlZjvOp/uVEpCglz4= Message-ID: <90bb0b5c-2ed3-03ad-4b96-8a5dffd75f56@FreeBSD.org> Date: Tue, 14 Jul 2020 14:12:14 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4B5pWj4l2Pz4HhJ X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=kYu8s3ip; dmarc=none; spf=pass (mx1.freebsd.org: domain of mavbsd@gmail.com designates 2607:f8b0:4864:20::829 as permitted sender) smtp.mailfrom=mavbsd@gmail.com X-Spamd-Result: default: False [-3.06 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; NEURAL_HAM_LONG(-0.96)[-0.962]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.91)[-0.911]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_HAM_SHORT(-0.99)[-0.989]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::829:from]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[mav@FreeBSD.org,mavbsd@gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[mav@FreeBSD.org,mavbsd@gmail.com]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 18:12:19 -0000 On 14.07.2020 11:33, Mateusz Guzik wrote: > On 7/13/20, Alexander Motin wrote: >> Author: mav >> Date: Mon Jul 13 14:25:25 2020 >> New Revision: 363144 >> URL: https://svnweb.freebsd.org/changeset/base/363144 >> >> Log: >> Minor textual fixes. >> >> MFC after: 1 week >> >> Modified: >> head/lib/libpmc/pmu-events/arch/x86/mapfile.csv >> -GenuineIntel-6-55,v1,skylakex,core >> +GenuineIntel-6-55-[01234],v1,skylakex,core > > This breaks hwpmc for me as it no longer recognizes the cpu. > kern.hwpmc.cpuid: GenuineIntel-6-55 Thank you for the report. It should be fixed with r363188. -- Alexander Motin From owner-svn-src-head@freebsd.org Tue Jul 14 18:50:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C3B7836BD57; Tue, 14 Jul 2020 18:50:48 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5qN84rhJz4C6s; Tue, 14 Jul 2020 18:50:48 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A674ACAA; Tue, 14 Jul 2020 18:50:48 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06EIom0P031593; Tue, 14 Jul 2020 18:50:48 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06EIomTb031592; Tue, 14 Jul 2020 18:50:48 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202007141850.06EIomTb031592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 14 Jul 2020 18:50:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363191 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 363191 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 18:50:48 -0000 Author: andrew Date: Tue Jul 14 18:50:48 2020 New Revision: 363191 URL: https://svnweb.freebsd.org/changeset/base/363191 Log: Print the arm64 registers in more exception handling panics It can be useful to get a dump of all registers when investigating why we received an exception that we are unable to handle. In these cases we already call panic, however we don't always print the registers. Add calls to print_registers and print esr and far when applicable. Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/trap.c Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Tue Jul 14 18:31:15 2020 (r363190) +++ head/sys/arm64/arm64/trap.c Tue Jul 14 18:50:48 2020 (r363191) @@ -170,8 +170,12 @@ static void align_abort(struct thread *td, struct trapframe *frame, uint64_t esr, uint64_t far, int lower) { - if (!lower) + if (!lower) { + print_registers(frame); + printf(" far: %16lx\n", far); + printf(" esr: %.8lx\n", esr); panic("Misaligned access from kernel space!"); + } call_trapsignal(td, SIGBUS, BUS_ADRALN, (void *)frame->tf_elr); userret(td, frame); @@ -361,6 +365,7 @@ do_el1h_sync(struct thread *td, struct trapframe *fram } else { print_registers(frame); printf(" far: %16lx\n", far); + printf(" esr: %.8lx\n", esr); panic("Unhandled EL1 %s abort: %x", exception == EXCP_INSN_ABORT ? "instruction" : "data", dfsc); @@ -397,6 +402,7 @@ do_el1h_sync(struct thread *td, struct trapframe *fram /* FALLTHROUGH */ default: print_registers(frame); + printf(" far: %16lx\n", READ_SPECIALREG(far_el1)); panic("Unknown kernel exception %x esr_el1 %lx\n", exception, esr); } @@ -466,10 +472,14 @@ do_el0_sync(struct thread *td, struct trapframe *frame if (dfsc < nitems(abort_handlers) && abort_handlers[dfsc] != NULL) abort_handlers[dfsc](td, frame, esr, far, 1); - else + else { + print_registers(frame); + printf(" far: %16lx\n", far); + printf(" esr: %.8lx\n", esr); panic("Unhandled EL0 %s abort: %x", exception == EXCP_INSN_ABORT_L ? "instruction" : "data", dfsc); + } break; case EXCP_UNKNOWN: if (!undef_insn(0, frame)) From owner-svn-src-head@freebsd.org Tue Jul 14 18:57:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 44CD236BF76; Tue, 14 Jul 2020 18:57:32 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5qWw0jgRz4N0H; Tue, 14 Jul 2020 18:57:32 +0000 (UTC) (envelope-from mckusick@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 EB8DCADA5; Tue, 14 Jul 2020 18:57:31 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06EIvVfW035947; Tue, 14 Jul 2020 18:57:31 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06EIvVZI035946; Tue, 14 Jul 2020 18:57:31 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202007141857.06EIvVZI035946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Tue, 14 Jul 2020 18:57:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363192 - in head: bin/ps sys/sys X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: in head: bin/ps sys/sys X-SVN-Commit-Revision: 363192 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 18:57:32 -0000 Author: mckusick Date: Tue Jul 14 18:57:31 2020 New Revision: 363192 URL: https://svnweb.freebsd.org/changeset/base/363192 Log: Update to D25266, bin/ps: Make the rtprio option actually show realtime priorities The current `ps -axO rtprio' show threads running at interrupt priority such as the [intr] thread as '1:48' and threads running at kernel priority such as [pagedaemon] as normal:4294967260. This change shows [intr] as intr:48 and [pagedaemon] as kernel:4. Reviewed by: kib MFC after: 1 week (together with -r362369) Differential Revision: https://reviews.freebsd.org/D25660 Modified: head/bin/ps/print.c head/sys/sys/rtprio.h Modified: head/bin/ps/print.c ============================================================================== --- head/bin/ps/print.c Tue Jul 14 18:50:48 2020 (r363191) +++ head/bin/ps/print.c Tue Jul 14 18:57:31 2020 (r363192) @@ -723,11 +723,18 @@ priorityr(KINFO *k, VARENT *ve __unused) break; case RTP_PRIO_NORMAL: /* alias for PRI_TIMESHARE */ - asprintf(&str, "normal:%u", level - PRI_MIN_TIMESHARE); + if (level >= PRI_MIN_TIMESHARE) + asprintf(&str, "normal:%u", level - PRI_MIN_TIMESHARE); + else + asprintf(&str, "kernel:%u", level - PRI_MIN_KERN); break; case RTP_PRIO_IDLE: /* alias for PRI_IDLE */ asprintf(&str, "idle:%u", level - PRI_MIN_IDLE); + break; + case RTP_PRIO_ITHD: + /* alias for PRI_ITHD */ + asprintf(&str, "intr:%u", level - PRI_MIN_ITHD); break; default: asprintf(&str, "%u:%u", class, level); Modified: head/sys/sys/rtprio.h ============================================================================== --- head/sys/sys/rtprio.h Tue Jul 14 18:50:48 2020 (r363191) +++ head/sys/sys/rtprio.h Tue Jul 14 18:57:31 2020 (r363192) @@ -44,6 +44,7 @@ /* priority types. Start at 1 to catch uninitialized fields. */ +#define RTP_PRIO_ITHD PRI_ITHD /* Interrupt thread. */ #define RTP_PRIO_REALTIME PRI_REALTIME /* real time process */ #define RTP_PRIO_NORMAL PRI_TIMESHARE /* time sharing process */ #define RTP_PRIO_IDLE PRI_IDLE /* idle process */ From owner-svn-src-head@freebsd.org Tue Jul 14 19:27:23 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD0C336D1BD; Tue, 14 Jul 2020 19:27:23 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5rBL6mh0z41j4; Tue, 14 Jul 2020 19:27:22 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f0bb900a4f426240105a23e.dip0.t-ipconnect.de [IPv6:2003:cd:5f0b:b900:a4f4:2624:105:a23e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 12FB31B549; Tue, 14 Jul 2020 19:27:20 +0000 (UTC) (envelope-from se@freebsd.org) Subject: Re: svn commit: r363172 - head/contrib/bc/src To: Adrian Chadd Cc: Brooks Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Gavin Howard References: <202007140502.06E52IZn022859@repo.freebsd.org> <20200714173151.GB23830@spindle.one-eyed-alien.net> From: =?UTF-8?Q?Stefan_E=c3=9fer?= Autocrypt: addr=se@freebsd.org; keydata= mQENBFVxiRIBCADOLNOZBsqlplHUQ3tG782FNtVT33rQli9EjNt2fhFERHIo4NxHlWBpHLnU b0s4L/eItx7au0i7Gegv01A9LUMwOnAc9EFAm4EW3Wmoa6MYrcP7xDClohg/Y69f7SNpEs3x YATBy+L6NzWZbJjZXD4vqPgZSDuMcLU7BEdJf0f+6h1BJPnGuwHpsSdnnMrZeIM8xQ8PPUVQ L0GZkVojHgNUngJH6e21qDrud0BkdiBcij0M3TCP4GQrJ/YMdurfc8mhueLpwGR2U1W8TYB7 4UY+NLw0McThOCLCxXflIeF/Y7jSB0zxzvb/H3LWkodUTkV57yX9IbUAGA5RKRg9zsUtABEB AAG0J1N0ZWZhbiBFw59lciAoRnJlZUJTRCkgPHNlQGZyZWVic2Qub3JnPokBVAQTAQoAPgIb AwULCQgHAwUVCgkICwUWAwIBAAIeAQIXgBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+q BQkLJQETAAoJEEfrte9a/fVEOeMH/icmdK1eZQvB3U8quJo9VMaZsaTuCMbUE4NThyfsIvIm MCd+rb/yULmMYwqNfjyKB1x4ikR4x+94l+yJoz7K0Usks+eNKDmMGJM6pWWssTigaJubFdVd hVVC+C1QJi7JshYSib08uONoPmO4lv5Az0TDYGtsMzsES2sIlc62c9go5WPGYhQFRbX3Lk6y V6m8OHh+G9XGSj3oPO4UteRwu+SzTdOLunZBWG1wu34+IeZm663D+2gOppQLWpLa2qaTerqw THu377ayZ2B2LPJ5JkvkZeHYPkwDQ+b5PGn0UhfkxPnDVYki5F7qKxvQ5uq1/q9YaCX7mmOl H2yO7tgVsrW5AQ0EVXGJEgEIALEj9qCXMZVucjpcd3QxM/TlUr98m5viEd1z4tCnPUyRWcIC EVtj2h5xMH+2iB0q1+KWhq+NsWtvScmEmfHnsr7dJ1K677OdpDhKVaJk61eeRulFY1R4yb6C 1MMxK+WgYB+vvpG0UeyR0M4uBewcPvRsq4yGUHFQKtLAbMdoPTSryJA+ElnmK1vdY+rPcHgi OIMBZM7ahsPXC0C9K4e5SP9clGyIoMpbfHXdx9q+Rp3zVtlbhyk3BS/xccu/+9pk9ICXL6GR js2sNnJ0wxdU1DsAlC59a5MnSruwiZFwRnkQhr3x6wk97Lg7sLS9jjTnCN7LGlVmSmpOEMy6 uq1AWfUAEQEAAYkBPAQYAQoAJgIbDBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+rBQkL JQEZAAoJEEfrte9a/fVEuesH/2DNxGWnHvWwMyiyhlQtafvDKwEn/wAgR8gHJFodB7emf8rA TnukH7MVttCoHtjN5lvv9RSBHjNTZls5wR/ANlwdRuPQHd8ZGxLe3S6IuUB3zDSwFltLGurO N2kOMhs5mTGyypSa+uw3rtQbUAVYf1oPbiR4FLtiM8FLyEvE95hX5fPq9Qvx9FmN79kmCIEw jDKPqDaUf/OR2fEF0LSIbXHEk4tNqCEwx5DIJ0fp5/z5UzICUAmwxyRs5O/Hre1jzPsMVyud Ml9t7UTOJGKVWwRory1PMnOFxN+iz5/d4FhYSKXF7kfMiFgol4LuWaxJRwbBrr71VGBrRy2a L1nw6Bc= Message-ID: Date: Tue, 14 Jul 2020 21:27:17 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200714173151.GB23830@spindle.one-eyed-alien.net> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NOsHfQZeaBKuU6jKjefVS6MzFSzJAdCuP" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 19:27:24 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --NOsHfQZeaBKuU6jKjefVS6MzFSzJAdCuP Content-Type: multipart/mixed; boundary="gI6u1mYaNUQhpNeA3r9xuBJWMRu7ZDL7G" --gI6u1mYaNUQhpNeA3r9xuBJWMRu7ZDL7G Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Am 14.07.20 um 19:31 schrieb Brooks Davis: > On Tue, Jul 14, 2020 at 05:02:18AM +0000, Adrian Chadd wrote: >> Author: adrian >> Date: Tue Jul 14 05:02:18 2020 >> New Revision: 363172 >> URL: https://svnweb.freebsd.org/changeset/base/363172 >> >> Log: >> [bc] Fix a "maybe uninitialized" compiler warning under mips-gcc-6.3= =2E0. >> =20 >> I guess this didn't like the case statements.. ? But this does quiet= en >> the compiler error. >=20 > IMO it would be better to disable this warning for this (old) compiler > on this file rather than making a change here (in general we should be > removing these sorts of changes). That being said, we need to write > down some guidance on this so we have a clear set of principles and we > can figure out how we decided which compilers are on which side of the > line. I fully agree and have notified the "upstream". He may want to apply the change, but I do not expect him to tag a new release for this minor change. Since this is contributed software, I'd really appreciate, if a solution was only applied to the local build tree of the person affected by this local problem - a generally applicable solution can then be discussed and applied, if found to be necessary. Regards, STefan --gI6u1mYaNUQhpNeA3r9xuBJWMRu7ZDL7G-- --NOsHfQZeaBKuU6jKjefVS6MzFSzJAdCuP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAl8OBxcACgkQR+u171r9 9URUXQgAu6xvrT9j9+FwU2a1aNR5fceYErs2YPUmra2dv2fWCyipAg+wlXxSLkON /fNieVxhmXIZl+M2qic/X9BM8Y/5mZplWzuZF6+PZsIPUU03eraArregUACF5Mld dBLR+1dyAw28fiZPoUzNhfnpDLw757gfHbk2iXL+MDseaVQfxKujw/b3EcX4s8Pi 5xx8hbSjcRzyNTolCmqFcYlV2zu9psF/7fAi32qk4CVb4Nqj6athhB/2ZRPmYBTn Gy4Ife/U6hEH1yFxzPX+gql499OH+Sh/2Cyx7ysomkvWdMPX/g7gKa7NsXvFTRi7 gmobX8mv+Aon0GH/Gv4YVeNVFXGotA== =MgVO -----END PGP SIGNATURE----- --NOsHfQZeaBKuU6jKjefVS6MzFSzJAdCuP-- From owner-svn-src-head@freebsd.org Tue Jul 14 20:23:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 28FD036E091; Tue, 14 Jul 2020 20:23:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5sR45vjFz3yQB; Tue, 14 Jul 2020 20:23:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 81260BF90; Tue, 14 Jul 2020 20:23:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06EKNSrv090506; Tue, 14 Jul 2020 20:23:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06EKNSLp090505; Tue, 14 Jul 2020 20:23:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202007142023.06EKNSLp090505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 14 Jul 2020 20:23:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363193 - in head: include sys/sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: include sys/sys X-SVN-Commit-Revision: 363193 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 20:23:29 -0000 Author: kib Date: Tue Jul 14 20:23:27 2020 New Revision: 363193 URL: https://svnweb.freebsd.org/changeset/base/363193 Log: Make CLOCK_REALTIME and TIMER_ABSTIME available for XOPEN_SOURCE >= 500. Reported by: jbeich PR: 247701 Reviewed by: jilles Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25554 Modified: head/include/time.h head/sys/sys/time.h Modified: head/include/time.h ============================================================================== --- head/include/time.h Tue Jul 14 18:57:31 2020 (r363192) +++ head/include/time.h Tue Jul 14 20:23:27 2020 (r363193) @@ -98,12 +98,14 @@ typedef __pid_t pid_t; #endif /* These macros are also in sys/time.h. */ -#if !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 +#if !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 199506 #define CLOCK_REALTIME 0 -#ifdef __BSD_VISIBLE +#endif /* !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 199506 */ +#if !defined(CLOCK_VIRTUAL) && __BSD_VISIBLE #define CLOCK_VIRTUAL 1 #define CLOCK_PROF 2 -#endif +#endif /* !defined(CLOCK_VIRTUAL) && __BSD_VISIBLE */ +#if !defined(CLOCK_MONOTONIC) && __POSIX_VISIBLE >= 200112 #define CLOCK_MONOTONIC 4 #define CLOCK_UPTIME 5 /* FreeBSD-specific. */ #define CLOCK_UPTIME_PRECISE 7 /* FreeBSD-specific. */ @@ -115,14 +117,14 @@ typedef __pid_t pid_t; #define CLOCK_SECOND 13 /* FreeBSD-specific. */ #define CLOCK_THREAD_CPUTIME_ID 14 #define CLOCK_PROCESS_CPUTIME_ID 15 -#endif /* !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 */ +#endif /* !defined(CLOCK_MONOTONIC) && __POSIX_VISIBLE >= 200112 */ -#if !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 #if __BSD_VISIBLE #define TIMER_RELTIME 0x0 /* relative timer */ #endif +#if !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 199506 #define TIMER_ABSTIME 0x1 /* absolute timer */ -#endif /* !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 */ +#endif /* !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 199506 */ struct tm { int tm_sec; /* seconds after the minute [0-60] */ Modified: head/sys/sys/time.h ============================================================================== --- head/sys/sys/time.h Tue Jul 14 18:57:31 2020 (r363192) +++ head/sys/sys/time.h Tue Jul 14 20:23:27 2020 (r363193) @@ -463,8 +463,12 @@ struct clockinfo { /* These macros are also in time.h. */ #ifndef CLOCK_REALTIME #define CLOCK_REALTIME 0 +#endif +#ifndef CLOCK_VIRTUAL #define CLOCK_VIRTUAL 1 #define CLOCK_PROF 2 +#endif +#ifndef CLOCK_MONOTONIC #define CLOCK_MONOTONIC 4 #define CLOCK_UPTIME 5 /* FreeBSD-specific. */ #define CLOCK_UPTIME_PRECISE 7 /* FreeBSD-specific. */ From owner-svn-src-head@freebsd.org Tue Jul 14 20:32:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 766EE36E867; Tue, 14 Jul 2020 20:32:51 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5sdv05sDz4CDb; Tue, 14 Jul 2020 20:32:50 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB68DC10F; Tue, 14 Jul 2020 20:32:50 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06EKWoXh096900; Tue, 14 Jul 2020 20:32:50 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06EKWo0Q096898; Tue, 14 Jul 2020 20:32:50 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007142032.06EKWo0Q096898@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 14 Jul 2020 20:32:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363194 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 363194 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 20:32:51 -0000 Author: tuexen Date: Tue Jul 14 20:32:50 2020 New Revision: 363194 URL: https://svnweb.freebsd.org/changeset/base/363194 Log: Improve the error handling in generating ASCONF chunks. In case of errors, the cleanup was not consistent. Thanks to Felix Weinrank for fuzzing the userland stack and making me aware of the issue. MFC after: 1 week Modified: head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Tue Jul 14 20:23:27 2020 (r363193) +++ head/sys/netinet/sctp_asconf.c Tue Jul 14 20:32:50 2020 (r363194) @@ -2587,14 +2587,14 @@ sctp_compose_asconf(struct sctp_tcb *stcb, int *retlen if (m_asconf_chk == NULL) { /* no mbuf's */ SCTPDBG(SCTP_DEBUG_ASCONF1, - "compose_asconf: couldn't get chunk mbuf!\n"); + "sctp_compose_asconf: couldn't get chunk mbuf!\n"); return (NULL); } m_asconf = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_NOWAIT, 1, MT_DATA); if (m_asconf == NULL) { /* no mbuf's */ SCTPDBG(SCTP_DEBUG_ASCONF1, - "compose_asconf: couldn't get mbuf!\n"); + "sctp_compose_asconf: couldn't get mbuf!\n"); sctp_m_freem(m_asconf_chk); return (NULL); } @@ -2719,10 +2719,12 @@ sctp_compose_asconf(struct sctp_tcb *stcb, int *retlen break; #endif default: - p_size = 0; - addr_size = 0; - addr_ptr = NULL; - break; + SCTPDBG(SCTP_DEBUG_ASCONF1, + "sctp_compose_asconf: no usable lookup addr (family = %d)!\n", + found_addr->sa_family); + sctp_m_freem(m_asconf_chk); + sctp_m_freem(m_asconf); + return (NULL); } lookup->ph.param_length = htons(SCTP_SIZE32(p_size)); memcpy(lookup->addr, addr_ptr, addr_size); @@ -2730,12 +2732,10 @@ sctp_compose_asconf(struct sctp_tcb *stcb, int *retlen } else { /* uh oh... don't have any address?? */ SCTPDBG(SCTP_DEBUG_ASCONF1, - "compose_asconf: no lookup addr!\n"); - /* XXX for now, we send a IPv4 address of 0.0.0.0 */ - lookup->ph.param_type = htons(SCTP_IPV4_ADDRESS); - lookup->ph.param_length = htons(SCTP_SIZE32(sizeof(struct sctp_ipv4addr_param))); - memset(lookup->addr, 0, sizeof(struct in_addr)); - SCTP_BUF_LEN(m_asconf_chk) += SCTP_SIZE32(sizeof(struct sctp_ipv4addr_param)); + "sctp_compose_asconf: no lookup addr!\n"); + sctp_m_freem(m_asconf_chk); + sctp_m_freem(m_asconf); + return (NULL); } } /* chain it all together */ @@ -3261,10 +3261,9 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb *inp, struct so } void -sctp_asconf_send_nat_state_update(struct sctp_tcb *stcb, - struct sctp_nets *net) +sctp_asconf_send_nat_state_update(struct sctp_tcb *stcb, struct sctp_nets *net) { - struct sctp_asconf_addr *aa; + struct sctp_asconf_addr *aa_vtag, *aa_add, *aa_del; struct sctp_ifa *sctp_ifap; struct sctp_asconf_tag_param *vtag; #ifdef INET @@ -3273,6 +3272,7 @@ sctp_asconf_send_nat_state_update(struct sctp_tcb *stc #ifdef INET6 struct sockaddr_in6 *to6; #endif + if (net == NULL) { SCTPDBG(SCTP_DEBUG_ASCONF1, "sctp_asconf_send_nat_state_update: Missing net\n"); return; @@ -3282,105 +3282,81 @@ sctp_asconf_send_nat_state_update(struct sctp_tcb *stc return; } /* - * Need to have in the asconf: - vtagparam(my_vtag/peer_vtag) - - * add(0.0.0.0) - del(0.0.0.0) - Any global addresses add(addr) + * Need to have in the ASCONF: - VTAG(my_vtag/peer_vtag) - + * ADD(wildcard) - DEL(wildcard) - ADD(Any global addresses) */ - SCTP_MALLOC(aa, struct sctp_asconf_addr *, sizeof(*aa), - SCTP_M_ASC_ADDR); - if (aa == NULL) { - /* didn't get memory */ - SCTPDBG(SCTP_DEBUG_ASCONF1, - "sctp_asconf_send_nat_state_update: failed to get memory!\n"); + SCTP_MALLOC(aa_vtag, struct sctp_asconf_addr *, sizeof(struct sctp_asconf_addr), SCTP_M_ASC_ADDR); + SCTP_MALLOC(aa_add, struct sctp_asconf_addr *, sizeof(struct sctp_asconf_addr), SCTP_M_ASC_ADDR); + SCTP_MALLOC(aa_del, struct sctp_asconf_addr *, sizeof(struct sctp_asconf_addr), SCTP_M_ASC_ADDR); + + if ((aa_vtag == NULL) || (aa_add == NULL) || (aa_del == NULL)) { + /* Didn't get memory */ + SCTPDBG(SCTP_DEBUG_ASCONF1, "sctp_asconf_send_nat_state_update: failed to get memory!\n"); +out: + if (aa_vtag != NULL) { + SCTP_FREE(aa_vtag, SCTP_M_ASC_ADDR); + } + if (aa_add != NULL) { + SCTP_FREE(aa_add, SCTP_M_ASC_ADDR); + } + if (aa_del != NULL) { + SCTP_FREE(aa_del, SCTP_M_ASC_ADDR); + } return; } - aa->special_del = 0; - /* fill in asconf address parameter fields */ - /* top level elements are "networked" during send */ - aa->ifa = NULL; - aa->sent = 0; /* clear sent flag */ - vtag = (struct sctp_asconf_tag_param *)&aa->ap.aph; + memset(aa_vtag, 0, sizeof(struct sctp_asconf_addr)); + aa_vtag->special_del = 0; + /* Fill in ASCONF address parameter fields. */ + /* Top level elements are "networked" during send. */ + aa_vtag->ifa = NULL; + aa_vtag->sent = 0; /* clear sent flag */ + vtag = (struct sctp_asconf_tag_param *)&aa_vtag->ap.aph; vtag->aph.ph.param_type = SCTP_NAT_VTAGS; vtag->aph.ph.param_length = sizeof(struct sctp_asconf_tag_param); vtag->local_vtag = htonl(stcb->asoc.my_vtag); vtag->remote_vtag = htonl(stcb->asoc.peer_vtag); - TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next); - SCTP_MALLOC(aa, struct sctp_asconf_addr *, sizeof(*aa), - SCTP_M_ASC_ADDR); - if (aa == NULL) { - /* didn't get memory */ - SCTPDBG(SCTP_DEBUG_ASCONF1, - "sctp_asconf_send_nat_state_update: failed to get memory!\n"); - return; - } - memset(aa, 0, sizeof(struct sctp_asconf_addr)); - /* fill in asconf address parameter fields */ - /* ADD(0.0.0.0) */ + memset(aa_add, 0, sizeof(struct sctp_asconf_addr)); + memset(aa_del, 0, sizeof(struct sctp_asconf_addr)); switch (net->ro._l_addr.sa.sa_family) { #ifdef INET case AF_INET: - aa->ap.aph.ph.param_type = SCTP_ADD_IP_ADDRESS; - aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_addrv4_param); - aa->ap.addrp.ph.param_type = SCTP_IPV4_ADDRESS; - aa->ap.addrp.ph.param_length = sizeof(struct sctp_ipv4addr_param); - /* No need to add an address, we are using 0.0.0.0 */ - TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next); + aa_add->ap.aph.ph.param_type = SCTP_ADD_IP_ADDRESS; + aa_add->ap.aph.ph.param_length = sizeof(struct sctp_asconf_addrv4_param); + aa_add->ap.addrp.ph.param_type = SCTP_IPV4_ADDRESS; + aa_add->ap.addrp.ph.param_length = sizeof(struct sctp_ipv4addr_param); + /* No need to fill the address, we are using 0.0.0.0 */ + aa_del->ap.aph.ph.param_type = SCTP_ADD_IP_ADDRESS; + aa_del->ap.aph.ph.param_length = sizeof(struct sctp_asconf_addrv4_param); + aa_del->ap.addrp.ph.param_type = SCTP_IPV4_ADDRESS; + aa_del->ap.addrp.ph.param_length = sizeof(struct sctp_ipv4addr_param); + /* No need to fill the address, we are using 0.0.0.0 */ break; #endif #ifdef INET6 case AF_INET6: - aa->ap.aph.ph.param_type = SCTP_ADD_IP_ADDRESS; - aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_addr_param); - aa->ap.addrp.ph.param_type = SCTP_IPV6_ADDRESS; - aa->ap.addrp.ph.param_length = sizeof(struct sctp_ipv6addr_param); - /* No need to add an address, we are using 0.0.0.0 */ - TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next); + aa_add->ap.aph.ph.param_type = SCTP_ADD_IP_ADDRESS; + aa_add->ap.aph.ph.param_length = sizeof(struct sctp_asconf_addr_param); + aa_add->ap.addrp.ph.param_type = SCTP_IPV6_ADDRESS; + aa_add->ap.addrp.ph.param_length = sizeof(struct sctp_ipv6addr_param); + /* No need to fill the address, we are using ::0 */ + aa_del->ap.aph.ph.param_type = SCTP_DEL_IP_ADDRESS; + aa_del->ap.aph.ph.param_length = sizeof(struct sctp_asconf_addr_param); + aa_del->ap.addrp.ph.param_type = SCTP_IPV6_ADDRESS; + aa_del->ap.addrp.ph.param_length = sizeof(struct sctp_ipv6addr_param); + /* No need to fill the address, we are using ::0 */ break; #endif default: SCTPDBG(SCTP_DEBUG_ASCONF1, - "sctp_asconf_send_nat_state_update: unknown address family\n"); - SCTP_FREE(aa, SCTP_M_ASC_ADDR); - return; + "sctp_asconf_send_nat_state_update: unknown address family %d\n", + net->ro._l_addr.sa.sa_family); + goto out; } - SCTP_MALLOC(aa, struct sctp_asconf_addr *, sizeof(*aa), - SCTP_M_ASC_ADDR); - if (aa == NULL) { - /* didn't get memory */ - SCTPDBG(SCTP_DEBUG_ASCONF1, - "sctp_asconf_send_nat_state_update: failed to get memory!\n"); - return; - } - memset(aa, 0, sizeof(struct sctp_asconf_addr)); - /* fill in asconf address parameter fields */ - /* ADD(0.0.0.0) */ - switch (net->ro._l_addr.sa.sa_family) { -#ifdef INET - case AF_INET: - aa->ap.aph.ph.param_type = SCTP_ADD_IP_ADDRESS; - aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_addrv4_param); - aa->ap.addrp.ph.param_type = SCTP_IPV4_ADDRESS; - aa->ap.addrp.ph.param_length = sizeof(struct sctp_ipv4addr_param); - /* No need to add an address, we are using 0.0.0.0 */ - TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next); - break; -#endif -#ifdef INET6 - case AF_INET6: - aa->ap.aph.ph.param_type = SCTP_DEL_IP_ADDRESS; - aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_addr_param); - aa->ap.addrp.ph.param_type = SCTP_IPV6_ADDRESS; - aa->ap.addrp.ph.param_length = sizeof(struct sctp_ipv6addr_param); - /* No need to add an address, we are using 0.0.0.0 */ - TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next); - break; -#endif - default: - SCTPDBG(SCTP_DEBUG_ASCONF1, - "sctp_asconf_send_nat_state_update: unknown address family\n"); - SCTP_FREE(aa, SCTP_M_ASC_ADDR); - return; - } + TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa_vtag, next); + TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa_add, next); + TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa_del, next); + /* Now we must hunt the addresses and add all global addresses */ if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_BOUNDALL) { struct sctp_vrf *vrf = NULL; Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Tue Jul 14 20:23:27 2020 (r363193) +++ head/sys/netinet/sctp_input.c Tue Jul 14 20:32:50 2020 (r363194) @@ -800,13 +800,13 @@ sctp_handle_abort(struct sctp_abort_chunk *abort, cause = (struct sctp_error_cause *)(abort + 1); error = ntohs(cause->code); if (error == SCTP_CAUSE_NAT_COLLIDING_STATE) { - SCTPDBG(SCTP_DEBUG_INPUT2, "Received Colliding state abort flags:%x\n", + SCTPDBG(SCTP_DEBUG_INPUT2, "Received Colliding state, ABORT flags:%x\n", abort->ch.chunk_flags); if (sctp_handle_nat_colliding_state(stcb)) { return (0); } } else if (error == SCTP_CAUSE_NAT_MISSING_STATE) { - SCTPDBG(SCTP_DEBUG_INPUT2, "Received missing state abort flags:%x\n", + SCTPDBG(SCTP_DEBUG_INPUT2, "Received missing state, ABORT flags:%x\n", abort->ch.chunk_flags); if (sctp_handle_nat_missing_state(stcb, net)) { return (0); @@ -1146,14 +1146,14 @@ sctp_handle_error(struct sctp_chunkhdr *ch, cause_code); break; case SCTP_CAUSE_NAT_COLLIDING_STATE: - SCTPDBG(SCTP_DEBUG_INPUT2, "Received Colliding state abort flags: %x\n", + SCTPDBG(SCTP_DEBUG_INPUT2, "Received Colliding state, ERROR flags: %x\n", ch->chunk_flags); if (sctp_handle_nat_colliding_state(stcb)) { return (0); } break; case SCTP_CAUSE_NAT_MISSING_STATE: - SCTPDBG(SCTP_DEBUG_INPUT2, "Received missing state abort flags: %x\n", + SCTPDBG(SCTP_DEBUG_INPUT2, "Received missing state, ERROR flags: %x\n", ch->chunk_flags); if (sctp_handle_nat_missing_state(stcb, net)) { return (0); From owner-svn-src-head@freebsd.org Tue Jul 14 20:37:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EF2E536EB19; Tue, 14 Jul 2020 20:37:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5slh33h7z4GMG; Tue, 14 Jul 2020 20:37:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E69A2BAEA; Tue, 14 Jul 2020 20:37:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06EKbpVB097370; Tue, 14 Jul 2020 20:37:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06EKbo7c097361; Tue, 14 Jul 2020 20:37:50 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202007142037.06EKbo7c097361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 14 Jul 2020 20:37:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363195 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include x86/include x86/x86 x86/xen X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 amd64/include i386/i386 i386/include x86/include x86/x86 x86/xen X-SVN-Commit-Revision: 363195 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 20:37:53 -0000 Author: kib Date: Tue Jul 14 20:37:50 2020 New Revision: 363195 URL: https://svnweb.freebsd.org/changeset/base/363195 Log: amd64: allow parallel shootdown IPIs Stop using smp_ipi_mtx to protect global shootdown state, and move/multiply the global state into pcpu. Now each CPU can initiate shootdown IPI independently from other CPUs. Initiator enters critical section, then fills its local PCPU shootdown info (pc_smp_tlb_XXX), then clears scoreboard generation at location (cpu, my_cpuid) for each target cpu. After that IPI is sent to all targets which scan for zeroed scoreboard generation words. Upon finding such word the shootdown data is read from corresponding cpu' pcpu, and generation is set. Meantime initiator loops waiting for all zeroed generations in scoreboard to update. Initiator does not disable interrupts, which should allow non-invalidation IPIs from deadlocking, it only needs to disable preemption to pin itself to the instance of the pcpu smp_tlb data. The generation is set before the actual invalidation is performed in handler. It is safe because target CPU cannot return to userspace before handler finishes. In principle only NMI can preempt the handler, but NMI would see the kernel handler frame and not touch not-invalidated user page table. Handlers loop until they do not see zeroed scoreboard generations. This, together with hardware keeping one pending IPI in LAPIC IRR should prevent lost shootdowns. Notes. 1. The code does protect writes to LAPIC ICR with exclusion. I believe this is fine because we in fact do not send IPIs from interrupt handlers. More for !x2APIC mode where ICR access for write requires two registers write, we disable interrupts around it. If considered incorrect, I can add per-cpu spinlock around ipi_send(). 2. Scoreboard lines owned by given target CPU can be padded to the cache line, to reduce ping-pong. Reviewed by: markj (previous version) Discussed with: alc Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Differential revision: https://reviews.freebsd.org/D25510 Modified: head/sys/amd64/amd64/apic_vector.S head/sys/amd64/amd64/db_interface.c head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/include/pcpu.h head/sys/amd64/include/smp.h head/sys/i386/i386/mp_machdep.c head/sys/i386/include/smp.h head/sys/x86/include/apicvar.h head/sys/x86/include/x86_smp.h head/sys/x86/x86/mp_x86.c head/sys/x86/xen/xen_apic.c Modified: head/sys/amd64/amd64/apic_vector.S ============================================================================== --- head/sys/amd64/amd64/apic_vector.S Tue Jul 14 20:32:50 2020 (r363194) +++ head/sys/amd64/amd64/apic_vector.S Tue Jul 14 20:37:50 2020 (r363195) @@ -171,63 +171,13 @@ IDTVEC(spuriousint) .text SUPERALIGN_TEXT -invltlb_ret: - call as_lapic_eoi - jmp ld_regs - - SUPERALIGN_TEXT - INTR_HANDLER invltlb - call invltlb_handler - jmp invltlb_ret - - INTR_HANDLER invltlb_pcid - call invltlb_pcid_handler - jmp invltlb_ret - - INTR_HANDLER invltlb_invpcid_nopti - call invltlb_invpcid_handler - jmp invltlb_ret - - INTR_HANDLER invltlb_invpcid_pti - call invltlb_invpcid_pti_handler - jmp invltlb_ret - /* - * Single page TLB shootdown + * IPI handler for cache and TLB shootdown */ - INTR_HANDLER invlpg - call invlpg_handler - jmp invltlb_ret - - INTR_HANDLER invlpg_invpcid - call invlpg_invpcid_handler - jmp invltlb_ret - - INTR_HANDLER invlpg_pcid - call invlpg_pcid_handler - jmp invltlb_ret - -/* - * Page range TLB shootdown. - */ - INTR_HANDLER invlrng - call invlrng_handler - jmp invltlb_ret - - INTR_HANDLER invlrng_invpcid - call invlrng_invpcid_handler - jmp invltlb_ret - - INTR_HANDLER invlrng_pcid - call invlrng_pcid_handler - jmp invltlb_ret - -/* - * Invalidate cache. - */ - INTR_HANDLER invlcache - call invlcache_handler - jmp invltlb_ret + INTR_HANDLER invlop + call invlop_handler + call as_lapic_eoi + jmp ld_regs /* * Handler for IPIs sent via the per-cpu IPI bitmap. Modified: head/sys/amd64/amd64/db_interface.c ============================================================================== --- head/sys/amd64/amd64/db_interface.c Tue Jul 14 20:32:50 2020 (r363194) +++ head/sys/amd64/amd64/db_interface.c Tue Jul 14 20:37:50 2020 (r363195) @@ -107,5 +107,4 @@ db_show_mdpcpu(struct pcpu *pc) db_printf("gs32p = %p\n", pc->pc_gs32p); db_printf("ldt = %p\n", pc->pc_ldt); db_printf("tss = %p\n", pc->pc_tss); - db_printf("tlb gen = %u\n", pc->pc_smp_tlb_done); } Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Tue Jul 14 20:32:50 2020 (r363194) +++ head/sys/amd64/amd64/machdep.c Tue Jul 14 20:37:50 2020 (r363195) @@ -1562,6 +1562,7 @@ amd64_bsp_pcpu_init1(struct pcpu *pc) PCPU_SET(ldt, (struct system_segment_descriptor *)&gdt[GUSERLDT_SEL]); PCPU_SET(fs32p, &gdt[GUFS32_SEL]); PCPU_SET(gs32p, &gdt[GUGS32_SEL]); + PCPU_SET(smp_tlb_gen, 1); } void Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Tue Jul 14 20:32:50 2020 (r363194) +++ head/sys/amd64/amd64/mp_machdep.c Tue Jul 14 20:37:50 2020 (r363195) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #ifdef GPROF #include #endif +#include #include #include #include @@ -202,36 +203,8 @@ cpu_mp_start(void) cpu_apic_ids[i] = -1; } - /* Install an inter-CPU IPI for TLB invalidation */ - if (pmap_pcid_enabled) { - if (invpcid_works) { - setidt(IPI_INVLTLB, pti ? - IDTVEC(invltlb_invpcid_pti_pti) : - IDTVEC(invltlb_invpcid_nopti), SDT_SYSIGT, - SEL_KPL, 0); - setidt(IPI_INVLPG, pti ? IDTVEC(invlpg_invpcid_pti) : - IDTVEC(invlpg_invpcid), SDT_SYSIGT, SEL_KPL, 0); - setidt(IPI_INVLRNG, pti ? IDTVEC(invlrng_invpcid_pti) : - IDTVEC(invlrng_invpcid), SDT_SYSIGT, SEL_KPL, 0); - } else { - setidt(IPI_INVLTLB, pti ? IDTVEC(invltlb_pcid_pti) : - IDTVEC(invltlb_pcid), SDT_SYSIGT, SEL_KPL, 0); - setidt(IPI_INVLPG, pti ? IDTVEC(invlpg_pcid_pti) : - IDTVEC(invlpg_pcid), SDT_SYSIGT, SEL_KPL, 0); - setidt(IPI_INVLRNG, pti ? IDTVEC(invlrng_pcid_pti) : - IDTVEC(invlrng_pcid), SDT_SYSIGT, SEL_KPL, 0); - } - } else { - setidt(IPI_INVLTLB, pti ? IDTVEC(invltlb_pti) : IDTVEC(invltlb), - SDT_SYSIGT, SEL_KPL, 0); - setidt(IPI_INVLPG, pti ? IDTVEC(invlpg_pti) : IDTVEC(invlpg), - SDT_SYSIGT, SEL_KPL, 0); - setidt(IPI_INVLRNG, pti ? IDTVEC(invlrng_pti) : IDTVEC(invlrng), - SDT_SYSIGT, SEL_KPL, 0); - } - - /* Install an inter-CPU IPI for cache invalidation. */ - setidt(IPI_INVLCACHE, pti ? IDTVEC(invlcache_pti) : IDTVEC(invlcache), + /* Install an inter-CPU IPI for for cache and TLB invalidations. */ + setidt(IPI_INVLOP, pti ? IDTVEC(invlop_pti) : IDTVEC(invlop), SDT_SYSIGT, SEL_KPL, 0); /* Install an inter-CPU IPI for all-CPU rendezvous */ @@ -314,6 +287,8 @@ init_secondary(void) pc->pc_pcid_next = PMAP_PCID_KERN + 2; pc->pc_pcid_gen = 1; + pc->pc_smp_tlb_gen = 1; + /* Init tss */ pc->pc_common_tss = __pcpu[0].pc_common_tss; pc->pc_common_tss.tss_iobase = sizeof(struct amd64tss) + @@ -542,11 +517,270 @@ start_ap(int apic_id) return 0; /* return FAILURE */ } +/* + * Flush the TLB on other CPU's + */ + +/* + * Invalidation request. PCPU pc_smp_tlb_op uses u_int instead of the + * enum to avoid both namespace and ABI issues (with enums). + */ +enum invl_op_codes { + INVL_OP_TLB = 1, + INVL_OP_TLB_INVPCID = 2, + INVL_OP_TLB_INVPCID_PTI = 3, + INVL_OP_TLB_PCID = 4, + INVL_OP_PGRNG = 5, + INVL_OP_PGRNG_INVPCID = 6, + INVL_OP_PGRNG_PCID = 7, + INVL_OP_PG = 8, + INVL_OP_PG_INVPCID = 9, + INVL_OP_PG_PCID = 10, + INVL_OP_CACHE = 11, +}; + +/* + * These variables are initialized at startup to reflect how each of + * the different kinds of invalidations should be performed on the + * current machine and environment. + */ +static enum invl_op_codes invl_op_tlb; +static enum invl_op_codes invl_op_pgrng; +static enum invl_op_codes invl_op_pg; + +/* + * Scoreboard of IPI completion notifications from target to IPI initiator. + * + * Each CPU can initiate shootdown IPI independently from other CPUs. + * Initiator enters critical section, then fills its local PCPU + * shootdown info (pc_smp_tlb_ vars), then clears scoreboard generation + * at location (cpu, my_cpuid) for each target cpu. After that IPI is + * sent to all targets which scan for zeroed scoreboard generation + * words. Upon finding such word the shootdown data is read from + * corresponding cpu' pcpu, and generation is set. Meantime initiator + * loops waiting for all zeroed generations in scoreboard to update. + */ +static uint32_t *invl_scoreboard; + +static void +invl_scoreboard_init(void *arg __unused) +{ + u_int i; + + invl_scoreboard = malloc(sizeof(uint32_t) * (mp_maxid + 1) * + (mp_maxid + 1), M_DEVBUF, M_WAITOK); + for (i = 0; i < (mp_maxid + 1) * (mp_maxid + 1); i++) + invl_scoreboard[i] = 1; + + if (pmap_pcid_enabled) { + if (invpcid_works) { + if (pti) + invl_op_tlb = INVL_OP_TLB_INVPCID_PTI; + else + invl_op_tlb = INVL_OP_TLB_INVPCID; + invl_op_pgrng = INVL_OP_PGRNG_INVPCID; + invl_op_pg = INVL_OP_PG_INVPCID; + } else { + invl_op_tlb = INVL_OP_TLB_PCID; + invl_op_pgrng = INVL_OP_PGRNG_PCID; + invl_op_pg = INVL_OP_PG_PCID; + } + } else { + invl_op_tlb = INVL_OP_TLB; + invl_op_pgrng = INVL_OP_PGRNG; + invl_op_pg = INVL_OP_PG; + } +} +SYSINIT(invl_ops, SI_SUB_SMP, SI_ORDER_FIRST, invl_scoreboard_init, NULL); + +static uint32_t * +invl_scoreboard_getcpu(u_int cpu) +{ + return (invl_scoreboard + cpu * (mp_maxid + 1)); +} + +static uint32_t * +invl_scoreboard_slot(u_int cpu) +{ + return (invl_scoreboard_getcpu(cpu) + PCPU_GET(cpuid)); +} + +/* + * Used by pmap to request cache or TLB invalidation on local and + * remote processors. Mask provides the set of remote CPUs which are + * to be signalled with the invalidation IPI. As an optimization, the + * curcpu_cb callback is invoked on the calling CPU while waiting for + * remote CPUs to complete the operation. + * + * The callback function is called unconditionally on the caller's + * underlying processor, even when this processor is not set in the + * mask. So, the callback function must be prepared to handle such + * spurious invocations. + * + * Interrupts must be enabled when calling the function with smp + * started, to avoid deadlock with other IPIs that are protected with + * smp_ipi_mtx spinlock at the initiator side. + */ +static void +smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, vm_offset_t addr1, + vm_offset_t addr2, smp_invl_cb_t curcpu_cb, enum invl_op_codes op) +{ + cpuset_t other_cpus, mask1; + uint32_t generation, *p_cpudone; + int cpu; + + /* + * It is not necessary to signal other CPUs while booting or + * when in the debugger. + */ + if (kdb_active || KERNEL_PANICKED() || !smp_started) { + curcpu_cb(pmap, addr1, addr2); + return; + } + + sched_pin(); + + /* + * Check for other cpus. Return if none. + */ + if (CPU_ISFULLSET(&mask)) { + if (mp_ncpus <= 1) + goto nospinexit; + } else { + CPU_CLR(PCPU_GET(cpuid), &mask); + if (CPU_EMPTY(&mask)) + goto nospinexit; + } + + /* + * Initiator must have interrupts enabled, which prevents + * non-invalidation IPIs, that takes smp_ipi_mtx spinlock, + * from deadlocking with as. On the other hand, preemption + * must be disabled to pin initiator to the instance of the + * pcpu pc_smp_tlb data and scoreboard line. + */ + KASSERT((read_rflags() & PSL_I) != 0, + ("smp_targeted_tlb_shootdown: interrupts disabled")); + critical_enter(); + + PCPU_SET(smp_tlb_addr1, addr1); + PCPU_SET(smp_tlb_addr2, addr2); + PCPU_SET(smp_tlb_pmap, pmap); + generation = PCPU_GET(smp_tlb_gen); + if (++generation == 0) + generation = 1; + PCPU_SET(smp_tlb_gen, generation); + PCPU_SET(smp_tlb_op, op); + /* Fence between filling smp_tlb fields and clearing scoreboard. */ + atomic_thread_fence_rel(); + + mask1 = mask; + while ((cpu = CPU_FFS(&mask1)) != 0) { + cpu--; + CPU_CLR(cpu, &mask1); + KASSERT(*invl_scoreboard_slot(cpu) != 0, + ("IPI scoreboard is zero, initiator %d target %d", + PCPU_GET(cpuid), cpu)); + *invl_scoreboard_slot(cpu) = 0; + } + + /* + * IPI acts as a fence between writing to the scoreboard above + * (zeroing slot) and reading from it below (wait for + * acknowledge). + */ + if (CPU_ISFULLSET(&mask)) { + ipi_all_but_self(IPI_INVLOP); + other_cpus = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &other_cpus); + } else { + other_cpus = mask; + while ((cpu = CPU_FFS(&mask)) != 0) { + cpu--; + CPU_CLR(cpu, &mask); + CTR3(KTR_SMP, "%s: cpu: %d invl ipi op: %x", __func__, + cpu, op); + ipi_send_cpu(cpu, IPI_INVLOP); + } + } + curcpu_cb(pmap, addr1, addr2); + while ((cpu = CPU_FFS(&other_cpus)) != 0) { + cpu--; + CPU_CLR(cpu, &other_cpus); + p_cpudone = invl_scoreboard_slot(cpu); + while (atomic_load_int(p_cpudone) != generation) + ia32_pause(); + } + critical_exit(); + sched_unpin(); + return; + +nospinexit: + curcpu_cb(pmap, addr1, addr2); + sched_unpin(); +} + void -invltlb_invpcid_handler(void) +smp_masked_invltlb(cpuset_t mask, pmap_t pmap, smp_invl_cb_t curcpu_cb) { + smp_targeted_tlb_shootdown(mask, pmap, 0, 0, curcpu_cb, invl_op_tlb); +#ifdef COUNT_XINVLTLB_HITS + ipi_global++; +#endif +} + +void +smp_masked_invlpg(cpuset_t mask, vm_offset_t addr, pmap_t pmap, + smp_invl_cb_t curcpu_cb) +{ + smp_targeted_tlb_shootdown(mask, pmap, addr, 0, curcpu_cb, invl_op_pg); +#ifdef COUNT_XINVLTLB_HITS + ipi_page++; +#endif +} + +void +smp_masked_invlpg_range(cpuset_t mask, vm_offset_t addr1, vm_offset_t addr2, + pmap_t pmap, smp_invl_cb_t curcpu_cb) +{ + smp_targeted_tlb_shootdown(mask, pmap, addr1, addr2, curcpu_cb, + invl_op_pgrng); +#ifdef COUNT_XINVLTLB_HITS + ipi_range++; + ipi_range_size += (addr2 - addr1) / PAGE_SIZE; +#endif +} + +void +smp_cache_flush(smp_invl_cb_t curcpu_cb) +{ + smp_targeted_tlb_shootdown(all_cpus, NULL, 0, 0, curcpu_cb, + INVL_OP_CACHE); +} + +/* + * Handlers for TLB related IPIs + */ +static void +invltlb_handler(pmap_t smp_tlb_pmap) +{ +#ifdef COUNT_XINVLTLB_HITS + xhits_gbl[PCPU_GET(cpuid)]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; +#endif /* COUNT_IPIS */ + + if (smp_tlb_pmap == kernel_pmap) + invltlb_glob(); + else + invltlb(); +} + +static void +invltlb_invpcid_handler(pmap_t smp_tlb_pmap) +{ struct invpcid_descr d; - uint32_t generation; #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; @@ -555,20 +789,17 @@ invltlb_invpcid_handler(void) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - generation = smp_tlb_generation; d.pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; d.pad = 0; d.addr = 0; invpcid(&d, smp_tlb_pmap == kernel_pmap ? INVPCID_CTXGLOB : INVPCID_CTX); - PCPU_SET(smp_tlb_done, generation); } -void -invltlb_invpcid_pti_handler(void) +static void +invltlb_invpcid_pti_handler(pmap_t smp_tlb_pmap) { struct invpcid_descr d; - uint32_t generation; #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; @@ -577,7 +808,6 @@ invltlb_invpcid_pti_handler(void) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - generation = smp_tlb_generation; d.pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; d.pad = 0; d.addr = 0; @@ -594,14 +824,13 @@ invltlb_invpcid_pti_handler(void) d.pcid |= PMAP_PCID_USER_PT; invpcid(&d, INVPCID_CTX); } - PCPU_SET(smp_tlb_done, generation); } -void -invltlb_pcid_handler(void) +static void +invltlb_pcid_handler(pmap_t smp_tlb_pmap) { uint64_t kcr3, ucr3; - uint32_t generation, pcid; + uint32_t pcid; #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; @@ -610,7 +839,6 @@ invltlb_pcid_handler(void) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - generation = smp_tlb_generation; /* Overlap with serialization */ if (smp_tlb_pmap == kernel_pmap) { invltlb_glob(); } else { @@ -632,14 +860,25 @@ invltlb_pcid_handler(void) load_cr3(kcr3); } } - PCPU_SET(smp_tlb_done, generation); } -void -invlpg_invpcid_handler(void) +static void +invlpg_handler(vm_offset_t smp_tlb_addr1) { +#ifdef COUNT_XINVLTLB_HITS + xhits_pg[PCPU_GET(cpuid)]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; +#endif /* COUNT_IPIS */ + + invlpg(smp_tlb_addr1); +} + +static void +invlpg_invpcid_handler(pmap_t smp_tlb_pmap, vm_offset_t smp_tlb_addr1) +{ struct invpcid_descr d; - uint32_t generation; #ifdef COUNT_XINVLTLB_HITS xhits_pg[PCPU_GET(cpuid)]++; @@ -648,7 +887,6 @@ invlpg_invpcid_handler(void) (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - generation = smp_tlb_generation; /* Overlap with serialization */ invlpg(smp_tlb_addr1); if (smp_tlb_pmap->pm_ucr3 != PMAP_NO_CR3) { d.pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid | @@ -657,14 +895,12 @@ invlpg_invpcid_handler(void) d.addr = smp_tlb_addr1; invpcid(&d, INVPCID_ADDR); } - PCPU_SET(smp_tlb_done, generation); } -void -invlpg_pcid_handler(void) +static void +invlpg_pcid_handler(pmap_t smp_tlb_pmap, vm_offset_t smp_tlb_addr1) { uint64_t kcr3, ucr3; - uint32_t generation; uint32_t pcid; #ifdef COUNT_XINVLTLB_HITS @@ -674,7 +910,6 @@ invlpg_pcid_handler(void) (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - generation = smp_tlb_generation; /* Overlap with serialization */ invlpg(smp_tlb_addr1); if (smp_tlb_pmap == PCPU_GET(curpmap) && (ucr3 = smp_tlb_pmap->pm_ucr3) != PMAP_NO_CR3) { @@ -683,15 +918,34 @@ invlpg_pcid_handler(void) ucr3 |= pcid | PMAP_PCID_USER_PT | CR3_PCID_SAVE; pmap_pti_pcid_invlpg(ucr3, kcr3, smp_tlb_addr1); } - PCPU_SET(smp_tlb_done, generation); } -void -invlrng_invpcid_handler(void) +static void +invlrng_handler(vm_offset_t smp_tlb_addr1, vm_offset_t smp_tlb_addr2) { + vm_offset_t addr, addr2; + +#ifdef COUNT_XINVLTLB_HITS + xhits_rng[PCPU_GET(cpuid)]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invlrng_counts[PCPU_GET(cpuid)])++; +#endif /* COUNT_IPIS */ + + addr = smp_tlb_addr1; + addr2 = smp_tlb_addr2; + do { + invlpg(addr); + addr += PAGE_SIZE; + } while (addr < addr2); +} + +static void +invlrng_invpcid_handler(pmap_t smp_tlb_pmap, vm_offset_t smp_tlb_addr1, + vm_offset_t smp_tlb_addr2) +{ struct invpcid_descr d; vm_offset_t addr, addr2; - uint32_t generation; #ifdef COUNT_XINVLTLB_HITS xhits_rng[PCPU_GET(cpuid)]++; @@ -702,7 +956,6 @@ invlrng_invpcid_handler(void) addr = smp_tlb_addr1; addr2 = smp_tlb_addr2; - generation = smp_tlb_generation; /* Overlap with serialization */ do { invlpg(addr); addr += PAGE_SIZE; @@ -717,15 +970,14 @@ invlrng_invpcid_handler(void) d.addr += PAGE_SIZE; } while (d.addr < addr2); } - PCPU_SET(smp_tlb_done, generation); } -void -invlrng_pcid_handler(void) +static void +invlrng_pcid_handler(pmap_t smp_tlb_pmap, vm_offset_t smp_tlb_addr1, + vm_offset_t smp_tlb_addr2) { vm_offset_t addr, addr2; uint64_t kcr3, ucr3; - uint32_t generation; uint32_t pcid; #ifdef COUNT_XINVLTLB_HITS @@ -737,7 +989,6 @@ invlrng_pcid_handler(void) addr = smp_tlb_addr1; addr2 = smp_tlb_addr2; - generation = smp_tlb_generation; /* Overlap with serialization */ do { invlpg(addr); addr += PAGE_SIZE; @@ -749,5 +1000,116 @@ invlrng_pcid_handler(void) ucr3 |= pcid | PMAP_PCID_USER_PT | CR3_PCID_SAVE; pmap_pti_pcid_invlrng(ucr3, kcr3, smp_tlb_addr1, addr2); } - PCPU_SET(smp_tlb_done, generation); +} + +static void +invlcache_handler(void) +{ +#ifdef COUNT_IPIS + (*ipi_invlcache_counts[PCPU_GET(cpuid)])++; +#endif /* COUNT_IPIS */ + wbinvd(); +} + +static void +invlop_handler_one_req(enum invl_op_codes smp_tlb_op, pmap_t smp_tlb_pmap, + vm_offset_t smp_tlb_addr1, vm_offset_t smp_tlb_addr2) +{ + switch (smp_tlb_op) { + case INVL_OP_TLB: + invltlb_handler(smp_tlb_pmap); + break; + case INVL_OP_TLB_INVPCID: + invltlb_invpcid_handler(smp_tlb_pmap); + break; + case INVL_OP_TLB_INVPCID_PTI: + invltlb_invpcid_pti_handler(smp_tlb_pmap); + break; + case INVL_OP_TLB_PCID: + invltlb_pcid_handler(smp_tlb_pmap); + break; + case INVL_OP_PGRNG: + invlrng_handler(smp_tlb_addr1, smp_tlb_addr2); + break; + case INVL_OP_PGRNG_INVPCID: + invlrng_invpcid_handler(smp_tlb_pmap, smp_tlb_addr1, + smp_tlb_addr2); + break; + case INVL_OP_PGRNG_PCID: + invlrng_pcid_handler(smp_tlb_pmap, smp_tlb_addr1, + smp_tlb_addr2); + break; + case INVL_OP_PG: + invlpg_handler(smp_tlb_addr1); + break; + case INVL_OP_PG_INVPCID: + invlpg_invpcid_handler(smp_tlb_pmap, smp_tlb_addr1); + break; + case INVL_OP_PG_PCID: + invlpg_pcid_handler(smp_tlb_pmap, smp_tlb_addr1); + break; + case INVL_OP_CACHE: + invlcache_handler(); + break; + default: + __assert_unreachable(); + break; + } +} + +void +invlop_handler(void) +{ + struct pcpu *initiator_pc; + pmap_t smp_tlb_pmap; + vm_offset_t smp_tlb_addr1, smp_tlb_addr2; + u_int initiator_cpu_id; + enum invl_op_codes smp_tlb_op; + uint32_t *scoreboard, smp_tlb_gen; + + scoreboard = invl_scoreboard_getcpu(PCPU_GET(cpuid)); + for (;;) { + for (initiator_cpu_id = 0; initiator_cpu_id <= mp_maxid; + initiator_cpu_id++) { + if (scoreboard[initiator_cpu_id] == 0) + break; + } + if (initiator_cpu_id > mp_maxid) + break; + initiator_pc = cpuid_to_pcpu[initiator_cpu_id]; + + /* + * This acquire fence and its corresponding release + * fence in smp_targeted_tlb_shootdown(), is between + * reading zero scoreboard slot and accessing PCPU of + * initiator for pc_smp_tlb values. + */ + atomic_thread_fence_acq(); + smp_tlb_pmap = initiator_pc->pc_smp_tlb_pmap; + smp_tlb_addr1 = initiator_pc->pc_smp_tlb_addr1; + smp_tlb_addr2 = initiator_pc->pc_smp_tlb_addr2; + smp_tlb_op = initiator_pc->pc_smp_tlb_op; + smp_tlb_gen = initiator_pc->pc_smp_tlb_gen; + + /* + * Ensure that we do not make our scoreboard + * notification visible to the initiator until the + * pc_smp_tlb values are read. The corresponding + * fence is implicitly provided by the barrier in the + * IPI send operation before the APIC ICR register + * write. + * + * As an optimization, the request is acknowledged + * before the actual invalidation is performed. It is + * safe because target CPU cannot return to userspace + * before handler finishes. Only NMI can preempt the + * handler, but NMI would see the kernel handler frame + * and not touch not-invalidated user page table. + */ + atomic_thread_fence_acq(); + atomic_store_int(&scoreboard[initiator_cpu_id], smp_tlb_gen); + + invlop_handler_one_req(smp_tlb_op, smp_tlb_pmap, smp_tlb_addr1, + smp_tlb_addr2); + } } Modified: head/sys/amd64/include/pcpu.h ============================================================================== --- head/sys/amd64/include/pcpu.h Tue Jul 14 20:32:50 2020 (r363194) +++ head/sys/amd64/include/pcpu.h Tue Jul 14 20:37:50 2020 (r363195) @@ -85,7 +85,7 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x c u_int pc_vcpu_id; /* Xen vCPU ID */ \ uint32_t pc_pcid_next; \ uint32_t pc_pcid_gen; \ - uint32_t pc_smp_tlb_done; /* TLB op acknowledgement */ \ + uint32_t pc_unused; \ uint32_t pc_ibpb_set; \ void *pc_mds_buf; \ void *pc_mds_buf64; \ @@ -94,7 +94,12 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x c u_int pc_ipi_bitmap; \ struct amd64tss pc_common_tss; \ struct user_segment_descriptor pc_gdt[NGDT]; \ - char __pad[2956] /* pad to UMA_PCPU_ALLOC_SIZE */ + void *pc_smp_tlb_pmap; \ + uint64_t pc_smp_tlb_addr1; \ + uint64_t pc_smp_tlb_addr2; \ + uint32_t pc_smp_tlb_gen; \ + u_int pc_smp_tlb_op; \ + char __pad[2924] /* pad to UMA_PCPU_ALLOC_SIZE */ #define PC_DBREG_CMD_NONE 0 #define PC_DBREG_CMD_LOAD 1 Modified: head/sys/amd64/include/smp.h ============================================================================== --- head/sys/amd64/include/smp.h Tue Jul 14 20:32:50 2020 (r363194) +++ head/sys/amd64/include/smp.h Tue Jul 14 20:37:50 2020 (r363195) @@ -29,34 +29,14 @@ extern u_int32_t mptramp_pagetables; inthand_t IDTVEC(justreturn), /* interrupt CPU with minimum overhead */ IDTVEC(justreturn1_pti), - IDTVEC(invltlb_pti), - IDTVEC(invltlb_pcid_pti), - IDTVEC(invltlb_pcid), /* TLB shootdowns - global, pcid */ - IDTVEC(invltlb_invpcid_pti_pti), - IDTVEC(invltlb_invpcid_nopti), - IDTVEC(invlpg_pti), - IDTVEC(invlpg_invpcid_pti), - IDTVEC(invlpg_invpcid), - IDTVEC(invlpg_pcid_pti), - IDTVEC(invlpg_pcid), - IDTVEC(invlrng_pti), - IDTVEC(invlrng_invpcid_pti), - IDTVEC(invlrng_invpcid), - IDTVEC(invlrng_pcid_pti), - IDTVEC(invlrng_pcid), - IDTVEC(invlcache_pti), + IDTVEC(invlop_pti), + IDTVEC(invlop), IDTVEC(ipi_intr_bitmap_handler_pti), IDTVEC(cpustop_pti), IDTVEC(cpususpend_pti), IDTVEC(rendezvous_pti); -void invltlb_pcid_handler(void); -void invltlb_invpcid_handler(void); -void invltlb_invpcid_pti_handler(void); -void invlpg_invpcid_handler(void); -void invlpg_pcid_handler(void); -void invlrng_invpcid_handler(void); -void invlrng_pcid_handler(void); +void invlop_handler(void); int native_start_all_aps(void); void mp_bootaddress(vm_paddr_t *, unsigned int *); Modified: head/sys/i386/i386/mp_machdep.c ============================================================================== --- head/sys/i386/i386/mp_machdep.c Tue Jul 14 20:32:50 2020 (r363194) +++ head/sys/i386/i386/mp_machdep.c Tue Jul 14 20:37:50 2020 (r363195) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #ifdef GPROF #include #endif +#include #include #include #include @@ -466,4 +467,223 @@ start_ap(int apic_id) DELAY(1000); } return 0; /* return FAILURE */ +} + +/* + * Flush the TLB on other CPU's + */ + +/* Variables needed for SMP tlb shootdown. */ +vm_offset_t smp_tlb_addr1, smp_tlb_addr2; +pmap_t smp_tlb_pmap; +volatile uint32_t smp_tlb_generation; + +/* + * Used by pmap to request cache or TLB invalidation on local and + * remote processors. Mask provides the set of remote CPUs which are + * to be signalled with the invalidation IPI, specified by vector. As + * an optimization, the curcpu_cb callback is invoked on the calling + * CPU while waiting for remote CPUs to complete the operation. + * + * The callback function is called unconditionally on the caller's + * underlying processor, even when this processor is not set in the + * mask. So, the callback function must be prepared to handle such + * spurious invocations. + */ +static void +smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, pmap_t pmap, + vm_offset_t addr1, vm_offset_t addr2, smp_invl_cb_t curcpu_cb) +{ + cpuset_t other_cpus; + volatile uint32_t *p_cpudone; + uint32_t generation; + int cpu; + + /* + * It is not necessary to signal other CPUs while booting or + * when in the debugger. + */ + if (kdb_active || KERNEL_PANICKED() || !smp_started) { + curcpu_cb(pmap, addr1, addr2); + return; + } + + sched_pin(); + + /* + * Check for other cpus. Return if none. + */ + if (CPU_ISFULLSET(&mask)) { + if (mp_ncpus <= 1) + goto nospinexit; + } else { + CPU_CLR(PCPU_GET(cpuid), &mask); + if (CPU_EMPTY(&mask)) + goto nospinexit; + } + + KASSERT((read_eflags() & PSL_I) != 0, + ("smp_targeted_tlb_shootdown: interrupts disabled")); + mtx_lock_spin(&smp_ipi_mtx); + smp_tlb_addr1 = addr1; + smp_tlb_addr2 = addr2; + smp_tlb_pmap = pmap; + generation = ++smp_tlb_generation; + if (CPU_ISFULLSET(&mask)) { + ipi_all_but_self(vector); + other_cpus = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &other_cpus); + } else { + other_cpus = mask; + while ((cpu = CPU_FFS(&mask)) != 0) { + cpu--; + CPU_CLR(cpu, &mask); + CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, + cpu, vector); + ipi_send_cpu(cpu, vector); + } + } + curcpu_cb(pmap, addr1, addr2); + while ((cpu = CPU_FFS(&other_cpus)) != 0) { + cpu--; + CPU_CLR(cpu, &other_cpus); + p_cpudone = &cpuid_to_pcpu[cpu]->pc_smp_tlb_done; + while (*p_cpudone != generation) + ia32_pause(); + } + mtx_unlock_spin(&smp_ipi_mtx); + sched_unpin(); + return; + +nospinexit: + curcpu_cb(pmap, addr1, addr2); + sched_unpin(); +} + +void +smp_masked_invltlb(cpuset_t mask, pmap_t pmap, smp_invl_cb_t curcpu_cb) +{ + smp_targeted_tlb_shootdown(mask, IPI_INVLTLB, pmap, 0, 0, curcpu_cb); +#ifdef COUNT_XINVLTLB_HITS + ipi_global++; +#endif +} + +void +smp_masked_invlpg(cpuset_t mask, vm_offset_t addr, pmap_t pmap, + smp_invl_cb_t curcpu_cb) +{ + smp_targeted_tlb_shootdown(mask, IPI_INVLPG, pmap, addr, 0, curcpu_cb); +#ifdef COUNT_XINVLTLB_HITS + ipi_page++; +#endif +} + +void +smp_masked_invlpg_range(cpuset_t mask, vm_offset_t addr1, vm_offset_t addr2, + pmap_t pmap, smp_invl_cb_t curcpu_cb) +{ + smp_targeted_tlb_shootdown(mask, IPI_INVLRNG, pmap, addr1, addr2, + curcpu_cb); +#ifdef COUNT_XINVLTLB_HITS + ipi_range++; + ipi_range_size += (addr2 - addr1) / PAGE_SIZE; +#endif +} + +void +smp_cache_flush(smp_invl_cb_t curcpu_cb) +{ + smp_targeted_tlb_shootdown(all_cpus, IPI_INVLCACHE, NULL, 0, 0, + curcpu_cb); +} + +/* + * Handlers for TLB related IPIs + */ +void +invltlb_handler(void) +{ + uint32_t generation; + +#ifdef COUNT_XINVLTLB_HITS + xhits_gbl[PCPU_GET(cpuid)]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; +#endif /* COUNT_IPIS */ + + /* + * Reading the generation here allows greater parallelism + * since invalidating the TLB is a serializing operation. + */ + generation = smp_tlb_generation; + if (smp_tlb_pmap == kernel_pmap) + invltlb_glob(); + PCPU_SET(smp_tlb_done, generation); +} + +void +invlpg_handler(void) +{ + uint32_t generation; + +#ifdef COUNT_XINVLTLB_HITS + xhits_pg[PCPU_GET(cpuid)]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; +#endif /* COUNT_IPIS */ + + generation = smp_tlb_generation; /* Overlap with serialization */ + if (smp_tlb_pmap == kernel_pmap) + invlpg(smp_tlb_addr1); + PCPU_SET(smp_tlb_done, generation); +} + +void +invlrng_handler(void) +{ + vm_offset_t addr, addr2; + uint32_t generation; + +#ifdef COUNT_XINVLTLB_HITS + xhits_rng[PCPU_GET(cpuid)]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invlrng_counts[PCPU_GET(cpuid)])++; +#endif /* COUNT_IPIS */ + + addr = smp_tlb_addr1; + addr2 = smp_tlb_addr2; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Jul 14 21:15:00 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1CF8B36F776; Tue, 14 Jul 2020 21:15:00 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5tZW6hFWz3f75; Tue, 14 Jul 2020 21:14:59 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8551C6DA; Tue, 14 Jul 2020 21:14:59 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06ELExrm021866; Tue, 14 Jul 2020 21:14:59 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06ELExFf021865; Tue, 14 Jul 2020 21:14:59 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007142114.06ELExFf021865@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 14 Jul 2020 21:14:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363196 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 363196 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 21:15:00 -0000 Author: mjg Date: Tue Jul 14 21:14:59 2020 New Revision: 363196 URL: https://svnweb.freebsd.org/changeset/base/363196 Log: cache: create a dedicate struct for negative entries .. and stuff if into the unused target vnode field This gets rid of concurrent nc_flag modifications racing with the shrinker and consequently fixes a bug where such a change could have been missed when cache_ncp_invalidate was being issued.. Reported by: zeising Tested by: pho, zeising Fixes: r362828 ("cache: lockless forward lookup with smr") Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Tue Jul 14 20:37:50 2020 (r363195) +++ head/sys/kern/vfs_cache.c Tue Jul 14 21:14:59 2020 (r363196) @@ -104,6 +104,11 @@ SDT_PROBE_DEFINE2(vfs, namecache, shrink_negative, don * This structure describes the elements in the cache of recent * names looked up by namei. */ +struct negstate { + u_char neg_flag; +}; +_Static_assert(sizeof(struct negstate) <= sizeof(struct vnode *), + "the state must fit in a union with a pointer without growing it"); struct namecache { CK_LIST_ENTRY(namecache) nc_hash;/* hash chain */ @@ -112,6 +117,7 @@ struct namecache { struct vnode *nc_dvp; /* vnode of parent of name */ union { struct vnode *nu_vp; /* vnode the name refers to */ + struct negstate nu_neg;/* negative entry state */ } n_un; u_char nc_flag; /* flag bits */ u_char nc_nlen; /* length of name */ @@ -134,6 +140,7 @@ struct namecache_ts { }; #define nc_vp n_un.nu_vp +#define nc_neg n_un.nu_neg /* * Flags in namecache.nc_flag @@ -144,10 +151,14 @@ struct namecache_ts { #define NCF_DTS 0x08 #define NCF_DVDROP 0x10 #define NCF_NEGATIVE 0x20 -#define NCF_HOTNEGATIVE 0x40 -#define NCF_INVALID 0x80 +#define NCF_INVALID 0x40 /* + * Flags in negstate.neg_flag + */ +#define NEG_HOT 0x01 + +/* * Mark an entry as invalid. * * This is called before it starts getting deconstructed. @@ -271,6 +282,14 @@ NCP2NEGLIST(struct namecache *ncp) return (&neglists[(((uintptr_t)(ncp) >> 8) & ncneghash)]); } +static inline struct negstate * +NCP2NEGSTATE(struct namecache *ncp) +{ + + MPASS(ncp->nc_flag & NCF_NEGATIVE); + return (&ncp->nc_neg); +} + #define numbucketlocks (ncbuckethash + 1) static u_int __read_mostly ncbuckethash; static struct rwlock_padalign __read_mostly *bucketlocks; @@ -713,21 +732,32 @@ SYSCTL_PROC(_debug_hashstat, OID_AUTO, nchash, CTLTYPE * round-robin manner. */ static void +cache_negative_init(struct namecache *ncp) +{ + struct negstate *negstate; + + ncp->nc_flag |= NCF_NEGATIVE; + negstate = NCP2NEGSTATE(ncp); + negstate->neg_flag = 0; +} + +static void cache_negative_hit(struct namecache *ncp) { struct neglist *neglist; + struct negstate *negstate; - MPASS(ncp->nc_flag & NCF_NEGATIVE); - if (ncp->nc_flag & NCF_HOTNEGATIVE) + negstate = NCP2NEGSTATE(ncp); + if ((negstate->neg_flag & NEG_HOT) != 0) return; neglist = NCP2NEGLIST(ncp); mtx_lock(&ncneg_hot.nl_lock); mtx_lock(&neglist->nl_lock); - if (!(ncp->nc_flag & NCF_HOTNEGATIVE)) { + if ((negstate->neg_flag & NEG_HOT) == 0) { numhotneg++; TAILQ_REMOVE(&neglist->nl_list, ncp, nc_dst); TAILQ_INSERT_TAIL(&ncneg_hot.nl_list, ncp, nc_dst); - ncp->nc_flag |= NCF_HOTNEGATIVE; + negstate->neg_flag |= NEG_HOT; } mtx_unlock(&neglist->nl_lock); mtx_unlock(&ncneg_hot.nl_lock); @@ -756,17 +786,18 @@ static void cache_negative_remove(struct namecache *ncp, bool neg_locked) { struct neglist *neglist; + struct negstate *negstate; bool hot_locked = false; bool list_locked = false; - MPASS(ncp->nc_flag & NCF_NEGATIVE); cache_assert_bucket_locked(ncp, RA_WLOCKED); neglist = NCP2NEGLIST(ncp); + negstate = NCP2NEGSTATE(ncp); if (!neg_locked) { - if (ncp->nc_flag & NCF_HOTNEGATIVE) { + if ((negstate->neg_flag & NEG_HOT) != 0) { hot_locked = true; mtx_lock(&ncneg_hot.nl_lock); - if (!(ncp->nc_flag & NCF_HOTNEGATIVE)) { + if ((negstate->neg_flag & NEG_HOT) == 0) { list_locked = true; mtx_lock(&neglist->nl_lock); } @@ -775,7 +806,7 @@ cache_negative_remove(struct namecache *ncp, bool neg_ mtx_lock(&neglist->nl_lock); } } - if (ncp->nc_flag & NCF_HOTNEGATIVE) { + if ((negstate->neg_flag & NEG_HOT) != 0) { mtx_assert(&ncneg_hot.nl_lock, MA_OWNED); TAILQ_REMOVE(&ncneg_hot.nl_list, ncp, nc_dst); numhotneg--; @@ -821,6 +852,7 @@ cache_negative_zap_one(void) { struct namecache *ncp, *ncp2; struct neglist *neglist; + struct negstate *negstate; struct mtx *dvlp; struct rwlock *blp; @@ -834,10 +866,12 @@ cache_negative_zap_one(void) ncp = TAILQ_FIRST(&ncneg_hot.nl_list); if (ncp != NULL) { neglist = NCP2NEGLIST(ncp); + negstate = NCP2NEGSTATE(ncp); mtx_lock(&neglist->nl_lock); + MPASS((negstate->neg_flag & NEG_HOT) != 0); TAILQ_REMOVE(&ncneg_hot.nl_list, ncp, nc_dst); TAILQ_INSERT_TAIL(&neglist->nl_list, ncp, nc_dst); - ncp->nc_flag &= ~NCF_HOTNEGATIVE; + negstate->neg_flag &= ~NEG_HOT; numhotneg--; mtx_unlock(&neglist->nl_lock); } @@ -1337,6 +1371,7 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st { struct namecache_ts *ncp_ts; struct namecache *ncp; + struct negstate *negstate; struct rwlock *blp; struct mtx *dvlp; uint32_t hash; @@ -1507,7 +1542,8 @@ negative_success: /* * We need to take locks to promote an entry. */ - if ((ncp->nc_flag & NCF_HOTNEGATIVE) == 0 || + negstate = NCP2NEGSTATE(ncp); + if ((negstate->neg_flag & NEG_HOT) == 0 || cache_ncp_invalid(ncp)) { vfs_smr_exit(); doing_smr = false; @@ -1834,7 +1870,7 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, ncp->nc_flag = flag; ncp->nc_vp = vp; if (vp == NULL) - ncp->nc_flag |= NCF_NEGATIVE; + cache_negative_init(ncp); ncp->nc_dvp = dvp; if (tsp != NULL) { ncp_ts = __containerof(ncp, struct namecache_ts, nc_nc); @@ -1869,11 +1905,7 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, n2_ts->nc_ticks = ncp_ts->nc_ticks; if (dtsp != NULL) { n2_ts->nc_dotdottime = ncp_ts->nc_dotdottime; - if (ncp->nc_flag & NCF_NEGATIVE) - mtx_lock(&ncneg_hot.nl_lock); n2_ts->nc_nc.nc_flag |= NCF_DTS; - if (ncp->nc_flag & NCF_NEGATIVE) - mtx_unlock(&ncneg_hot.nl_lock); } } goto out_unlock_free; From owner-svn-src-head@freebsd.org Tue Jul 14 21:15:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BDF4636FC87; Tue, 14 Jul 2020 21:15:17 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5tZs0KBhz3fW6; Tue, 14 Jul 2020 21:15:16 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B487C45A; Tue, 14 Jul 2020 21:15:16 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06ELFGZk021937; Tue, 14 Jul 2020 21:15:16 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06ELFGSM021936; Tue, 14 Jul 2020 21:15:16 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202007142115.06ELFGSM021936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Tue, 14 Jul 2020 21:15:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363197 - head/stand X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/stand X-SVN-Commit-Revision: 363197 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 21:15:17 -0000 Author: mhorne Date: Tue Jul 14 21:15:16 2020 New Revision: 363197 URL: https://svnweb.freebsd.org/changeset/base/363197 Log: Really fix cleandir after r362973 I made an attempt to fix this in r362978, but all it really did was confine the issue to the $MACHINE_CPUARCH == "riscv" case. The real problem is that LINKER_FEATURES is not defined here, so bsd.linker.mk needs to be included. This error with cleandir only occurs when META_MODE is disabled, which explains why it was missed by both CI and myself. Note that this effectively reverts r362978. Reported by: mjg Reviewed by: imp, kevans (in IRC) Modified: head/stand/defs.mk Modified: head/stand/defs.mk ============================================================================== --- head/stand/defs.mk Tue Jul 14 21:14:59 2020 (r363196) +++ head/stand/defs.mk Tue Jul 14 21:15:16 2020 (r363197) @@ -17,6 +17,7 @@ INTERNALLIB= .endif .include +.include WARNS?= 1 @@ -151,7 +152,7 @@ CFLAGS+= -fPIC # Some RISC-V linkers have support for relaxations, while some (lld) do not # yet. If this is the case we inhibit the compiler from emitting relaxations. -.if ${MACHINE_CPUARCH} == "riscv" && ${LINKER_FEATURES:Mriscv-relaxations} == "" +.if ${LINKER_FEATURES:Mriscv-relaxations} == "" CFLAGS+= -mno-relax .endif From owner-svn-src-head@freebsd.org Tue Jul 14 21:16:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5637936FCAA; Tue, 14 Jul 2020 21:16:08 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5tbq6xHPz3gPx; Tue, 14 Jul 2020 21:16:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 943EBC908; Tue, 14 Jul 2020 21:16:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06ELG7Io022019; Tue, 14 Jul 2020 21:16:07 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06ELG7ZB022018; Tue, 14 Jul 2020 21:16:07 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007142116.06ELG7ZB022018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 14 Jul 2020 21:16:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363198 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 363198 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 21:16:08 -0000 Author: mjg Date: Tue Jul 14 21:16:07 2020 New Revision: 363198 URL: https://svnweb.freebsd.org/changeset/base/363198 Log: cache: remove a useless argument from cache_negative_insert Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Tue Jul 14 21:15:16 2020 (r363197) +++ head/sys/kern/vfs_cache.c Tue Jul 14 21:16:07 2020 (r363198) @@ -764,21 +764,16 @@ cache_negative_hit(struct namecache *ncp) } static void -cache_negative_insert(struct namecache *ncp, bool neg_locked) +cache_negative_insert(struct namecache *ncp) { struct neglist *neglist; MPASS(ncp->nc_flag & NCF_NEGATIVE); cache_assert_bucket_locked(ncp, RA_WLOCKED); neglist = NCP2NEGLIST(ncp); - if (!neg_locked) { - mtx_lock(&neglist->nl_lock); - } else { - mtx_assert(&neglist->nl_lock, MA_OWNED); - } + mtx_lock(&neglist->nl_lock); TAILQ_INSERT_TAIL(&neglist->nl_list, ncp, nc_dst); - if (!neg_locked) - mtx_unlock(&neglist->nl_lock); + mtx_unlock(&neglist->nl_lock); atomic_add_rel_long(&numneg, 1); } @@ -1965,7 +1960,7 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, } else { if (cnp->cn_flags & ISWHITEOUT) ncp->nc_flag |= NCF_WHITE; - cache_negative_insert(ncp, false); + cache_negative_insert(ncp); SDT_PROBE2(vfs, namecache, enter_negative, done, dvp, ncp->nc_name); } From owner-svn-src-head@freebsd.org Tue Jul 14 21:16:49 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 24A2436FBD5; Tue, 14 Jul 2020 21:16:49 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5tcc62b4z3ycb; Tue, 14 Jul 2020 21:16:48 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8D563C45C; Tue, 14 Jul 2020 21:16:48 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06ELGme5022087; Tue, 14 Jul 2020 21:16:48 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06ELGm3b022086; Tue, 14 Jul 2020 21:16:48 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007142116.06ELGm3b022086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 14 Jul 2020 21:16:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363199 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 363199 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 21:16:49 -0000 Author: mjg Date: Tue Jul 14 21:16:48 2020 New Revision: 363199 URL: https://svnweb.freebsd.org/changeset/base/363199 Log: cache: remove neg_locked argument from cache_zap_locked Tested by: pho Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Tue Jul 14 21:16:07 2020 (r363198) +++ head/sys/kern/vfs_cache.c Tue Jul 14 21:16:48 2020 (r363199) @@ -441,7 +441,7 @@ STATNODE_COUNTER(numneg_evicted, STATNODE_COUNTER(shrinking_skipped, "Number of times shrinking was already in progress"); -static void cache_zap_locked(struct namecache *ncp, bool neg_locked); +static void cache_zap_locked(struct namecache *ncp); static int vn_fullpath_hardlink(struct thread *td, struct nameidata *ndp, char **retbuf, char **freebuf, size_t *buflen); static int vn_fullpath_any(struct thread *td, struct vnode *vp, struct vnode *rdir, @@ -778,7 +778,7 @@ cache_negative_insert(struct namecache *ncp) } static void -cache_negative_remove(struct namecache *ncp, bool neg_locked) +cache_negative_remove(struct namecache *ncp) { struct neglist *neglist; struct negstate *negstate; @@ -788,18 +788,16 @@ cache_negative_remove(struct namecache *ncp, bool neg_ cache_assert_bucket_locked(ncp, RA_WLOCKED); neglist = NCP2NEGLIST(ncp); negstate = NCP2NEGSTATE(ncp); - if (!neg_locked) { - if ((negstate->neg_flag & NEG_HOT) != 0) { - hot_locked = true; - mtx_lock(&ncneg_hot.nl_lock); - if ((negstate->neg_flag & NEG_HOT) == 0) { - list_locked = true; - mtx_lock(&neglist->nl_lock); - } - } else { + if ((negstate->neg_flag & NEG_HOT) != 0) { + hot_locked = true; + mtx_lock(&ncneg_hot.nl_lock); + if ((negstate->neg_flag & NEG_HOT) == 0) { list_locked = true; mtx_lock(&neglist->nl_lock); } + } else { + list_locked = true; + mtx_lock(&neglist->nl_lock); } if ((negstate->neg_flag & NEG_HOT) != 0) { mtx_assert(&ncneg_hot.nl_lock, MA_OWNED); @@ -888,19 +886,24 @@ cache_negative_zap_one(void) mtx_unlock(&neglist->nl_lock); mtx_lock(dvlp); rw_wlock(blp); - mtx_lock(&neglist->nl_lock); + /* + * Enter SMR to safely check the negative list. + * Even if the found pointer matches, the entry may now be reallocated + * and used by a different vnode. + */ + vfs_smr_enter(); ncp2 = TAILQ_FIRST(&neglist->nl_list); if (ncp != ncp2 || dvlp != VP2VNODELOCK(ncp2->nc_dvp) || - blp != NCP2BUCKETLOCK(ncp2) || !(ncp2->nc_flag & NCF_NEGATIVE)) { + blp != NCP2BUCKETLOCK(ncp2)) { + vfs_smr_exit(); ncp = NULL; } else { + vfs_smr_exit(); SDT_PROBE2(vfs, namecache, shrink_negative, done, ncp->nc_dvp, ncp->nc_name); - - cache_zap_locked(ncp, true); + cache_zap_locked(ncp); counter_u64_add(numneg_evicted, 1); } - mtx_unlock(&neglist->nl_lock); rw_wunlock(blp); mtx_unlock(dvlp); cache_free(ncp); @@ -913,7 +916,7 @@ cache_negative_zap_one(void) * pointer to a vnode or if it is just a negative cache entry. */ static void -cache_zap_locked(struct namecache *ncp, bool neg_locked) +cache_zap_locked(struct namecache *ncp) { if (!(ncp->nc_flag & NCF_NEGATIVE)) @@ -936,7 +939,7 @@ cache_zap_locked(struct namecache *ncp, bool neg_locke } else { SDT_PROBE2(vfs, namecache, zap_negative, done, ncp->nc_dvp, ncp->nc_name); - cache_negative_remove(ncp, neg_locked); + cache_negative_remove(ncp); } if (ncp->nc_flag & NCF_ISDOTDOT) { if (ncp == ncp->nc_dvp->v_cache_dd) @@ -962,7 +965,7 @@ cache_zap_negative_locked_vnode_kl(struct namecache *n blp = NCP2BUCKETLOCK(ncp); rw_wlock(blp); - cache_zap_locked(ncp, false); + cache_zap_locked(ncp); rw_wunlock(blp); } @@ -1009,7 +1012,7 @@ cache_zap_locked_vnode_kl2(struct namecache *ncp, stru } } rw_wlock(blp); - cache_zap_locked(ncp, false); + cache_zap_locked(ncp); rw_wunlock(blp); if (to_unlock != NULL) mtx_unlock(to_unlock); @@ -1055,7 +1058,7 @@ cache_zap_locked_vnode(struct namecache *ncp, struct v to_unlock = vlp1; } rw_wlock(blp); - cache_zap_locked(ncp, false); + cache_zap_locked(ncp); rw_wunlock(blp); mtx_unlock(to_unlock); out: @@ -1086,7 +1089,7 @@ cache_zap_unlocked_bucket(struct namecache *ncp, struc break; } if (rncp != NULL) { - cache_zap_locked(rncp, false); + cache_zap_locked(rncp); rw_wunlock(blp); cache_unlock_vnodes(dvlp, vlp); counter_u64_add(zap_and_exit_bucket_relock_success, 1); @@ -1112,7 +1115,7 @@ cache_zap_wlocked_bucket(struct namecache *ncp, struct if (!(ncp->nc_flag & NCF_NEGATIVE)) vlp = VP2VNODELOCK(ncp->nc_vp); if (cache_trylock_vnodes(dvlp, vlp) == 0) { - cache_zap_locked(ncp, false); + cache_zap_locked(ncp); rw_wunlock(blp); cache_unlock_vnodes(dvlp, vlp); return (0); @@ -1139,7 +1142,7 @@ cache_zap_rlocked_bucket(struct namecache *ncp, struct if (cache_trylock_vnodes(dvlp, vlp) == 0) { rw_runlock(blp); rw_wlock(blp); - cache_zap_locked(ncp, false); + cache_zap_locked(ncp); rw_wunlock(blp); cache_unlock_vnodes(dvlp, vlp); return (0); @@ -1165,7 +1168,7 @@ cache_zap_wlocked_bucket_kl(struct namecache *ncp, str cache_sort_vnodes(&dvlp, &vlp); if (*vlpp1 == dvlp && *vlpp2 == vlp) { - cache_zap_locked(ncp, false); + cache_zap_locked(ncp); cache_unlock_vnodes(dvlp, vlp); *vlpp1 = NULL; *vlpp2 = NULL; @@ -1180,7 +1183,7 @@ cache_zap_wlocked_bucket_kl(struct namecache *ncp, str *vlpp2 = NULL; if (cache_trylock_vnodes(dvlp, vlp) == 0) { - cache_zap_locked(ncp, false); + cache_zap_locked(ncp); cache_unlock_vnodes(dvlp, vlp); return (0); } @@ -1798,7 +1801,7 @@ cache_enter_dotdot_prep(struct vnode *dvp, struct vnod ncp = dvp->v_cache_dd; if (ncp != NULL && (ncp->nc_flag & NCF_ISDOTDOT)) { KASSERT(ncp->nc_dvp == dvp, ("wrong isdotdot parent")); - cache_zap_locked(ncp, false); + cache_zap_locked(ncp); } else { ncp = NULL; } @@ -1929,7 +1932,7 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, */ if ((ndd = vp->v_cache_dd) != NULL) { if ((ndd->nc_flag & NCF_ISDOTDOT) != 0) - cache_zap_locked(ndd, false); + cache_zap_locked(ndd); else ndd = NULL; } From owner-svn-src-head@freebsd.org Tue Jul 14 21:17:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 543F236FD85; Tue, 14 Jul 2020 21:17:10 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5td15vKbz3ypy; Tue, 14 Jul 2020 21:17:09 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 408BDC6DC; Tue, 14 Jul 2020 21:17:09 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06ELH9OE022156; Tue, 14 Jul 2020 21:17:09 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06ELH9YS022155; Tue, 14 Jul 2020 21:17:09 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007142117.06ELH9YS022155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 14 Jul 2020 21:17:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363200 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 363200 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 21:17:10 -0000 Author: mjg Date: Tue Jul 14 21:17:08 2020 New Revision: 363200 URL: https://svnweb.freebsd.org/changeset/base/363200 Log: cache: count dropped entries Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Tue Jul 14 21:16:48 2020 (r363199) +++ head/sys/kern/vfs_cache.c Tue Jul 14 21:17:08 2020 (r363200) @@ -408,6 +408,7 @@ STATNODE_ULONG(numneg, "Number of negative cache entri STATNODE_ULONG(numcache, "Number of cache entries"); STATNODE_COUNTER(numcachehv, "Number of namecache entries with vnodes held"); STATNODE_COUNTER(numcalls, "Number of cache lookups"); +STATNODE_COUNTER(numdrops, "Number of dropped entries due to reaching the limit"); STATNODE_COUNTER(dothits, "Number of '.' hits"); STATNODE_COUNTER(dotdothits, "Number of '..' hits"); STATNODE_COUNTER(numchecks, "Number of checks in lookup"); @@ -1853,6 +1854,7 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, lnumcache = atomic_fetchadd_long(&numcache, 1) + 1; if (__predict_false(lnumcache >= ncsize)) { atomic_add_long(&numcache, -1); + counter_u64_add(numdrops, 1); return; } From owner-svn-src-head@freebsd.org Tue Jul 14 21:17:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0532C36FD9B; Tue, 14 Jul 2020 21:17:48 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5tdl4sk2z40Vg; Tue, 14 Jul 2020 21:17:47 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 178B1C79A; Tue, 14 Jul 2020 21:17:47 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06ELHkkF022227; Tue, 14 Jul 2020 21:17:46 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06ELHkCG022226; Tue, 14 Jul 2020 21:17:46 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007142117.06ELHkCG022226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 14 Jul 2020 21:17:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363201 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 363201 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 21:17:48 -0000 Author: mjg Date: Tue Jul 14 21:17:46 2020 New Revision: 363201 URL: https://svnweb.freebsd.org/changeset/base/363201 Log: cache: remove numcalls The counter is not very useful and if necessary the value can be found by summing up other counters. Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Tue Jul 14 21:17:08 2020 (r363200) +++ head/sys/kern/vfs_cache.c Tue Jul 14 21:17:46 2020 (r363201) @@ -407,7 +407,6 @@ static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW | STATNODE_ULONG(numneg, "Number of negative cache entries"); STATNODE_ULONG(numcache, "Number of cache entries"); STATNODE_COUNTER(numcachehv, "Number of namecache entries with vnodes held"); -STATNODE_COUNTER(numcalls, "Number of cache lookups"); STATNODE_COUNTER(numdrops, "Number of dropped entries due to reaching the limit"); STATNODE_COUNTER(dothits, "Number of '.' hits"); STATNODE_COUNTER(dotdothits, "Number of '..' hits"); @@ -1384,8 +1383,6 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st return (0); } #endif - - counter_u64_add(numcalls, 1); if (__predict_false(cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.')) return (cache_lookup_dot(dvp, vpp, cnp, tsp, ticksp)); From owner-svn-src-head@freebsd.org Tue Jul 14 21:19:34 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 86D5C36FAEF; Tue, 14 Jul 2020 21:19:34 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5tgp1FfFz434c; Tue, 14 Jul 2020 21:19:34 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E61E5C2DA; Tue, 14 Jul 2020 21:19:33 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06ELJXSd022347; Tue, 14 Jul 2020 21:19:33 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06ELJXtb022346; Tue, 14 Jul 2020 21:19:33 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007142119.06ELJXtb022346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 14 Jul 2020 21:19:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363202 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 363202 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 21:19:34 -0000 Author: mjg Date: Tue Jul 14 21:19:33 2020 New Revision: 363202 URL: https://svnweb.freebsd.org/changeset/base/363202 Log: cache: make negative shrinker round robin on all lists every time Previously it would check 4, 3, 2, 1 lists. In practice by the time it is getting called all lists have some elements and consequently this does not result in new evictions. Nonetheless, the code is clearer. Tested by: pho Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Tue Jul 14 21:17:46 2020 (r363201) +++ head/sys/kern/vfs_cache.c Tue Jul 14 21:19:33 2020 (r363202) @@ -262,7 +262,6 @@ static u_int __read_mostly ncsize; /* the size as comp struct nchstats nchstats; /* cache effectiveness statistics */ static struct mtx __exclusive_cache_line ncneg_shrink_lock; -static int shrink_list_turn; struct neglist { struct mtx nl_lock; @@ -815,18 +814,18 @@ cache_negative_remove(struct namecache *ncp) } static void -cache_negative_shrink_select(int start, struct namecache **ncpp, +cache_negative_shrink_select(struct namecache **ncpp, struct neglist **neglistpp) { struct neglist *neglist; struct namecache *ncp; - int i; + static u_int cycle; + u_int i; *ncpp = ncp = NULL; - neglist = NULL; - for (i = start; i < numneglists; i++) { - neglist = &neglists[i]; + for (i = 0; i < numneglists; i++) { + neglist = &neglists[(cycle + i) % numneglists]; if (TAILQ_FIRST(&neglist->nl_list) == NULL) continue; mtx_lock(&neglist->nl_lock); @@ -838,6 +837,7 @@ cache_negative_shrink_select(int start, struct namecac *neglistpp = neglist; *ncpp = ncp; + cycle++; } static void @@ -870,12 +870,8 @@ cache_negative_zap_one(void) } mtx_unlock(&ncneg_hot.nl_lock); - cache_negative_shrink_select(shrink_list_turn, &ncp, &neglist); - shrink_list_turn++; - if (shrink_list_turn == numneglists) - shrink_list_turn = 0; - if (ncp == NULL && shrink_list_turn == 0) - cache_negative_shrink_select(shrink_list_turn, &ncp, &neglist); + cache_negative_shrink_select(&ncp, &neglist); + mtx_unlock(&ncneg_shrink_lock); if (ncp == NULL) return; From owner-svn-src-head@freebsd.org Tue Jul 14 21:47:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 246CB350A25; Tue, 14 Jul 2020 21:47:45 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5vJJ6JKRz3Tr9; Tue, 14 Jul 2020 21:47:44 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr1-x430.google.com with SMTP id a6so309076wrm.4; Tue, 14 Jul 2020 14:47:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Ks6iPjjLtKVF102Ck6MeYEBT8F1PtOh3VqIt+UGMhP4=; b=Pg/A4j/GW/OAEtnkczLNm4h3E6ZujWel8BybeBQA+mPkOiM4c6cih/EuiJTVbePVO4 gAsNw2zOVO+MkEGh8FxYNixz6N8/f4bWPCy7jFELDEdRqFATqU052+OFF5HmBzHbF0tA nGs7j2C0+lPQwtB8Z+gYpRKuV0UiSVTfncYHOG1r+ktDBkGc3c0yndbWUu7PUi8CigY8 nnQ5ODpea/lRjxNNvf8Lpk50As2trJcwt7BU9PxCMNLACNazCOyYmPx0hcdkfOMam0cC gmuskfyw/Ii0iRHHhlBeq55haY8dPRzlW2L6eHbxokaHVvjQMWFX8Hn3ZINKMlsvbIGw 8HDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Ks6iPjjLtKVF102Ck6MeYEBT8F1PtOh3VqIt+UGMhP4=; b=X/KJa/5FOHVMWqeVUJ3tmSNZGbL1msojkpUjw5YdT7H+iD1X1T5fuE5mNcSC3FV3dr LeoqKltfIR8WodjAYyWqQXEU45cdfEgPdFF1iT4Br+mh7wSgQY4Cv2tOc55p8+PUeLM/ Rl7kzAYd27Sb2k+PSQrdAaEsNmrPgzet6aDdthTTowcRFR36cP0igfcMv8nnTo8UzCYr lTgrJ1cReIMSesEEx4OvtGQVlcYVSl9VXFEYX2xgpGfAnlVu1n0jjC8fhJ9tTUQfBpwd PDJNDETUz+/AC5fD6sDlH38j7YjpY44A1mJPqdWMiWT1FSwZFc1bO4Ny7grVSgZkYd76 UIfA== X-Gm-Message-State: AOAM532NUliMwJoxmhdt+cYVPBjBIKDewP6jeKxCY+ewdQ2Qp7W0tXFU QohYIG+lgIEsQ12WmX2hr2dN4Uzu1HofBh0rGFxEZQ== X-Google-Smtp-Source: ABdhPJwJfMERSE24cP7zkes3HNzNzDPG2NlPlI2kNGNQ6fnlv3q9Ko83wec6h02qS3aAP+nSxnduasWQxbvBuNvbYEE= X-Received: by 2002:a05:6000:1290:: with SMTP id f16mr8526828wrx.66.1594763262103; Tue, 14 Jul 2020 14:47:42 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:9d84:0:0:0:0:0 with HTTP; Tue, 14 Jul 2020 14:47:41 -0700 (PDT) In-Reply-To: <90bb0b5c-2ed3-03ad-4b96-8a5dffd75f56@FreeBSD.org> References: <202007131425.06DEPPxQ077335@repo.freebsd.org> <90bb0b5c-2ed3-03ad-4b96-8a5dffd75f56@FreeBSD.org> From: Mateusz Guzik Date: Tue, 14 Jul 2020 23:47:41 +0200 Message-ID: Subject: Re: svn commit: r363144 - head/lib/libpmc/pmu-events/arch/x86 To: Alexander Motin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4B5vJJ6JKRz3Tr9 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 21:47:46 -0000 indeed it works, thanks On 7/14/20, Alexander Motin wrote: > On 14.07.2020 11:33, Mateusz Guzik wrote: >> On 7/13/20, Alexander Motin wrote: >>> Author: mav >>> Date: Mon Jul 13 14:25:25 2020 >>> New Revision: 363144 >>> URL: https://svnweb.freebsd.org/changeset/base/363144 >>> >>> Log: >>> Minor textual fixes. >>> >>> MFC after: 1 week >>> >>> Modified: >>> head/lib/libpmc/pmu-events/arch/x86/mapfile.csv > >>> -GenuineIntel-6-55,v1,skylakex,core >>> +GenuineIntel-6-55-[01234],v1,skylakex,core >> >> This breaks hwpmc for me as it no longer recognizes the cpu. >> kern.hwpmc.cpuid: GenuineIntel-6-55 > > Thank you for the report. It should be fixed with r363188. > > -- > Alexander Motin > -- Mateusz Guzik From owner-svn-src-head@freebsd.org Tue Jul 14 21:57:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8CB9D350BB2; Tue, 14 Jul 2020 21:57:02 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5vW141hVz3ckS; Tue, 14 Jul 2020 21:57:01 +0000 (UTC) (envelope-from wulf@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 82EB5CD30; Tue, 14 Jul 2020 21:57:00 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06ELv0LG046830; Tue, 14 Jul 2020 21:57:00 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06ELv0QT046829; Tue, 14 Jul 2020 21:57:00 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <202007142157.06ELv0QT046829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Tue, 14 Jul 2020 21:57:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363205 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 363205 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 21:57:02 -0000 Author: wulf Date: Tue Jul 14 21:56:59 2020 New Revision: 363205 URL: https://svnweb.freebsd.org/changeset/base/363205 Log: linuxkpi: Ignore NULL pointers passed to string parameter of kstr(n)dup That follows Linux and fixes related drm-kmod-5.3 panic. Reviewed by: imp, hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25657 Modified: head/sys/compat/linuxkpi/common/include/linux/string.h Modified: head/sys/compat/linuxkpi/common/include/linux/string.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/string.h Tue Jul 14 21:43:57 2020 (r363204) +++ head/sys/compat/linuxkpi/common/include/linux/string.h Tue Jul 14 21:56:59 2020 (r363205) @@ -103,6 +103,8 @@ kstrdup(const char *string, gfp_t gfp) char *retval; size_t len; + if (string == NULL) + return (NULL); len = strlen(string) + 1; retval = kmalloc(len, gfp); if (retval != NULL) @@ -115,6 +117,8 @@ kstrndup(const char *string, size_t len, gfp_t gfp) { char *retval; + if (string == NULL) + return (NULL); retval = kmalloc(len + 1, gfp); if (retval != NULL) strncpy(retval, string, len); From owner-svn-src-head@freebsd.org Tue Jul 14 22:14:16 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C6943513C1; Tue, 14 Jul 2020 22:14:16 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-yb1-f196.google.com (mail-yb1-f196.google.com [209.85.219.196]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5vtv6KWSz48Qp; Tue, 14 Jul 2020 22:14:15 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-yb1-f196.google.com with SMTP id c14so188036ybj.0; Tue, 14 Jul 2020 15:14:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9qvpKf/DhfMwqMWWd6vCk05RrFsa3BlKIs2sHc7t9Yc=; b=VR+1JP/7mLlaG1MBPFHSJeZsjMVh7IScdT0zvl1XxT8MiIUdW4Z8xmhXFKwCUbYqml GsFjoMQ3WJ3fP1GHX/Z29oIDsHJJefUqVEgQAT6olzY+GSYVJeQjKfV1hEkYDSNSqRZq hQ9jbcIlMBJwr6ie70siuODklntrJL+de58WTqX5Ulr7r9kHSJgfc2IoemBIcrmGMSd4 mJgQLBBlufVPeLbwf+j+QwxuAaoE2UrsM7uGt5CbKMT1EgTXWvmK3GM9oyeQ3h5jP+Ug f/MSTCgetu2pzAbLfEpxvZ4HKDX3qhjQ8OhRdJEz+rnjmztVMfwumsXZQZv/K7BkmVN/ nknA== X-Gm-Message-State: AOAM533ktCX1F7junBjkwBJuTbPY+Zsw+wDdEG6qb4s3lPiIuYWVKWmK VJQumfiw3At8jjJ0AsrpqwuLOB2NySQ2TPFae9y4n4cSckI= X-Google-Smtp-Source: ABdhPJwy/icWi5G4pLJQ95wM+hAM7X/LP2hwNaNv+Nw4MO0zfzOOtDgjoFVJ/WVaTAEygrqIkg70otW/MsyEF+ygW4w= X-Received: by 2002:a25:b1a5:: with SMTP id h37mr732360ybj.241.1594764853780; Tue, 14 Jul 2020 15:14:13 -0700 (PDT) MIME-Version: 1.0 References: <202007140154.06E1sOjN003426@repo.freebsd.org> In-Reply-To: <202007140154.06E1sOjN003426@repo.freebsd.org> From: Li-Wen Hsu Date: Wed, 15 Jul 2020 06:14:02 +0800 Message-ID: Subject: Re: svn commit: r363170 - in head: contrib/byacc contrib/byacc/package contrib/byacc/package/debian contrib/byacc/package/pkgsrc contrib/byacc/test contrib/byacc/test/btyacc contrib/byacc/test/yacc usr... To: Jung-uk Kim Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4B5vtv6KWSz48Qp X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 22:14:16 -0000 On Tue, Jul 14, 2020 at 9:54 AM Jung-uk Kim wrote: > > Author: jkim > Date: Tue Jul 14 01:54:24 2020 > New Revision: 363170 > URL: https://svnweb.freebsd.org/changeset/base/363170 > > Log: > MFV: r362513 > > Update byacc to 20200330. Hello Jung-uk, There are some things I haven't figured out, but currently there is one yacc test case in our CI is failing. Please check the output of usr.bin.yacc.yacc_tests.main at https://ci.freebsd.org/job/FreeBSD-head-amd64-test/15843/testReport/junit/usr.bin.yacc/yacc_tests/main/ The yacc processed result of /usr/tests/usr.bin/yacc/calc.y is different than the reference, /usr/tests/usr.bin/yacc/yacc/calc.tab.c And checking the files under contrib/byacc/ , there are (1) ./test/calc.tab.c (2) ./test/btyacc/calc.tab.c (3) ./test/yacc/calc.tab.c (3) is what we want, and that was the source of /usr/tests/usr.bin/yacc/yacc/calc.tab.c before this import. It was updated in the new byacc release and matches the behavior of new yacc. However, currently we install (1) as /usr/tests/usr.bin/yacc/calc.y , the content looks generated by a very old yacc The thing I still don't know is why the source of calc.tab.c is changed as there is no related change in usr.bin/yacc/tests/Makefile . Surprisingly, removing (1) can restore the old behavior of using (3) as the source. I haven't checked why that file appears in the upstream distfile but it did not exist in our old version of byacc, 20170201. I'm not sure what's the best way to fix this. The fastest way is just removing contrib/byacc/test/calc.tab.c , and the following task is checking with upstream for the intention of adding that file. We may also want to fix the Makefile or .mk files to make the source of /usr/tests/usr.bin/yacc/yacc/calc.tab.c not affected by the file with the same name under different directories. BTW, there are some entries need to be added to the ObsoleteFiles.inc, like /usr/tests/usr.bin/yacc/err_inherit1.y which is Please help check this test issue of the new yacc. Thanks, Li-Wen From owner-svn-src-head@freebsd.org Tue Jul 14 22:18:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D1AE635171D; Tue, 14 Jul 2020 22:18:13 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-yb1-f193.google.com (mail-yb1-f193.google.com [209.85.219.193]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5vzS3C8Yz4Fgm; Tue, 14 Jul 2020 22:18:12 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-yb1-f193.google.com with SMTP id 134so174184ybd.6; Tue, 14 Jul 2020 15:18:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KRbgDkkoUR5y0XvW7LmnLi7iIxcHhyR3vwayMEsKlNA=; b=ck50nBlSiqRetSONQKewZonpI3Hk192ueUB2mWOlpqDOFv9arDBwOUvo+OPzuzY6Ez EDhR0hoyLl3LVWz3M6oGjdNxrLQzh6vwtfMQ3HH9k3yrCWUTvBoAwNzDAKqkq0fc6jgh LQv3t2FPqH1+/74GGIYsdKHlInS5fWybUMXtn5Zl39BEP3SZzMNu3S9sULkqwPg4n3eo twAUosqErR2QtlRnGFvPb5xByVR2wYj0AEVyHLRz8x3SgNy2XZNNiR1loDV5kYQ5DaLN HyQ/THzTdYPikoOpe4zAaaqVUc1O0pstw32dyrk/iHg93brNeE1qD2opx5Nn6M9wlljY ltVQ== X-Gm-Message-State: AOAM531/6l27uLKHr+9bzYt8dbRojkzjF8I8fLheamy7QNHweIgIZbB1 eFy9+1GXFTAMJHA3ch7hG2mQMg7wmgEbqE70klCyvdGVZ3U= X-Google-Smtp-Source: ABdhPJz6dBbNdtKBNj8k/uUJWnJPGXCLqoWudFLPf3RBvbbGIAVWoTvc6rz9jeTFPRDOijk7kUkqQMOjF7065TkhEuI= X-Received: by 2002:a25:d104:: with SMTP id i4mr12122384ybg.176.1594765090784; Tue, 14 Jul 2020 15:18:10 -0700 (PDT) MIME-Version: 1.0 References: <202007140154.06E1sOjN003426@repo.freebsd.org> In-Reply-To: From: Li-Wen Hsu Date: Wed, 15 Jul 2020 06:17:59 +0800 Message-ID: Subject: Re: svn commit: r363170 - in head: contrib/byacc contrib/byacc/package contrib/byacc/package/debian contrib/byacc/package/pkgsrc contrib/byacc/test contrib/byacc/test/btyacc contrib/byacc/test/yacc usr... To: Jung-uk Kim Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4B5vzS3C8Yz4Fgm X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of lwhsufreebsd@gmail.com designates 209.85.219.193 as permitted sender) smtp.mailfrom=lwhsufreebsd@gmail.com X-Spamd-Result: default: False [-1.17 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.57)[-0.568]; FROM_NEQ_ENVFROM(0.00)[lwhsu@freebsd.org,lwhsufreebsd@gmail.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-0.63)[-0.633]; RCVD_TLS_ALL(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.219.193:from]; NEURAL_SPAM_SHORT(0.03)[0.031]; FORGED_SENDER(0.30)[lwhsu@freebsd.org,lwhsufreebsd@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.219.193:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+]; TAGGED_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 22:18:14 -0000 On Wed, Jul 15, 2020 at 6:14 AM Li-Wen Hsu wrote: > > On Tue, Jul 14, 2020 at 9:54 AM Jung-uk Kim wrote: > > > > Author: jkim > > Date: Tue Jul 14 01:54:24 2020 > > New Revision: 363170 > > URL: https://svnweb.freebsd.org/changeset/base/363170 > > > > Log: > > MFV: r362513 > > > > Update byacc to 20200330. > > Hello Jung-uk, > > There are some things I haven't figured out, but currently there is > one yacc test case in our CI is failing. > > Please check the output of usr.bin.yacc.yacc_tests.main at > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/15843/testReport/junit/usr.bin.yacc/yacc_tests/main/ > > The yacc processed result of /usr/tests/usr.bin/yacc/calc.y is > different than the reference, > /usr/tests/usr.bin/yacc/yacc/calc.tab.c > > And checking the files under contrib/byacc/ , there are > (1) ./test/calc.tab.c > (2) ./test/btyacc/calc.tab.c > (3) ./test/yacc/calc.tab.c > > (3) is what we want, and that was the source of > /usr/tests/usr.bin/yacc/yacc/calc.tab.c before this import. It was > updated in the new byacc release and matches the behavior of new yacc. > However, currently we install (1) as /usr/tests/usr.bin/yacc/calc.y , Sorry, I mean currently we install (1) as /usr/tests/usr.bin/yacc/yacc/calc.tab.c > the content looks generated by a very old yacc > > The thing I still don't know is why the source of calc.tab.c is > changed as there is no related change in usr.bin/yacc/tests/Makefile . > Surprisingly, removing (1) can restore the old behavior of using (3) > as the source. I haven't checked why that file appears in the upstream > distfile but it did not exist in our old version of byacc, 20170201. > > I'm not sure what's the best way to fix this. The fastest way is just > removing contrib/byacc/test/calc.tab.c , and the following task is > checking with upstream for the intention of adding that file. We may > also want to fix the Makefile or .mk files to make the source of > /usr/tests/usr.bin/yacc/yacc/calc.tab.c not affected by the file with > the same name under different directories. > > BTW, there are some entries need to be added to the ObsoleteFiles.inc, like > /usr/tests/usr.bin/yacc/err_inherit1.y which is > > Please help check this test issue of the new yacc. > > Thanks, > Li-Wen From owner-svn-src-head@freebsd.org Tue Jul 14 22:25:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B17B43517B2; Tue, 14 Jul 2020 22:25: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 4B5w7R3jfqz4RT6; Tue, 14 Jul 2020 22:25: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 31224D596; Tue, 14 Jul 2020 22:25: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 06EMP7n2065127; Tue, 14 Jul 2020 22:25:07 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06EMP6DK065124; Tue, 14 Jul 2020 22:25:06 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202007142225.06EMP6DK065124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Tue, 14 Jul 2020 22:25:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363206 - in head/sys: dev/coretemp dev/hwpmc x86/include X-SVN-Group: head X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: in head/sys: dev/coretemp dev/hwpmc x86/include X-SVN-Commit-Revision: 363206 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 22:25:07 -0000 Author: freqlabs Date: Tue Jul 14 22:25:06 2020 New Revision: 363206 URL: https://svnweb.freebsd.org/changeset/base/363206 Log: hwpmc: Always set pmc_cpuid to something pmc_cpuid was uninitialized for most AMD processor families. We can still populate this string for unimplemented families. Also added a CPUID_TO_STEPPING macro and converted existing code to use it. Reviewed by: mav MFC after: 2 weeks Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25673 Modified: head/sys/dev/coretemp/coretemp.c head/sys/dev/hwpmc/hwpmc_amd.c head/sys/dev/hwpmc/hwpmc_intel.c head/sys/x86/include/specialreg.h Modified: head/sys/dev/coretemp/coretemp.c ============================================================================== --- head/sys/dev/coretemp/coretemp.c Tue Jul 14 21:56:59 2020 (r363205) +++ head/sys/dev/coretemp/coretemp.c Tue Jul 14 22:25:06 2020 (r363206) @@ -166,7 +166,7 @@ coretemp_attach(device_t dev) sc->sc_dev = dev; pdev = device_get_parent(dev); cpu_model = CPUID_TO_MODEL(cpu_id); - cpu_stepping = cpu_id & CPUID_STEPPING; + cpu_stepping = CPUID_TO_STEPPING(cpu_id); /* * Some CPUs, namely the PIII, don't have thermal sensors, but Modified: head/sys/dev/hwpmc/hwpmc_amd.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_amd.c Tue Jul 14 21:56:59 2020 (r363205) +++ head/sys/dev/hwpmc/hwpmc_amd.c Tue Jul 14 22:25:06 2020 (r363206) @@ -1073,7 +1073,7 @@ pmc_amd_initialize(void) enum pmc_cputype cputype; struct pmc_mdep *pmc_mdep; enum pmc_class class; - int model, stepping; + int family, model, stepping; char *name; /* @@ -1085,14 +1085,16 @@ pmc_amd_initialize(void) */ name = NULL; - model = ((cpu_id & 0xF0000) >> 12) | ((cpu_id & 0xF0) >> 4); - stepping = cpu_id & 0xF; - if (CPUID_TO_FAMILY(cpu_id) == 0x17) - snprintf(pmc_cpuid, sizeof(pmc_cpuid), "AuthenticAMD-%d-%02X-%X", - CPUID_TO_FAMILY(cpu_id), model, stepping); - if (CPUID_TO_FAMILY(cpu_id) == 0x18) + family = CPUID_TO_FAMILY(cpu_id); + model = CPUID_TO_MODEL(cpu_id); + stepping = CPUID_TO_STEPPING(cpu_id); + + if (family == 0x18) snprintf(pmc_cpuid, sizeof(pmc_cpuid), "HygonGenuine-%d-%02X-%X", - CPUID_TO_FAMILY(cpu_id), model, stepping); + family, model, stepping); + else + snprintf(pmc_cpuid, sizeof(pmc_cpuid), "AuthenticAMD-%d-%02X-%X", + family, model, stepping); switch (cpu_id & 0xF00) { #if defined(__i386__) Modified: head/sys/dev/hwpmc/hwpmc_intel.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_intel.c Tue Jul 14 21:56:59 2020 (r363205) +++ head/sys/dev/hwpmc/hwpmc_intel.c Tue Jul 14 22:25:06 2020 (r363206) @@ -80,7 +80,7 @@ pmc_intel_initialize(void) { struct pmc_mdep *pmc_mdep; enum pmc_cputype cputype; - int error, model, nclasses, ncpus, stepping, verov; + int error, family, model, nclasses, ncpus, stepping, verov; KASSERT(cpu_vendor_id == CPU_VENDOR_INTEL, ("[intel,%d] Initializing non-intel processor", __LINE__)); @@ -91,11 +91,13 @@ pmc_intel_initialize(void) nclasses = 2; error = 0; verov = 0; - model = ((cpu_id & 0xF0000) >> 12) | ((cpu_id & 0xF0) >> 4); - stepping = cpu_id & 0xF; + family = CPUID_TO_FAMILY(cpu_id); + model = CPUID_TO_MODEL(cpu_id); + stepping = CPUID_TO_STEPPING(cpu_id); snprintf(pmc_cpuid, sizeof(pmc_cpuid), "GenuineIntel-%d-%02X-%X", - (cpu_id & 0xF00) >> 8, model, stepping); + family, model, stepping); + switch (cpu_id & 0xF00) { case 0x600: /* Pentium Pro, Celeron, Pentium II & III */ switch (model) { Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Tue Jul 14 21:56:59 2020 (r363205) +++ head/sys/x86/include/specialreg.h Tue Jul 14 22:25:06 2020 (r363206) @@ -280,6 +280,7 @@ ((((id) & CPUID_FAMILY) >> 8) + \ (((id) & CPUID_EXT_FAMILY) >> 20)) #endif +#define CPUID_TO_STEPPING(id) ((id) & CPUID_STEPPING) /* * CPUID instruction 1 ebx info From owner-svn-src-head@freebsd.org Tue Jul 14 22:43:41 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6CDF9351AF2; Tue, 14 Jul 2020 22:43:41 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5wXs2Cb6z40mW; Tue, 14 Jul 2020 22:43:41 +0000 (UTC) (envelope-from yuripv@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 11DD4D5EC; Tue, 14 Jul 2020 22:43:41 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06EMheKD077339; Tue, 14 Jul 2020 22:43:40 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06EMheoi077338; Tue, 14 Jul 2020 22:43:40 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <202007142243.06EMheoi077338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Tue, 14 Jul 2020 22:43:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363207 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 363207 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 22:43:41 -0000 Author: yuripv Date: Tue Jul 14 22:43:40 2020 New Revision: 363207 URL: https://svnweb.freebsd.org/changeset/base/363207 Log: top: VIS_SAFE turned out to be unsafe Unset VIS_SAFE flag as it turned out to be actually unsafe for continuos top display as it's passing through sequences resulting cursor movement (backspace, tab, carriage-return), and explicitly set VIS_TAB for the same reason. Reported by: Mark Millard , swills Tested by: Mark Millard , swills Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Tue Jul 14 22:25:06 2020 (r363206) +++ head/usr.bin/top/machine.c Tue Jul 14 22:43:40 2020 (r363207) @@ -1016,7 +1016,7 @@ format_next_process(struct handle * xhandle, char *(*g len = (argbuflen - (dst - argbuf) - 1) / 4; strvisx(dst, src, MIN(strlen(src), len), - VIS_NL | VIS_CSTYLE | VIS_OCTAL | VIS_SAFE); + VIS_NL | VIS_TAB | VIS_CSTYLE | VIS_OCTAL); while (*dst != '\0') dst++; if ((argbuflen - (dst - argbuf) - 1) / 4 > 0) From owner-svn-src-head@freebsd.org Tue Jul 14 23:59:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AEAB1353C26; Tue, 14 Jul 2020 23:59:01 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5yCn41wRz4gDr; Tue, 14 Jul 2020 23:59:01 +0000 (UTC) (envelope-from jkim@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 51EDFE2B2; Tue, 14 Jul 2020 23:59:01 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06ENx1Pm021091; Tue, 14 Jul 2020 23:59:01 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06ENx1S4021090; Tue, 14 Jul 2020 23:59:01 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202007142359.06ENx1S4021090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 14 Jul 2020 23:59:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363208 - head/contrib/byacc/test X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: head/contrib/byacc/test X-SVN-Commit-Revision: 363208 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 23:59:01 -0000 Author: jkim Date: Tue Jul 14 23:59:00 2020 New Revision: 363208 URL: https://svnweb.freebsd.org/changeset/base/363208 Log: Remove a redundant file from test directory to unbreak yacc regression test. It looks like the obsolete file from old regression test was accidentally re-added between version 20170709 and 20180510. Reported by: lwhsu Deleted: head/contrib/byacc/test/calc.tab.c From owner-svn-src-head@freebsd.org Wed Jul 15 00:13:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 38224354171; Wed, 15 Jul 2020 00:13:18 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5yXF2tzvz3dBj; Wed, 15 Jul 2020 00:13:17 +0000 (UTC) (envelope-from jkim@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 93A8EE931; Wed, 15 Jul 2020 00:13:16 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06F0DGZs033020; Wed, 15 Jul 2020 00:13:16 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06F0DGfE033019; Wed, 15 Jul 2020 00:13:16 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202007150013.06F0DGfE033019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 15 Jul 2020 00:13:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363209 - head X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 363209 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 00:13:18 -0000 Author: jkim Date: Wed Jul 15 00:13:15 2020 New Revision: 363209 URL: https://svnweb.freebsd.org/changeset/base/363209 Log: Remove obsolete files after byacc 20200330 import (r363171). Reported by: lwhsu Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Jul 14 23:59:00 2020 (r363208) +++ head/ObsoleteFiles.inc Wed Jul 15 00:13:15 2020 (r363209) @@ -36,6 +36,21 @@ # xargs -n1 | sort | uniq -d; # done +# 20200714: update byacc to 20200330 +OLD_FILES+=usr/tests/usr.bin/yacc/btyacc_calc1.y +OLD_FILES+=usr/tests/usr.bin/yacc/btyacc_demo.y +OLD_FILES+=usr/tests/usr.bin/yacc/btyacc_destroy1.y +OLD_FILES+=usr/tests/usr.bin/yacc/btyacc_destroy2.y +OLD_FILES+=usr/tests/usr.bin/yacc/btyacc_destroy3.y +OLD_FILES+=usr/tests/usr.bin/yacc/err_inherit1.y +OLD_FILES+=usr/tests/usr.bin/yacc/err_inherit2.y +OLD_FILES+=usr/tests/usr.bin/yacc/err_inherit3.y +OLD_FILES+=usr/tests/usr.bin/yacc/err_inherit4.y +OLD_FILES+=usr/tests/usr.bin/yacc/err_inherit5.y +OLD_FILES+=usr/tests/usr.bin/yacc/inherit0.y +OLD_FILES+=usr/tests/usr.bin/yacc/inherit1.y +OLD_FILES+=usr/tests/usr.bin/yacc/inherit2.y + # 20200706: update of sglist(9), r360574 OLD_FILES+=usr/share/man/man9/sglist_append_ext_pgs.9.gz OLD_FILES+=usr/share/man/man9/sglist_append_mb_ext_pgs.9.gz From owner-svn-src-head@freebsd.org Wed Jul 15 01:26:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E706A355DE0; Wed, 15 Jul 2020 01:26:28 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B608h53bDz4VlQ; Wed, 15 Jul 2020 01:26:28 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 74E14F780; Wed, 15 Jul 2020 01:26:28 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06F1QSKO075829; Wed, 15 Jul 2020 01:26:28 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06F1QSFu075828; Wed, 15 Jul 2020 01:26:28 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202007150126.06F1QSFu075828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 15 Jul 2020 01:26:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363210 - head/sys/fs/nfsclient X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfsclient X-SVN-Commit-Revision: 363210 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 01:26:29 -0000 Author: rmacklem Date: Wed Jul 15 01:26:28 2020 New Revision: 363210 URL: https://svnweb.freebsd.org/changeset/base/363210 Log: Fix the pNFS flexible file layout client for servers with small write size. The code in nfscl_dofflayout() loops when a flexible file layout server provides a small write data limit (no extant server is known to do this). If/when it looped, it erroneously reused the "drpc" argument for the mirror worker thread, corrupting it. This patch fixes the problem by only using the calling thread after the first loop iteration. Found during testing by simulating a server with a small write size. Since no extant pNFS server is known to provide a small write size, this fix it not needed in practice at this time. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Wed Jul 15 00:13:15 2020 (r363209) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Wed Jul 15 01:26:28 2020 (r363210) @@ -6248,10 +6248,17 @@ nfscl_dofflayoutio(vnode_t vp, struct uio *uiop, int * NFSCL_DEBUG(4, "mcopy reloff=%d xfer=%jd\n", rel_off, (uintmax_t)xfer); /* - * Do last write to a mirrored DS with this + * Do the writes after the first loop iteration + * and the write for the last mirror via this * thread. + * This loop only iterates for small values + * of nfsdi_wsize, which may never occur in + * practice. However, the drpc is completely + * used by the first iteration and, as such, + * cannot be used after that. */ - if (mirror < flp->nfsfl_mirrorcnt - 1) + if (mirror < flp->nfsfl_mirrorcnt - 1 && + rel_off == 0) error = nfsio_writedsmir(vp, iomode, must_commit, stateidp, *dspp, off, xfer, fhp, m, dp->nfsdi_vers, From owner-svn-src-head@freebsd.org Wed Jul 15 01:33:47 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1DCCB35601B; Wed, 15 Jul 2020 01:33:47 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B60K63FDqz4j4H; Wed, 15 Jul 2020 01:33:46 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f68.google.com with SMTP id v8so526785iox.2; Tue, 14 Jul 2020 18:33:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=U+kofLKFiQv8qbJon1fQ12N8pLQa2bhfF6Yb+i4IPhs=; b=WhzFmHd5AfOufPZcPXGsbcpNrmENxoHDhzN+p2EpGS202JDd/G6kigx2v9zPb9n5Vd YG8lK4EWbDB0+/IDqPLZs0Ne0VcKT6nCxkpJr+XtKhobWKW3vtxFe13AsDfv5xl2xeRQ oJS0N1b/Tba/jAZde+49SWA8lmhyMyakjV646jXSK+ajAyFDYo+Qla3gc5fEtAhc13Gu OFH4Hj40TmzwxUs2utwAaU5fv8u2mBXwH+QOd4uXzrFfyfJVl6oztUSxSx0j9z7fjSI4 NF4RXEfSmLSKiMXySFwY0OG2x60CcVR6MA9nuA0LW06UcFC6wl5ZYUjVAXIuzuHrncEK 9yuw== X-Gm-Message-State: AOAM533EtY8Bf5jKrElU4/0WXLFRPDthDDxaySyJ5SE48ZWibfKv5ay6 MSPTU3+i/b+XkEelo8maxkrrkoiQcyObsa83pgPhzw== X-Google-Smtp-Source: ABdhPJw2vKOCb7h15qG586T7vBDTAZYPmgFfUaOeYPblQLFkqxktFo8V9LeWWxBZDcTM+WOrKY7hw0VM6R9uZubN+Fg= X-Received: by 2002:a02:8816:: with SMTP id r22mr9091794jai.128.1594776823871; Tue, 14 Jul 2020 18:33:43 -0700 (PDT) MIME-Version: 1.0 References: <202007141202.06EC2VTA080844@repo.freebsd.org> <202007141646.06EGku9q013703@gndrsh.dnsmgr.net> In-Reply-To: <202007141646.06EGku9q013703@gndrsh.dnsmgr.net> From: Ed Maste Date: Tue, 14 Jul 2020 21:33:32 -0400 Message-ID: Subject: Re: svn commit: r363178 - head/contrib/mandoc To: "Rodney W. Grimes" Cc: Gordon Bergling , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4B60K63FDqz4j4H X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 01:33:47 -0000 On Tue, 14 Jul 2020 at 12:47, Rodney W. Grimes wrote: > > > Author: gbe (doc committer) > > Date: Tue Jul 14 12:02:30 2020 > > New Revision: 363178 > > URL: https://svnweb.freebsd.org/changeset/base/363178 > > > > Log: > > Revert r362809: Mention FreeBSD in the HISTORY sections of apropos(1) and makewhatis(8). > > Thank you This seems like a regression - information about when a certain utility (or a different implementation thereof) appeared in FreeBSD seems like useful and relevant information. From owner-svn-src-head@freebsd.org Wed Jul 15 09:48:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 134CE35FB48; Wed, 15 Jul 2020 09:48:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6CJ46hYTz3RTY; Wed, 15 Jul 2020 09:48:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C952B15601; Wed, 15 Jul 2020 09:48:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06F9majp083372; Wed, 15 Jul 2020 09:48:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06F9maDu083371; Wed, 15 Jul 2020 09:48:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202007150948.06F9maDu083371@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 15 Jul 2020 09:48:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363211 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 363211 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 09:48:37 -0000 Author: kib Date: Wed Jul 15 09:48:36 2020 New Revision: 363211 URL: https://svnweb.freebsd.org/changeset/base/363211 Log: Grammar and typo fixes. Submitted by: alc MFC after: 20 days Modified: head/sys/amd64/amd64/mp_machdep.c Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Wed Jul 15 01:26:28 2020 (r363210) +++ head/sys/amd64/amd64/mp_machdep.c Wed Jul 15 09:48:36 2020 (r363211) @@ -203,7 +203,7 @@ cpu_mp_start(void) cpu_apic_ids[i] = -1; } - /* Install an inter-CPU IPI for for cache and TLB invalidations. */ + /* Install an inter-CPU IPI for cache and TLB invalidations. */ setidt(IPI_INVLOP, pti ? IDTVEC(invlop_pti) : IDTVEC(invlop), SDT_SYSIGT, SEL_KPL, 0); @@ -557,7 +557,7 @@ static enum invl_op_codes invl_op_pg; * at location (cpu, my_cpuid) for each target cpu. After that IPI is * sent to all targets which scan for zeroed scoreboard generation * words. Upon finding such word the shootdown data is read from - * corresponding cpu' pcpu, and generation is set. Meantime initiator + * corresponding cpu's pcpu, and generation is set. Meantime initiator * loops waiting for all zeroed generations in scoreboard to update. */ static uint32_t *invl_scoreboard; @@ -654,8 +654,8 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, /* * Initiator must have interrupts enabled, which prevents - * non-invalidation IPIs, that takes smp_ipi_mtx spinlock, - * from deadlocking with as. On the other hand, preemption + * non-invalidation IPIs that take smp_ipi_mtx spinlock, + * from deadlocking with us. On the other hand, preemption * must be disabled to pin initiator to the instance of the * pcpu pc_smp_tlb data and scoreboard line. */ @@ -687,7 +687,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, /* * IPI acts as a fence between writing to the scoreboard above * (zeroing slot) and reading from it below (wait for - * acknowledge). + * acknowledgment). */ if (CPU_ISFULLSET(&mask)) { ipi_all_but_self(IPI_INVLOP); @@ -1080,7 +1080,7 @@ invlop_handler(void) /* * This acquire fence and its corresponding release - * fence in smp_targeted_tlb_shootdown(), is between + * fence in smp_targeted_tlb_shootdown() is between * reading zero scoreboard slot and accessing PCPU of * initiator for pc_smp_tlb values. */ From owner-svn-src-head@freebsd.org Wed Jul 15 10:13:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9EC80361D8D; Wed, 15 Jul 2020 10:13:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6Crh33c4z42Xp; Wed, 15 Jul 2020 10:13:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 30635158FB; Wed, 15 Jul 2020 10:13:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FADNLU001486; Wed, 15 Jul 2020 10:13:23 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FADNUk001485; Wed, 15 Jul 2020 10:13:23 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007151013.06FADNUk001485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 15 Jul 2020 10:13:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363212 - head/lib/libprocstat X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/lib/libprocstat X-SVN-Commit-Revision: 363212 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 10:13:24 -0000 Author: mjg Date: Wed Jul 15 10:13:23 2020 New Revision: 363212 URL: https://svnweb.freebsd.org/changeset/base/363212 Log: libprocstat: fix kvm filedesc access after introduction of fdescenttbl Modified: head/lib/libprocstat/libprocstat.c Modified: head/lib/libprocstat/libprocstat.c ============================================================================== --- head/lib/libprocstat/libprocstat.c Wed Jul 15 09:48:36 2020 (r363211) +++ head/lib/libprocstat/libprocstat.c Wed Jul 15 10:13:23 2020 (r363212) @@ -459,6 +459,7 @@ procstat_getfiles_kvm(struct procstat *procstat, struc { struct file file; struct filedesc filed; + struct fdescenttbl *fdt; struct pwd pwd; unsigned long pwd_addr; struct vm_map_entry vmentry; @@ -467,13 +468,14 @@ procstat_getfiles_kvm(struct procstat *procstat, struc vm_map_entry_t entryp; vm_object_t objp; struct vnode *vp; - struct filedescent *ofiles; struct filestat *entry; struct filestat_list *head; kvm_t *kd; void *data; - int i, fflags; + int fflags; + unsigned int i; int prot, type; + size_t fdt_size; unsigned int nfiles; bool haspwd; @@ -553,26 +555,31 @@ procstat_getfiles_kvm(struct procstat *procstat, struc STAILQ_INSERT_TAIL(head, entry, next); } - nfiles = filed.fd_lastfile + 1; - ofiles = malloc(nfiles * sizeof(struct filedescent)); - if (ofiles == NULL) { - warn("malloc(%zu)", nfiles * sizeof(struct filedescent)); + if (!kvm_read_all(kd, (unsigned long)filed.fd_files, &nfiles, + sizeof(nfiles))) { + warnx("can't read fd_files at %p", (void *)filed.fd_files); + return (NULL); + } + + fdt_size = sizeof(*fdt) + nfiles * sizeof(struct filedescent); + fdt = malloc(fdt_size); + if (fdt == NULL) { + warn("malloc(%zu)", fdt_size); goto do_mmapped; } - if (!kvm_read_all(kd, (unsigned long)filed.fd_ofiles, ofiles, - nfiles * sizeof(struct filedescent))) { - warnx("cannot read file structures at %p", - (void *)filed.fd_ofiles); - free(ofiles); + if (!kvm_read_all(kd, (unsigned long)filed.fd_files, fdt, fdt_size)) { + warnx("cannot read file structures at %p", (void *)filed.fd_files); + free(fdt); goto do_mmapped; } - for (i = 0; i <= filed.fd_lastfile; i++) { - if (ofiles[i].fde_file == NULL) + for (i = 0; i < nfiles; i++) { + if (fdt->fdt_ofiles[i].fde_file == NULL) { continue; - if (!kvm_read_all(kd, (unsigned long)ofiles[i].fde_file, &file, + } + if (!kvm_read_all(kd, (unsigned long)fdt->fdt_ofiles[i].fde_file, &file, sizeof(struct file))) { warnx("can't read file %d at %p", i, - (void *)ofiles[i].fde_file); + (void *)fdt->fdt_ofiles[i].fde_file); continue; } switch (file.f_type) { @@ -623,7 +630,7 @@ procstat_getfiles_kvm(struct procstat *procstat, struc if (entry != NULL) STAILQ_INSERT_TAIL(head, entry, next); } - free(ofiles); + free(fdt); do_mmapped: From owner-svn-src-head@freebsd.org Wed Jul 15 10:14:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 93549361BF5; Wed, 15 Jul 2020 10:14:02 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6CsQ19hCz4325; Wed, 15 Jul 2020 10:14:01 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 82AC615B26; Wed, 15 Jul 2020 10:14:01 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FAE16F001560; Wed, 15 Jul 2020 10:14:01 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FAE1oR001559; Wed, 15 Jul 2020 10:14:01 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007151014.06FAE1oR001559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 15 Jul 2020 10:14:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363213 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 363213 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 10:14:02 -0000 Author: mjg Date: Wed Jul 15 10:14:00 2020 New Revision: 363213 URL: https://svnweb.freebsd.org/changeset/base/363213 Log: fd: add obvious branch predictions to fdalloc Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Wed Jul 15 10:13:23 2020 (r363212) +++ head/sys/kern/kern_descrip.c Wed Jul 15 10:14:00 2020 (r363213) @@ -1847,9 +1847,9 @@ fdalloc(struct thread *td, int minfd, int *result) * If none is found, grow the file table. */ fd = fd_first_free(fdp, minfd, fdp->fd_nfiles); - if (fd >= maxfd) + if (__predict_false(fd >= maxfd)) return (EMFILE); - if (fd >= fdp->fd_nfiles) { + if (__predict_false(fd >= fdp->fd_nfiles)) { allocfd = min(fd * 2, maxfd); #ifdef RACCT if (RACCT_ENABLED()) { From owner-svn-src-head@freebsd.org Wed Jul 15 10:24:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 04528361EEE; Wed, 15 Jul 2020 10:24:06 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6D516Z71z483v; Wed, 15 Jul 2020 10:24:05 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C1CBE15D0E; Wed, 15 Jul 2020 10:24:05 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FAO5Uu007874; Wed, 15 Jul 2020 10:24:05 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FAO4YC007868; Wed, 15 Jul 2020 10:24:04 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007151024.06FAO4YC007868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 15 Jul 2020 10:24:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363214 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 363214 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 10:24:06 -0000 Author: mjg Date: Wed Jul 15 10:24:04 2020 New Revision: 363214 URL: https://svnweb.freebsd.org/changeset/base/363214 Log: fd: remove fd_lastfile It keeps recalculated way more often than it is needed. Provide a routine (fdlastfile) to get it if necessary. Consumers may be better off with a bitmap iterator instead. Modified: head/sys/kern/init_main.c head/sys/kern/kern_descrip.c head/sys/kern/kern_exec.c head/sys/kern/kern_fork.c head/sys/kern/sys_generic.c head/sys/sys/filedesc.h Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Wed Jul 15 10:14:00 2020 (r363213) +++ head/sys/kern/init_main.c Wed Jul 15 10:24:04 2020 (r363214) @@ -558,7 +558,7 @@ proc0_init(void *dummy __unused) siginit(&proc0); /* Create the file descriptor table. */ - p->p_fd = fdinit(NULL, false); + p->p_fd = fdinit(NULL, false, NULL); p->p_fdtol = NULL; /* Create the limits structures. */ Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Wed Jul 15 10:14:00 2020 (r363213) +++ head/sys/kern/kern_descrip.c Wed Jul 15 10:24:04 2020 (r363214) @@ -108,7 +108,6 @@ static __read_mostly smr_t pwd_smr; static int closefp(struct filedesc *fdp, int fd, struct file *fp, struct thread *td, int holdleaders); static int fd_first_free(struct filedesc *fdp, int low, int size); -static int fd_last_used(struct filedesc *fdp, int size); static void fdgrowtable(struct filedesc *fdp, int nfd); static void fdgrowtable_exp(struct filedesc *fdp, int nfd); static void fdunused(struct filedesc *fdp, int fd); @@ -213,29 +212,32 @@ fd_first_free(struct filedesc *fdp, int low, int size) } /* - * Find the highest non-zero bit in the given bitmap, starting at 0 and - * not exceeding size - 1. Return -1 if not found. + * Find the last used fd. + * + * Call this variant if fdp can't be modified by anyone else (e.g, during exec). + * Otherwise use fdlastfile. */ -static int -fd_last_used(struct filedesc *fdp, int size) +int +fdlastfile_single(struct filedesc *fdp) { NDSLOTTYPE *map = fdp->fd_map; - NDSLOTTYPE mask; int off, minoff; - off = NDSLOT(size); - if (size % NDENTRIES) { - mask = ~(~(NDSLOTTYPE)0 << (size % NDENTRIES)); - if ((mask &= map[off]) != 0) - return (off * NDENTRIES + flsl(mask) - 1); - --off; - } + off = NDSLOT(fdp->fd_nfiles - 1); for (minoff = NDSLOT(0); off >= minoff; --off) if (map[off] != 0) return (off * NDENTRIES + flsl(map[off]) - 1); return (-1); } +int +fdlastfile(struct filedesc *fdp) +{ + + FILEDESC_LOCK_ASSERT(fdp); + return (fdlastfile_single(fdp)); +} + static int fdisused(struct filedesc *fdp, int fd) { @@ -265,8 +267,6 @@ fdused(struct filedesc *fdp, int fd) FILEDESC_XLOCK_ASSERT(fdp); fdused_init(fdp, fd); - if (fd > fdp->fd_lastfile) - fdp->fd_lastfile = fd; if (fd == fdp->fd_freefile) fdp->fd_freefile++; } @@ -287,8 +287,6 @@ fdunused(struct filedesc *fdp, int fd) fdp->fd_map[NDSLOT(fd)] &= ~NDBIT(fd); if (fd < fdp->fd_freefile) fdp->fd_freefile = fd; - if (fd == fdp->fd_lastfile) - fdp->fd_lastfile = fd_last_used(fdp, fd); } /* @@ -1317,7 +1315,7 @@ int kern_close_range(struct thread *td, u_int lowfd, u_int highfd) { struct filedesc *fdp; - int fd, ret; + int fd, ret, lastfile; ret = 0; fdp = td->td_proc->p_fd; @@ -1335,14 +1333,15 @@ kern_close_range(struct thread *td, u_int lowfd, u_int } /* - * If fdp->fd_lastfile == -1, we're dealing with either a fresh file + * If lastfile == -1, we're dealing with either a fresh file * table or one in which every fd has been closed. Just return * successful; there's nothing left to do. */ - if (fdp->fd_lastfile == -1) + lastfile = fdlastfile(fdp); + if (lastfile == -1) goto out; - /* Clamped to [lowfd, fd_lastfile] */ - highfd = MIN(highfd, fdp->fd_lastfile); + /* Clamped to [lowfd, lastfile] */ + highfd = MIN(highfd, lastfile); for (fd = lowfd; fd <= highfd; fd++) { if (fdp->fd_ofiles[fd].fde_file != NULL) { FILEDESC_SUNLOCK(fdp); @@ -1741,14 +1740,6 @@ fdgrowtable(struct filedesc *fdp, int nfd) int nnfiles, onfiles; NDSLOTTYPE *nmap, *omap; - /* - * If lastfile is -1 this struct filedesc was just allocated and we are - * growing it to accommodate for the one we are going to copy from. There - * is no need to have a lock on this one as it's not visible to anyone. - */ - if (fdp->fd_lastfile != -1) - FILEDESC_XLOCK_ASSERT(fdp); - KASSERT(fdp->fd_nfiles > 0, ("zero-length file table")); /* save old values */ @@ -2033,12 +2024,17 @@ finstall(struct thread *td, struct file *fp, int *fd, * If fdp is not NULL, return with it shared locked. */ struct filedesc * -fdinit(struct filedesc *fdp, bool prepfiles) +fdinit(struct filedesc *fdp, bool prepfiles, int *lastfile) { struct filedesc0 *newfdp0; struct filedesc *newfdp; struct pwd *newpwd; + if (prepfiles) + MPASS(lastfile != NULL); + else + MPASS(lastfile == NULL); + newfdp0 = uma_zalloc(filedesc0_zone, M_WAITOK | M_ZERO); newfdp = &newfdp0->fd_fd; @@ -2048,7 +2044,6 @@ fdinit(struct filedesc *fdp, bool prepfiles) refcount_init(&newfdp->fd_holdcnt, 1); newfdp->fd_cmask = CMASK; newfdp->fd_map = newfdp0->fd_dmap; - newfdp->fd_lastfile = -1; newfdp->fd_files = (struct fdescenttbl *)&newfdp0->fd_dfiles; newfdp->fd_files->fdt_nfiles = NDFILE; @@ -2058,23 +2053,23 @@ fdinit(struct filedesc *fdp, bool prepfiles) return (newfdp); } - if (prepfiles && fdp->fd_lastfile >= newfdp->fd_nfiles) - fdgrowtable(newfdp, fdp->fd_lastfile + 1); - FILEDESC_SLOCK(fdp); newpwd = pwd_hold_filedesc(fdp); smr_serialized_store(&newfdp->fd_pwd, newpwd, true); - if (!prepfiles) { FILEDESC_SUNLOCK(fdp); - } else { - while (fdp->fd_lastfile >= newfdp->fd_nfiles) { - FILEDESC_SUNLOCK(fdp); - fdgrowtable(newfdp, fdp->fd_lastfile + 1); - FILEDESC_SLOCK(fdp); - } + return (newfdp); } + for (;;) { + *lastfile = fdlastfile(fdp); + if (*lastfile < newfdp->fd_nfiles) + break; + FILEDESC_SUNLOCK(fdp); + fdgrowtable(newfdp, *lastfile + 1); + FILEDESC_SLOCK(fdp); + } + return (newfdp); } @@ -2148,14 +2143,14 @@ fdcopy(struct filedesc *fdp) { struct filedesc *newfdp; struct filedescent *nfde, *ofde; - int i; + int i, lastfile; MPASS(fdp != NULL); - newfdp = fdinit(fdp, true); + newfdp = fdinit(fdp, true, &lastfile); /* copy all passable descriptors (i.e. not kqueue) */ newfdp->fd_freefile = -1; - for (i = 0; i <= fdp->fd_lastfile; ++i) { + for (i = 0; i <= lastfile; ++i) { ofde = &fdp->fd_ofiles[i]; if (ofde->fde_file == NULL || (ofde->fde_file->f_ops->fo_flags & DFLAG_PASSABLE) == 0 || @@ -2168,7 +2163,6 @@ fdcopy(struct filedesc *fdp) *nfde = *ofde; filecaps_copy(&ofde->fde_caps, &nfde->fde_caps, true); fdused_init(newfdp, i); - newfdp->fd_lastfile = i; } if (newfdp->fd_freefile == -1) newfdp->fd_freefile = i; @@ -2190,12 +2184,12 @@ fdcopy_remapped(struct filedesc *fdp, const int *fds, { struct filedesc *newfdp; struct filedescent *nfde, *ofde; - int error, i; + int error, i, lastfile; MPASS(fdp != NULL); - newfdp = fdinit(fdp, true); - if (nfds > fdp->fd_lastfile + 1) { + newfdp = fdinit(fdp, true, &lastfile); + if (nfds > lastfile + 1) { /* New table cannot be larger than the old one. */ error = E2BIG; goto bad; @@ -2203,7 +2197,7 @@ fdcopy_remapped(struct filedesc *fdp, const int *fds, /* Copy all passable descriptors (i.e. not kqueue). */ newfdp->fd_freefile = nfds; for (i = 0; i < nfds; ++i) { - if (fds[i] < 0 || fds[i] > fdp->fd_lastfile) { + if (fds[i] < 0 || fds[i] > lastfile) { /* File descriptor out of bounds. */ error = EBADF; goto bad; @@ -2227,7 +2221,6 @@ fdcopy_remapped(struct filedesc *fdp, const int *fds, *nfde = *ofde; filecaps_copy(&ofde->fde_caps, &nfde->fde_caps, true); fdused_init(newfdp, i); - newfdp->fd_lastfile = i; } newfdp->fd_cmask = fdp->fd_cmask; FILEDESC_SUNLOCK(fdp); @@ -2252,7 +2245,7 @@ fdclearlocks(struct thread *td) struct file *fp; struct proc *p; struct vnode *vp; - int i; + int i, lastfile; p = td->td_proc; fdp = p->p_fd; @@ -2265,7 +2258,8 @@ fdclearlocks(struct thread *td) fdtol->fdl_refcount)); if (fdtol->fdl_refcount == 1 && (p->p_leader->p_flag & P_ADVLOCK) != 0) { - for (i = 0; i <= fdp->fd_lastfile; i++) { + lastfile = fdlastfile(fdp); + for (i = 0; i <= lastfile; i++) { fp = fdp->fd_ofiles[i].fde_file; if (fp == NULL || fp->f_type != DTYPE_VNODE || !fhold(fp)) @@ -2330,9 +2324,10 @@ fdescfree_fds(struct thread *td, struct filedesc *fdp, struct freetable *ft, *tft; struct filedescent *fde; struct file *fp; - int i; + int i, lastfile; - for (i = 0; i <= fdp->fd_lastfile; i++) { + lastfile = fdlastfile_single(fdp); + for (i = 0; i <= lastfile; i++) { fde = &fdp->fd_ofiles[i]; fp = fde->fde_file; if (fp != NULL) { @@ -2480,11 +2475,12 @@ fdcloseexec(struct thread *td) struct filedesc *fdp; struct filedescent *fde; struct file *fp; - int i; + int i, lastfile; fdp = td->td_proc->p_fd; KASSERT(fdp->fd_refcnt == 1, ("the fdtable should not be shared")); - for (i = 0; i <= fdp->fd_lastfile; i++) { + lastfile = fdlastfile_single(fdp); + for (i = 0; i <= lastfile; i++) { fde = &fdp->fd_ofiles[i]; fp = fde->fde_file; if (fp != NULL && (fp->f_type == DTYPE_MQUEUE || @@ -3289,11 +3285,12 @@ chroot_refuse_vdir_fds(struct filedesc *fdp) { struct vnode *vp; struct file *fp; - int fd; + int fd, lastfile; FILEDESC_LOCK_ASSERT(fdp); - for (fd = 0; fd <= fdp->fd_lastfile; fd++) { + lastfile = fdlastfile(fdp); + for (fd = 0; fd <= lastfile; fd++) { fp = fget_locked(fdp, fd); if (fp == NULL) continue; @@ -3610,8 +3607,9 @@ filedesc_to_leader_alloc(struct filedesc_to_leader *ol static int sysctl_kern_proc_nfds(SYSCTL_HANDLER_ARGS) { + NDSLOTTYPE *map; struct filedesc *fdp; - int i, count, slots; + int count, off, minoff; if (*(int *)arg1 != 0) return (EINVAL); @@ -3619,9 +3617,10 @@ sysctl_kern_proc_nfds(SYSCTL_HANDLER_ARGS) fdp = curproc->p_fd; count = 0; FILEDESC_SLOCK(fdp); - slots = NDSLOTS(fdp->fd_lastfile + 1); - for (i = 0; i < slots; i++) - count += bitcountl(fdp->fd_map[i]); + map = fdp->fd_map; + off = NDSLOT(fdp->fd_nfiles - 1); + for (minoff = NDSLOT(0); off >= minoff; --off) + count += bitcountl(map[off]); FILEDESC_SUNLOCK(fdp); return (SYSCTL_OUT(req, &count, sizeof(count))); @@ -3641,7 +3640,7 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS) struct filedesc *fdp; struct file *fp; struct proc *p; - int error, n; + int error, n, lastfile; error = sysctl_wire_old_buffer(req, 0); if (error != 0) @@ -3660,8 +3659,7 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS) if (fdp == NULL) continue; /* overestimates sparse tables. */ - if (fdp->fd_lastfile > 0) - n += fdp->fd_lastfile; + n += fdp->fd_nfiles; fddrop(fdp); } sx_sunlock(&allproc_lock); @@ -3688,7 +3686,8 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS) if (fdp == NULL) continue; FILEDESC_SLOCK(fdp); - for (n = 0; fdp->fd_refcnt > 0 && n <= fdp->fd_lastfile; ++n) { + lastfile = fdlastfile(fdp); + for (n = 0; fdp->fd_refcnt > 0 && n <= lastfile; ++n) { if ((fp = fdp->fd_ofiles[n].fde_file) == NULL) continue; xf.xf_fd = n; @@ -3891,7 +3890,7 @@ kern_proc_filedesc_out(struct proc *p, struct sbuf *s struct export_fd_buf *efbuf; struct vnode *cttyvp, *textvp, *tracevp; struct pwd *pwd; - int error, i; + int error, i, lastfile; cap_rights_t rights; PROC_LOCK_ASSERT(p, MA_OWNED); @@ -3950,7 +3949,8 @@ kern_proc_filedesc_out(struct proc *p, struct sbuf *s } pwd_drop(pwd); } - for (i = 0; fdp->fd_refcnt > 0 && i <= fdp->fd_lastfile; i++) { + lastfile = fdlastfile(fdp); + for (i = 0; fdp->fd_refcnt > 0 && i <= lastfile; i++) { if ((fp = fdp->fd_ofiles[i].fde_file) == NULL) continue; #ifdef CAPABILITIES @@ -4064,7 +4064,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS) struct kinfo_file *kif; struct filedesc *fdp; struct pwd *pwd; - int error, i, *name; + int error, i, lastfile, *name; struct file *fp; struct proc *p; @@ -4092,7 +4092,8 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS) okif, fdp, req); pwd_drop(pwd); } - for (i = 0; fdp->fd_refcnt > 0 && i <= fdp->fd_lastfile; i++) { + lastfile = fdlastfile(fdp); + for (i = 0; fdp->fd_refcnt > 0 && i <= lastfile; i++) { if ((fp = fdp->fd_ofiles[i].fde_file) == NULL) continue; export_file_to_kinfo(fp, i, NULL, kif, fdp, @@ -4283,7 +4284,7 @@ file_to_first_proc(struct file *fp) fdp = p->p_fd; if (fdp == NULL) continue; - for (n = 0; n <= fdp->fd_lastfile; n++) { + for (n = 0; n < fdp->fd_nfiles; n++) { if (fp == fdp->fd_ofiles[n].fde_file) return (p); } @@ -4337,7 +4338,7 @@ DB_SHOW_COMMAND(files, db_show_files) continue; if ((fdp = p->p_fd) == NULL) continue; - for (n = 0; n <= fdp->fd_lastfile; ++n) { + for (n = 0; n < fdp->fd_nfiles; ++n) { if ((fp = fdp->fd_ofiles[n].fde_file) == NULL) continue; db_print_file(fp, header); Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Wed Jul 15 10:14:00 2020 (r363213) +++ head/sys/kern/kern_exec.c Wed Jul 15 10:24:04 2020 (r363214) @@ -1208,7 +1208,7 @@ exec_copyin_data_fds(struct thread *td, struct image_a memset(args, '\0', sizeof(*args)); ofdp = td->td_proc->p_fd; - if (datalen >= ARG_MAX || fdslen > ofdp->fd_lastfile + 1) + if (datalen >= ARG_MAX || fdslen >= ofdp->fd_nfiles) return (E2BIG); error = exec_alloc_args(args); if (error != 0) Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Wed Jul 15 10:14:00 2020 (r363213) +++ head/sys/kern/kern_fork.c Wed Jul 15 10:24:04 2020 (r363214) @@ -332,7 +332,7 @@ fork_norfproc(struct thread *td, int flags) */ if (flags & RFCFDG) { struct filedesc *fdtmp; - fdtmp = fdinit(td->td_proc->p_fd, false); + fdtmp = fdinit(td->td_proc->p_fd, false, NULL); fdescfree(td); p1->p_fd = fdtmp; } @@ -403,7 +403,7 @@ do_fork(struct thread *td, struct fork_req *fr, struct * Copy filedesc. */ if (fr->fr_flags & RFCFDG) { - fd = fdinit(p1->p_fd, false); + fd = fdinit(p1->p_fd, false, NULL); fdtol = NULL; } else if (fr->fr_flags & RFFDG) { fd = fdcopy(p1->p_fd); Modified: head/sys/kern/sys_generic.c ============================================================================== --- head/sys/kern/sys_generic.c Wed Jul 15 10:14:00 2020 (r363213) +++ head/sys/kern/sys_generic.c Wed Jul 15 10:24:04 2020 (r363214) @@ -960,7 +960,7 @@ sys_select(struct thread *td, struct select_args *uap) * * There are applications that rely on the behaviour. * - * nd is fd_lastfile + 1. + * nd is fd_nfiles. */ static int select_check_badfd(fd_set *fd_in, int nd, int ndu, int abi_nfdbits) @@ -1023,9 +1023,9 @@ kern_select(struct thread *td, int nd, fd_set *fd_in, return (EINVAL); fdp = td->td_proc->p_fd; ndu = nd; - lf = fdp->fd_lastfile; - if (nd > lf + 1) - nd = lf + 1; + lf = fdp->fd_nfiles; + if (nd > lf) + nd = lf; error = select_check_badfd(fd_in, nd, ndu, abi_nfdbits); if (error != 0) @@ -1556,7 +1556,7 @@ pollscan(struct thread *td, struct pollfd *fds, u_int FILEDESC_SLOCK(fdp); for (i = 0; i < nfd; i++, fds++) { - if (fds->fd > fdp->fd_lastfile) { + if (fds->fd >= fdp->fd_nfiles) { fds->revents = POLLNVAL; n++; } else if (fds->fd < 0) { Modified: head/sys/sys/filedesc.h ============================================================================== --- head/sys/sys/filedesc.h Wed Jul 15 10:14:00 2020 (r363213) +++ head/sys/sys/filedesc.h Wed Jul 15 10:24:04 2020 (r363214) @@ -96,7 +96,6 @@ struct filedesc { struct fdescenttbl *fd_files; /* open files table */ smrpwd_t fd_pwd; /* directories */ NDSLOTTYPE *fd_map; /* bitmap of free fds */ - int fd_lastfile; /* high-water mark of fd_ofiles */ int fd_freefile; /* approx. next free file */ u_short fd_cmask; /* mask for file creation */ int fd_refcnt; /* thread reference count */ @@ -235,7 +234,9 @@ void fdinstall_remapped(struct thread *td, struct file void fdunshare(struct thread *td); void fdescfree(struct thread *td); void fdescfree_remapped(struct filedesc *fdp); -struct filedesc *fdinit(struct filedesc *fdp, bool prepfiles); +int fdlastfile(struct filedesc *fdp); +int fdlastfile_single(struct filedesc *fdp); +struct filedesc *fdinit(struct filedesc *fdp, bool prepfiles, int *lastfile); struct filedesc *fdshare(struct filedesc *fdp); struct filedesc_to_leader * filedesc_to_leader_alloc(struct filedesc_to_leader *old, From owner-svn-src-head@freebsd.org Wed Jul 15 10:24:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ED1283621E3; Wed, 15 Jul 2020 10:24:40 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6D5h4PD9z48d0; Wed, 15 Jul 2020 10:24:40 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4F2E015D0F; Wed, 15 Jul 2020 10:24:40 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FAOeK4007945; Wed, 15 Jul 2020 10:24:40 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FAOePk007944; Wed, 15 Jul 2020 10:24:40 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007151024.06FAOePk007944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 15 Jul 2020 10:24:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363215 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 363215 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 10:24:41 -0000 Author: mjg Date: Wed Jul 15 10:24:39 2020 New Revision: 363215 URL: https://svnweb.freebsd.org/changeset/base/363215 Log: poll: factor fd lookup out of scan and rescan Modified: head/sys/kern/sys_generic.c Modified: head/sys/kern/sys_generic.c ============================================================================== --- head/sys/kern/sys_generic.c Wed Jul 15 10:24:04 2020 (r363214) +++ head/sys/kern/sys_generic.c Wed Jul 15 10:24:39 2020 (r363215) @@ -1476,7 +1476,50 @@ sys_ppoll(struct thread *td, struct ppoll_args *uap) return (kern_poll(td, uap->fds, uap->nfds, tsp, ssp)); } +#ifdef CAPABILITIES static int +poll_fget(struct filedesc *fdp, int fd, struct file **fpp) +{ + const struct filedescent *fde; + const struct fdescenttbl *fdt; + const cap_rights_t *haverights; + struct file *fp; + int error; + + if (__predict_false(fd >= fdp->fd_nfiles)) + return (EBADF); + + fdt = fdp->fd_files; + fde = &fdt->fdt_ofiles[fd]; + fp = fde->fde_file; + if (__predict_false(fp == NULL)) + return (EBADF); + haverights = cap_rights_fde_inline(fde); + error = cap_check_inline(haverights, &cap_event_rights); + if (__predict_false(error != 0)) + return (EBADF); + *fpp = fp; + return (0); +} +#else +static int +poll_fget(struct filedesc *fdp, int fd, struct file **fpp) +{ + struct file *fp; + + if (__predict_false(fd >= fdp->fd_nfiles)) + return (EBADF); + + fp = fdp->fd_ofiles[fd].fde_file; + if (__predict_false(fp == NULL)) + return (EBADF); + + *fpp = fp; + return (0); +} +#endif + +static int pollrescan(struct thread *td) { struct seltd *stp; @@ -1499,19 +1542,11 @@ pollrescan(struct thread *td) /* If the selinfo wasn't cleared the event didn't fire. */ if (si != NULL) continue; - fp = fdp->fd_ofiles[fd->fd].fde_file; -#ifdef CAPABILITIES - if (fp == NULL || - cap_check(cap_rights(fdp, fd->fd), &cap_event_rights) != 0) -#else - if (fp == NULL) -#endif - { + if (poll_fget(fdp, fd->fd, &fp) != 0) { fd->revents = POLLNVAL; n++; continue; } - /* * Note: backend also returns POLLHUP and * POLLERR if appropriate. @@ -1550,47 +1585,39 @@ pollout(struct thread *td, struct pollfd *fds, struct static int pollscan(struct thread *td, struct pollfd *fds, u_int nfd) { - struct filedesc *fdp = td->td_proc->p_fd; + struct filedesc *fdp; struct file *fp; - int i, n = 0; + int i, n; + n = 0; + fdp = td->td_proc->p_fd; FILEDESC_SLOCK(fdp); for (i = 0; i < nfd; i++, fds++) { - if (fds->fd >= fdp->fd_nfiles) { + if (fds->fd < 0) { + fds->revents = 0; + continue; + } + if (poll_fget(fdp, fds->fd, &fp) != 0) { fds->revents = POLLNVAL; n++; - } else if (fds->fd < 0) { - fds->revents = 0; - } else { - fp = fdp->fd_ofiles[fds->fd].fde_file; -#ifdef CAPABILITIES - if (fp == NULL || - cap_check(cap_rights(fdp, fds->fd), &cap_event_rights) != 0) -#else - if (fp == NULL) -#endif - { - fds->revents = POLLNVAL; - n++; - } else { - /* - * Note: backend also returns POLLHUP and - * POLLERR if appropriate. - */ - selfdalloc(td, fds); - fds->revents = fo_poll(fp, fds->events, - td->td_ucred, td); - /* - * POSIX requires POLLOUT to be never - * set simultaneously with POLLHUP. - */ - if ((fds->revents & POLLHUP) != 0) - fds->revents &= ~POLLOUT; - - if (fds->revents != 0) - n++; - } + continue; } + /* + * Note: backend also returns POLLHUP and + * POLLERR if appropriate. + */ + selfdalloc(td, fds); + fds->revents = fo_poll(fp, fds->events, + td->td_ucred, td); + /* + * POSIX requires POLLOUT to be never + * set simultaneously with POLLHUP. + */ + if ((fds->revents & POLLHUP) != 0) + fds->revents &= ~POLLOUT; + + if (fds->revents != 0) + n++; } FILEDESC_SUNLOCK(fdp); td->td_retval[0] = n; From owner-svn-src-head@freebsd.org Wed Jul 15 12:07:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2FD7F364721; Wed, 15 Jul 2020 12:07:50 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6GNj3JNQz4g12; Wed, 15 Jul 2020 12:07:49 +0000 (UTC) (envelope-from arichardson@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 8BC2C16DA5; Wed, 15 Jul 2020 12:07:48 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FC7med068616; Wed, 15 Jul 2020 12:07:48 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FC7mKs068615; Wed, 15 Jul 2020 12:07:48 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202007151207.06FC7mKs068615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Wed, 15 Jul 2020 12:07:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363216 - head/lib/libpmc X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/lib/libpmc X-SVN-Commit-Revision: 363216 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 12:07:50 -0000 Author: arichardson Date: Wed Jul 15 12:07:47 2020 New Revision: 363216 URL: https://svnweb.freebsd.org/changeset/base/363216 Log: Avoid rebuilding libpmc in every incremental rebuild Generate libpmc_events.c in a temporary file first and only overwrite it if the files are actually different. This avoids compiling and relinking the different variants of libpmc on every incremental build. Reviewed By: jhb Differential Revision: https://reviews.freebsd.org/D24784 Modified: head/lib/libpmc/Makefile Modified: head/lib/libpmc/Makefile ============================================================================== --- head/lib/libpmc/Makefile Wed Jul 15 10:24:39 2020 (r363215) +++ head/lib/libpmc/Makefile Wed Jul 15 12:07:47 2020 (r363216) @@ -32,9 +32,13 @@ SUBDIR+= pmu-events .endif .endif -libpmc_events.c: ${JEVENTS} - ${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmc_events.c -SRCS+= libpmc_events.c +libpmc_events.c: ${JEVENTS} .META + ${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch ${.TARGET}.tmp + if [ ! -e ${.TARGET} ] || ! cmp -s ${.TARGET} ${.TARGET}.tmp; then \ + mv -f ${.TARGET}.tmp ${.TARGET}; \ + fi +CLEANFILES+= libpmc_events.c libpmc_events.c.tmp +SRCS+= libpmc_events.c .endif WARNS?= 3 From owner-svn-src-head@freebsd.org Wed Jul 15 12:07:56 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CF2A63646CD; Wed, 15 Jul 2020 12:07:56 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6GNq30Cpz4g8G; Wed, 15 Jul 2020 12:07:55 +0000 (UTC) (envelope-from arichardson@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 31BA016E9A; Wed, 15 Jul 2020 12:07:54 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FC7sOa068670; Wed, 15 Jul 2020 12:07:54 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FC7s30068669; Wed, 15 Jul 2020 12:07:54 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202007151207.06FC7s30068669@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Wed, 15 Jul 2020 12:07:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363217 - head/usr.bin/localedef X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/usr.bin/localedef X-SVN-Commit-Revision: 363217 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 12:07:57 -0000 Author: arichardson Date: Wed Jul 15 12:07:53 2020 New Revision: 363217 URL: https://svnweb.freebsd.org/changeset/base/363217 Log: Add missing newline and return in localedef error message I hit those error messages when using a localedef built against headers that don't match the target system (cross-building from a Linux host). This problem will be fixed in the next commit. Modified: head/usr.bin/localedef/collate.c Modified: head/usr.bin/localedef/collate.c ============================================================================== --- head/usr.bin/localedef/collate.c Wed Jul 15 12:07:47 2020 (r363216) +++ head/usr.bin/localedef/collate.c Wed Jul 15 12:07:53 2020 (r363217) @@ -850,7 +850,8 @@ void add_order_directive(void) { if (collinfo.directive_count >= COLL_WEIGHTS_MAX) { - fprintf(stderr,"too many directives (max %d)", COLL_WEIGHTS_MAX); + fprintf(stderr, "too many directives (max %d)\n", COLL_WEIGHTS_MAX); + return; } collinfo.directive_count++; } @@ -859,7 +860,7 @@ static void add_order_pri(int32_t ref) { if (curr_weight >= NUM_WT) { - fprintf(stderr,"too many weights (max %d)", NUM_WT); + fprintf(stderr, "too many weights (max %d)\n", NUM_WT); return; } order_weights[curr_weight] = ref; From owner-svn-src-head@freebsd.org Wed Jul 15 12:08:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 884753645AD; Wed, 15 Jul 2020 12:08:05 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6GP029mqz3RW2; Wed, 15 Jul 2020 12:08:04 +0000 (UTC) (envelope-from arichardson@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 9EE5B16DA6; Wed, 15 Jul 2020 12:08:02 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FC82Nu068745; Wed, 15 Jul 2020 12:08:02 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FC7xGp068723; Wed, 15 Jul 2020 12:07:59 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202007151207.06FC7xGp068723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Wed, 15 Jul 2020 12:07:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363218 - in head/usr.bin/localedef: . bootstrap X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: in head/usr.bin/localedef: . bootstrap X-SVN-Commit-Revision: 363218 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 12:08:06 -0000 Author: arichardson Date: Wed Jul 15 12:07:59 2020 New Revision: 363218 URL: https://svnweb.freebsd.org/changeset/base/363218 Log: Allow bootstrapping localdef on non-FreeBSD systems The current localedef simply assumes that the locale headers on build system are compatible with those on the target system which is not necessarily true. It generally works on FreeBSD (as long as we don't change the locale headers), but Linux and macOS provide completely different locale headers. This change adds new bootstrap headers that namespace certain xlocale structures defined or used by in the headers that localdef needs. This is required since system headers *must* be able to include the "real" locale headers for printf(), etc., but we also want to access the target systems's internal locale structures. Reviewed By: yuripv, brooks Differential Revision: https://reviews.freebsd.org/D25229 Added: head/usr.bin/localedef/bootstrap/ head/usr.bin/localedef/bootstrap/_ctype.h (contents, props changed) head/usr.bin/localedef/bootstrap/bootstrap_xlocale_private.h (contents, props changed) head/usr.bin/localedef/bootstrap/collate.h (contents, props changed) head/usr.bin/localedef/bootstrap/ctype.h (contents, props changed) head/usr.bin/localedef/bootstrap/limits.h (contents, props changed) head/usr.bin/localedef/bootstrap/lmessages.h (contents, props changed) head/usr.bin/localedef/bootstrap/lmonetary.h (contents, props changed) head/usr.bin/localedef/bootstrap/lnumeric.h (contents, props changed) head/usr.bin/localedef/bootstrap/namespace.h (contents, props changed) head/usr.bin/localedef/bootstrap/timelocal.h (contents, props changed) head/usr.bin/localedef/bootstrap/un-namespace.h (contents, props changed) head/usr.bin/localedef/bootstrap/xlocale.h (contents, props changed) Modified: head/usr.bin/localedef/Makefile head/usr.bin/localedef/collate.c head/usr.bin/localedef/ctype.c Modified: head/usr.bin/localedef/Makefile ============================================================================== --- head/usr.bin/localedef/Makefile Wed Jul 15 12:07:53 2020 (r363217) +++ head/usr.bin/localedef/Makefile Wed Jul 15 12:07:59 2020 (r363218) @@ -20,6 +20,9 @@ parser.h: parser.y IGNORE_PRAGMA= yes CFLAGS+= -I. -I${.CURDIR} +.if defined(BOOTSTRAPPING) +CFLAGS+= -I${.CURDIR}/bootstrap +.endif CFLAGS+= -I${SRCTOP}/lib/libc/locale CFLAGS+= -I${SRCTOP}/lib/libc/stdtime Added: head/usr.bin/localedef/bootstrap/_ctype.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/localedef/bootstrap/_ctype.h Wed Jul 15 12:07:59 2020 (r363218) @@ -0,0 +1,48 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * We have to ensure that we use the same constants as the target system when + * bootstrapping localedef so that we generate compatible databases. + */ +#ifndef __FreeBSD__ +typedef int __ct_rune_t; /* arg type for ctype funcs */ +typedef __ct_rune_t __rune_t; /* rune_t (see above) */ +typedef __ct_rune_t __wint_t; /* wint_t (see above) */ +#endif +#include "../../include/_ctype.h" Added: head/usr.bin/localedef/bootstrap/bootstrap_xlocale_private.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/localedef/bootstrap/bootstrap_xlocale_private.h Wed Jul 15 12:07:59 2020 (r363218) @@ -0,0 +1,54 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LOCALDEF_BOOTSTRAP_XLOCALE_PRIVATE_H +#define _LOCALDEF_BOOTSTRAP_XLOCALE_PRIVATE_H +/* + * Avoid pulling in anything from the real xlocale_private.h. + * Unfortunately, we can't simply add a local xlocale_private.h to include + * it instead of the real file, since xlocale_private.h is included with double + * quotes from the same directory and therefore the real file will be selected. + */ +#define _XLOCALE_PRIVATE__H_ + +typedef struct _localedef_bootstrap_xlocale* localedef_bootstrap_locale_t; +struct localedef_bootstrap_xlocale_component { + char unused; +}; + +#endif /* _LOCALDEF_BOOTSTRAP_XLOCALE_PRIVATE_H */ Added: head/usr.bin/localedef/bootstrap/collate.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/localedef/bootstrap/collate.h Wed Jul 15 12:07:59 2020 (r363218) @@ -0,0 +1,40 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ +#include "namespace.h" +#include "../../../lib/libc/locale/collate.h" +#include "un-namespace.h" Added: head/usr.bin/localedef/bootstrap/ctype.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/localedef/bootstrap/ctype.h Wed Jul 15 12:07:59 2020 (r363218) @@ -0,0 +1,58 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ +#pragma once +#include +#include_next + +/* + * On macOS isxdigit(), etc are defined in _ctype.h, but we have to include the + * target _ctype.h so that localedef uses the correct values. + * To fix macOS bootstrap, provide a declaration of isxdigit(), etc. here. + * However, only do so if they are not already define as a macro (as is the + * case on Linux). + */ +#ifndef isxdigit +__BEGIN_DECLS +int isalpha(int); +int isascii(int); +int isdigit(int); +int isgraph(int); +int islower(int); +int isxdigit(int); +__END_DECLS +#endif Added: head/usr.bin/localedef/bootstrap/limits.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/localedef/bootstrap/limits.h Wed Jul 15 12:07:59 2020 (r363218) @@ -0,0 +1,48 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ +#include_next + +#ifndef COLL_WEIGHTS_MAX +#error "COLL_WEIGHTS_MAX missing" +#endif + +#if COLL_WEIGHTS_MAX != 10 +#pragma message("Changing value of COLL_WEIGHTS_MAX") +#undef COLL_WEIGHTS_MAX +#define COLL_WEIGHTS_MAX 10 +#endif Added: head/usr.bin/localedef/bootstrap/lmessages.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/localedef/bootstrap/lmessages.h Wed Jul 15 12:07:59 2020 (r363218) @@ -0,0 +1,41 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ +#include "namespace.h" +#define lc_messages_T localedef_bootstrap_lc_messages_T +#include "../../../lib/libc/locale/lmessages.h" +#include "un-namespace.h" Added: head/usr.bin/localedef/bootstrap/lmonetary.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/localedef/bootstrap/lmonetary.h Wed Jul 15 12:07:59 2020 (r363218) @@ -0,0 +1,41 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ +#include "namespace.h" +#define lc_numeric_T localedef_bootstrap_lc_numeric_T +#include "../../../lib/libc/locale/lmonetary.h" +#include "un-namespace.h" Added: head/usr.bin/localedef/bootstrap/lnumeric.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/localedef/bootstrap/lnumeric.h Wed Jul 15 12:07:59 2020 (r363218) @@ -0,0 +1,41 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ +#include "namespace.h" +#define lc_monetary_T localedef_bootstrap_lc_monetary_T +#include "../../../lib/libc/locale/lnumeric.h" +#include "un-namespace.h" Added: head/usr.bin/localedef/bootstrap/namespace.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/localedef/bootstrap/namespace.h Wed Jul 15 12:07:59 2020 (r363218) @@ -0,0 +1,44 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ +#include "bootstrap_xlocale_private.h" + +#define locale_t localedef_bootstrap_locale_t +#define xlocale_collate localedef_bootstrap_xlocale_collate +#define xlocale_component localedef_bootstrap_xlocale_component +#define xlocale_monetary localedef_bootstrap_xlocale_monetary +#define xlocale_numeric localedef_bootstrap_xlocale_numeric Added: head/usr.bin/localedef/bootstrap/timelocal.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/localedef/bootstrap/timelocal.h Wed Jul 15 12:07:59 2020 (r363218) @@ -0,0 +1,41 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ +#include "namespace.h" +#define lc_time_T localedef_bootstrap_lc_time_T +#include "../../../lib/libc/stdtime/timelocal.h" +#include "un-namespace.h" Added: head/usr.bin/localedef/bootstrap/un-namespace.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/localedef/bootstrap/un-namespace.h Wed Jul 15 12:07:59 2020 (r363218) @@ -0,0 +1,42 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ +#undef locale_t +#undef xlocale_collate +#undef xlocale_component +#undef xlocale_monetary +#undef xlocale_numeric Added: head/usr.bin/localedef/bootstrap/xlocale.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/localedef/bootstrap/xlocale.h Wed Jul 15 12:07:59 2020 (r363218) @@ -0,0 +1,42 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ +/* + * This header only exists to avoid pulling in the host xlocale.h from + * the libc-internal headers. This is required since newer Linux GLibc no + * longer includes xlocale.h and older versions include an incompatible header. + */ Modified: head/usr.bin/localedef/collate.c ============================================================================== --- head/usr.bin/localedef/collate.c Wed Jul 15 12:07:53 2020 (r363217) +++ head/usr.bin/localedef/collate.c Wed Jul 15 12:07:59 2020 (r363218) @@ -49,6 +49,8 @@ __FBSDID("$FreeBSD$"); #include "parser.h" #include "collate.h" +_Static_assert(COLL_WEIGHTS_MAX == 10, "This code assumes a value of 10"); + /* * Design notes. * Modified: head/usr.bin/localedef/ctype.c ============================================================================== --- head/usr.bin/localedef/ctype.c Wed Jul 15 12:07:53 2020 (r363217) +++ head/usr.bin/localedef/ctype.c Wed Jul 15 12:07:59 2020 (r363218) @@ -43,11 +43,13 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include #include "localedef.h" #include "parser.h" + +/* Always include the defines for the target: */ +#define _DONT_USE_CTYPE_INLINE_ /* Avoid dependencies on runetype.h */ +#include "_ctype.h" #include "runefile.h" From owner-svn-src-head@freebsd.org Wed Jul 15 12:08:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9FD01364737; Wed, 15 Jul 2020 12:08:11 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6GP51dq8z3RNX; Wed, 15 Jul 2020 12:08:09 +0000 (UTC) (envelope-from arichardson@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 89C1716DA7; Wed, 15 Jul 2020 12:08:07 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FC87Ro068796; Wed, 15 Jul 2020 12:08:07 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FC87bp068795; Wed, 15 Jul 2020 12:08:07 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202007151208.06FC87bp068795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Wed, 15 Jul 2020 12:08:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363219 - head/tools/build X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/tools/build X-SVN-Commit-Revision: 363219 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 12:08:12 -0000 Author: arichardson Date: Wed Jul 15 12:08:06 2020 New Revision: 363219 URL: https://svnweb.freebsd.org/changeset/base/363219 Log: Fix BUILD_WITH_STRICT_TMPPATH builds We need dd in $PATH for some of the MK_BOOT code and some tests also use it. Obtained from: CheriBSD Modified: head/tools/build/Makefile Modified: head/tools/build/Makefile ============================================================================== --- head/tools/build/Makefile Wed Jul 15 12:07:59 2020 (r363218) +++ head/tools/build/Makefile Wed Jul 15 12:08:06 2020 (r363219) @@ -105,7 +105,7 @@ SYSINCS+= ${SRCTOP}/sys/sys/font.h # basic commands: It is fine to use the host version for all of these even on # Linux/MacOS since we only use flags that are supported by all of them. -_host_tools_to_symlink= basename bzip2 bunzip2 chmod chown cmp comm cp date \ +_host_tools_to_symlink= basename bzip2 bunzip2 chmod chown cmp comm cp date dd \ dirname echo env false find fmt gzip gunzip head hostname id ln ls \ mkdir mv nice patch rm realpath sh sleep stat tee touch tr true uname \ uniq wc which From owner-svn-src-head@freebsd.org Wed Jul 15 13:17:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C7906365A4E; Wed, 15 Jul 2020 13:17:21 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6Hwx2fnLz4QQ0; Wed, 15 Jul 2020 13:17:21 +0000 (UTC) (envelope-from vangyzen@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 E4D8D177E3; Wed, 15 Jul 2020 13:17:20 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FDHK5C011668; Wed, 15 Jul 2020 13:17:20 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FDHHsp011647; Wed, 15 Jul 2020 13:17:17 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <202007151317.06FDHHsp011647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Wed, 15 Jul 2020 13:17:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363220 - in head/contrib/ofed: infiniband-diags/src libibumad libibverbs libibverbs/examples libmlx5 librdmacm/examples opensm/opensm X-SVN-Group: head X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: in head/contrib/ofed: infiniband-diags/src libibumad libibverbs libibverbs/examples libmlx5 librdmacm/examples opensm/opensm X-SVN-Commit-Revision: 363220 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 13:17:21 -0000 Author: vangyzen Date: Wed Jul 15 13:17:16 2020 New Revision: 363220 URL: https://svnweb.freebsd.org/changeset/base/363220 Log: Fix Coverity issues in OFED read_ibdiag_config NULL deref read_ibdiag_config mem leak ib_mad_inv_field_str Missing comma in a string array initialization print_node_header NULL deref diff_node_ports copy-paste error ibportstate.c main() missing break in switch set_thresholds NULL ptr deref dump_unicast_tables leaks mapnd umad_cm_attr_str dead code __ibv_close_device close(-1) check return value of listen() mlx5 bitmap.h - bad bit shift - UB get_dst_addr check return value of inet_pton osm_perfmgr_init check return value of cl_spinlock_init osm_port_new memory leak on error path sa_mad_ctrl_rcv_callback missing break in switch case I did not include CID numbers because these were found by an internal run at Isilon. Reviewed by: cem kib MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D25676 Modified: head/contrib/ofed/infiniband-diags/src/ibdiag_common.c head/contrib/ofed/infiniband-diags/src/ibdiag_sa.c head/contrib/ofed/infiniband-diags/src/iblinkinfo.c head/contrib/ofed/infiniband-diags/src/ibportstate.c head/contrib/ofed/infiniband-diags/src/ibqueryerrors.c head/contrib/ofed/infiniband-diags/src/ibroute.c head/contrib/ofed/libibumad/umad_str.c head/contrib/ofed/libibverbs/device.c head/contrib/ofed/libibverbs/examples/rc_pingpong.c head/contrib/ofed/libibverbs/examples/srq_pingpong.c head/contrib/ofed/libibverbs/examples/uc_pingpong.c head/contrib/ofed/libibverbs/examples/ud_pingpong.c head/contrib/ofed/libibverbs/examples/xsrq_pingpong.c head/contrib/ofed/libmlx5/bitmap.h head/contrib/ofed/librdmacm/examples/mckey.c head/contrib/ofed/opensm/opensm/osm_perfmgr.c head/contrib/ofed/opensm/opensm/osm_port.c head/contrib/ofed/opensm/opensm/osm_sa_mad_ctrl.c Modified: head/contrib/ofed/infiniband-diags/src/ibdiag_common.c ============================================================================== --- head/contrib/ofed/infiniband-diags/src/ibdiag_common.c Wed Jul 15 12:08:06 2020 (r363219) +++ head/contrib/ofed/infiniband-diags/src/ibdiag_common.c Wed Jul 15 13:17:16 2020 (r363220) @@ -120,6 +120,7 @@ static inline int val_str_true(const char *val_str) void read_ibdiag_config(const char *file) { char buf[1024]; + char orig_buf[1024]; FILE *config_fd = NULL; char *p_prefix, *p_last; char *name; @@ -142,8 +143,14 @@ void read_ibdiag_config(const char *file) if (*p_prefix == '#') continue; /* ignore comment lines */ + strlcpy(orig_buf, buf, sizeof(orig_buf)); name = strtok_r(p_prefix, "=", &p_last); val_str = strtok_r(NULL, "\n", &p_last); + if (!name || !val_str) { + fprintf(stderr, "%s: malformed line in \"%s\":\n%s\n", + prog_name, file, orig_buf); + continue; + } if (strncmp(name, "CA", strlen("CA")) == 0) { free(ibd_ca); @@ -165,6 +172,7 @@ void read_ibdiag_config(const char *file) ibd_sakey = strtoull(val_str, 0, 0); } else if (strncmp(name, "nd_format", strlen("nd_format")) == 0) { + free(ibd_nd_format); ibd_nd_format = strdup(val_str); } } Modified: head/contrib/ofed/infiniband-diags/src/ibdiag_sa.c ============================================================================== --- head/contrib/ofed/infiniband-diags/src/ibdiag_sa.c Wed Jul 15 12:08:06 2020 (r363219) +++ head/contrib/ofed/infiniband-diags/src/ibdiag_sa.c Wed Jul 15 13:17:16 2020 (r363220) @@ -222,7 +222,7 @@ static const char *ib_mad_inv_field_str[] = { "MAD Reserved", "MAD Reserved", "MAD Reserved", - "MAD Invalid value in Attribute field(s) or Attribute Modifier" + "MAD Invalid value in Attribute field(s) or Attribute Modifier", "MAD UNKNOWN ERROR" }; #define MAD_ERR_UNKNOWN (ARR_SIZE(ib_mad_inv_field_str) - 1) Modified: head/contrib/ofed/infiniband-diags/src/iblinkinfo.c ============================================================================== --- head/contrib/ofed/infiniband-diags/src/iblinkinfo.c Wed Jul 15 12:08:06 2020 (r363219) +++ head/contrib/ofed/infiniband-diags/src/iblinkinfo.c Wed Jul 15 13:17:16 2020 (r363220) @@ -293,7 +293,8 @@ void print_node_header(ibnd_node_t *node, int *out_hea printf("%s%s: %s:\n", out_prefix ? out_prefix : "", nodetype_str(node), remap); - (*out_header_flag)++; + if (out_header_flag) + (*out_header_flag)++; free(remap); } } @@ -397,7 +398,7 @@ void diff_node_ports(ibnd_node_t * fabric1_node, ibnd_ } if (output_diff && fabric2_port) { - print_node_header(fabric1_node, + print_node_header(fabric2_node, head_print, NULL); print_port(fabric2_node, Modified: head/contrib/ofed/infiniband-diags/src/ibportstate.c ============================================================================== --- head/contrib/ofed/infiniband-diags/src/ibportstate.c Wed Jul 15 12:08:06 2020 (r363219) +++ head/contrib/ofed/infiniband-diags/src/ibportstate.c Wed Jul 15 13:17:16 2020 (r363220) @@ -564,6 +564,7 @@ int main(int argc, char **argv) printf("Port is already in enable state\n"); goto close_port; } + /* FALLTHROUGH */ case ENABLE: case RESET: /* Polling */ Modified: head/contrib/ofed/infiniband-diags/src/ibqueryerrors.c ============================================================================== --- head/contrib/ofed/infiniband-diags/src/ibqueryerrors.c Wed Jul 15 12:08:06 2020 (r363219) +++ head/contrib/ofed/infiniband-diags/src/ibqueryerrors.c Wed Jul 15 13:17:16 2020 (r363220) @@ -130,6 +130,7 @@ static void set_thres(char *name, uint32_t val) static void set_thresholds(char *threshold_file) { char buf[1024]; + char orig_buf[1024]; int val = 0; FILE *thresf = fopen(threshold_file, "r"); char *p_prefix, *p_last; @@ -156,8 +157,14 @@ static void set_thresholds(char *threshold_file) if (*p_prefix == '#') continue; /* ignore comment lines */ + strlcpy(orig_buf, buf, sizeof(orig_buf)); name = strtok_r(p_prefix, "=", &p_last); val_str = strtok_r(NULL, "\n", &p_last); + if (!name || !val_str) { + fprintf(stderr, "malformed line in \"%s\":\n%s\n", + threshold_file, orig_buf); + continue; + } val = strtoul(val_str, NULL, 0); set_thres(name, val); Modified: head/contrib/ofed/infiniband-diags/src/ibroute.c ============================================================================== --- head/contrib/ofed/infiniband-diags/src/ibroute.c Wed Jul 15 12:08:06 2020 (r363219) +++ head/contrib/ofed/infiniband-diags/src/ibroute.c Wed Jul 15 13:17:16 2020 (r363220) @@ -354,6 +354,8 @@ char *dump_unicast_tables(ib_portid_t * portid, int st " (%s):\n", startlid, endlid, portid2str(portid), nodeguid, mapnd); + free(mapnd); + DEBUG("Switch top is 0x%x\n", top); printf(" Lid Out Destination\n"); @@ -390,7 +392,6 @@ char *dump_unicast_tables(ib_portid_t * portid, int st } printf("%d %slids dumped \n", n, dump_all ? "" : "valid "); - free(mapnd); return 0; } Modified: head/contrib/ofed/libibumad/umad_str.c ============================================================================== --- head/contrib/ofed/libibumad/umad_str.c Wed Jul 15 12:08:06 2020 (r363219) +++ head/contrib/ofed/libibumad/umad_str.c Wed Jul 15 13:17:16 2020 (r363220) @@ -246,7 +246,6 @@ static const char * umad_sm_attr_str(__be16 attr_id) default: return (umad_common_attr_str(attr_id)); } - return (""); } static const char * umad_sa_attr_str(__be16 attr_id) @@ -301,7 +300,6 @@ static const char * umad_sa_attr_str(__be16 attr_id) default: return (umad_common_attr_str(attr_id)); } - return (""); } static const char * umad_cm_attr_str(__be16 attr_id) @@ -336,7 +334,6 @@ static const char * umad_cm_attr_str(__be16 attr_id) default: return (umad_common_attr_str(attr_id)); } - return (""); } const char * umad_attribute_str(uint8_t mgmt_class, __be16 attr_id) Modified: head/contrib/ofed/libibverbs/device.c ============================================================================== --- head/contrib/ofed/libibverbs/device.c Wed Jul 15 12:08:06 2020 (r363219) +++ head/contrib/ofed/libibverbs/device.c Wed Jul 15 13:17:16 2020 (r363220) @@ -264,7 +264,6 @@ int __ibv_close_device(struct ibv_context *context) { int async_fd = context->async_fd; int cmd_fd = context->cmd_fd; - int cq_fd = -1; struct verbs_context *context_ex; struct verbs_device *verbs_device = verbs_get_device(context->device); @@ -279,8 +278,6 @@ int __ibv_close_device(struct ibv_context *context) close(async_fd); close(cmd_fd); - if (abi_ver <= 2) - close(cq_fd); return 0; } Modified: head/contrib/ofed/libibverbs/examples/rc_pingpong.c ============================================================================== --- head/contrib/ofed/libibverbs/examples/rc_pingpong.c Wed Jul 15 12:08:06 2020 (r363219) +++ head/contrib/ofed/libibverbs/examples/rc_pingpong.c Wed Jul 15 13:17:16 2020 (r363220) @@ -273,7 +273,11 @@ static struct pingpong_dest *pp_server_exch_dest(struc return NULL; } - listen(sockfd, 1); + if (listen(sockfd, 1)) { + perror("listen() failed"); + close(sockfd); + return NULL; + } connfd = accept(sockfd, NULL, NULL); close(sockfd); if (connfd < 0) { Modified: head/contrib/ofed/libibverbs/examples/srq_pingpong.c ============================================================================== --- head/contrib/ofed/libibverbs/examples/srq_pingpong.c Wed Jul 15 12:08:06 2020 (r363219) +++ head/contrib/ofed/libibverbs/examples/srq_pingpong.c Wed Jul 15 13:17:16 2020 (r363220) @@ -283,7 +283,11 @@ static struct pingpong_dest *pp_server_exch_dest(struc return NULL; } - listen(sockfd, 1); + if (listen(sockfd, 1)) { + perror("listen() failed"); + close(sockfd); + return NULL; + } connfd = accept(sockfd, NULL, NULL); close(sockfd); if (connfd < 0) { Modified: head/contrib/ofed/libibverbs/examples/uc_pingpong.c ============================================================================== --- head/contrib/ofed/libibverbs/examples/uc_pingpong.c Wed Jul 15 12:08:06 2020 (r363219) +++ head/contrib/ofed/libibverbs/examples/uc_pingpong.c Wed Jul 15 13:17:16 2020 (r363220) @@ -247,7 +247,11 @@ static struct pingpong_dest *pp_server_exch_dest(struc return NULL; } - listen(sockfd, 1); + if (listen(sockfd, 1)) { + perror("listen() failed"); + close(sockfd); + return NULL; + } connfd = accept(sockfd, NULL, NULL); close(sockfd); if (connfd < 0) { Modified: head/contrib/ofed/libibverbs/examples/ud_pingpong.c ============================================================================== --- head/contrib/ofed/libibverbs/examples/ud_pingpong.c Wed Jul 15 12:08:06 2020 (r363219) +++ head/contrib/ofed/libibverbs/examples/ud_pingpong.c Wed Jul 15 13:17:16 2020 (r363220) @@ -245,7 +245,11 @@ static struct pingpong_dest *pp_server_exch_dest(struc return NULL; } - listen(sockfd, 1); + if (listen(sockfd, 1)) { + perror("listen() failed"); + close(sockfd); + return NULL; + } connfd = accept(sockfd, NULL, NULL); close(sockfd); if (connfd < 0) { Modified: head/contrib/ofed/libibverbs/examples/xsrq_pingpong.c ============================================================================== --- head/contrib/ofed/libibverbs/examples/xsrq_pingpong.c Wed Jul 15 12:08:06 2020 (r363219) +++ head/contrib/ofed/libibverbs/examples/xsrq_pingpong.c Wed Jul 15 13:17:16 2020 (r363220) @@ -630,7 +630,11 @@ static int pp_server_connect(int port) return 1; } - listen(sockfd, ctx.num_clients); + if (listen(sockfd, ctx.num_clients)) { + perror("listen() failed"); + close(sockfd); + return 1; + } for (i = 0; i < ctx.num_clients; i++) { connfd = accept(sockfd, NULL, NULL); Modified: head/contrib/ofed/libmlx5/bitmap.h ============================================================================== --- head/contrib/ofed/libmlx5/bitmap.h Wed Jul 15 12:08:06 2020 (r363219) +++ head/contrib/ofed/libmlx5/bitmap.h Wed Jul 15 13:17:16 2020 (r363220) @@ -95,17 +95,17 @@ found: static inline void mlx5_set_bit(unsigned int nr, unsigned long *addr) { - addr[(nr / BITS_PER_LONG)] |= (1 << (nr % BITS_PER_LONG)); + addr[(nr / BITS_PER_LONG)] |= (1UL << (nr % BITS_PER_LONG)); } -static inline void mlx5_clear_bit(unsigned int nr, unsigned long *addr) +static inline void mlx5_clear_bit(unsigned int nr, unsigned long *addr) { - addr[(nr / BITS_PER_LONG)] &= ~(1 << (nr % BITS_PER_LONG)); + addr[(nr / BITS_PER_LONG)] &= ~(1UL << (nr % BITS_PER_LONG)); } static inline int mlx5_test_bit(unsigned int nr, const unsigned long *addr) { - return !!(addr[(nr / BITS_PER_LONG)] & (1 << (nr % BITS_PER_LONG))); + return !!(addr[(nr / BITS_PER_LONG)] & (1UL << (nr % BITS_PER_LONG))); } #endif Modified: head/contrib/ofed/librdmacm/examples/mckey.c ============================================================================== --- head/contrib/ofed/librdmacm/examples/mckey.c Wed Jul 15 12:08:06 2020 (r363219) +++ head/contrib/ofed/librdmacm/examples/mckey.c Wed Jul 15 13:17:16 2020 (r363220) @@ -469,8 +469,7 @@ static int get_dst_addr(char *dst, struct sockaddr *ad sib = (struct sockaddr_ib *) addr; memset(sib, 0, sizeof *sib); sib->sib_family = AF_IB; - inet_pton(AF_INET6, dst, &sib->sib_addr); - return 0; + return inet_pton(AF_INET6, dst, &sib->sib_addr) != 1; } static int run(void) Modified: head/contrib/ofed/opensm/opensm/osm_perfmgr.c ============================================================================== --- head/contrib/ofed/opensm/opensm/osm_perfmgr.c Wed Jul 15 12:08:06 2020 (r363219) +++ head/contrib/ofed/opensm/opensm/osm_perfmgr.c Wed Jul 15 13:17:16 2020 (r363220) @@ -1935,7 +1935,9 @@ ib_api_status_t osm_perfmgr_init(osm_perfmgr_t * pm, o pm->state = p_opt->perfmgr ? PERFMGR_STATE_ENABLED : PERFMGR_STATE_DISABLE; pm->sweep_state = PERFMGR_SWEEP_SLEEP; - cl_spinlock_init(&pm->lock); + status = cl_spinlock_init(&pm->lock); + if (status != IB_SUCCESS) + goto Exit; pm->sweep_time_s = p_opt->perfmgr_sweep_time_s; pm->max_outstanding_queries = p_opt->perfmgr_max_outstanding_queries; pm->ignore_cas = p_opt->perfmgr_ignore_cas; Modified: head/contrib/ofed/opensm/opensm/osm_port.c ============================================================================== --- head/contrib/ofed/opensm/opensm/osm_port.c Wed Jul 15 12:08:06 2020 (r363219) +++ head/contrib/ofed/opensm/opensm/osm_port.c Wed Jul 15 13:17:16 2020 (r363220) @@ -161,8 +161,10 @@ osm_port_t *osm_port_new(IN const ib_node_info_t * p_n only the singular part that has this GUID is owned. */ p_physp = osm_node_get_physp_ptr(p_parent_node, port_num); - if (!p_physp) + if (!p_physp) { + osm_port_delete(&p_port); return NULL; + } CL_ASSERT(port_guid == osm_physp_get_port_guid(p_physp)); p_port->p_physp = p_physp; Modified: head/contrib/ofed/opensm/opensm/osm_sa_mad_ctrl.c ============================================================================== --- head/contrib/ofed/opensm/opensm/osm_sa_mad_ctrl.c Wed Jul 15 12:08:06 2020 (r363219) +++ head/contrib/ofed/opensm/opensm/osm_sa_mad_ctrl.c Wed Jul 15 13:17:16 2020 (r363220) @@ -373,6 +373,7 @@ static void sa_mad_ctrl_rcv_callback(IN osm_madw_t * p case IB_MAD_METHOD_GETMULTI: #endif is_get_request = TRUE; + /* FALLTHROUGH */ case IB_MAD_METHOD_SET: case IB_MAD_METHOD_DELETE: /* if we are closing down simply do nothing */ From owner-svn-src-head@freebsd.org Wed Jul 15 13:26:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E335E365BF0; Wed, 15 Jul 2020 13:26:17 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6J7F2rQKz4g3j; Wed, 15 Jul 2020 13:26:17 +0000 (UTC) (envelope-from vangyzen@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 85E0517E80; Wed, 15 Jul 2020 13:26:16 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FDQGCY017663; Wed, 15 Jul 2020 13:26:16 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FDQFmN017658; Wed, 15 Jul 2020 13:26:15 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <202007151326.06FDQFmN017658@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Wed, 15 Jul 2020 13:26:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363221 - head/contrib/ofed/libibverbs/examples X-SVN-Group: head X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: head/contrib/ofed/libibverbs/examples X-SVN-Commit-Revision: 363221 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 13:26:18 -0000 Author: vangyzen Date: Wed Jul 15 13:26:15 2020 New Revision: 363221 URL: https://svnweb.freebsd.org/changeset/base/363221 Log: Fix style in r363220 Apply the style change Kostik suggested in the review. Reported by: kib MFC after: 2 weeks X-MFC with: r363220 Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D25676 Modified: head/contrib/ofed/libibverbs/examples/rc_pingpong.c head/contrib/ofed/libibverbs/examples/srq_pingpong.c head/contrib/ofed/libibverbs/examples/uc_pingpong.c head/contrib/ofed/libibverbs/examples/ud_pingpong.c head/contrib/ofed/libibverbs/examples/xsrq_pingpong.c Modified: head/contrib/ofed/libibverbs/examples/rc_pingpong.c ============================================================================== --- head/contrib/ofed/libibverbs/examples/rc_pingpong.c Wed Jul 15 13:17:16 2020 (r363220) +++ head/contrib/ofed/libibverbs/examples/rc_pingpong.c Wed Jul 15 13:26:15 2020 (r363221) @@ -273,7 +273,7 @@ static struct pingpong_dest *pp_server_exch_dest(struc return NULL; } - if (listen(sockfd, 1)) { + if (listen(sockfd, 1) < 0) { perror("listen() failed"); close(sockfd); return NULL; Modified: head/contrib/ofed/libibverbs/examples/srq_pingpong.c ============================================================================== --- head/contrib/ofed/libibverbs/examples/srq_pingpong.c Wed Jul 15 13:17:16 2020 (r363220) +++ head/contrib/ofed/libibverbs/examples/srq_pingpong.c Wed Jul 15 13:26:15 2020 (r363221) @@ -283,7 +283,7 @@ static struct pingpong_dest *pp_server_exch_dest(struc return NULL; } - if (listen(sockfd, 1)) { + if (listen(sockfd, 1) < 0) { perror("listen() failed"); close(sockfd); return NULL; Modified: head/contrib/ofed/libibverbs/examples/uc_pingpong.c ============================================================================== --- head/contrib/ofed/libibverbs/examples/uc_pingpong.c Wed Jul 15 13:17:16 2020 (r363220) +++ head/contrib/ofed/libibverbs/examples/uc_pingpong.c Wed Jul 15 13:26:15 2020 (r363221) @@ -247,7 +247,7 @@ static struct pingpong_dest *pp_server_exch_dest(struc return NULL; } - if (listen(sockfd, 1)) { + if (listen(sockfd, 1) < 0) { perror("listen() failed"); close(sockfd); return NULL; Modified: head/contrib/ofed/libibverbs/examples/ud_pingpong.c ============================================================================== --- head/contrib/ofed/libibverbs/examples/ud_pingpong.c Wed Jul 15 13:17:16 2020 (r363220) +++ head/contrib/ofed/libibverbs/examples/ud_pingpong.c Wed Jul 15 13:26:15 2020 (r363221) @@ -245,7 +245,7 @@ static struct pingpong_dest *pp_server_exch_dest(struc return NULL; } - if (listen(sockfd, 1)) { + if (listen(sockfd, 1) < 0) { perror("listen() failed"); close(sockfd); return NULL; Modified: head/contrib/ofed/libibverbs/examples/xsrq_pingpong.c ============================================================================== --- head/contrib/ofed/libibverbs/examples/xsrq_pingpong.c Wed Jul 15 13:17:16 2020 (r363220) +++ head/contrib/ofed/libibverbs/examples/xsrq_pingpong.c Wed Jul 15 13:26:15 2020 (r363221) @@ -630,7 +630,7 @@ static int pp_server_connect(int port) return 1; } - if (listen(sockfd, ctx.num_clients)) { + if (listen(sockfd, ctx.num_clients) < 0) { perror("listen() failed"); close(sockfd); return 1; From owner-svn-src-head@freebsd.org Wed Jul 15 13:43:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B419366571; Wed, 15 Jul 2020 13:43:50 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6JWT4d6Pz44VS; Wed, 15 Jul 2020 13:43:49 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 53F38180F0; Wed, 15 Jul 2020 13:43:49 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FDhnaL030217; Wed, 15 Jul 2020 13:43:49 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FDhnEo030216; Wed, 15 Jul 2020 13:43:49 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <202007151343.06FDhnEo030216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Wed, 15 Jul 2020 13:43:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363222 - head/sys/powerpc/aim X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/powerpc/aim X-SVN-Commit-Revision: 363222 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 13:43:51 -0000 Author: luporl Date: Wed Jul 15 13:43:48 2020 New Revision: 363222 URL: https://svnweb.freebsd.org/changeset/base/363222 Log: [PowerPC] Use PVO_PADDR to get the PA from PVO Use PVO_PADDR macro to get the physical address from a PVO, instead of explicitly ANDing pvo_pte.pa with LPTE_RPGN where it is needed. Besides improving readability, this is needed to support superpages (D25237), where the steps to get the PA from a PVO are different. Reviewed by: markj Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D25654 Modified: head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Wed Jul 15 13:26:15 2020 (r363221) +++ head/sys/powerpc/aim/mmu_oea64.c Wed Jul 15 13:43:48 2020 (r363222) @@ -108,6 +108,9 @@ uintptr_t moea64_get_unique_vsid(void); #define VSID_TO_HASH(vsid) (((vsid) >> 4) & 0xfffff) #define VSID_HASH_MASK 0x0000007fffffffffULL +/* Get physical address from PVO. */ +#define PVO_PADDR(pvo) ((pvo)->pvo_pte.pa & LPTE_RPGN) + /* * Locking semantics: * @@ -1207,7 +1210,7 @@ moea64_unwire(pmap_t pm, vm_offset_t sva, vm_offset_t (pvo->pvo_pte.prot & VM_PROT_WRITE)) { if (refchg < 0) refchg = LPTE_CHG; - m = PHYS_TO_VM_PAGE(pvo->pvo_pte.pa & LPTE_RPGN); + m = PHYS_TO_VM_PAGE(PVO_PADDR(pvo)); refchg |= atomic_readandclear_32(&m->md.mdpg_attrs); if (refchg & LPTE_CHG) @@ -1615,7 +1618,7 @@ moea64_extract(pmap_t pm, vm_offset_t va) if (pvo == NULL) pa = 0; else - pa = (pvo->pvo_pte.pa & LPTE_RPGN) | (va - PVO_VADDR(pvo)); + pa = PVO_PADDR(pvo) | (va - PVO_VADDR(pvo)); PMAP_UNLOCK(pm); return (pa); @@ -1636,7 +1639,7 @@ moea64_extract_and_hold(pmap_t pmap, vm_offset_t va, v PMAP_LOCK(pmap); pvo = moea64_pvo_find_va(pmap, va & ~ADDR_POFF); if (pvo != NULL && (pvo->pvo_pte.prot & prot) == prot) { - m = PHYS_TO_VM_PAGE(pvo->pvo_pte.pa & LPTE_RPGN); + m = PHYS_TO_VM_PAGE(PVO_PADDR(pvo)); if (!vm_page_wire_mapped(m)) m = NULL; } @@ -1943,7 +1946,7 @@ moea64_kextract(vm_offset_t va) pvo = moea64_pvo_find_va(kernel_pmap, va); KASSERT(pvo != NULL, ("moea64_kextract: no addr found for %#" PRIxPTR, va)); - pa = (pvo->pvo_pte.pa & LPTE_RPGN) | (va - PVO_VADDR(pvo)); + pa = PVO_PADDR(pvo) | (va - PVO_VADDR(pvo)); PMAP_UNLOCK(kernel_pmap); return (pa); } @@ -2269,7 +2272,7 @@ moea64_pvo_protect( pmap_t pm, struct pvo_entry *pvo, */ oldprot = pvo->pvo_pte.prot; pvo->pvo_pte.prot = prot; - pg = PHYS_TO_VM_PAGE(pvo->pvo_pte.pa & LPTE_RPGN); + pg = PHYS_TO_VM_PAGE(PVO_PADDR(pvo)); /* * If the PVO is in the page table, update mapping @@ -2284,7 +2287,7 @@ moea64_pvo_protect( pmap_t pm, struct pvo_entry *pvo, if ((pg->oflags & VPO_UNMANAGED) == 0) vm_page_aflag_set(pg, PGA_EXECUTABLE); moea64_syncicache(pm, PVO_VADDR(pvo), - pvo->pvo_pte.pa & LPTE_RPGN, PAGE_SIZE); + PVO_PADDR(pvo), PAGE_SIZE); } /* @@ -2648,7 +2651,7 @@ moea64_pvo_remove_from_pmap(struct pvo_entry *pvo) /* Send RC bits to VM */ if ((pvo->pvo_vaddr & PVO_MANAGED) && (pvo->pvo_pte.prot & VM_PROT_WRITE)) { - pg = PHYS_TO_VM_PAGE(pvo->pvo_pte.pa & LPTE_RPGN); + pg = PHYS_TO_VM_PAGE(PVO_PADDR(pvo)); if (pg != NULL) { refchg |= atomic_readandclear_32(&pg->md.mdpg_attrs); if (refchg & LPTE_CHG) @@ -2674,7 +2677,7 @@ moea64_pvo_remove_from_page_locked(struct pvo_entry *p /* * Update vm about page writeability/executability if managed */ - PV_LOCKASSERT(pvo->pvo_pte.pa & LPTE_RPGN); + PV_LOCKASSERT(PVO_PADDR(pvo)); if (pvo->pvo_vaddr & PVO_MANAGED) { if (m != NULL) { LIST_REMOVE(pvo, pvo_vlink); @@ -2694,11 +2697,11 @@ moea64_pvo_remove_from_page(struct pvo_entry *pvo) vm_page_t pg = NULL; if (pvo->pvo_vaddr & PVO_MANAGED) - pg = PHYS_TO_VM_PAGE(pvo->pvo_pte.pa & LPTE_RPGN); + pg = PHYS_TO_VM_PAGE(PVO_PADDR(pvo)); - PV_LOCK(pvo->pvo_pte.pa & LPTE_RPGN); + PV_LOCK(PVO_PADDR(pvo)); moea64_pvo_remove_from_page_locked(pvo, pg); - PV_UNLOCK(pvo->pvo_pte.pa & LPTE_RPGN); + PV_UNLOCK(PVO_PADDR(pvo)); } static struct pvo_entry * @@ -2810,7 +2813,7 @@ moea64_dev_direct_mapped(vm_paddr_t pa, vm_size_t size for (pvo = RB_FIND(pvo_tree, &kernel_pmap->pmap_pvo, &key); ppa < pa + size; ppa += PAGE_SIZE, pvo = RB_NEXT(pvo_tree, &kernel_pmap->pmap_pvo, pvo)) { - if (pvo == NULL || (pvo->pvo_pte.pa & LPTE_RPGN) != ppa) { + if (pvo == NULL || PVO_PADDR(pvo) != ppa) { error = EFAULT; break; } @@ -2886,7 +2889,7 @@ moea64_sync_icache(pmap_t pm, vm_offset_t va, vm_size_ len = MIN(lim - va, sz); pvo = moea64_pvo_find_va(pm, va & ~ADDR_POFF); if (pvo != NULL && !(pvo->pvo_pte.pa & LPTE_I)) { - pa = (pvo->pvo_pte.pa & LPTE_RPGN) | (va & ADDR_POFF); + pa = PVO_PADDR(pvo) | (va & ADDR_POFF); moea64_syncicache(pm, va, pa, len); } va += len; @@ -3005,7 +3008,7 @@ moea64_scan_pmap() } } - pa = pvo->pvo_pte.pa & LPTE_RPGN; + pa = PVO_PADDR(pvo); if (va & PVO_LARGE) { pa_end = pa + lpsize; From owner-svn-src-head@freebsd.org Wed Jul 15 14:27:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5FAA3367653; Wed, 15 Jul 2020 14:27:24 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6KTl6BB5z47s4; Wed, 15 Jul 2020 14:27:23 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95C66184D0; Wed, 15 Jul 2020 14:27:23 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FERN5n055237; Wed, 15 Jul 2020 14:27:23 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FERNPK055236; Wed, 15 Jul 2020 14:27:23 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202007151427.06FERNPK055236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Wed, 15 Jul 2020 14:27:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363223 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 363223 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 14:27:24 -0000 Author: allanjude Date: Wed Jul 15 14:27:23 2020 New Revision: 363223 URL: https://svnweb.freebsd.org/changeset/base/363223 Log: vlan(4): Minor grammar corrections Note: date not bumped because "content" was not changed, just inserted some missing words. PR: 248001 Submitted by: Jose Luis Duran MFC after: 2 weeks Sponsored by: Klara Inc. Modified: head/share/man/man4/vxlan.4 Modified: head/share/man/man4/vxlan.4 ============================================================================== --- head/share/man/man4/vxlan.4 Wed Jul 15 13:43:48 2020 (r363222) +++ head/share/man/man4/vxlan.4 Wed Jul 15 14:27:23 2020 (r363223) @@ -80,7 +80,7 @@ The driver creates a pseudo Ethernet network interface that supports the usual network .Xr ioctl 2 Ns s -and is thus can be used with +and thus can be used with .Xr ifconfig 8 like any other Ethernet interface. The @@ -89,7 +89,7 @@ interface encapsulates the Ethernet frame by prepending IP/UDP and .Nm headers. -Thus, the encapsulated (inner) frame is able to transmitted +Thus, the encapsulated (inner) frame is able to be transmitted over a routed, Layer 3 network to the remote host. .Pp The @@ -102,7 +102,7 @@ When in multicast mode, the interface joins an IP multicast group, and receives packets sent to the group address, and transmits packets to either the multicast group address, -or directly the remote host if there is an appropriate +or directly to the remote host if there is an appropriate forwarding table entry. .Pp When the @@ -155,7 +155,7 @@ The maximum number of entries in the table is configur .Xr ifconfig 8 .Cm vxlanmaxaddr command. -Stale entries in the table periodically pruned. +Stale entries in the table are periodically pruned. The timeout is configurable with the .Xr ifconfig 8 .Cm vxlantimeout From owner-svn-src-head@freebsd.org Wed Jul 15 14:38:16 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D673C368207; Wed, 15 Jul 2020 14:38:16 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6KkJ4rTGz4R6Q; Wed, 15 Jul 2020 14:38:16 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 416E8188C3; Wed, 15 Jul 2020 14:38:16 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FEcF4e061139; Wed, 15 Jul 2020 14:38:15 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FEcFxo061138; Wed, 15 Jul 2020 14:38:15 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202007151438.06FEcFxo061138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Wed, 15 Jul 2020 14:38:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363224 - head/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/cmd/zpool X-SVN-Commit-Revision: 363224 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 14:38:17 -0000 Author: allanjude Date: Wed Jul 15 14:38:15 2020 New Revision: 363224 URL: https://svnweb.freebsd.org/changeset/base/363224 Log: zpool-features(7): Note that the boot loader has support for large_blocks Since r304321 (-current: Aug 18, 2016) and r328866 (stable/11: Feb 5, 2018) the FreeBSD loader has supported reading from datasets with the large_blocks feature active. PR: 247992 Reported by: Anton Saietskii MFC after: 2 weeks Sponsored by: Klara Inc. Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Wed Jul 15 14:27:23 2020 (r363223) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Wed Jul 15 14:38:15 2020 (r363224) @@ -521,10 +521,9 @@ property has been set larger than 128KB, and will retu once all filesystems that have ever had their recordsize larger than 128KB are destroyed. .Pp -Please note that booting from datasets that have recordsize greater than -128KB is -.Em NOT -supported by the +Booting from datasets that use the +.Sy large_block +feature is supported by the .Fx boot loader. .It Sy large_dnode From owner-svn-src-head@freebsd.org Wed Jul 15 15:35:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3ED5F3694E8; Wed, 15 Jul 2020 15:35:28 +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 4B6M0H6wFPz4S04; Wed, 15 Jul 2020 15:35:27 +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 2B3B6194AC; Wed, 15 Jul 2020 15:35:27 +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 06FFZQ15098039; Wed, 15 Jul 2020 15:35:26 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FFZQLO098037; Wed, 15 Jul 2020 15:35:26 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202007151535.06FFZQLO098037@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 15 Jul 2020 15:35:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363225 - head/crypto/openssh X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/crypto/openssh X-SVN-Commit-Revision: 363225 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 15:35:28 -0000 Author: emaste Date: Wed Jul 15 15:35:26 2020 New Revision: 363225 URL: https://svnweb.freebsd.org/changeset/base/363225 Log: openssh: refer to OpenSSL not SSLeay This change was made upstream between 7.9p1 and 8.0p1. We've made local changes in the same places for handling the version_addendum; apply the SSLeay_version to OpenSSL_version change in advance of importing 8.0p1. Obtained from: OpenSSH-portable a65784c9f9c5 Sponsored by: The FreeBSD Foundation Modified: head/crypto/openssh/sshd.c head/crypto/openssh/version.h Modified: head/crypto/openssh/sshd.c ============================================================================== --- head/crypto/openssh/sshd.c Wed Jul 15 14:38:15 2020 (r363224) +++ head/crypto/openssh/sshd.c Wed Jul 15 15:35:26 2020 (r363225) @@ -1749,7 +1749,7 @@ main(int ac, char **av) debug("sshd version %s, %s", SSH_VERSION, #ifdef WITH_OPENSSL - SSLeay_version(SSLEAY_VERSION) + OpenSSL_version(SSLEAY_VERSION) #else "without OpenSSL" #endif Modified: head/crypto/openssh/version.h ============================================================================== --- head/crypto/openssh/version.h Wed Jul 15 14:38:15 2020 (r363224) +++ head/crypto/openssh/version.h Wed Jul 15 15:35:26 2020 (r363225) @@ -9,7 +9,7 @@ #define SSH_VERSION_FREEBSD "FreeBSD-20200214" #ifdef WITH_OPENSSL -#define OPENSSL_VERSION_STRING SSLeay_version(SSLEAY_VERSION) +#define OPENSSL_VERSION_STRING OpenSSL_version(SSLEAY_VERSION) #else #define OPENSSL_VERSION_STRING "without OpenSSL" #endif From owner-svn-src-head@freebsd.org Wed Jul 15 16:12:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0ABB36A074; Wed, 15 Jul 2020 16:12:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6MpV67g3z49mt; Wed, 15 Jul 2020 16:12:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E524719B3A; Wed, 15 Jul 2020 16:12:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FGC1jF019874; Wed, 15 Jul 2020 16:12:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FGC18D019873; Wed, 15 Jul 2020 16:12:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202007151612.06FGC18D019873@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 15 Jul 2020 16:12:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363227 - head/sys/i386/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/i386/i386 X-SVN-Commit-Revision: 363227 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 16:12:03 -0000 Author: kib Date: Wed Jul 15 16:12:00 2020 New Revision: 363227 URL: https://svnweb.freebsd.org/changeset/base/363227 Log: Improve description of the vector argument for i386 smp_targeted_tlb_shootdown(). Submitted by: alc MFC after: 20 days Modified: head/sys/i386/i386/mp_machdep.c Modified: head/sys/i386/i386/mp_machdep.c ============================================================================== --- head/sys/i386/i386/mp_machdep.c Wed Jul 15 15:40:46 2020 (r363226) +++ head/sys/i386/i386/mp_machdep.c Wed Jul 15 16:12:00 2020 (r363227) @@ -481,9 +481,10 @@ volatile uint32_t smp_tlb_generation; /* * Used by pmap to request cache or TLB invalidation on local and * remote processors. Mask provides the set of remote CPUs which are - * to be signalled with the invalidation IPI, specified by vector. As - * an optimization, the curcpu_cb callback is invoked on the calling - * CPU while waiting for remote CPUs to complete the operation. + * to be signalled with the invalidation IPI. Vector specifies which + * invalidation IPI is used. As an optimization, the curcpu_cb + * callback is invoked on the calling CPU while waiting for remote + * CPUs to complete the operation. * * The callback function is called unconditionally on the caller's * underlying processor, even when this processor is not set in the From owner-svn-src-head@freebsd.org Wed Jul 15 17:05:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DAFF336B330; Wed, 15 Jul 2020 17:05:39 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6P0M0CjDz4RQP; Wed, 15 Jul 2020 17:05:38 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A29B1A8B7; Wed, 15 Jul 2020 17:05:38 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FH5ceG053878; Wed, 15 Jul 2020 17:05:38 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FH5cjv053877; Wed, 15 Jul 2020 17:05:38 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202007151705.06FH5cjv053877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 15 Jul 2020 17:05:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363228 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 363228 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 17:05:40 -0000 Author: brooks Date: Wed Jul 15 17:05:37 2020 New Revision: 363228 URL: https://svnweb.freebsd.org/changeset/base/363228 Log: Don't imply that all action values can be OR'd. This is neither POSIX compliant nor what the implementation does. This could be allowed by changing the value of TCSAFLUSH from 2 to 3, but that doesn't seem worthwhile after 25+ years. Reviewed by: imp MFC after: 1 week Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25659 Modified: head/lib/libc/gen/tcsetattr.3 Modified: head/lib/libc/gen/tcsetattr.3 ============================================================================== --- head/lib/libc/gen/tcsetattr.3 Wed Jul 15 16:12:00 2020 (r363227) +++ head/lib/libc/gen/tcsetattr.3 Wed Jul 15 17:05:37 2020 (r363228) @@ -28,7 +28,7 @@ .\" @(#)tcsetattr.3 8.3 (Berkeley) 1/2/94 .\" $FreeBSD$ .\" -.Dd January 2, 1994 +.Dd July 15, 2020 .Dt TCSETATTR 3 .Os .Sh NAME @@ -221,8 +221,7 @@ termios structure referenced by .Fa t . The .Fa action -argument is created by -.Em or Ns 'ing +argument is one of the following values, as specified in the include file .In termios.h . .Bl -tag -width "TCSADRAIN" @@ -240,18 +239,20 @@ The change occurs after all output written to .Fa fd has been transmitted to the terminal. Additionally, any input that has been received but not read is discarded. -.It Fa TCSASOFT -If this value is -.Em or Ns 'ed -into the +.El +.Pp +The .Fa action -value, the values of the +may be modified by +.Em or Ns 'ing +in +.Fa TCSASOFT +which causes the values of the .Va c_cflag , .Va c_ispeed , and .Va c_ospeed -fields are ignored. -.El +fields to be ignored. .Pp The 0 baud rate is used to terminate the connection. If 0 is specified as the output speed to the function From owner-svn-src-head@freebsd.org Wed Jul 15 17:24:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4B18936B6E7; Wed, 15 Jul 2020 17:24:37 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6PQD0pj9z3VQX; Wed, 15 Jul 2020 17:24:35 +0000 (UTC) (envelope-from arichardson@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 754361ABA2; Wed, 15 Jul 2020 17:24:35 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FHOZmp066280; Wed, 15 Jul 2020 17:24:35 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FHOZWu066279; Wed, 15 Jul 2020 17:24:35 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202007151724.06FHOZWu066279@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Wed, 15 Jul 2020 17:24:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363229 - head/lib/libmd X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/lib/libmd X-SVN-Commit-Revision: 363229 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 17:24:37 -0000 Author: arichardson Date: Wed Jul 15 17:24:34 2020 New Revision: 363229 URL: https://svnweb.freebsd.org/changeset/base/363229 Log: Remove warning that is no longer accurate after r361853 We now build the skein assembly with clangs integrated assembler. Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D25664 Modified: head/lib/libmd/Makefile Modified: head/lib/libmd/Makefile ============================================================================== --- head/lib/libmd/Makefile Wed Jul 15 17:05:37 2020 (r363228) +++ head/lib/libmd/Makefile Wed Jul 15 17:24:34 2020 (r363229) @@ -121,8 +121,6 @@ CFLAGS+= -DRMD160_ASM ACFLAGS+= -DSKEIN_LOOP=0 SRCS+= skein_block_asm.S CFLAGS+= -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to replace with assembly: 256+512+1024 = 1792 -.else -.warning as not available: not using optimized Skein asm .endif .if exists(${MACHINE_ARCH}/sha.S) || exists(${MACHINE_ARCH}/rmd160.S) || exists(${MACHINE_ARCH}/skein_block_asm.S) ACFLAGS+= -DELF -Wa,--noexecstack From owner-svn-src-head@freebsd.org Wed Jul 15 17:24:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5DB6636B375; Wed, 15 Jul 2020 17:24:42 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6PQK16KHz3VJB; Wed, 15 Jul 2020 17:24:41 +0000 (UTC) (envelope-from arichardson@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 87D021ACA0; Wed, 15 Jul 2020 17:24:40 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FHOe4d066335; Wed, 15 Jul 2020 17:24:40 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FHOebu066332; Wed, 15 Jul 2020 17:24:40 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202007151724.06FHOebu066332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Wed, 15 Jul 2020 17:24:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363230 - head/usr.bin/xinstall X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/usr.bin/xinstall X-SVN-Commit-Revision: 363230 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 17:24:42 -0000 Author: arichardson Date: Wed Jul 15 17:24:39 2020 New Revision: 363230 URL: https://svnweb.freebsd.org/changeset/base/363230 Log: Allow install(1)'s create_tempfile() to work on Linux hosts GLibc expects six 'X' characters in the mkstemp template argument and will return EINVAL otherwise. Reviewed By: emaste, imp, mjg Differential Revision: https://reviews.freebsd.org/D25662 Modified: head/usr.bin/xinstall/install.1 head/usr.bin/xinstall/xinstall.c Modified: head/usr.bin/xinstall/install.1 ============================================================================== --- head/usr.bin/xinstall/install.1 Wed Jul 15 17:24:34 2020 (r363229) +++ head/usr.bin/xinstall/install.1 Wed Jul 15 17:24:39 2020 (r363230) @@ -301,8 +301,8 @@ This is mainly for use in debugging the .Fx Ports Collection. .Sh FILES -.Bl -tag -width "INS@XXXX" -compact -.It Pa INS@XXXX +.Bl -tag -width "INS@XXXXXX" -compact +.It Pa INS@XXXXXX If either .Fl S option is specified, or the @@ -312,9 +312,9 @@ or option is used in conjunction with the .Fl s option, temporary files named -.Pa INS@XXXX , +.Pa INS@XXXXXX , where -.Pa XXXX +.Pa XXXXXX is decided by .Xr mkstemp 3 , are created in the target directory. Modified: head/usr.bin/xinstall/xinstall.c ============================================================================== --- head/usr.bin/xinstall/xinstall.c Wed Jul 15 17:24:34 2020 (r363229) +++ head/usr.bin/xinstall/xinstall.c Wed Jul 15 17:24:39 2020 (r363230) @@ -1161,7 +1161,7 @@ create_tempfile(const char *path, char *temp, size_t t p++; else p = temp; - (void)strncpy(p, "INS@XXXX", &temp[tsize - 1] - p); + (void)strncpy(p, "INS@XXXXXX", &temp[tsize - 1] - p); temp[tsize - 1] = '\0'; return (mkstemp(temp)); } From owner-svn-src-head@freebsd.org Wed Jul 15 18:04:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4578936C145; Wed, 15 Jul 2020 18:04:02 +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 4B6QHk1D5Kz3TMq; Wed, 15 Jul 2020 18:04:02 +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 0E9931B31F; Wed, 15 Jul 2020 18:04:02 +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 06FI41kO091006; Wed, 15 Jul 2020 18:04:01 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FI41cD091005; Wed, 15 Jul 2020 18:04:01 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202007151804.06FI41cD091005@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 15 Jul 2020 18:04:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363232 - head/sys/modules/dtb/allwinner X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/modules/dtb/allwinner X-SVN-Commit-Revision: 363232 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 18:04:02 -0000 Author: avg Date: Wed Jul 15 18:04:01 2020 New Revision: 363232 URL: https://svnweb.freebsd.org/changeset/base/363232 Log: build DTS for Orange Pi PC Plus as well Reviewed by: manu MFC after: 1 week Modified: head/sys/modules/dtb/allwinner/Makefile Modified: head/sys/modules/dtb/allwinner/Makefile ============================================================================== --- head/sys/modules/dtb/allwinner/Makefile Wed Jul 15 17:34:08 2020 (r363231) +++ head/sys/modules/dtb/allwinner/Makefile Wed Jul 15 18:04:01 2020 (r363232) @@ -21,6 +21,7 @@ DTS= \ sun8i-h3-nanopi-neo.dts \ sun8i-h3-orangepi-one.dts \ sun8i-h3-orangepi-pc.dts \ + sun8i-h3-orangepi-pc-plus.dts \ sun8i-h3-orangepi-plus2e.dts DTSO= sun8i-a83t-sid.dtso \ From owner-svn-src-head@freebsd.org Wed Jul 15 18:11:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B615636BE77; Wed, 15 Jul 2020 18:11:05 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6QRp5Djgz3d3t; Wed, 15 Jul 2020 18:11:02 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 06FIAsx1018212; Wed, 15 Jul 2020 11:10:54 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 06FIAsxN018211; Wed, 15 Jul 2020 11:10:54 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202007151810.06FIAsxN018211@gndrsh.dnsmgr.net> Subject: Re: svn commit: r363178 - head/contrib/mandoc In-Reply-To: To: Ed Maste Date: Wed, 15 Jul 2020 11:10:54 -0700 (PDT) CC: "Rodney W. Grimes" , Gordon Bergling , src-committers , svn-src-all , svn-src-head Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4B6QRp5Djgz3d3t X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [2.43 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.27)[0.272]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_SPAM_MEDIUM(0.82)[0.825]; RCVD_TLS_LAST(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_SPAM_LONG(0.43)[0.432]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 18:11:05 -0000 > On Tue, 14 Jul 2020 at 12:47, Rodney W. Grimes > wrote: > > > > > Author: gbe (doc committer) > > > Date: Tue Jul 14 12:02:30 2020 > > > New Revision: 363178 > > > URL: https://svnweb.freebsd.org/changeset/base/363178 > > > > > > Log: > > > Revert r362809: Mention FreeBSD in the HISTORY sections of apropos(1) and makewhatis(8). > > > > Thank you > > This seems like a regression - information about when a certain > utility (or a different implementation thereof) appeared in FreeBSD > seems like useful and relevant information. The only thing that was added, and herein reverted was incorrect information that apropos and makewhatis first appeared in FreeBSD 11, conflicting the much richer HISTORY already present in this manual page. Please read the full manual page and make comments if you then feel they are needed. Why reply to my thank you and not the commit that did the revert? ---- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed Jul 15 18:24:23 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E3B8936C86E; Wed, 15 Jul 2020 18:24:23 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6QlC26yHz498j; Wed, 15 Jul 2020 18:24:23 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f47.google.com with SMTP id a12so3252628ion.13; Wed, 15 Jul 2020 11:24:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8ul4K0cRZ1SmM5PKHjh/4wCHVVW8nbFPMxEC49+HKiM=; b=AY5H5fdjmXIx8UJdBQjSEDoHn08e7BJHTd+T/SvXANQf88qwLQ7Dfnk0KHrsaS2xbU 52WKpbGaBtrqtHaUA8v9CTvXtkhDUlmFxohRreKzjQ1r0lBu6nG6oCIjXz+NfRbDsTVF OekXLXYsqvE5ILC8w/2jrw8Jtd+cQmGzPNaJfbsneldFOR0H+V0eulBAz6Z3jazhIn3A GHnQH5+DHZjAOk65C7OGcpmyjyc7+WiiD82f+0RPkYouuuMRlhB+TMmtnZNQrCmEu6+y QFv6HNl2UiqcO2yiULC6Jd9ta6PP5PdAbFoKH7XYBceZfkNynObJSJxrvnhMLVxu7H3F DdVw== X-Gm-Message-State: AOAM531ksIHr69TB/NiJ9IVftk3vERFT3XjEB/oS+8Hs2QZ1gR29z3mb 2u7JSOEjfRkB0AKNiH8AOLoLUymc5jixNCDcrcVLStPa X-Google-Smtp-Source: ABdhPJxrVrz5FrqQSClKu0NOZz8gsDBPohf89OBonVEb4I0mzIW80iw9OaAEtgKdjFDKwPu8ZazIs4+ZFiHrF9hHGuc= X-Received: by 2002:a5d:9c44:: with SMTP id 4mr590253iof.15.1594837460181; Wed, 15 Jul 2020 11:24:20 -0700 (PDT) MIME-Version: 1.0 References: <202007151810.06FIAsxN018211@gndrsh.dnsmgr.net> In-Reply-To: <202007151810.06FIAsxN018211@gndrsh.dnsmgr.net> From: Ed Maste Date: Wed, 15 Jul 2020 14:24:08 -0400 Message-ID: Subject: Re: svn commit: r363178 - head/contrib/mandoc To: "Rodney W. Grimes" Cc: Gordon Bergling , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4B6QlC26yHz498j X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 18:24:24 -0000 On Wed, 15 Jul 2020 at 14:11, Rodney W. Grimes wrote: > > The only thing that was added, and herein reverted was incorrect > information that apropos and makewhatis first appeared in FreeBSD 11, > conflicting the much richer HISTORY already present in this manual page. It seems that including history as it relates to FreeBSD would be a suitable addition to this section. Just "This version of the .Nm utility..." instead of "The .Nm utility" would be fine? > Why reply to my thank you and not the commit that did the revert? Sorry, I just replied to the end of the thread. From owner-svn-src-head@freebsd.org Wed Jul 15 18:28:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B552536C963; Wed, 15 Jul 2020 18:28:57 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6QrS5Pd6z4Hdw; Wed, 15 Jul 2020 18:28:56 +0000 (UTC) (envelope-from gshapiro@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 068681B47B; Wed, 15 Jul 2020 18:28:56 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FIStnf004125; Wed, 15 Jul 2020 18:28:55 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FISs8K004119; Wed, 15 Jul 2020 18:28:54 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <202007151828.06FISs8K004119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Wed, 15 Jul 2020 18:28:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363233 - in head: contrib/sendmail contrib/sendmail/cf contrib/sendmail/cf/cf contrib/sendmail/cf/feature contrib/sendmail/cf/m4 contrib/sendmail/cf/ostype contrib/sendmail/contrib con... X-SVN-Group: head X-SVN-Commit-Author: gshapiro X-SVN-Commit-Paths: in head: contrib/sendmail contrib/sendmail/cf contrib/sendmail/cf/cf contrib/sendmail/cf/feature contrib/sendmail/cf/m4 contrib/sendmail/cf/ostype contrib/sendmail/contrib contrib/sendmail/doc/op cont... X-SVN-Commit-Revision: 363233 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 18:28:57 -0000 Author: gshapiro Date: Wed Jul 15 18:28:54 2020 New Revision: 363233 URL: https://svnweb.freebsd.org/changeset/base/363233 Log: Merge sendmail 8.16.1 to HEAD: See contrib/sendmail/RELEASE_NOTES for details Includes build infrastructure & config updates required for changes in 8.16.1 MFC after: 5 days Added: - copied unchanged from r363203, vendor/sendmail/dist/cf/feature/blocklist_recipients.m4 - copied unchanged from r363203, vendor/sendmail/dist/cf/feature/check_cert_altnames.m4 - copied unchanged from r363203, vendor/sendmail/dist/cf/feature/tls_failures.m4 head/contrib/sendmail/include/sm/notify.h - copied unchanged from r363203, vendor/sendmail/dist/include/sm/notify.h head/contrib/sendmail/libsm/notify.c - copied, changed from r363203, vendor/sendmail/dist/libsm/notify.c head/contrib/sendmail/libsm/t-notify.c - copied unchanged from r363203, vendor/sendmail/dist/libsm/t-notify.c head/contrib/sendmail/libsmdb/smcdb.c - copied unchanged from r363203, vendor/sendmail/dist/libsmdb/smcdb.c head/contrib/sendmail/src/ratectrl.h - copied unchanged from r363203, vendor/sendmail/dist/src/ratectrl.h head/contrib/sendmail/src/tls.h - copied unchanged from r363203, vendor/sendmail/dist/src/tls.h head/contrib/sendmail/src/tlsh.c - copied unchanged from r363203, vendor/sendmail/dist/src/tlsh.c Directory Properties: head/contrib/sendmail/cf/feature/blocklist_recipients.m4 (props changed) head/contrib/sendmail/cf/feature/check_cert_altnames.m4 (props changed) head/contrib/sendmail/cf/feature/tls_failures.m4 (props changed) Modified: head/contrib/sendmail/CACerts head/contrib/sendmail/FREEBSD-upgrade head/contrib/sendmail/KNOWNBUGS head/contrib/sendmail/LICENSE head/contrib/sendmail/PGPKEYS head/contrib/sendmail/README head/contrib/sendmail/RELEASE_NOTES head/contrib/sendmail/cf/README head/contrib/sendmail/cf/cf/Makefile head/contrib/sendmail/cf/cf/knecht.mc head/contrib/sendmail/cf/cf/submit.cf head/contrib/sendmail/cf/feature/bcc.m4 head/contrib/sendmail/cf/feature/blacklist_recipients.m4 head/contrib/sendmail/cf/feature/dnsbl.m4 head/contrib/sendmail/cf/feature/enhdnsbl.m4 head/contrib/sendmail/cf/m4/cfhead.m4 head/contrib/sendmail/cf/m4/proto.m4 head/contrib/sendmail/cf/m4/version.m4 head/contrib/sendmail/cf/ostype/hpux10.m4 head/contrib/sendmail/cf/ostype/hpux9.m4 head/contrib/sendmail/contrib/cidrexpand head/contrib/sendmail/contrib/dnsblaccess.m4 head/contrib/sendmail/contrib/expn.pl head/contrib/sendmail/contrib/mmuegel head/contrib/sendmail/doc/op/op.me head/contrib/sendmail/editmap/Makefile head/contrib/sendmail/editmap/editmap.c head/contrib/sendmail/include/libmilter/mfapi.h head/contrib/sendmail/include/libmilter/mfdef.h head/contrib/sendmail/include/libsmdb/smdb.h head/contrib/sendmail/include/sendmail/pathnames.h head/contrib/sendmail/include/sendmail/sendmail.h head/contrib/sendmail/include/sm/assert.h head/contrib/sendmail/include/sm/bdb.h head/contrib/sendmail/include/sm/cdefs.h head/contrib/sendmail/include/sm/clock.h head/contrib/sendmail/include/sm/conf.h head/contrib/sendmail/include/sm/config.h head/contrib/sendmail/include/sm/debug.h head/contrib/sendmail/include/sm/errstring.h head/contrib/sendmail/include/sm/gen.h head/contrib/sendmail/include/sm/heap.h head/contrib/sendmail/include/sm/io.h head/contrib/sendmail/include/sm/ldap.h head/contrib/sendmail/include/sm/limits.h head/contrib/sendmail/include/sm/os/sm_os_freebsd.h head/contrib/sendmail/include/sm/rpool.h head/contrib/sendmail/include/sm/sem.h head/contrib/sendmail/include/sm/shm.h head/contrib/sendmail/include/sm/string.h head/contrib/sendmail/include/sm/test.h head/contrib/sendmail/include/sm/types.h head/contrib/sendmail/include/sm/varargs.h head/contrib/sendmail/include/sm/xtrap.h head/contrib/sendmail/libmilter/Makefile head/contrib/sendmail/libmilter/README head/contrib/sendmail/libmilter/comm.c head/contrib/sendmail/libmilter/docs/api.html head/contrib/sendmail/libmilter/docs/design.html head/contrib/sendmail/libmilter/docs/index.html head/contrib/sendmail/libmilter/docs/installation.html head/contrib/sendmail/libmilter/docs/overview.html head/contrib/sendmail/libmilter/docs/sample.html head/contrib/sendmail/libmilter/docs/smfi_addheader.html head/contrib/sendmail/libmilter/docs/smfi_addrcpt.html head/contrib/sendmail/libmilter/docs/smfi_addrcpt_par.html head/contrib/sendmail/libmilter/docs/smfi_chgfrom.html head/contrib/sendmail/libmilter/docs/smfi_chgheader.html head/contrib/sendmail/libmilter/docs/smfi_delrcpt.html head/contrib/sendmail/libmilter/docs/smfi_getpriv.html head/contrib/sendmail/libmilter/docs/smfi_getsymval.html head/contrib/sendmail/libmilter/docs/smfi_insheader.html head/contrib/sendmail/libmilter/docs/smfi_main.html head/contrib/sendmail/libmilter/docs/smfi_opensocket.html head/contrib/sendmail/libmilter/docs/smfi_progress.html head/contrib/sendmail/libmilter/docs/smfi_quarantine.html head/contrib/sendmail/libmilter/docs/smfi_register.html head/contrib/sendmail/libmilter/docs/smfi_replacebody.html head/contrib/sendmail/libmilter/docs/smfi_setbacklog.html head/contrib/sendmail/libmilter/docs/smfi_setconn.html head/contrib/sendmail/libmilter/docs/smfi_setdbg.html head/contrib/sendmail/libmilter/docs/smfi_setmlreply.html head/contrib/sendmail/libmilter/docs/smfi_setpriv.html head/contrib/sendmail/libmilter/docs/smfi_setreply.html head/contrib/sendmail/libmilter/docs/smfi_setsymlist.html head/contrib/sendmail/libmilter/docs/smfi_settimeout.html head/contrib/sendmail/libmilter/docs/smfi_stop.html head/contrib/sendmail/libmilter/docs/smfi_version.html head/contrib/sendmail/libmilter/docs/xxfi_abort.html head/contrib/sendmail/libmilter/docs/xxfi_body.html head/contrib/sendmail/libmilter/docs/xxfi_close.html head/contrib/sendmail/libmilter/docs/xxfi_connect.html head/contrib/sendmail/libmilter/docs/xxfi_data.html head/contrib/sendmail/libmilter/docs/xxfi_envfrom.html head/contrib/sendmail/libmilter/docs/xxfi_envrcpt.html head/contrib/sendmail/libmilter/docs/xxfi_eoh.html head/contrib/sendmail/libmilter/docs/xxfi_eom.html head/contrib/sendmail/libmilter/docs/xxfi_header.html head/contrib/sendmail/libmilter/docs/xxfi_helo.html head/contrib/sendmail/libmilter/docs/xxfi_negotiate.html head/contrib/sendmail/libmilter/docs/xxfi_unknown.html head/contrib/sendmail/libmilter/engine.c head/contrib/sendmail/libmilter/example.c head/contrib/sendmail/libmilter/handler.c head/contrib/sendmail/libmilter/libmilter.h head/contrib/sendmail/libmilter/listener.c head/contrib/sendmail/libmilter/main.c head/contrib/sendmail/libmilter/monitor.c head/contrib/sendmail/libmilter/sm_gethost.c head/contrib/sendmail/libmilter/smfi.c head/contrib/sendmail/libmilter/worker.c head/contrib/sendmail/libsm/Makefile head/contrib/sendmail/libsm/Makefile.m4 head/contrib/sendmail/libsm/assert.c head/contrib/sendmail/libsm/clock.c head/contrib/sendmail/libsm/config.c head/contrib/sendmail/libsm/debug.c head/contrib/sendmail/libsm/errstring.c head/contrib/sendmail/libsm/exc.c head/contrib/sendmail/libsm/findfp.c head/contrib/sendmail/libsm/flags.c head/contrib/sendmail/libsm/fopen.c head/contrib/sendmail/libsm/fpos.c head/contrib/sendmail/libsm/fscanf.c head/contrib/sendmail/libsm/io.html head/contrib/sendmail/libsm/ldap.c head/contrib/sendmail/libsm/local.h head/contrib/sendmail/libsm/makebuf.c head/contrib/sendmail/libsm/mbdb.c head/contrib/sendmail/libsm/memstat.c head/contrib/sendmail/libsm/niprop.c head/contrib/sendmail/libsm/refill.c head/contrib/sendmail/libsm/rewind.c head/contrib/sendmail/libsm/rpool.c head/contrib/sendmail/libsm/sem.c head/contrib/sendmail/libsm/signal.c head/contrib/sendmail/libsm/stdio.c head/contrib/sendmail/libsm/strdup.c head/contrib/sendmail/libsm/strerror.c head/contrib/sendmail/libsm/string.c head/contrib/sendmail/libsm/strio.c head/contrib/sendmail/libsm/strto.c head/contrib/sendmail/libsm/syslogio.c head/contrib/sendmail/libsm/t-event.c head/contrib/sendmail/libsm/t-exc.c head/contrib/sendmail/libsm/t-heap.c head/contrib/sendmail/libsm/t-scanf.c head/contrib/sendmail/libsm/t-sem.c head/contrib/sendmail/libsm/vfprintf.c head/contrib/sendmail/libsm/vfscanf.c head/contrib/sendmail/libsmdb/Makefile head/contrib/sendmail/libsmdb/Makefile.m4 head/contrib/sendmail/libsmdb/smdb.c head/contrib/sendmail/libsmdb/smdb1.c head/contrib/sendmail/libsmdb/smdb2.c head/contrib/sendmail/libsmdb/smndbm.c head/contrib/sendmail/libsmutil/Makefile head/contrib/sendmail/libsmutil/cf.c head/contrib/sendmail/libsmutil/safefile.c head/contrib/sendmail/mail.local/Makefile head/contrib/sendmail/mail.local/mail.local.c head/contrib/sendmail/mailstats/Makefile head/contrib/sendmail/mailstats/mailstats.c head/contrib/sendmail/makemap/Makefile head/contrib/sendmail/makemap/Makefile.m4 head/contrib/sendmail/makemap/makemap.8 head/contrib/sendmail/makemap/makemap.c head/contrib/sendmail/praliases/Makefile head/contrib/sendmail/praliases/praliases.c head/contrib/sendmail/rmail/Makefile head/contrib/sendmail/rmail/rmail.c head/contrib/sendmail/smrsh/Makefile head/contrib/sendmail/smrsh/smrsh.c head/contrib/sendmail/src/Makefile head/contrib/sendmail/src/Makefile.m4 head/contrib/sendmail/src/README head/contrib/sendmail/src/TRACEFLAGS head/contrib/sendmail/src/alias.c head/contrib/sendmail/src/arpadate.c head/contrib/sendmail/src/bf.c head/contrib/sendmail/src/collect.c head/contrib/sendmail/src/conf.c head/contrib/sendmail/src/conf.h head/contrib/sendmail/src/control.c head/contrib/sendmail/src/daemon.c head/contrib/sendmail/src/daemon.h head/contrib/sendmail/src/deliver.c head/contrib/sendmail/src/domain.c head/contrib/sendmail/src/envelope.c head/contrib/sendmail/src/err.c head/contrib/sendmail/src/headers.c head/contrib/sendmail/src/macro.c head/contrib/sendmail/src/main.c head/contrib/sendmail/src/map.c head/contrib/sendmail/src/map.h head/contrib/sendmail/src/mci.c head/contrib/sendmail/src/milter.c head/contrib/sendmail/src/mime.c head/contrib/sendmail/src/parseaddr.c head/contrib/sendmail/src/queue.c head/contrib/sendmail/src/ratectrl.c head/contrib/sendmail/src/readcf.c head/contrib/sendmail/src/recipient.c head/contrib/sendmail/src/sasl.c head/contrib/sendmail/src/savemail.c head/contrib/sendmail/src/sendmail.h head/contrib/sendmail/src/sfsasl.c head/contrib/sendmail/src/sfsasl.h head/contrib/sendmail/src/sm_resolve.c head/contrib/sendmail/src/sm_resolve.h head/contrib/sendmail/src/srvrsmtp.c head/contrib/sendmail/src/stab.c head/contrib/sendmail/src/timers.c head/contrib/sendmail/src/tls.c head/contrib/sendmail/src/udb.c head/contrib/sendmail/src/usersmtp.c head/contrib/sendmail/src/util.c head/contrib/sendmail/src/version.c head/contrib/sendmail/test/Results head/contrib/sendmail/vacation/Makefile head/contrib/sendmail/vacation/vacation.c head/etc/sendmail/freebsd.mc head/etc/sendmail/freebsd.submit.mc head/lib/libsm/Makefile head/lib/libsmdb/Makefile head/usr.sbin/sendmail/Makefile Directory Properties: head/contrib/sendmail/ (props changed) Modified: head/contrib/sendmail/CACerts ============================================================================== --- head/contrib/sendmail/CACerts Wed Jul 15 18:04:01 2020 (r363232) +++ head/contrib/sendmail/CACerts Wed Jul 15 18:28:54 2020 (r363233) @@ -1,4 +1,3 @@ -# $Id: CACerts,v 8.6 2013-01-18 15:14:17 ca Exp $ # This file contains some CA certificates that are used to sign the # certificates of mail servers of members of the sendmail consortium # who may reply to questions etc sent to sendmail.org. @@ -10,189 +9,92 @@ Certificate: Data: Version: 3 (0x2) Serial Number: - 92:91:67:de:e0:ef:2c:e4 + 81:9d:41:0f:40:55:ac:4a Signature Algorithm: sha1WithRSAEncryption - Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2015/emailAddress=ca+ca-rsa2015@esmtp.org + Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=CA/emailAddress=ca+ca-rsa2018@esmtp.org Validity - Not Before: Mar 2 19:15:29 2015 GMT - Not After : Mar 1 19:15:29 2018 GMT - Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2015/emailAddress=ca+ca-rsa2015@esmtp.org + Not Before: Feb 27 02:30:55 2018 GMT + Not After : Feb 26 02:30:55 2021 GMT + Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=CA/emailAddress=ca+ca-rsa2018@esmtp.org Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:b9:1a:a1:56:ce:cb:16:af:4f:96:ba:2a:70:31: - 70:d3:86:6c:7a:46:26:47:42:3f:de:49:57:3e:08: - 1e:10:25:bf:06:8f:ca:fd:f4:5e:6a:01:7d:31:4d: - 50:88:18:43:71:66:65:42:9c:90:97:0d:95:f2:14: - ef:d7:5e:77:ef:7d:b5:49:3f:02:bb:83:20:f7:e6: - fc:9a:cd:13:df:60:41:28:8e:39:07:a6:a4:40:98: - 15:1e:46:b6:04:2e:f9:ab:32:d1:8b:fe:52:81:f1: - d2:e1:c3:cf:bf:ab:40:a7:f0:e4:e5:a2:82:37:30: - 8c:10:7d:aa:a8:7c:7e:76:cc:5f:1a:24:d0:8c:94: - f6:f2:7f:4a:be:2f:38:67:c0:06:e6:9e:51:ad:55: - d0:cb:26:71:cf:f4:af:7d:5a:41:81:16:fb:26:ec: - f0:35:01:6e:db:f9:e9:00:d7:d0:89:7b:cf:88:16: - 8b:1c:8f:77:1f:5d:ef:70:04:28:76:c5:1b:c6:23: - 8d:49:6b:f0:b8:21:56:d6:7d:68:6c:be:21:e3:e6: - e3:1d:6f:a5:ea:dc:83:e4:27:b3:6f:5f:1b:3d:33: - a1:d5:d3:f0:73:1a:12:eb:d9:95:00:71:59:16:b4: - e4:60:38:b2:2e:7f:b7:d4:c5:e9:3f:74:e4:48:38: - 29:89 + 00:b8:a3:8d:79:28:c1:1f:9c:11:74:43:26:e1:3b: + cc:14:87:5b:6b:64:4c:ed:79:1b:7f:2a:03:d0:7b: + ef:9e:88:b0:64:36:ee:58:ef:fd:d9:c7:20:b3:71: + e9:6d:1e:a7:bc:c1:7c:3b:fe:2a:e4:16:2f:bc:d6: + 2c:f5:98:f9:c4:21:1c:ca:c3:7e:57:89:c8:a9:2f: + da:6b:9b:52:d6:c9:9d:98:97:6d:08:7c:a6:37:4e: + d4:26:bb:db:73:b0:38:ef:7d:1e:dd:8e:dd:8e:17: + 2f:a0:3d:a9:0e:4d:f0:2b:b8:14:23:33:ad:c8:a0: + e5:9d:0f:27:ad:83:a2:78:90:05:ec:29:06:91:07: + 45:6c:5f:ba:8e:1d:f1:d7:1b:2d:f9:99:ba:2e:27: + e1:03:7d:e9:d2:54:35:cc:39:79:07:83:d8:93:9b: + d6:ef:72:ab:d4:63:8e:6b:f7:00:66:5f:77:e8:b6: + bc:de:5f:8c:d0:ce:1a:c4:db:03:9d:e4:ee:0a:ec: + 77:c5:f2:30:69:7e:70:12:e5:c2:4a:28:3f:e7:19: + eb:af:41:fb:e6:a6:1d:b5:fd:2b:99:03:f5:20:90: + 38:73:bd:43:70:da:cf:1f:34:5d:ab:17:4b:73:cf: + f9:3d:e1:a2:79:14:de:d8:40:85:82:c4:5a:84:82: + 32:f1 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - B1:69:DB:5E:9B:CE:1A:B4:1D:B2:6A:FC:5A:22:97:B6:24:14:6F:32 + 42:37:75:E7:8F:12:CF:D9:EB:21:22:7D:8A:E8:49:21:FD:E2:3A:3A X509v3 Authority Key Identifier: - keyid:B1:69:DB:5E:9B:CE:1A:B4:1D:B2:6A:FC:5A:22:97:B6:24:14:6F:32 - DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2015/emailAddress=ca+ca-rsa2015@esmtp.org - serial:92:91:67:DE:E0:EF:2C:E4 - + keyid:42:37:75:E7:8F:12:CF:D9:EB:21:22:7D:8A:E8:49:21:FD:E2:3A:3A + DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=CA/emailAddress=ca+ca-rsa2018@esmtp.org + serial:81:9D:41:0F:40:55:AC:4A X509v3 Basic Constraints: CA:TRUE X509v3 Subject Alternative Name: - email:ca+ca-rsa2015@esmtp.org + email:ca+ca-rsa2018@esmtp.org X509v3 Issuer Alternative Name: - email:ca+ca-rsa2015@esmtp.org + email:ca+ca-rsa2018@esmtp.org Signature Algorithm: sha1WithRSAEncryption - 0a:ce:07:39:77:08:c5:3a:00:04:e8:a0:3b:f7:d2:4c:79:02: - 23:0b:da:c0:55:39:82:71:0a:0c:83:e2:de:f2:3b:fe:23:bc: - 9b:13:34:d1:29:0a:16:3f:01:7d:9f:fb:4b:aa:12:dc:3b:7e: - b9:27:7b:ec:0c:3f:c0:d9:f5:d8:a8:a1:9c:1c:3a:2f:40:df: - 27:1a:1a:a0:74:00:19:b7:82:0e:f9:45:86:bf:32:da:0e:72: - 0a:4c:2c:39:21:63:c3:1f:61:6e:e2:4d:ba:7a:26:1a:15:ce: - b1:f6:1a:59:04:70:ed:e8:72:05:4c:fc:84:c6:a5:f4:e2:4a: - 40:e4:42:70:87:9a:a7:02:26:3a:47:34:09:e0:7b:88:ca:fb: - 99:d9:9b:bb:0c:52:8a:93:d5:59:30:0b:55:42:b4:bb:d2:b1: - 49:55:81:a4:70:a0:49:19:f2:4f:61:94:af:e9:d7:62:68:65: - 97:67:00:26:b8:9b:b2:2c:d0:2c:83:7d:3e:b3:31:73:b9:55: - 49:53:fa:a3:ad:1b:02:67:08:9e:ce:9e:eb:9f:47:0d:6c:95: - e9:6c:30:92:c1:94:67:ad:d9:e3:b9:61:ea:a9:72:98:81:3a: - 62:80:70:20:9a:3e:c4:1f:6f:bd:b4:00:ec:b1:fe:71:da:91: - 15:89:f7:8f ------BEGIN CERTIFICATE----- -MIIFJzCCBA+gAwIBAgIJAJKRZ97g7yzkMA0GCSqGSIb3DQEBBQUAMIGlMQswCQYD -VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTERMA8GA1UEBwwIQmVya2VsZXkx -FDASBgNVBAoMC0VuZG1haWwgT3JnMQwwCgYDVQQLDANNVEExIjAgBgNVBAMMGUNs -YXVzIEFzc21hbm4gQ0EgUlNBIDIwMTUxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz -YTIwMTVAZXNtdHAub3JnMB4XDTE1MDMwMjE5MTUyOVoXDTE4MDMwMTE5MTUyOVow -gaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMREwDwYDVQQHDAhC -ZXJrZWxleTEUMBIGA1UECgwLRW5kbWFpbCBPcmcxDDAKBgNVBAsMA01UQTEiMCAG -A1UEAwwZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAxNTEmMCQGCSqGSIb3DQEJARYX -Y2ErY2EtcnNhMjAxNUBlc210cC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw -ggEKAoIBAQC5GqFWzssWr0+WuipwMXDThmx6RiZHQj/eSVc+CB4QJb8Gj8r99F5q -AX0xTVCIGENxZmVCnJCXDZXyFO/XXnfvfbVJPwK7gyD35vyazRPfYEEojjkHpqRA -mBUeRrYELvmrMtGL/lKB8dLhw8+/q0Cn8OTlooI3MIwQfaqofH52zF8aJNCMlPby -f0q+LzhnwAbmnlGtVdDLJnHP9K99WkGBFvsm7PA1AW7b+ekA19CJe8+IFoscj3cf -Xe9wBCh2xRvGI41Ja/C4IVbWfWhsviHj5uMdb6Xq3IPkJ7NvXxs9M6HV0/BzGhLr -2ZUAcVkWtORgOLIuf7fUxek/dORIOCmJAgMBAAGjggFWMIIBUjAdBgNVHQ4EFgQU -sWnbXpvOGrQdsmr8WiKXtiQUbzIwgdoGA1UdIwSB0jCBz4AUsWnbXpvOGrQdsmr8 -WiKXtiQUbzKhgaukgagwgaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9y -bmlhMREwDwYDVQQHDAhCZXJrZWxleTEUMBIGA1UECgwLRW5kbWFpbCBPcmcxDDAK -BgNVBAsMA01UQTEiMCAGA1UEAwwZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAxNTEm -MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAxNUBlc210cC5vcmeCCQCSkWfe4O8s -5DAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMTVAZXNtdHAu -b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMTVAZXNtdHAub3JnMA0GCSqGSIb3 -DQEBBQUAA4IBAQAKzgc5dwjFOgAE6KA799JMeQIjC9rAVTmCcQoMg+Le8jv+I7yb -EzTRKQoWPwF9n/tLqhLcO365J3vsDD/A2fXYqKGcHDovQN8nGhqgdAAZt4IO+UWG -vzLaDnIKTCw5IWPDH2Fu4k26eiYaFc6x9hpZBHDt6HIFTPyExqX04kpA5EJwh5qn -AiY6RzQJ4HuIyvuZ2Zu7DFKKk9VZMAtVQrS70rFJVYGkcKBJGfJPYZSv6ddiaGWX -ZwAmuJuyLNAsg30+szFzuVVJU/qjrRsCZwiezp7rn0cNbJXpbDCSwZRnrdnjuWHq -qXKYgTpigHAgmj7EH2+9tADssf5x2pEVifeP ------END CERTIFICATE----- + 0b:4c:e5:c2:ed:0a:e5:7b:95:29:22:d4:8f:5f:cb:1b:b1:e3: + 4c:fc:90:e7:2e:97:87:87:a2:63:0d:6d:4d:f0:1f:0d:84:11: + dc:df:b7:fa:c3:c6:2e:07:e9:a0:e9:a6:9f:54:17:ad:1a:d0: + 36:be:31:cc:a5:85:a0:45:4a:87:45:80:7e:de:ea:97:68:e0: + 2b:09:5d:9a:31:6f:f5:78:22:c5:66:2a:99:70:9e:6d:c4:ab: + f6:90:01:70:53:07:66:6c:a6:b5:ce:4b:36:05:83:87:0c:a7: + e0:1e:34:d0:5e:76:a4:20:71:cd:9d:c1:ae:82:27:e0:6f:16: + 57:74:e7:63:9f:d0:3d:72:91:6d:97:a4:82:23:84:dd:6e:0d: + da:43:00:a7:ce:2f:f8:79:04:67:6a:e5:b0:ab:30:d8:f1:90: + 10:43:3b:09:77:27:34:a4:d4:c0:25:4e:21:32:a3:ab:60:1c: + 9d:6e:e2:65:39:51:7f:cd:9f:88:3a:7e:f4:38:af:7b:5b:a7: + bb:7b:70:97:21:59:fc:5c:55:a1:db:74:0a:37:1e:33:97:5f: + 70:32:98:b3:d9:99:4e:08:3c:de:01:82:17:9b:49:d7:fa:c9: + 45:8d:93:cc:42:d6:36:f2:39:3a:47:28:3f:6f:6a:e5:23:f3: + 5c:d4:a3:1b - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: - f1:41:b3:3d:ba:bd:33:49 - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2012/emailAddress=ca+ca-rsa2012@esmtp.org - Validity - Not Before: Mar 10 02:47:46 2012 GMT - Not After : Mar 10 02:47:46 2015 GMT - Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2012/emailAddress=ca+ca-rsa2012@esmtp.org - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:a2:80:fc:c6:ce:7f:60:38:65:f4:38:f9:7a:d9: - 87:fd:47:eb:3f:2c:4a:c9:38:77:6a:77:94:92:7f: - 83:3d:99:57:2c:5f:37:bb:ba:12:10:17:56:fa:eb: - 43:a6:4b:4c:1e:30:32:07:94:2f:5a:d8:65:49:29: - fa:24:d1:f0:0b:45:2d:e5:d5:cb:7d:60:dc:a6:ce: - a4:47:35:30:ee:5e:8d:c2:30:e7:a7:63:32:b0:59: - 80:cc:8c:99:64:77:8f:50:8e:88:51:47:36:ea:9a: - f3:b4:c0:8c:a6:ab:c6:42:57:88:b9:5f:9f:61:15: - bb:79:65:93:ca:a9:fd:17:eb:87:26:8b:eb:b7:2b: - 7e:33:05:2b:ba:c0:46:f7:08:fd:da:c1:50:9b:3d: - 26:83:5c:53:97:89:2c:cc:5f:f2:7b:a8:b7:3d:fb: - f2:b4:89:0d:43:ef:18:5c:21:75:71:cc:f0:c2:a3: - 84:69:c0:a7:f3:9b:de:c1:c7:5a:5c:7e:68:da:49: - 71:af:58:a8:51:9f:bd:f9:3d:bb:a5:92:fa:7b:1d: - 52:f5:fe:90:59:95:27:65:a4:af:97:9a:4f:01:39: - 59:7d:08:6f:a1:8f:42:47:49:bf:12:52:53:39:74: - 8d:62:3b:bd:4c:4f:05:0f:c4:b9:3e:da:a8:0e:96: - 05:2d - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 08:38:E3:88:92:53:6E:F1:56:69:27:44:B5:4C:A0:18:CA:06:97:EB - X509v3 Authority Key Identifier: - keyid:08:38:E3:88:92:53:6E:F1:56:69:27:44:B5:4C:A0:18:CA:06:97:EB - DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2012/emailAddress=ca+ca-rsa2012@esmtp.org - serial:F1:41:B3:3D:BA:BD:33:49 - - X509v3 Basic Constraints: - CA:TRUE - X509v3 Subject Alternative Name: - email:ca+ca-rsa2012@esmtp.org - X509v3 Issuer Alternative Name: - email:ca+ca-rsa2012@esmtp.org - Signature Algorithm: sha1WithRSAEncryption - 9a:8f:4d:23:5b:30:80:e1:94:e4:66:9c:3a:17:8b:79:49:5b: - ec:5d:e5:a1:22:2d:71:37:a1:51:e7:1d:b1:0d:a9:9b:aa:a9: - 0d:c7:cd:d6:24:f9:e0:f0:57:be:4f:74:0c:4b:7a:42:4c:70: - 19:2e:8e:eb:cb:1b:00:26:27:eb:1c:42:33:d5:ec:32:b4:6c: - 7d:a3:04:a1:5c:00:49:c9:0d:4c:4d:28:37:06:22:77:ec:40: - 15:25:3a:23:84:ae:1f:da:90:dd:c9:dc:27:ee:7c:ec:e5:df: - b8:ba:1e:3f:ee:c2:91:a2:3f:22:92:1e:f3:06:7e:aa:e9:c3: - 11:2d:3d:2f:85:f7:fc:d7:e2:f8:6d:70:a6:40:62:69:e7:52: - ed:1b:19:38:72:86:08:a1:3d:47:c8:68:82:41:db:db:2a:52: - 25:d7:49:aa:9e:c5:83:22:7d:2f:0b:df:8c:90:2d:b5:aa:33: - c7:9b:e8:39:8f:bb:79:5b:13:2d:4e:a9:69:59:c7:09:26:e2: - b5:53:80:86:72:bb:7c:be:e9:46:5b:d8:b2:78:42:d6:5d:c3: - bb:3a:3b:5f:0f:e8:c3:60:fb:88:9f:3a:2b:9f:d3:7d:9f:c7: - 32:aa:4d:34:a7:66:a1:25:16:95:a6:69:e7:86:a3:5c:b9:b9: - df:58:05:e3 -----BEGIN CERTIFICATE----- -MIIFJzCCBA+gAwIBAgIJAPFBsz26vTNJMA0GCSqGSIb3DQEBBQUAMIGlMQswCQYD -VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxMIQmVya2VsZXkx -FDASBgNVBAoTC0VuZG1haWwgT3JnMQwwCgYDVQQLEwNNVEExIjAgBgNVBAMTGUNs -YXVzIEFzc21hbm4gQ0EgUlNBIDIwMTIxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz -YTIwMTJAZXNtdHAub3JnMB4XDTEyMDMxMDAyNDc0NloXDTE1MDMxMDAyNDc0Nlow -gaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhC -ZXJrZWxleTEUMBIGA1UEChMLRW5kbWFpbCBPcmcxDDAKBgNVBAsTA01UQTEiMCAG -A1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAxMjEmMCQGCSqGSIb3DQEJARYX -Y2ErY2EtcnNhMjAxMkBlc210cC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw -ggEKAoIBAQCigPzGzn9gOGX0OPl62Yf9R+s/LErJOHdqd5SSf4M9mVcsXze7uhIQ -F1b660OmS0weMDIHlC9a2GVJKfok0fALRS3l1ct9YNymzqRHNTDuXo3CMOenYzKw -WYDMjJlkd49QjohRRzbqmvO0wIymq8ZCV4i5X59hFbt5ZZPKqf0X64cmi+u3K34z -BSu6wEb3CP3awVCbPSaDXFOXiSzMX/J7qLc9+/K0iQ1D7xhcIXVxzPDCo4RpwKfz -m97Bx1pcfmjaSXGvWKhRn735Pbulkvp7HVL1/pBZlSdlpK+Xmk8BOVl9CG+hj0JH -Sb8SUlM5dI1iO71MTwUPxLk+2qgOlgUtAgMBAAGjggFWMIIBUjAdBgNVHQ4EFgQU -CDjjiJJTbvFWaSdEtUygGMoGl+swgdoGA1UdIwSB0jCBz4AUCDjjiJJTbvFWaSdE -tUygGMoGl+uhgaukgagwgaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y -bmlhMREwDwYDVQQHEwhCZXJrZWxleTEUMBIGA1UEChMLRW5kbWFpbCBPcmcxDDAK -BgNVBAsTA01UQTEiMCAGA1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAxMjEm -MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAxMkBlc210cC5vcmeCCQDxQbM9ur0z -STAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMTJAZXNtdHAu -b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMTJAZXNtdHAub3JnMA0GCSqGSIb3 -DQEBBQUAA4IBAQCaj00jWzCA4ZTkZpw6F4t5SVvsXeWhIi1xN6FR5x2xDambqqkN -x83WJPng8Fe+T3QMS3pCTHAZLo7ryxsAJifrHEIz1ewytGx9owShXABJyQ1MTSg3 -BiJ37EAVJTojhK4f2pDdydwn7nzs5d+4uh4/7sKRoj8ikh7zBn6q6cMRLT0vhff8 -1+L4bXCmQGJp51LtGxk4coYIoT1HyGiCQdvbKlIl10mqnsWDIn0vC9+MkC21qjPH -m+g5j7t5WxMtTqlpWccJJuK1U4CGcrt8vulGW9iyeELWXcO7OjtfD+jDYPuInzor -n9N9n8cyqk00p2ahJRaVpmnnhqNcubnfWAXj +MIIE4jCCA8qgAwIBAgIJAIGdQQ9AVaxKMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTERMA8GA1UEBwwIQmVya2VsZXkx +FDASBgNVBAoMC0VuZG1haWwgT3JnMQwwCgYDVQQLDANNVEExCzAJBgNVBAMMAkNB +MSYwJAYJKoZIhvcNAQkBFhdjYStjYS1yc2EyMDE4QGVzbXRwLm9yZzAeFw0xODAy +MjcwMjMwNTVaFw0yMTAyMjYwMjMwNTVaMIGOMQswCQYDVQQGEwJVUzETMBEGA1UE +CAwKQ2FsaWZvcm5pYTERMA8GA1UEBwwIQmVya2VsZXkxFDASBgNVBAoMC0VuZG1h +aWwgT3JnMQwwCgYDVQQLDANNVEExCzAJBgNVBAMMAkNBMSYwJAYJKoZIhvcNAQkB +FhdjYStjYS1yc2EyMDE4QGVzbXRwLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEP +ADCCAQoCggEBALijjXkowR+cEXRDJuE7zBSHW2tkTO15G38qA9B7756IsGQ27ljv +/dnHILNx6W0ep7zBfDv+KuQWL7zWLPWY+cQhHMrDfleJyKkv2mubUtbJnZiXbQh8 +pjdO1Ca723OwOO99Ht2O3Y4XL6A9qQ5N8Cu4FCMzrcig5Z0PJ62DoniQBewpBpEH +RWxfuo4d8dcbLfmZui4n4QN96dJUNcw5eQeD2JOb1u9yq9Rjjmv3AGZfd+i2vN5f +jNDOGsTbA53k7grsd8XyMGl+cBLlwkooP+cZ669B++amHbX9K5kD9SCQOHO9Q3Da +zx80XasXS3PP+T3honkU3thAhYLEWoSCMvECAwEAAaOCAT8wggE7MB0GA1UdDgQW +BBRCN3XnjxLP2eshIn2K6Ekh/eI6OjCBwwYDVR0jBIG7MIG4gBRCN3XnjxLP2esh +In2K6Ekh/eI6OqGBlKSBkTCBjjELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlm +b3JuaWExETAPBgNVBAcMCEJlcmtlbGV5MRQwEgYDVQQKDAtFbmRtYWlsIE9yZzEM +MAoGA1UECwwDTVRBMQswCQYDVQQDDAJDQTEmMCQGCSqGSIb3DQEJARYXY2ErY2Et +cnNhMjAxOEBlc210cC5vcmeCCQCBnUEPQFWsSjAMBgNVHRMEBTADAQH/MCIGA1Ud +EQQbMBmBF2NhK2NhLXJzYTIwMThAZXNtdHAub3JnMCIGA1UdEgQbMBmBF2NhK2Nh +LXJzYTIwMThAZXNtdHAub3JnMA0GCSqGSIb3DQEBBQUAA4IBAQALTOXC7Qrle5Up +ItSPX8sbseNM/JDnLpeHh6JjDW1N8B8NhBHc37f6w8YuB+mg6aafVBetGtA2vjHM +pYWgRUqHRYB+3uqXaOArCV2aMW/1eCLFZiqZcJ5txKv2kAFwUwdmbKa1zks2BYOH +DKfgHjTQXnakIHHNncGugifgbxZXdOdjn9A9cpFtl6SCI4Tdbg3aQwCnzi/4eQRn +auWwqzDY8ZAQQzsJdyc0pNTAJU4hMqOrYBydbuJlOVF/zZ+IOn70OK97W6e7e3CX +IVn8XFWh23QKNx4zl19wMpiz2ZlOCDzeAYIXm0nX+slFjZPMQtY28jk6Ryg/b2rl +I/Nc1KMb -----END CERTIFICATE----- Modified: head/contrib/sendmail/FREEBSD-upgrade ============================================================================== --- head/contrib/sendmail/FREEBSD-upgrade Wed Jul 15 18:04:01 2020 (r363232) +++ head/contrib/sendmail/FREEBSD-upgrade Wed Jul 15 18:28:54 2020 (r363233) @@ -1,6 +1,6 @@ $FreeBSD$ -sendmail 8.15.2 +sendmail 8.16.1 originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/ For the import of sendmail, the following directories were renamed: @@ -13,12 +13,16 @@ http://www.freebsd.org/doc/en_US.ISO8859-1/articles/co Then merged using: -% set FSVN=svn+ssh://svn.freebsd.org/base +% set FSVN=svn+ssh://repo.freebsd.org/base % svn checkout $FSVN/head/contrib/sendmail head % cd head -% svn merge --accept=postpone $FSVN/vendor/sendmail/dist . -% svn rm --force */Build [e-v]*/*.0 cf/cf/generic-*.cf cf/cf/Build -% svn rm --force Build devtools doc/op/op.ps src/makesendmail src/sysexits.h +### Replace XXXXXX with import revision number in next command: +% svn merge -c rXXXXXX --accept=postpone '^/vendor/sendmail/dist' . +% svn resolve --accept working cf/cf/Build \ + cf/cf/generic-{bsd4.4,hpux{9,10},linux,mpeix,nextstep3.3,osf1,solaris,sunos4.1,ultrix4}.cf \ + devtools doc/op/op.ps editmap/editmap.0 mail.local/mail.local.0 mailstats/mailstats.0 \ + makemap/makemap.0 praliases/praliases.0 rmail/rmail.0 smrsh/smrsh.0 \ + src/{aliases,mailq,newaliases,sendmail}.0 vacation/vacation.0 % svn propset -R svn:keywords FreeBSD=%H . % svn propdel svn:keywords libmilter/docs/*.jpg % svn diff --no-diff-deleted --old=$FSVN/vendor/sendmail/dist --new=. @@ -98,4 +102,4 @@ infrastructure in FreeBSD: usr.sbin/mailwrapper/Makefile gshapiro@FreeBSD.org -06-July-2015 +15-July-2020 Modified: head/contrib/sendmail/KNOWNBUGS ============================================================================== --- head/contrib/sendmail/KNOWNBUGS Wed Jul 15 18:04:01 2020 (r363232) +++ head/contrib/sendmail/KNOWNBUGS Wed Jul 15 18:28:54 2020 (r363233) @@ -271,4 +271,3 @@ Kresolve sequence dnsmx canon be used if set instead of LOCAL_RELAY ($R). This will be fixed in a future version. -$Revision: 8.61 $, Last updated $Date: 2011-04-07 17:48:23 $ Modified: head/contrib/sendmail/LICENSE ============================================================================== --- head/contrib/sendmail/LICENSE Wed Jul 15 18:04:01 2020 (r363232) +++ head/contrib/sendmail/LICENSE Wed Jul 15 18:28:54 2020 (r363233) @@ -37,7 +37,7 @@ each of the following conditions is met: the "Copyright Notice" refers to the following language: "Copyright (c) 1998-2014 Proofpoint, Inc. All rights reserved." -3. Neither the name of Proofpoint, Inc. nor the University of California nor +4. Neither the name of Proofpoint, Inc. nor the University of California nor names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission. The name "sendmail" is a trademark of Proofpoint, Inc. Modified: head/contrib/sendmail/PGPKEYS ============================================================================== --- head/contrib/sendmail/PGPKEYS Wed Jul 15 18:04:01 2020 (r363232) +++ head/contrib/sendmail/PGPKEYS Wed Jul 15 18:28:54 2020 (r363233) @@ -8,140 +8,1092 @@ GPG: gpg --import PGPKEYS Other versions of PGP may require you to separate each key into a separate file and add them one at a time. -Type Bits KeyID Created Expires Algorithm Use -pub 1024 0x16F4CCE9 1999-06-23 ---------- RSA Sign & Encrypt -f16 Fingerprint16 = 18 A4 51 78 CA 72 D4 A7 ED 80 BA 8A C4 98 71 1D -uid Sendmail Security +Note that PGP 2.X and 5.X are deprecated and may not properly +function with newer keys. +pub 4096R/CA28E5A4 2016-03-04 +fingerprint: 8E6A 5575 0635 A7EA F56C FE80 3D67 CBA7 CA28 E5A4 +uid Sendmail Security + -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.4 (Darwin) +Version: GnuPG v1 -mQCNAzdxaGsAAAEEALq7JPrdyXCm3DdJEKR9miP8/B9vrferOBoNimPFceDEqCpm -0RiJtnGhUJwt/HZZhiGDWPYTIa7VajfxiEzJ7LZH+/uXgQFVN27fPwoNKCI+7sr3 -FnRs3Xapojn3d3LZSHagTh+VTuG5LxbP/m//sj2Rw1MMPw1b7sApykAW9MzpAAUR +mQINBFbZrJQBEADf5e1nG0uJs97KLNWbm4NjA5QapVuDk9AsRN4/T3tXVhgK3rBO +lDwQnKFXon/0W/zwXNG4/XLM9Izga0reb8INj1meDVNaqX2PaKqmjUFZWVqz1IAR +HqCjnR/BDuN+6nLpIEETCSnCnOqK6gBhkzc41vU9HiiujVFlyJwcNLrJe5hpgIEX +SW8RQsSja3+qbhZbGrI0izCk7OPJUwNhvs5yzXa3jpiIohfoFV017Ww+iuXu7c1n +Gb9nGnWotI7FYTeWQLUs2A9zCDSZxLn2s7wtbJJlCezY7yUwhxdZm7zjFVf8f4/X +VArmjJsyKZSfmX/l+0JRD0Uh45GFHFi1YuYlhZhGcx6aDYoY63cvREYLS7jHbXzr +c+NDCmrqqIJCqj63ky/m57PCC8HuClREGTxOyAcRYtoA/A+i7X+hPx+E4RvJZxEf +1wxAJJ2W13hq7+Bo1sF9NlKFpLKRCydpdfaP5++UpXSiIWNmQaPeNBmVm/nWDj0l +eDPUKE1mIw1eVSLTLlXJy/jlZNCbQ6tgAJkvEUiylj43SE71FmFImrJHumOxlBXS +5K028kIRJPHgqTrnZ9TDdeHoTBRGougZwe17S2nyyEZpi3rZgXxiwaTuNnLhxPv6 +p+lQuxPdfhdnXTD7EClCzOfTEyT9HvhMiCuepFhTB+qSmivQAHxEZxxmSwARAQAB tDJTZW5kbWFpbCBTZWN1cml0eSA8c2VuZG1haWwtc2VjdXJpdHlAc2VuZG1haWwu -b3JnPokAlQMFEDdxaGvAKcpAFvTM6QEB1bsD/jj+vTodXqoJphCrBLwFmwymopZp -/HHu8o8FURlL6jQ6ihCruCw6PxNMzSdgmnOgyXxyRZIVO1pUyWf/RnS/r09tPLlq -nZxdAPquhB2pkawvFp+Y///lb92SgfbS3/dtSDDAJ8FO+CDUKS5dKuZ6vSDU6ezH -BDYjhd6pPYVd5hz3iQCVAwUQN3Fv9XxLZ22gDhVjAQH4BQQAuCNG977A4v0xjQi8 -AJsJmlS5mKMqn/Lw+sl1h4yQwF2vzNDdxhNWjZVziK3lUIUPh86u8m5CSdN2BB1Y -1RawLvyfpl4b9KtyXxF4fh2BYmygJ4iG+WxhpaT5RS0eFvsSefO7/w13bx5U0Z7A -YfHMt7+CKHm7bAx3l17g3I9aCMCJAJUDBRA3cXDdzx61AyIyegEBAeZmA/4zCJxF -aathJ0soRJOcyRDzHKbAqlShF+Mx0tzcwbE3hAZrIqJ3TRK2MbrsBNnkFHPuPF0e -eKr7TQsXOa+ig57wlHsCOc/fd9jLITjSYKxrQuZz3CrNefPKvv6v6Ctc6TT4GwhC -zHglLC9Bfy9zgbv2wHswRvQBmRlCaERH3HLb1okAlQMFEDd41z8j5GLUv3ukIQEB -9WcD/iFFF2kfSTyD+IfcLl4WCaYSeD/q/fAplpOOZWnC9PB1x3YrMHn/H8zd3S5B -05D8+MR/QL8n8/5P+pyHa4VNRbeX8g8E34ocZf48y6FeqGi8qmcTBJDgqUTO5yMu -t+b57G2pAIzasGcoZDqC3aJnFKwPjGRxnUFJaxlogrbUYCNOiQCVAwUQN3jwKW9S -k9ijm6ZVAQEtugP/ewRrMCdhCbWsSUOrYn1a/pfN2KiJbhs0YyOyWbU6RvJiSFY1 -0BNAxYTbymHDOn2UhUhCrUpqatmgCuxmUsoH2Y4AAFC/94/oltwDUfnw6muqqn2K -7AelRBbJ5wUs65pHu8kfzVB5wJh8eDacKFkK0lqgtRQCE0suhqCSFUfvtzuJAJUD -BRA3fTCCXx7Ib4gMnlUBAWddA/oD0RKLIkLspmJC3ccmkncviMSv0rME4vY0NIfm -IC0zsYITlU/E6H/CqVmU4Hmr5hmr5GUNNtrVZ0oLH1PUjobmZcTITJZbQSS2nY02 -N6JZT5BSAwQBfUfSMwURISRQBUOfi1kLqYk3f6UTee37/+Ig2kb388T6ClcXCv82 -FrZuwIg/AwUQN30wxNTeeNh4KRvYEQLtAACfaxVaX5D1r7hrfi/zbszQ7oekyssA -n1suZQU7/6nIhFvdusr+/VG0RFrAiQCVAwUQN307ugDy2QnruxtBAQGKlwP/asS+ -h9ct4R66OSEjXepsMvl0So8djX15ugXb3EEJjWRH1epu7obhDymAgdQOD9NEr7BF -0FSNCUOylASGszdcS1n5AlqV+TYihXVn265Azy+hg8g2ek97tD+x6JseKsx2nh8n -/Es+zd3mACk21qvHB0U4FjdiQeSSirNrUHGYHZiIPwMFEDd9ihWDAqGhPt8C6hEC -tSMAn0fo1QmxEoscgdF0esw7Bn/J+Bj6AKDNzo63lHEhUpf+JIGlfA2zzS01Z4kA -lQMFEDd9lxoA/N7tSC51jQEBmvgD/ilLDoFPLbycEorpXFP6V0toEtTelueAeQty -SoqD3YB+pSjTtXDqFenNWaBu0hZb7B5tg40YXqyxMEYQVpJh5coy6SlupmF2fzBi -63++FHkxuGym9EeALPJixtM9r6pTzbX8rfvElKENiU9DBUXNhRkAocYs3pxmUge0 -9THHIyDPiQB1AwUQN32t3XLJQtjqWiN5AQEIYQL/QZEjtc1pMYlnO7i0IzvZX/mI -RfX/0l+/+jneoSqP2EbmyvH3KMyl5SeuAifohkjK0SGRlygSMl8kceUHndeIynxg -mM6hr9SKTByFiTy8SZeV8ovYyJ2vMk3OhUVpvGmAiD8DBRA3gbAczsKIjL9qTKER -AhdDAJwKqcVkm9TBCmutXxwVTcffjINlBgCgrMqc6UOHlUtZps33xWZLgZh4awiJ -AJUDBRA3g9C+TCpm+b/C9j0BAaJMBACskZxjnZbvDgm0qdvESy5+jcluxTh5fUeH -DpnkfOP0AUAe8Ykwt8syWOQZ+3Midez8JqTAu+uvNbUckuR5XL8nMYpN06ogjg1T -CgjLito6IptqYUZgWFvGDCdDgC+m8vw7pUbqh59mDTe0X5Q/x9Cu5JxfhxnXTNBQ -+pI8lLAmsYkAlQMFEDeD0Jt3HZKuiXLHwQEBMZoD/2FaLFJ03tEAfNQhLmSgunWV -akXz8udE+pY7IWi6LJGu5iwtIDJ/r0nCrJ6/aqzu9JLpGhfTnhPPCXlz4NfhriRz -12cv2Rlg+gI3Y0Fiju5eo5TWnu+qB36vQsv73xpfQ7oCmoVY2ZntQVBaf8dyFrAd -FBf1y33xWo58zRsg2u2hiQCVAwUQN695leHU/BTm0HRxAQGANwQAmIO4anB29bKY -vm6ulYAm1yAyzTD5TibUnk2Ecne5st4AKGJdSrmaN7i5djxkCfimT6MnAIBRG8y9 -nXW4mCMGjfDkwve800HkrSGy8uWhHs4T8TiY8mZsIgkW5tBWnHfSyOVlc7QUbCDD -7AzrIO3x9vYIdHMM3LAdnG9PKcLjNN6IRgQQEQIABgUCOCrZQgAKCRA/9E8kOH04 -7XJEAKC7Fzj0Mr7JxxwYEqwVgMhpbmhJkQCg7Sa+dR2qpuhYH80RPvtSEpBS6NWI -RgQQEQIABgUCOCsObAAKCRDAz2v13mRiHprlAJ9z24xI7kHeunGE41pQ3eb32dSO -iQCcDBmlk2RVM+ecYTwf5RyT0qyk9lqIRgQQEQIABgUCOCpmUQAKCRDUpU1Ixb5z -WIjFAJ9lIJTH5y24d7TiWlspj8R49Wz/VQCg+EdEulY4h5A5wk1D8eCs5ar5gbCJ -AJUDBRA4YClQmAfmW9hLWSEBAb+cA/4mRKQMyimXZDCr+0FPjazysN5/GXR9wK9F -Q0Gb++nT2Hli/oWQ6F3t1mTLI4vprpiIaFK83HZjRHHU0FEELYL7Lg3F2mirYFNt -Yx1Ag0jZKc+ernLLXEJK8weM7KMADWz1544eMpfb9PRNdmjRyrzBYVfR+vQ1/OBp -zwm6aLAtb4kAlQMFEDjKizecHL3i41xWNQEBjYUD/06hAwd2PGvWynmZP6BxUHW1 -iJ5YnJC/Jlr3d7AyM4I0I1twKTDHLiqUoLvqOWPO4qqO1iFNkX6/8kCjqa6ERaBq -j50vr84knCHc6tin/df+qTR5iOKeLTFkIZVWEHKusVgLN4jNdTUoavxAUgaZxcqv -W7JzYEMIXJ6WyA+JRLDXiQCVAwUQO1XXe3xLZ22gDhVjAQENbgP9FStaWIfIhNEo -JTkCgxd8QkJEc/yumlv7Cw46BmDqwZLwV6sE06YPL0jiPIu9Tv8I3HqlKcK6FBOq -aAvv6ccA7mY6PPIVtk+EZQckSX1ALOcETDNYTOSMVxbq7b0ovvm4sG6D/A28k9b+ -s2ghGKVquYdnn6rEbr8bqmUTwN7RgiqJAJUDBRA7Vdd/1uCh/k++Kt0BAXoYA/9j -jKJfxi4Km64nHG4PhM5bm+OPoymX3uPkyOYXzHerwGIRmVl29FxG0szDPsO0gK2h -f3B2WOGxqMpZrzR4DIdNrtC+R3KO+3FJU0F6+T4dqAOhSvIbVQ8Ic3Wf1M69rJq2 -FID4zk6B4ymesNZVK9hoY7RuuMefUZS8cODoxWlz4Yg/AwUQOCo8e/1viMYh0Kcb -EQJ+/ACfZCL7u2dfVhIfLYqoWqcuuBJeALQAn2pIu6Qg3R0uVJt+gSIH636QM5n/ -iEYEEBECAAYFAjtUu4QACgkQorv7JAz5VvfWuACgmY47eZClnIakMnE2bOaL161Y -iqYAoI7/PnKgJT+LU/WjXwOZHGsoMXOUiQCVAwUQO1jKrwZ+Xti/tWVpAQEYaAQA -pM5VPqRJqQ941YdezQ1jjE7nsLOQ6SJPVUeFguvVHWSTDEcPvp0TEKUTFRruwmKx -yLCR9Ux3Olh0rqXHydT+k6f6++FKzXj/vtHTtNOPIVQisV7K1rDS9Mvj1WdTMJxF -300EXlUpWtAADiEYqxxIeGJ1FWcxUjRCaqA0WUMFXe2JAJUDBRA8H4S+iWliuGeM -CgMBAUo4A/0f+n2BvpudIcJVyVBxUZK9EGdDiZSYZWEUaXnvTWbS9FtjLTIWjzmP -kbz9gnJ+KPcXr/5RpD5XCdCC1rjQ0EpNjWLHnsaTjTDsJ9NGkLPp0lASEdUMK9NW -tG+CCGCMDo/MHhiw09tH5gzCR1KJTFuDiHiINrk5dS+IHIXzCYYB1ohGBBARAgAG -BQI77DSdAAoJEL+2fm9BJ4pEGE8AoPniG1xspcy7o94D3yOKlXAq4wVoAKC6sDFu -ZS2Lja5FbtL4Tl3sl7k7hYhGBBARAgAGBQI79sVoAAoJEPFmQMK+QtymVjgAoIB7 -dEOcSKt2fYJAEtgAiIoVtKHtAJ9S6bqdAT9Xgomd79JN1KPlXRVOJohGBBARAgAG -BQI8+g9kAAoJEC+cdg2xRYLBiEwAn3S/QfwawMiDcpQm7K7q8BTxmcrQAKDaSfAd -Zea7tsIsjVpL627gpCf1uIhGBBARAgAGBQI9hM4xAAoJEHrsMNJ+GHnpSWoAoOsf -gbKx+mCMRbLOEYgAU9DB13qdAJ4zkAaZCijpqqvTi0XjnPMkq7RbpYhGBBIRAgAG -BQI+W7nOAAoJEDBS/CoUw26Bv5wAnjvZsj0SetF/Jth5uvw+jHDLp1QuAJwKy8ZY -e1E+7dOU8CQgYD1Zy5nuaohGBBIRAgAGBQI/aaJkAAoJEC27dr+t1MkzoLcAoLEq -jwJzYeTGbrIfhc4t4/SJnuD2AJ4gIPGnbL6fl9+9TRMlAMHo4xNcVYhGBBMRAgAG -BQI887P9AAoJEEq61lpJwpzCcmMAoKp4ZauTD+oEBfvXtL/eBSxTA0rKAJ9uADQB -IiVBWy54UnhJ7F6NSb2R14hGBBARAgAGBQI+9wRgAAoJELghiQKdsrW873oAn15C -080LnClmIjRoGKppUynk7LqTAJ0RXLkjiepVsgZCW/pXYy6wK5DkeYhGBBARAgAG -BQI/1fplAAoJEFIY2mCt64GL6UAAn1FrBfweuTEy3p+i+ekJdKf4Je4bAKC8SrPC -WVEl5Pr+XpuP92f3KxQJtohGBBARAgAGBQI/1ftLAAoJEKTWXDNQN2ZnOuYAn36o -95rvUoSFIiTVytWm5go8arkYAKC9rUwywbYx49u/rdUtj396kocq9YhGBBARAgAG -BQJAC08wAAoJEIHC9+viE7aStBkAn2DN85MEaydtxX1S0Sz22Qawre//AJ9NYpd/ -BKPMY3o80IuYy6k+E5e4cIhGBBARAgAGBQJAC09qAAoJEGtw7Nldw/RzMlYAoLeH -NbcbFnINRaU3vJLp7ieZCUrKAKC/+N6FEM2JNJzkeRsHhOvOn7EXmYhGBBARAgAG -BQJAkTWOAAoJEKn24r/sjo2pIp4AoISelNVVxuIBl2i3t7ajQaUpruJpAKCGDYPg -RaGIuII/2fwEGzIpZzYE5IhGBBIRAgAGBQJCNCwxAAoJEFMx5x175C/jTPMAoKFG -qbOkCtxD3edRmA3PzE+dg39xAKCCgjpb4Y0PXk8Xu9tvaDPZcul93ohGBBMRAgAG -BQJAC07iAAoJEBhZ0B9ne6HsIlIAn0adP67A4L45/4m8xExRv4Uc6twdAJ9PTE4G -X3XennlL+6cVXB961V1NL4kCHAQQAQIABgUCQX8prQAKCRCq4+bOZqFEaGUHEACf -4Om9MDBS9SilmZ22Ssa8WtrUzUL1yOuO3+n/XhvJ5lGjUwi0oW4EcMJFCKZI7DOX -aN7zlD5akd9N0ZNg8W23xz29nnp6/upeQRQ7ckqDL/+o8DgjwCyQVH+ZzDrBDsip -PqtVTcogBx07CioJSX1jy7CVnsaZVH111hgghSsLM3S9KrlmwQ8zzN56FbwmDyoG -Qi3oyH9Xh+1YeCxUM4hS6Gk1wCAFCYx7Y53dDALB0MvsFMSWDflJLhae652rSot3 -jjFzH4FOdKk2/1uSVOKS8YQtLBu/Vf83q/gacdxtkyj7zdUYtSg4OHuR9JVfF+Yx -g9v+U5PkqVSymLEv523nEoq1LMPtWhPNb5Om/T/5H2N/x+z1jSxTCZajRoMchG0R -9k9GtcGZQqfUrdC0lztB+03KzZRJvPRUV0m2Ia0fNPUvUlTcLCdk3/brYuxEC13h -A9qh8dIwWrX60aHanrqmeH2RSEqbnBMn1g9NRvFkV9QbGofCezKAvvRq7vZ1vFC4 -5/X3NqqHm45ISN6MitDJhJOnD+ZoARVAnFpC6pdpAg1+Ld7v1PtEj7rRAVzGOVZr -U55f3gBIx9Ezdeh6+7HfCFSv1sKkGcYlVvriCswpUrJn5sqaFYYZvjxin1D2kwvT -aG/4sOQOooHBU+JpdGecir2Jme+ET41NZ7/Q+OuPGIkAlQMFEEQbRB44IttHzDdP -LQEBlmYEANBwFJxl7HWGdKLSg3PD9rd/UuPsA2iS4EcMk9h1Mz8lm1WwmE9s4mvx -0DmNtfSHwV/GF3TwfrkvofoqXxU+b0CkNIaHPkCKP+FzFTT1dC5ZBrGBqLi6Izu2 -wDmenjGMCosR9Xv/ss8CQ4L2XF2uCGyVEmel58UHx/StYvjEeL4MiQCVAwUQRBtE -RSGD4bE5bweJAQEAywP6A0jdCALabHlRXk2mgfdqBKEWn1H8waZLgRjebwzn0lnK -3a2pSYZOqaDg9x4TNrHi+FZ0RZJC1u+q/nBfQw9Fqr4tavnHXuEagTJhTpzBREIc -fNEW0vhziJPpd1Cab8ErZKICCEiVu/CFG08M+benCSEAfJN9ZS1ER/mZMvqyY/OJ -AJUDBRBEG0RRyNXtKZX2F3EBAb47A/9WlKsdMPQuTcekXtiyImUxMIw4isRkEw/o -Hq7Xo/TiCfa+7CyvfZ26VXa+hdh+GTtUfQeb1QP8Q/S42qfuz5t+geT06phBy1lK -lIf7zdeptHkEfqzQ1p4/PVul9YChMAzH+qZH6RN6jh0w/aSj28fhw67rHch62fAb -Xnn0lXBdcokAlQMFEEQbRGdwoCRNHvmSUQEB9CUEALuAxKlHjjo0Cd0Wv+VnhDr5 -+fmR9vNgpvgt3t4qHNcgTVGZza6e+T7gk8daWDP/HhHNa5he7EpNeVK+yu3SCyiI -Y9p+e+JSx2FnOLqqddG86l3cexFahlNuxfyCnC/2c3yGsLFIKtb3vZClwvyUzfGQ -rTqPF6sqL4TU7uv0UplNiQCVAwUQRBtEdx57s8ivlZYlAQH0YQQAlsgJ6wcI37au -F5hG5wHYhxGSv4YNIRWAgYNFIDnk90AsG7XPcuhgyuKVfcAn6jEdVjRLhogpxo+I -PNOeIV3kiS9LFfLgWGrx7arnrmMPOP/0l32VCum5n06CM2G7D+o7uTAU8qul1nNN -gpExpdV7qPrw9k01j5rod5PjZlG8zV0= -=SR28 +b3JnPokCNwQTAQIAIQUCVtmslAIbAwYLCQgHAwIGFQgCCQoLAxYCAQIeAQIXgAAK +CRA9Z8unyijlpL1XD/4yKdr8unh/OJ5ks0BcjUpJBNkYbdYt+B4hb1lqgaM+kqSD +HRt0tgcsa+m6Kcwl8TVZY1NlJRl/L/V6xP9bN/hw3e6eijx4m1dC5DSZP0/GZ4L4 +u4pa349wj8jp33lMXQacrOgNcRPNfIrxww4bxOqlPwDbkfbn4HJVsdDvW8fZbsEM +T+S8UnIOScwMov1zY+q/VO0kcFfCjTu9w3zrnOyz9vKkMj2QBbAm+kawW7fyt9vt +kxwmLIx3XHczyFAiAqppvbqJV2AqTRdVy7rX79xkHUylnuAbZ+/6lBMc8kbQWdx/ +loQA2xFfbQxGRWKeOH/FpcpfcocD3PZbJ1/D5Bef5WegVXti6zHwHWZFhFRB1851 +ReM7RJiEJo76PpOc+aR6RKhYdfMtML/7dsnR51HWWuIfZbXbf836/SXHp3/MUOuC +1qyBeDweOXRbBCHGhvwad47NBj3QwK+1IFMFlDwLgCtJZhkqCSy3v/UhnK/cV6u5 +npsLDJaQixU0kH5x1PbxoAsupeEo8VEUxlONOIMgrBwiaHIbwkL8/i02fHkA/hbQ +AteZZ5vKi8Fapq60izQCvusybEA2Rx+Y7GMntXhjGthzTHL+E+A2KEq4lDrwmYzY +jKVn5kJY9Wct9YQ8g8ytj3tPX9d8strSejrg6wBvPMNQXD9Hg+DXRd2nyog36IkB +HAQQAQIABgUCVtmsuwAKCRAQkK8gpapb5saZCAC8ltCRFRCD/Bhva3y1WkYLFXeu +zfG+L43rVEFfW+fQFCeiulK3y3hKijMARi6OjDhdZBK7cavstZec2CnOKmJRuprr +Z9FwC9uUG9LfGEkpgwA6FMlje82C9B/wssVZiLNGuMGBg2BVaQKglw7loahMYdLO +7DBtOEz2bPcC5v/tO80s2mtzrTOWW5WbUmIB8m/888W+/T3jUeP3v1FtAhk28urO +fHUcbifEbvdLblWeYiTi/PMEjVWvcWfiQepy3mA+G6veH02BFTMozzlcisHdJNwn +Uqi8xcU0fIU2j5gDvPJ5IgppEEfwfWg0qqglPRPCpz++dn+LFoXV0N4pWdn8iQEc +BBABAgAGBQJW2a0lAAoJEG1M0ZQp+wPewsMH/1PXIE+F4DYq11ohmwPG+g8MFkL2 +y7rBGvsTdm7Y0JgWqo2BJ8sOpBhDduDJdlQRk/D5CWOxiPA7qGLmtBntpw3U1Wp1 +A9DtcpR0AVlUwuSer5k+uGIxJzmu8w29MMpFtqBLjx3kH12MOAqTrC6YgxXsQEYD +yluFMRcp7KfrWoEU9AAfpuT4wk8P3U+8m7QGqNpfTeNFgHmUd0dDzT6+zZYdFzmn +BxXgp+W5SgX68OA4QXk30fGt8/btHQF0/qM76xCLXvOvV2WvLgwh2k0gNVHdl9BR +4Gos8SwOHKQZY9JtEAPu7vo66RGQ+jeNRYIDW+wVMHXLo0R1TkOg/r2Na+GInAQQ +AQIABgUCVtmtYQAKCRDAKcpAFvTM6XVIA/4iLoL7GDztXgFzSzMC9dlrFGjxtnAo +6N1ZsPE9U/JN9KjS7T7/8w1u6cmewLoDPNN9WDqaQ62P010DKe/VfmhoMDumH4Tj +ngOH19+RBmD/f1Xb0NgbWbRbF4hYFXqGmyUoRUDl1MWyOa+KSMC4lKdr7HQXQF/0 +8EY9yfJLx6xymYicBBABAgAGBQJW2nCwAAoJEMGcHSUS00YdyXgD/jjlvEBq3wDP +KT97+xy2RoTU6lNyrlkD+9Zu6PE5QSt8tbXpQ13nCWS5quegk0fJg/X9W+hpt8DR +8WQ2F3LiBXZGR73hkRx0f+MQArx+O+J6cSjw6rUwELld8EF2Vi7bOuMgE33BVleT +pvaCzB9yQd3+nKbgDb+ZynHZce7bJow5iJwEEAECAAYFAlbacNsACgkQ71iWZNQy +4Z32JgQAqVRJVb3Y69KcQ+d9zEkTmTZutsntqP5lbCJgdW13FG4mXoyqT9ncmSck +XuJMhWoaZOfdIrZw7STLSzKmAfFeQdMiSWo/KZxV++YezamNGPeqjyfGqNn6wxSp +qutJ1b3L3OG9i0+yuv04YhKX8mdNF1GnD7lrPYHONnp8oZawFISInAQQAQIABgUC +Vtpw4AAKCRBvUpPYo5umVRI5A/4vboBeKv1+JZNOWp1uP/JRBoC+ccdVAJW3hmAX +aBHhI252KQRJ5j+WeZZGHOOVHJ4JEJS7m5GNsPBtXaSCy0N/y2Qxobwp9DZxTA50 +yVnsEVGOh2DaPRr6oJx4NC/65TGyExRNKCM+RMhGCf+x34nujoq3GI2bQf3Cy21t +GDS30IicBBABAgAGBQJW2nDkAAoJEJwcveLjXFY1KSgD/iitVYxY9kxbIyiiEoDJ +rjwtsRXYIHOHdUMXC1tiodzIuPfscyO/sSnYXgoxh8iz/9RJiyTIGSoePnd+rmw5 +fef7EKWRPJJ00qCnJrg8q3PVctQiYeH5/AZrVGSJrIbdyMoQelj0igNhPic7iQQe +Ihns14avXv8bCwHvMxYmgtw2iJwEEAECAAYFAlbacOkACgkQOCLbR8w3Ty3+PQP+ +Kjuma4zB4nvwm5VxD3XQsJQEHF62W3pByUzSsOAJ5WXMbhVD+zV3P6ps/SbjZGlG +74Rx21nTNbeSIZig9XlfBjl2RmGTXDItE6mNpOzPysJeDUERjKvYYBacskBwsiRb +sNZ6pKPkoPUt5ALn2CJ+wZryWd6IdLW1tYBuPHr6uJGInAQQAQIABgUCVtpw7QAK +CRCJaWK4Z4wKAz/OA/wNuEw1FLrCc5O57ohRuHIYMK5HI4Cw1XQO2zWz4M4Gn4Pv +5ghJ9j3a5j5QiPbLSmKt3aWprPkIoGdKfiSMDlrW1Qtgj9J9Y6cf13Ja7NqGdNMM +sHTPNEiKH2r9hkdg5aVyCai1J+Obi0ocF7wcxNHOXxBD2dvBn4wffCXeB6awGIic +BBABAgAGBQJW2nD3AAoJECGD4bE5bweJnrQD/0OV/d3ykAAADy4fC6zyVFcbaaB5 +CmFO/rQUjMP96+0QVq6DT9q3Tv0TE3+0JyqdDS1RGM/mEGpijuoQO6upNnVlOudq +kugJstOb5RNLq8GVJKMt/EXa09eRImdzQq4tagVSV8wIHsvQTItnmFjIK1dWqEJ7 +4Wr8Wpn+J7Y69So5iJwEEAECAAYFAlbacSYACgkQyNXtKZX2F3HzUQP+OBNaNNwW +Z9iYqZ2j1beVn6R3F98qDZ1G8QA94FXMW24P7jid+N47DMH4R89t8yyvmcb9QweS +jD4oaLRMOxjdzXEDnO8FcPQGtubtN9/54qPTNjSUYztLYVNCYcqlpqHP9WUUJN6G +GT0aHBTaXTs4BggeYbnoexXmGfaUWPt9W2GInAQQAQIABgUCVtpxMQAKCRBwoCRN +HvmSUe0PA/4m0COSkS89udfYSyhN7flXgtOB3fKraw219+dOUmBCxIRl8qInqWUM ++216u2q0NCh3MFBMRmk/FrCa59yBoP/ftibjAwKDm3TCUUre++kVwNPPCONPsaMZ +zgP4Hu0U7pjrCyI8zRffN5obQr6v7xDyGwy5bpGH4UD216u+/UiDe4icBBABAgAG +BQJW2nE1AAoJEB57s8ivlZYlpesD/i3Xoj2yR3UemnaYpYWEiKvHGzUKiVqyjz7x +BVhDMDFJxFlJeQjxnzWcsdS15W79hl96kVHCHsHqnC0oGT/OdaXpUnvQIm2Ot/+f +rU2AzXBm97VpdwAohxHIOzFFY9JUyZnzLV8ejoYngaQA764fpRgNSjVm1jIAxUse +4cc4Na1qiJwEEAECAAYFAlbacT0ACgkQl0MBGHCTuEEn+AQA6H5I99ajHAMTMxfb +JRZ5wxsCn1KvHo2S82UUDCC/Cwzpn6cT0b5ClTbz27EsLHouXsOqNUpJleLN/UZY +vyiNc2skejTH2RUNrBhhbnrlpjfKsjldEbpRbfAeMlen+8mwiZKptjF2Wh2S+IvC +8UUCNYBsLdcL99ft3GCxLBm0VsCInAQQAQIABgUCVtpxQQAKCRDYqvDK9rMHKZgo +A/0eTw15SzWVMX8G/XJ87q+2GBaGHu1mGkv/CYbhFu+oqDLuLfVIH/QonHkIW+ql +IPVnJt1f3sG2BBAo/bC/DhTTM5GsbLSDyZ0vf3Qn1JWYR9958+U7As5jRTZjLfxe +rY4FW8is0xHwEHXz9/9i69h7Iz+CLZKTXmqNebkrHfedW4icBBABAgAGBQJW2nFG +AAoJEBKJbpunfyQppAIEAJh9zjV/9qbsEAbJ/ecXY+rshTKe6Ed1LpQ24/b6N0Z3 +LuR3n5n4+qyXsojXLY/DpJaHQeIf0WHaUHhJn/lqtPhfg7NpGnjbJIqhTlvsEpy+ +pmIqo1OnB6Nkv6C+JRXfW6VLJzxAvCtoHwacPtetOWtY+VF1o0KIezvEMC2bZy7g +iQEcBBABAgAGBQJW2nFLAAoJEGBN+/KFQQq+4M8IAJwzU6zpwIK/lk6ZuOSyBewU +Y9dAEh6M8/vD1tFZ+o+vRagHjraHhw/rWLx+5f80hn84ymoD13YOONCjosO+w7JP +PH5N/ehokBy3hb6A2jCzsZR1sMIwqeYvoG8+UOzBjqZ5CnUSYRRg0uPddS5S8Lyh +vDBnKWGF8DfUUfKGF1YN/yoIB/E7QH+lRTWSnOaWdF1/h+/qV/e5V4nykzibcRGj +VBa/H1qkmqk7DX+di66Dz4MtsCYOqIzmuz9wOYK8oDaH6qt0G+CigTo9Hs0CLt87 +ezq15CvnVhdVNpE6gt1Ye7tERO2EK1zNGvJXUETyQ2BSrqoybttFmxFM51X/fBuJ +ARwEEAECAAYFAlbacU8ACgkQOaTHfal4hLBVHgf/djm9OmqzZC/LEmv5agNglqc1 +SCTjLvd/3hCxDeM5IGLdLQwDi3aIzZjW+aU0dCMgR3S9d7/MJcPsA47oYtqYRG4+ +V9xOCqCWvcJ8gC+Ra+h5PN+ESy4Qqo771fNThV4C5QMQ6t8I+JPiepI+H4U19zxb +SjdoLkoswDfxcEF+PpoQcW1R2PxWvES6kQixmfIV27QZKeKXK2KJWK6sbLLn4m8Y +SzKnCaIkISQhTgGlCkUivaSwSaUYo9epjRUPT8Xivcu1IuoV3f23qkx6NBCEdnpe +WpZHmYG9v8XKdxSU3CHUBSVmWbUtIoo9kh6ArKyhuVVopayRmrByfQUdO1TblokB +HAQQAQIABgUCVtpxUwAKCRCOWun7zu70O7zLB/96No2LT9tXlknLRth3Fg0MPLud +SX4dnJJA8tA/c1Giu7O/PQS8NT07KoBerqCt355WA6ABdlnOX3lgKo/qm0EyeHU/ +17sJdUKWWEdaF7JcOdCSQCm7bzfIi4I7u3IrMAqvkiphFflaukVS8euBKMq7ljxi +74wI/7tK85UtiuBK9p02Zrnkkln+VgQ5oLMiyHVyevpMY/YQSGT3ARwdJW7Povwt +JxVCPZHDHumUqiTeFisLl6/WHyGPyzK0Zi83JRfPkr756iRfskTiCP7wN1L/T8lQ +nJeugKG+XAwaxhh6T14j4TrA2E9A9reb+6636LLLdsS3jKG/wWyl6w9FgZcUiQEc +BBABAgAGBQJW2nFYAAoJED1osl1SB8rTBawIALifXmm7e9kjDsuy1RCCZVRbv/7j ++0vOsw96gqbM0fuQV1qnt6uLppJgbFgXFJOKchoXRBYBFuZ6tcsU4IZ3itW0WYgh +7Iv02LlWExFNlNFJpNOnRfK3k9md1jZIFwnLFIUMymmlHYAIuKX4zrD6XhWxX45i +AmuWyORw+cyEiHjbY3hGFa9XMeM8ckvvlW9h65hcizNfnldrHUWz6s6sYTTQO4U7 +wBz1tMTL/1LNBxkQV/FYj9OorNQGrdPYOD+FmOm0K6dPQsMmK2QVsPk8rhohUnWI +TAiPr+i49HZarHnX041wOeBB3rhSJ77A47jdgYnR/X1Fp94m5fq+N2wxWjmJARwE +EAECAAYFAlbacV0ACgkQYd4R7OJ2OnPJfwgAt+xz05qqQksAhVtl4vCcDM3smP2N +3iCoPJvI4hpYdfiPgA/UGe8cHTnQqCbfgZA9BPtGEMkK5Tk09p9ale9EK643VgD0 +ekI34YB7rje3QVhKudrhMeGO5WoSlrXOG6W6/8jucpHcYtjcSjgdB0pcBpA5IHRI +7k4ntkkvWlXOllCioxPwscHKrkPWSDI83xXdnShmYnzwcOBQhHXiICyLo+zYU+bh +FpwqcnItAKz2aI/hKSz8YWey5AGF9RH1Uwf7leGqVlD57f4BOkrhq27YgJzXri4W +jfBkEXluWU2RhiknxL3K86WLeUvTeUgB2gZPGHMyFILD4YsSY+ZUIPqN7IkBHAQQ +AQIABgUCVtpxYgAKCRCq9bXeBb3MU8QcCACquxGrkyuB9XRnlnMFhkZimaj9IU/o +RGADeRU4TMxtZooXA9VQvU1o7Kdz5s+v+TKyFAyLoLbOs/SEb1rb8X1k1R1DiVzX ++EkKONk5sMSMiBE+/5vsQPMuR7bUxPYd4cpIM8sYUyiWGif3KFd6bnNS/hnh9ziE +trgj9P9wjeztTQcPbCARZocMGOcnSsRZJPTWOuUiUdNykkDxBuyeXA7V45H1ozzF +Qe7WYb+zmvm0bbPme7R+IFABaJoQYEUAYnDWkfRg12La+tpRTK0LA0rQ3DHQuQZ9 +CdBvTowO5QyA7TpKanJPFauMVaO8qrPJspw7NLpvWo9JyI55eNFZSYLUiEYEEBEC +AAYFAlbacd4ACgkQGPUDgCTCeAJZNwCeLZStzZQKk4BB2L2MyxwhEy3ivdgAn2yt +89G259NL0HO4UDdEjQmeRdYPiJwEEAECAAYFAlbaceUACgkQvdqP1j/qff1+7QP7 +BPaV9C2Jjsmd1epuxRE8wDKOUbgCOP0Wnz/RQcGtmLpE+b6gDyAkO04yJc5sgTOG +vPwJIInvfmp9IeHSz3dpiTweUgwy40U8LJNm4rvI+LPaR6FTYtvgrtEn83jiXPvO +n3p3NUF2AUgdpfW9jpQwlcU8kqO7U5FhNn0SwDbB+wKInAQQAQIABgUCVtpx7QAK +CRB8S2dtoA4VY35sBACaR78j7jxTq/Y+wPNzmgGiY7Re97Ik2fJnUnldplVC1Kqe +IRD1g1JX7f83/WbBmsYswTUEkP24mmWTIyyBZzZdMgcV/zC6OPn2myCPY4jt9HHA +eYDgDCjy8JBlxDgb/zS6uT0IKPbO19hsO3nEsXX4ezTR5vGg6BsoUhOlFInnCIic +BBABAgAGBQJW2nH0AAoJENbgof5PvirdcY8D/AlG/9+DrudG7GwRFmMLnpFqPJ0O +vWFNVZtNvGVmsyi6yspY9nvKLyZiTkB80uOadljvcvAle7el9wTNtFgw0H7MKixO +j7whiyX6c+I0qse2R8r65i458kuikNfVL3IRz+3LWNg1N4nevwrbIIT0GEZ7uz5L +LLHKAK2UFD9XprgviEYEEBECAAYFAlbacf0ACgkQIfnFvPdqm/Xv9ACggz/E2KGa +Wjs1eFGMHsDeixJV/icAnR518j9qLfnTXG81oDSg+LVi3qjIiQEcBBABAgAGBQJW +2nIFAAoJEGKe+O4Mi4Mz6X8H/38qfHEQrWr1WaEoiZTsIq4qHqXHt5oK2fUt15mQ +jDIutggOgSlG2sPAEmiKxl2Z+adGvCr/1p9xpFlMWIXql/aJXTQpgRwru8J33eLC +B9Nofnkwvcr5FyUxKgvDE/mSeT/zlxDaBtTCx46SEizSNqR7y2oWb/HoYTu+1gcF +8wRmKxF+UQLiNY62r5VHggBLdHz6ZLJw5Fuq2X/XNsto0b6XYF3TcL14WyWaIB/9 +gNVMvkFgNeTyfSrICnzcZLQwkCfPct4r9ekD4Sr7RLbnOnsjMnfsWbACgEV8wVsQ +awMlDwWWxFMIWBiOo2Qw1Eqw+JFVq+UqVI0rRbXBBgqVshWJARwEEAECAAYFAlba +cgsACgkQvSdtLm/PqIUMaAf/X8KWAvlfo81h3dkGsVLEGgs/SdhlrcMrkChcfMpF +HhGaydcQG4VQy754GnclQGqbHkazFN2zB6/GtfJ0tqTG8UZNTYfsXjvOCOaCvHCr +D8K6W6uL+PyFazvg4BpwZeHuOTUepHKVW+/YCkV5YA90w8VkK7TJYTQUOoqjY5rN +ddE+UHA7669L2ApqvDFaKrRXIl0XARk7cVbmP+Rmd9lT3hAKAYLGqAoTBc9Ih27N +erJG6YSRovEaYMyH6waYGu/sQokRcSs7tmW8NLXd9MKe7zqE1sn9s8+/3sQ7XVmn +bk1IZKQRBvn+fah8x8lFNTFKtGbG771f7r6A1DiSwaZE7bkCDQRW2ayUARAAp3na +YPI1BOJ2yNCgDwtcaTFKo6i+JEexl3YexJKO/gbvfITZpDNknOGYv1bbmPscHY8B +dv+U0YOYwOYOpuGMnOFk4enHrayXYWEac6NxKHNwiw+1mktvpEyrXN6JsI9ys7zE +0TA5t+7NpChIJ3uWX753P/wXuEcwiH1G7fnC1OarWMo98pRlXVUWSpQE8RXIxmCt +IYisBBCfMIVcGBRd7wT/yMU9ADZBeXWX5wHxuN7R7BauDND08Vs2AxZ5bJpzKrr7 +PjpGUfB0LPcsZ0l02k/6nBnSymsybenYgRIpcP2WxLuY4P8ZfkPQy/ZH7XCcObXl +yIBTBwEm2JTpfsV9pOdM9J9R41VAzq8Ljm6lMMv0i/sXT4f4v01bT40iuNa64mOC +r0LJHghpF8q/CY0xwwoOSsRdDLOYUpQNdA4colxN5aSE37Wi4dSU46Sdp6WNJECn +2HOdeJJJCBLVAPCgKXCHf54HqiZI2sh3sYCCQUk3GKKAJQCCKqP0uxtw9wdq4VNO +DQaLQADR7uxZMnKT6M41XEvPwuvXFRyUj5VSCyUzNryMAkYyxScWncFzhxMzSWh4 +qlU1litNkho3xQFFpa4zNI1S4dSfzv7Sv5QcslUTuWGz+d5Ixl5/XajHceV4d7sy +DlvQIXfVUzPfz73Kib/jhzrUGPFNF+BZ4Qe6IMMAEQEAAYkCHwQYAQIACQUCVtms +lAIbDAAKCRA9Z8unyijlpH82EAC9jEAIX4MkulcI1EqZrh7K3TMHCCl9UE3YbbGl +i+X97gI2yNQjQSL3FRMZAcqLqNq3I1PCXuSg5T7gITMNh1DpO3JjZ3TBLvw3tdCy +/0sUtzcRkxmAN5afpRUUcxi6OA7s8Y9MPuWNnDtcG0CGEG7WX/bVXowue15SUXRv +TShSVoalOxyra2/1QKp3fqYPRwfPP5cjEkZT19riWS0gH+k8GxKaYt6fhs2JuxiZ +aOZTeSWr0wuFIemygi8jqBhOdsb8ialYeoWrbw2zOimeaIm/rLgT901nE6xF2zl9 +jVhMNPb7EmFOOIX65k0FerlDO6aiufxKfLNAfAp+AeM5jv1b6T1jFBOltkT/0dQ5 +NNSb4loz7zo3fRvZDyUowS/F5Zrdt6rsX0FcGJiPcpaPlC9W7kRw60jonMhhh8mR +46GMO7kt3u9mMHVeSUd5HRQjFakeVwQwgiwCX/np8iI3t33oA21WUO9TzY6rKgJf +znX+MOLRilfFaqSN/B1ZZqJX3S7wSkXdO77KSShZTFJVoY2XvyqLTaPVgTM7A/By +KOlzghRF65ViVJnDZUQfQBxe+qYCplAYzcmxknQFeNBeaHbuV9fZ39sKX5I99arg +mk6wxhyuojEHuR7it6IU5BP8vaAGrL1jb1c2EeAe+pdJwpAb1Aq6MU6uWqOGup8t +9T92qg== +=xY3m -----END PGP PUBLIC KEY BLOCK----- +pub rsa4096/0xD583210EF51471A7 2020-04-08 [SC] + Key fingerprint = ADFD B709 FE1E A682 E585 5971 D583 210E F514 71A7 +uid [ full ] Sendmail Signing Key/2020 +sub rsa4096/0x5C092A1B257B1C27 2020-04-08 [E] + +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBF6OACMBEACZTPTPsjrVvigeypzCc2FkC1vuAgD0IcGckcjFL6w8r9O9eG8C +Y1ZGKF476MAY1EgXvCrUbDG7LPIi2y2SGStE8iZqhVBy188C5a7LPDjX6guHxL9m ++OX7TafOqS43BbXuG1fvWGdhnEY7ZdC/SFUR1mWwFz+pHYC2bTdUm+KGyqBdT163 +cSPycWOixVdxGg7CPJLSvaqJ9Ft5u/LalvLyf1m9vT8zLAn7YlkATvg/wuzzB0LW +zCV65FDuda4kkJwelhT9kBbEkoyqLU4Y4J36X51vXGHFL3Uc3ck6FiLt1qw/Hs8h +SfwSf9vgBSNhi45rYe6sfBTJN9PZ7l+tPZ20hU0N0+q3QodlbXPy23WdeT4cvp2E +vAl6jUMp1rypEmgr2i+CMMt6g4itxbmk08SXC61XEPZqeV3qd+hqRSN9bicErJpE +IZysXdO8SXw0NhomdwWncY6BWPY6GYbIhaCRyPEz2i6neUUZZb+qZNKH8KJwij1j +jre2+TTTIWSUCSVXh5YuKR4Hr+faKU5+LXiC3K5GrmAIxFA1RHXvq68Nt3P4jFKI +Bu+T19xC/R8Lqtc271BDlQxQW8uwhESZgp/56Sf5XTNyWSoEK1QoVChkn4vO7m+3 +Igyn8HUVHOXmNpYKXeXtbP6Y2ISAf5YHkdFtdstj0kg0GWCPlFupyD4diwARAQAB +tDFTZW5kbWFpbCBTaWduaW5nIEtleS8yMDIwIDxzZW5kbWFpbEBTZW5kbWFpbC5P +Ukc+iQJVBBMBCgA/FiEErf23Cf4epoLlhVlx1YMhDvUUcacFAl6OACMCGwMLCwkN +CAoMBwsEAwIGFQoJCAsDBRYCAwEAAh4BAheAAAoJENWDIQ71FHGnRssP/i0mBf7u +Kn6ap7KOmJ/nwmhfd4enqGPITxPxVnwmnpffVv/XA7OuAHkCPql8jD7z0FPZkTEp +Wgevj/mWX2imjEIS4sioQScA4Koqc8YczUoDTeg6D4KcZj9Px/t8OZ8ubCSU8n7+ +gZC3qY7bOnQca2Sdo7EIHn7xI4EgllSUzPkeZW9PTL8xLPGOjH6w4U4Xaabve/Ls +R7RQW5lbsTboWJBis8n+we5TMgxTAIUavXVT7nlRO7F6YQuqZ8vLB1bHj+OLEaVl +3iakFt00X84Ee/F7XD7a2YWYEBfvwp42sFC16ghdgPQN3E0keJZqKwnBiOa4sv0z +3eiSJa3S+mgQXQ8syVg+IQFRgPq5z8RLyHdyTmdRcPHSxNX+uJIMP4+QgnrcH2Z4 +OiOEHoZKITOudIWNXmEZWNU/TQMzlYvQWMf9BRMQM7He1JCAPf20wzvNt0JuYdll +wPbhFAdWps/ieHsQ+ApLMrEOoldfbZQKGSEgMCJkiSCb5hnc/z+X3zBjIi4H6lyU +eFLX3a1gVg9j+uHpORn7y5q7Uw3HXkS/a6PExJOu5sfffdbfNzkAIQN4LcCTPwf7 +bH25aKnmIeXY2w0cxmuS5t/uT7hYaIZgGyg0nGGQ5TCJ/Zicop+7W4lcvyiKqvmd +83SmETuY/S05ZqShQaeumdjn0CCBjGA8XYXoiQEzBBABCgAdFiEEsICXn00EPhnQ +WjacYp747gyLgzMFAl6OAZEACgkQYp747gyLgzP4SwgAm9fa+gc9glqkijfd1tT/ +g5rXFU0jIr5vtqFZg+4MUQ3Gl8VUzduUQjAkO2oF9A4qS5XW7zaOQW8EMC/ioFsM +aNHQMsWApGUwGdxnUL8psUROqJ6ry+vHkO5aiy0ovdvKMYr/G1N2jzf/5C/V3C/Q +Yr6NMdAAdiFbe1eg/I2cCBifVN4jcg/rqIMD3j5Tej46WZ6Yh7mUeMbRSiacoyAw +io7G+QOBF1MdnNpDX5d84g4LG3KX9fKErUaDlLvulnR13RvtIgePgyqBb3qAiwmz +0/N4wFn2SyF9i/y8SfKZmNe9PKz5icxKaVH7sZoREc7BKYrEE8NDO4a1jGwH32HD +gokBMwQQAQoAHRYhBK0g4aqLQTZwpkJS2L0nbS5vz6iFBQJejgGuAAoJEL0nbS5v +z6iF/5QH/3hzctN4ADtQL4pQOLB6Fjfwk7kJJMJyMS1KsOQaVjfviB+v02dJ/3jY +G8P/PGuGQhNTdOo5Sd1riMAs9qBrYTH1LAzbGJYKT7aU0ceqCq0BZA71YRY7GWv2 +8TuG6LLjcZZUXjj5a+4p66lHgvq+FK+moONqA445UxVqBgsUnbBxbmWQEiiIGZYw +upSB3yAmKrMsXk8Hgqz+1yg0TtVuhfETB5L2dMlA/ZfO1WIzTQaU3TGbb8Q5m1dx +kD19iD1oW5BkmKZHo5yzYHPP9h3kMynVgJjRMfW+u2tv8GnJMXxHkacbpgcsySiq +fpK4Kb4H+fIdOViwufEBbdum+LO2DlSJATMEEAEKAB0WIQSxdZZEUwNdzt176Rlg +TfvyhUEKvgUCXo4BtwAKCRBgTfvyhUEKvgO3B/0UqQwduX0jD00L3q6k5hYpjuir ++llK9XwBrfBehpYAwocLX9rjeBthVvB+epNBsacU8CmMbLgmvq7+ZG5Jh+wNhHx5 +iXK6rZvTjm0/CxdbqpqsvpKkNdNsj6m22c/zUu0eWxPUAomfSxfX0FgxNg8NjOZx +RH+gi5FgItQY+hgLVHaSEQOqmm6Lk7qnt1KdhI42uCFxaBjAhB/nvv7lCeqDJltL +Q8yHCtEKTt1Z99KvldJicAAcXtC4KmBQog6szmw8DdZcV+mzXNyvGMXxsssAaSOj +QDjdXmCiGXnnxMWdmc0zjUdQJWWIgO6erwu5OCX0F2NuRE5tgIMSejNUAuYBiQEz +BBABCgAdFiEEWHJiGKkTQA3mYDYBOaTHfal4hLAFAl6OAc4ACgkQOaTHfal4hLBj +Zwf+JJ9rZ6YbR30sRSb8whxcXWDd0OhaBD675/y6BinZxPv7i8sxb996Pdz4wx9U +f0WyBU/1NMsror11cdkoaIb66MHkicgTYpagdAnRxGYStoY7mGCqiVW6HZ4th8CD +38PX7w8x4ct+9FnTTfdK01N566YrHKLiPoBLpPmeqVItzLRrHf6Rj283dYagxMfO +hH7JAK544nNxRja99VrRYglozUNYPDE7OPiTyiG/7wXTDfPC2Y+oWyAxQGmA/vtR +EApIhrKxV2YQq4YWm2X370y6FjjH32AhjixFChDmPA1ilLTZOjP+K6yTSmQ5JVTU +lnbh41oyZeanMiZox063hyHa54kBMwQQAQoAHRYhBMp6jzmiQZ//sKmrJ45a6fvO +7vQ7BQJejgHTAAoJEI5a6fvO7vQ7a4MH/34wrS091ePEsnmHR0bcUfuWY0fq7zko +7wj2NIQLScha8mvgGCPDNR4GfGi97+Lqp/euuSIr30WVSrdMIH6ZNlFItnypdu+R +8DrY4CjgaIc19h5HQlf8V0aL52NNlJ0dwSwMSKgDDUvmZCBnfIdrF0umUc8uMRxr +bAHAq6TUaGOxbqF00God8q+TL0Rdb4xF+5UV2LERfNjJ796NSx2nIH9MzBRcrQrt +PPsRE59m24yeLfMXC0G+pRVA6IsxVd7jX5shPhvXbu9VNCpPWyuATXRdMgMH/I4k +qVVWV2UslgntrA/pPb8hlC9vm1Kila3yE8X6XdUv7KB7s6Rr7fiWqI+JATMEEAEK +AB0WIQS4fUVphvGUhAflzLQ9aLJdUgfK0wUCXo4B2AAKCRA9aLJdUgfK039wCACD +IgBkSGltFdWBgPmNeDUShaszPGeAplv8imjaJaHm0T3G671df28MTP+e2iZ63eqo +cIwTYIQNBEPNfWa5FL5JkHMdGsOuvEH1UxowPOWDe3AfJHlBPOCtmo6oLro4ddin +epLJMqOCLygDtM7vV2HAY8WqLC2206QhHeNE8bWryqTO2T/2IjrO28Pcbf5dFUPC +o0EmtzQLw5WKOwa0BINb63Af7zzJAbXKC9erGoCyFQu1YyRmsn69hC6x4eYccijf +Lzr7YfgJbWUJ76bJ7HhdKJccZUHhEln0u+onsQqKeHes143n34cBnq8nwLEWapIt +23X9grK9H5KCNBss9ua6iQEzBBABCgAdFiEESfaovoRzOUlRkW87Yd4R7OJ2OnMF +Al6OAd4ACgkQYd4R7OJ2OnNU/ggAuXwxh39YliN+AVi68JCkeYIuy+mrjBMK8lj5 +s5o9BY+KkiRMIlBcJq585iPJ3xYhPqqf+RbXWVJr4qiC7iFzD703x2GpRxJWssIQ +dilRWRixAOGASc6em+NkTDnKFuj27bsM5aUx80yo3FUhxqwHawj7vp+ysx7XynYP +lXZ1JdnD/uCM1YzMeZHGrQtO0L8aIDcqFx0+rz7KtIyUQ7kYdeZg9rjamfJdbBko +cf+C2jWX9gF0AlXSBvnQ3Y/r/2uYgCqT6mKU0Nt6liC/nN1+R+AfIY5KhBd86gPN +Qz8mCdLfOcO3EbKHWBl/1mLgNX/KcRrst4YnqdPvyaK56EPun4kBMwQQAQoAHRYh +BDC8p0cF+kFUVXMde6r1td4FvcxTBQJejgHjAAoJEKr1td4FvcxTPMQH/A90Bhrs +RdzhXXQ2cW3tqqWbwuphcFfIZr4kn2br9yNqt/vHjIHqvsrgiWMKQKJxX4/UoLyn +8EHeDScyrsVzLIKZDKAoGmLU376PzpDJdlzeFZOaRG3iTz6Des2THBHbKCp3g3z/ +ALx0yWkW8TJWzx8CV3nhym3HNC/567OR6dfWa0J0CtC71KqfE93HB31Ac/SjNUF7 +qQSn00RWZWfW+n6hDL7GDr34RewajTpZg7HwkflY29XFUs6FuOb0Kpd31WxNO0vX +yxsSzXH6rY/A4kvx+I4Y539rkfu9GdMXvefKUYBPKVMtn2a21LdsjM8RFm0kmusz +jDta0WzzJxlAIrWJATMEEAEKAB0WIQQPXJauyOaenI5ULlxtTNGUKfsD3gUCXo4B +6AAKCRBtTNGUKfsD3m7BB/9yn/GO7AvO+w8MCKmidVZZNLA5XPkwP5mQzkYwr9lM +7Z2vzdLthohr8jPkX2LatKFsmzzLZuaapm3oKXQa6bRm3xZbGBkTCR5HbZ5eh7lt +wrE5Ot6bzLTkQPdfMJVK0NERMVTSmpvZsrQPGSQlHg2CMH7D3xQh5Eoc+oQnMzPz +ZVQMBtlprjrWQRRzSsOUS+mql89xuLAByS2SV4tW9WeZlJJc8dVwdZhoJQ/4osvP +3p3ifA1pY5I9R4bV2gIgLKo9TtUWnGmPPnzqb1zeKVIdpbeqRkAwb6/boxroSNT4 +f49iqiPCNSOSuDB58PGcwJDdZKDSwimj5ATrWWYffMUuiQIzBBABCgAdFiEEPIoe +jn9Eyt4RT+1GS8m9pmv3Jq0FAl6OAe0ACgkQS8m9pmv3Jq2RqA//TkwYzF3J7RN8 +8tZMQu4staXlu5Xlo8FNVtqe2mRhmkXtVTFsrrpyohawAwg9Kc55FcNzdaOjzpCM +LNDo3huboh5VV2tUVJXhMj/Cs/KNWE3r5A87cGcDwMHhxYB5VAJANYmCNtManEvq +rwIVIJx7MXIt4hWRBcCWf3Z04nEZDlAUdzmr/yZkjYFwA7GFuvw8tJI7ehBz3Y6v +Rx0ms7OKlHKVQO9q9Qkw6kOrC79eY4dyEhXodi19Mg4Nq2D8ByhZMaxvujzvir2N +z9TjEPHC2X3yI9ts76jPRqQvPZ6IDDRX1xyc2FBuU4dOnEeDp/1BA63adlQXRISD +6Kv1PeobIY3eFzMWpyrZxwrCu4he9YdWWjZO/t0LkC2Y3CD1Pr/znCQwbsnQY/VZ +YJoVUYUPGxaa/VZYLJ26thJuL8fX80ZiTJTWlopIxY6r8DTok0sRsDP50+GVn7Q/ +GzEhpA9muAJLu9cPFTOFxHy6klOX0oZ7SCE2kN4ZXePBugS43agOdihInHhgfKwB +qXDZGDPNGWpqyzudgeYXC2qCooKf2Uln2CTiUa5eioPpl7KqKxwE5zl/byLa8fDy +I25Aye1AQClaUP/5Ei10mCXWalZZT+4kkWVaT0UEECiYrFFTAVBoxmpOvnuFXtey +Hzdc3jnb/M41WBUyNbLUUujbSqDknwmJAjMEEAEKAB0WIQSmhz0kpNbWKErkKnXw +YFn9XcfMPwUCXo4B8gAKCRDwYFn9XcfMPwQOEACrqEL1pv7oYV/UDvhqeuRlA94c +kMfrczDp3QXUjnVA74gLzsPDziWZmuFQ9Yl2+YV2CE1UlKMauJCvwFDM97AK8Qhd +AzGcYR+sfKZtKdvciU6aLQ9eMSTOmIdIc+RSGVOKTRGWYxeVI8ynh4D7HDfrijAf +MoLsEmvdgCm2/+jxoAKQw76TL4YsBWGLN/kGWTN1pQOPAUhin9np9edvq+qf5E5e +YV80pYlhAPfM45cTqtiNXQDK7QFBnKxocpqPBrFsfwHQBkSlpa7uwwaBk89qp3Hg +VBBj4g9bXAoDZcZ4YzLgutie8GPgJ9+S9j4ldQxh0KE2oV3VVuljPi5ucisfqWj2 +JEI2EwPpPNabRkRN02I/D5R4MW8Rg6JCyknAhPYS2sERS3w/DtOiFT6ynHN/K+PK +x1clvEz1ZeUSCS0SpXVxHZ/gq9ZUiCR/2Sq9O4P8W14V9BJgiFWZNFLP6CBDobwu +zsJoT2BYRbTu8hX2rhCnPTN7C9+1SXHYTbIRyPzCX164QWi86X7/FJIv9dqRb8t1 +pN5TUitQ26BcNMUNdB9Y6eCTRSYlq37LsWRTbUXPQ7IHZVb6BpsVX1BVF9vibmUp +5yg7dTW3QRgrqmUc/A5P2no/QUgtL+svzGs4eGjyirQQ9kXXVQ9iXTcaa7xtRNQE +NzE4pZOv8nWgDYRifokCMwQQAQoAHRYhBFCjAwmOot17y+4q2gngH6A8DFBOBQJe +jgH2AAoJEAngH6A8DFBOGGEP/jod+csxUQ4r8Va52Zd+G9iPm/L9i3ZcjgJwyDbp +6qCEPv2YqY1yQi/ING2HXjhcI0cMjz4bMG5gqYxEdbs6TNBqPqvhnkDiSIRedkjd +3iFHucN3IRezQsnn/NC8Tsh+Kc8xCFZIa9VXaBqcJiihRkCkJLTlvT036k8JAfXo +XDU9mjLlGsJpIs5Z6YNMlZQbO6mr1A0j6a6+p28aQd/64Znipf6nPKfLOcAnsVlp +JHP2nFj3PFsbigPmRAsV/6LM5aidV4wDv04SuPVrE6j+//8Zl6YWLtca9gHBMxEe +RJlfN1W8ULJNZ41MEaP7XGVAe4AEYZQD3ZWYYrC5w8TR0P6hpcOm6nJww2KwjYRV +DOB2oePwvThr9XIKvQZeruVvqi36ZzzUjN/ggl8r/4Fp6A4LB9m3IIczPwId36ya +tqC95jO+WAi59vcUozyF8+JHjDLBfHowvqQf8l7nFz2FVXTsVJisQh8A9vfWd41W +fGkBh9ZG0I0KqqigCqB5+YDii6Q8ort5n0jCg75+87slLNPqdigVDg+tsii1ZMXV +od3ezyi8nmQjyX8qV7jUz6tSY9ar5/3tt6G6qTtY22Xb/9i4aWcbfEZLEkixVAuf +kUdo2Q7jDtdTKaYvJ/7l0XtnyxVbhlCzqUZg393hC58kDyP0yOtQTz5YoeKlvEJa +6rTuiQIzBBABCgAdFiEEKWyU29AoAkW/05HXe1KWSO6FcmQFAl6OK5MACgkQe1KW +SO6FcmTM7w/+Iq2OrevekUO55SM5uGLKBNgHvopIV3NRP0syVWdJNJ0qcOINz9Qx +9ZD+G37QAt28a4Emwncg4jWQENx1xH+EUGX5ANlhnwt20AZwBICAcYsZMUZeBNkT +Qi//+c5BUNLR1CqErYnktgDdb9rqOXAD1tsVFAAoWyPVuJVK2ooZmcpxSDYwWEz+ +mRafgu4vFMbx03soyESLqK4svUuMdEVaoGlm6Jy/BUYt/kZW2FTpRNLdQ7M+fYJn +wp2gYKdrbA4pbIDn87Hr1bGkGkYMjS/9kPY1MzFG/lOVE4iIgrKJoKGaVgIpdZHc +vrkKgysj6ohJdUwWJJYyOJL6KB6lV1OZmhrdsWAa2jf3gkoY7bXUhagioWYxBsxN +zjQ3JsWXFeARut18Iqrwo05vqeofdz/yMAca3th76zfbPWBZQYhZEgPbHxOlzNp1 +VwnZcYMgQc2Dp+6ZaoFiEgQTItTw6pBrsyBecFHvqIGEhebw0MFubxueMs69jlSI +hHhWVRBT88ISdQP16A0JC9VF8Pi5p3Infh9+cD4yfks1eRJ9iRFV2WdI0QwogCve +Pcs+1Bk6un2ImLdV4JwhIBH/EXvKsj0jxREDxSP0GscykcbO2jP1F0hh7DPWb3+x +A6u11cAxIk0MvUwBasQSf0jugH5uf+72RGiQKI0nyqwgB6PbJa4/2YqJARwEEAEC +AAYFAl6O0EYACgkQEJCvIKWqW+Y0agf/UfGphCJvunLo54+Lgsx96jerdbamasCQ +D5//1WLccOgxHIakrtoBfr5l2IhyNoqsvydWH1ek4yIQ1K5i3zQAX5qWDRFgLFuN +FAwoLHR1sH7hwkeri7rya7GllnJ50MgflRMybgaCF7+t5xHvmu8UfLAFCZSNTDyn +gLKx+pR9oTCMpQJ63P+zxokmuRhgXi640XHKUuCdq6o2TMdXkb1JRY5fponWTFBK +jBMpbY0/5pAs8wMxgDYKBtIzh6t1GyUmqT6nk6m22QNFDJIPV9NKMS5LRpC7O7pD +VRnsnH1bhbkchfQSI2Hd6UIt5mnrFi5G/Mbu31z721uKX766wGBc5YkCMwQQAQgA +HRYhBP6PzR9csRnCENReoDEM9EqsvxFCBQJekmlzAAoJEDEM9EqsvxFCnssP+gPf +586RLbf/61+aUce31CD0JZW6hEc0s7MTcVGeXJJkPHEHLP4rP77ghLrIU2d2mkP1 +td+b2w6q7rDNzZiNZEHpL/cue87+iLIVOncZxxwska8oxLFiPcnK2ft95Sgo/p86 +lgFsuMCy9JtzPgk5Md2tOVZ+Mi3uSI0E9HfRdKdTRBfnVJfnF1PTNN0/lC2VA9mM +amaghgqyAnGI9dOcbJ6GNqyugEci8hMfjMoNZlciDcDA/88GEBUc1NQdbwYA0uli +CtKx07wvMoVzEBQP9PeBWC9/Uv+i2mY0sNPJFuxYjUrESDpsvopRhkgCEZRgztMg +XpOHgOMrzUg4GBCYAGsNR71B9DfltgX8mqSRCcRBuaGDKTN9sybr7QKCaHZde1Rh +3X/gbqqmB71IFOluKyKwtT+ezr598SuC4Xp8K8X7fH8Yx9vAsw9oFMwPTQqzWC9M +tKNjQRsZSIVoRNZ3JlcEzdM6IR5IOmuKhyV8Z+wp7Hcvd9DkSKyzgT4qiRU7aYHe +Z50RU/M6usrGpCgV9DFdFLJ9w+TDqtUbtrY6SjkSgpawbwvcOali3Gp8N5uB0HyL +dO5FUmJR/lo91nV/4rgx060la0QQF+rw3VzDH7tr5Hlasrede1ez5dtsnRflTWBo +vxkYzzvdU7tSbItIrtxl6ve1+6SzwWPEa0DtMDB5iQIzBBABCgAdFiEEEsC24lup +rSzxu0tC8Ar26sJF0gsFAl6TCkAACgkQ8Ar26sJF0gvs9g/+O1tvLLSOhiC/5ZuZ +qbUKC//J+y1uahBG3Y4nT8fiyx55/U2Y7SG8g3WWxxwWX6gxe1ALWFstmc2C7Tip +TIo9VenVV+nH3kYRYqsle0ImwrczFs6ZMRr+yEo5MxkZqAjm04Bl19i2mSyydUc+ +7yltn6I0XJ83NmUcx22ccyoSZrHpIzUTINMCYdQUxOjMsp9wAvaT7doROkt11dil +SzUoJ91nCpy3woz1tMXVmyXq8axKbtBnEEvncF0iZQ7zIDrRhMQYHl/WTMZ0ejpD +P3KA8fE57wLLvXEp5czc68Utj/nDIirgDN61Wm10qh9ucOMWp+ffruTan5oUNckV +1PbCLVVPLy7tzjic3fL8fVLTNcfg2p9AbXzU0IS4pPTyv5ThdwdZwZm+EkvMeFwY +AISsygWdt+bHOhGa8w9dKAGj5o9l8e1sFc7Vv1gBn9VY3waknkiTubv0FRHZtXsh +znz2AU+JI/6c0VZT6hR0oLXI4m2g7RFAkESsAcRmZjGyJe56rWRvKyClecCxWyTd +l7HDvD5COUsWvqnfROLlxJym4lNOpzDaBwtFFjBCo0ahBcDbvpV4zUSdloWGV4R0 ++/tra0DizqTJCsRy6uA9My77OhHV6NELjsRzumfFzkJBfU3enCidApFtyLg7Jiz4 +LfJOf+JTHPL2JkLLX/bzkfWipH65Ag0EXo4AIwEQAPG+GGrflLiUzkB5aJEK8lJ5 +LCyPW6wau6xnX0rbngAvfAM3Lqolyof0FLPrecrXhJAKiyKZUlhTF/XAxWYwtgNb +0a6Cfrp8v4aSI1Iv3JK1jsFVAULfdRznDnd5Z99+uT0M0kuHQhcoVYwoEUQg6fjV +kuoBP6GC2aVw0j3jUSVri0nXrhHjVL2cRp06R93tPsrLwfYl4GisYKZ0qDN2SJx4 +zkOdq1CRTKQOIVr9m5M316Wu1nCzlB7yK8Bd4UgkPq8177yyKRrqcfyH52pBOYbJ +/o/SVx03nNu52DYmdb9L2DShERt9vFw9CvyV0aAJBa4wVlVQWVUBOCQBqfLjClzl +HqdcSLaBL9clcKfNnXfDp4qD7XrQlCXiIH0w4GmLL0+mJBTbg3tUTaOvRui9r0oS +QSgbdcxxbb1bDNL5mhVNX9prARuSgVL5NDRLYQyKpru1xJT1P8E9bI4DAvXrq1wy +6O1n02MzRbao29AR189HebfRmGVaotRP7LLuWKJY5zaA+cv2VZs6VwmyA4NOZcG5 +FhlzFyguLaC9lJp30fg/l614XSnxp8Mxt+vH0zlAeQSA71D1+w0c+y441YuYKgVr +xqdwN2FwlsCjSdE1JkzQhOA7xeTd400dZU4LTm6zEV2cKbXRd/JZfqJ0BVAhYIII +08JlYBZW/SAzXWq7wWvBABEBAAGJAjYEGAEKACAWIQSt/bcJ/h6mguWFWXHVgyEO +9RRxpwUCXo4AIwIbDAAKCRDVgyEO9RRxpwr5D/0YyFqg+Y9+XqA8Qkc1uQelQN5i +8nMBsga+t+rh1CJsLWxF/yATo3ohD8/qpaDhmEXKha3pvw0xF88WZzdOGk+Wvp7d +GVCK3ZLVu/3XnVhvNJiL9jjJXuilkGA3lg8FPiD9VWN9jqs0R1Uqe4YqerQTajEJ +336EbKQsp6gtat26dKigb5bLq3ZHqD/1OcXIxtBGBd/ayStxhxnHJKAymW4hmIiR +CrjrQYCCCYv6l43N9uaHh+CWoJBYMcMsAHbGsolGLVakOm/IN1uuZgegAz3rb73r +2T8LLZuYmdFKkt8ptbEwTMniIN2JQYvsehkcbSvdnGIHhiiOQQiCVqeiOSSR9bx+ +f0LYkKFdVFBukK/L/oQT6iyYQR8hcMavGBU1pQDKNHgZtVuQ0bDGv4FupSeaQGg7 +dYFt2wfFHWPK410QOQD7PxzFjxLl9EzCs7FXbIzJ7IVOxvfBwT6g1hab1FAZT787 +zQvrx4QdGe/3BoXOoV08tqaENc17terEaArBleNb+Flqc4gr/HOInlpT/BQ9fL9x +0cOZmh4Gbu8nHSmhAOB422xn+XRum6LQT2E4u+ITFTOGLk31FXJ14xRS7CsKLd4F +gmOJ78JKVfONBpmdVsw/emTMU5I/C/8m9l0nO0P4Q6diao23krgWk73x7dBoBqDn +4XUsDQOZ8aKrTpMO+Q== +=jgHV +-----END PGP PUBLIC KEY BLOCK----- + + +pub rsa4096/0x09E01FA03C0C504E 2019-01-09 [SC] + Key fingerprint = 50A3 0309 8EA2 DD7B CBEE 2ADA 09E0 1FA0 3C0C 504E +uid Sendmail Signing Key/2019 +sub rsa4096/0xEF9F24EFDC48FA66 2019-01-09 [E] + +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFw2ic8BEADI+1rR04aRoVA2llbsWv2KQpLnItCL2vxBo/+7OdqC9LDnGa6/ +BA2KgTrykOv1YiAK6WBGHiapZx5Wrob5UPPjDERWX0a/O1ejHD6T5onIUklrS2VO +ZxyUvNkqx0XMtdvt5zESVFJv81Ykp+6E0cF1211ew+5BC15RHnkiccrZWXcERb9r +YRqCkVJC1ENd6B6fFjipjTM9Cn6WUck5kozW18ASBiT4ILjR2UjXV+wWrAKNoFny +Yki3a4aYJ2qSo9509oFTqpb8nX3vTY9q9qvYa4xW65ZYi9ISdbDOJZFQMyo+rcGU +ksvMMnsAnsebYBCmGj4A+9CQZGRY0GbUc7iLlFATwd7COq+rrlmXB2lnbBY55nH1 +fcCsmnG8oPGHtSTOeAaBkJKT3y5raIqHp/5pIzNbBpdbDkQR9QnrWtTxH605R1xo +AO32/m69Q1gmeGbmmR96bjiNkdGHTTZsjOLg7+EpuWcE+lFbDJnSTUD5r5NCUHCY +pR7nQCGdzle6/8OztmNL1fLYbOCHDnHZ+PknixjAj76VRmZYYyBf/nwAQfyhpzQC +wLK9wyvuqyeIlYjBNYybqji/KgpC8DLI4T8d1rJAVlf0hy85DCGST9/Y8rdMGgVj +HDJHOTZG1i+YXkFQccJOVIIDZcCIsLmY6xCaOp+208zTUXdW4cpwKbK9gQARAQAB +tDFTZW5kbWFpbCBTaWduaW5nIEtleS8yMDE5IDxzZW5kbWFpbEBTZW5kbWFpbC5P +Ukc+iQJVBBMBCgA/FiEEUKMDCY6i3XvL7iraCeAfoDwMUE4FAlw2ic8CGwMLCwkN +CAoMBwsEAwIGFQoJCAsDBRYCAwEAAh4BAheAAAoJEAngH6A8DFBO99UP/20PWjVr +CiCGWWrxVkRcoRHTUnyqSCvpJGJwIoTNk+f/0K16xmDknai/fdWqGVsuVqTZwmQD +KL81U8hjHlaDyVes8d1nQ2RDcwVpRyH//8U2mhD4Zyb+hZg4eJrQ73K//OQgZfJL +fjxyjbsRD7UHITKwgdjlXCHFJjfu1tVBGUmUhv8ncjXBRgBB5Pe9vl8y3qga7IPg +tcbbPqmobPCu7akHioG1/RwzruKKIHVUwlng3DFg/rgZaRQGGe2Hn+8ldFTB8iTE +uivMZJT2M9p15/tO6qLG+SO1/pB6xuAeZROENtL4ZTnxKMgjm09v8ljntIkkfTmh +hfoFooN2Im1WUYlU6TtCfcb9chG0a3r8suLTe68uH8VLhSoPaXwotWlpudGwSzDK +jFwOPACN9QcCG9zLXD/wbpV+PO1vLTkZA6XkIuc9udW17LMo4kvxUOCmiJZAb5jk +9TyjIKHvX804P/ONbTj6GP+mdxV7vQmTxw4fMTH6GVUlqgBKYBM9GWWiLOs+2iw8 +EMA3jq+9byKYQ3M8n9avg4BlCmyTMXHdeEyKsk2hBApg/nl2vfNASnDrcvwo6S7O +sP11wL5OjGNI/BCp5LEO36HyUEZTENs6IkiyOp/xOjg97MUY+BrG7Y5hTnKWCYRh +LEgF54o+ICkDKJAND9x54/59RyFXONoMFhJXiQIzBBABCgAdFiEEpoc9JKTW1ihK +5Cp18GBZ/V3HzD8FAlw2jcsACgkQ8GBZ/V3HzD8aqg/7B8UooebTLXPgqPm6hYPQ +5LbRAZtDhVGTMQ8QOlioLQYyqgt6Gn0XeM5E4ehPLMlHS5OjdClk2U3GzNQNheRx +LpoGxHlscCsZQih3DH3bViQfEIGN0VSYlmn1l804263/Qgrv3iTkGKcW4KcwHJ7w +fzDVl+NFCexLVBOK6FMz+DTZaOC0UifzsWzv2YAVc/2FV+WJpgfScjZHttzTWvZU +o7QKVouQlJpJzzWjk3Z6Nm5TWKcqwT1XJxQRi/fcYPB1iAHp+4fN0xhiLhMeTguE +K6WQ9JJDTgULMgXUlONX3vML00nX/u8Sk0CPKLXCAJxPouH8wohIQzUIKOSQMqtY +59toRyRQgXMaKHQ4DL6NehkNxduFBAYt0wgnhi48ageFlAK2kKTQV5//obRfSks9 +UR/mLWYyrhZ8BwaFAjDds0oiZRZYr3LsGr4anJ4rHXzTW6G1Z1Css3M+8hnjjgru +7i0yjkpYaR1mgGkXhbLED8x/B7vf5UvVhQYXZi6wnm9ujY/VtninXRUS0/6VtjEk +k4Cwh7PZWvKzYpa7I6l5u8a9sjLCCgHCkuDkt+6F7vUaNx5NXrMHXFJMPy8hM6HD +yzAoES4T3A+YIwU4ZIjneoE6WdfW0dosf40cXK6ufFwh2+ONg59a5ezbEWYAfyy2 +VnVOfiptJxDSV3ITaTih9h+JAjMEEAEKAB0WIQQpbJTb0CgCRb/Tkdd7UpZI7oVy +ZAUCXDaN2AAKCRB7UpZI7oVyZO0+D/92wYw2cBuQun4hNwskVTrukH2QFN7NcFQY +QWfwu5U+RumkZ39bY3u/f2pUB9mDLmFUY0PZ9Uk0z1ymJymSCmjhSifqYikYY2Z7 +dSHT1piS2RH51cy19r1c5lys6zucvAtyQAR2jyLExqiR3/Zul1XIapnmvZEv3V94 ++PmMGC42gZa3BpUamXh8pMcnMDnrMJ8d4gxKUNbfagXkfXz/MGoldZtq1PU59k0e +8Ef1vkL5IdiYLzdMprH10BoGyDEuFkKmkFZsIAvqaTla3zwklnqUxxdV9SLI1gCu +Xnz1W/5B+qFZsiYrUd/VfJVHu1sZlo3pz70lMxbiJXCf8gzs2ezFft7BYDQ/vGjT +Rm41EUs4Qy4fjSQYcTIobzd8DN8ZfoNtS/lcNpJE29kmCQxVn6rWLDSqYKqTFqka +2Jgt+fjlrPWJwJrdt5M8y0HPXeBY2ydSdp5o9vFL8SJS7ItiTg4zUZoCnssIxQfz +sg63SikTP1uZm55X6+3bKSae1wmAXsTi0I2wYEHMVHsbYwsSZrKstPpj/wOt10uV +jt3mSYXqEZ4JUPlsVQ+OFK5QlhjinDJ7NIC0pu1sagkFCO1wzGs6hoicY6hB5wFS +WPDfpgr3lkLQ5GB4+A9F8V5CaGta1ZBhnWNy4fQImWPrsvnPXswkH5NxqRL0ha+s +10EQjVeGVYkBMwQQAQoAHRYhBK0g4aqLQTZwpkJS2L0nbS5vz6iFBQJcNo33AAoJ +EL0nbS5vz6iF8QsH/ja45MCWmD5+bEpzRu6JvBrALwkAkSd25v6D7FiB5JZFof4a +an8wGKmQwXvSbC6getI+djWGOg+/O0ios/ePqUW8DWEQqF7poAlzSmb/+dScl1LJ +UR5erguFpLy9MvY3BwTh9kfZTY6hm17pOhgQ6xoV9dV2awIWB6EDOX/8XLwYFE9W ++blxfAVlJMY2l869Uiafor3ejA9rrJ8dgKlqS9kL+X77FBuoTcGPzWIzemJDKvR1 +eFmFhyrh1627fBoiaPbX7jJkBtaBubwN4gUb436+9SHhSvCdVisZ9CGND/iql/Mj +gCwioUR36t3fqNca9vbP6gfSDqfRbU2ZACWn6MCJAjMEEAEKAB0WIQQ8ih6Of0TK +3hFP7UZLyb2ma/cmrQUCXDaN/wAKCRBLyb2ma/cmrQIQD/oC9xA1K5AlOjiRrwI7 +hNsLqfabFfJrNJNhZM+UAQ6Ta1kzuSP/OhEBhwEJ4Oi+wjKr/iBeW1DwueuEFdIx +tL8NtiGWSP2MK6J78azyUqwj0c3PfBtPsAcCvTpK7gGHfAbfwqgMSscQ12aJa/9z +k+exoz8dJMM/7WTx39blJR9wGa5TSmIB/qeRlB+t9XZ1+qVzkPm3P0ZkLMj1tMGI +yykC3C7eAiE1iwRchLfBC9MQkAZy1OPIJaLMaAOKjchUOWchaLoiVtb1fQRkbS4A +WZxx/zO3++waQR3X11ZX6j3IjdPU+Mt8OuPrE70QY2+5Kj/+h1648ma9EfGhFfJX +IMMoA/tIkVG1ujOoHHbk7526lkCzRpnX4rCiGWnaI+iDVWzQnud0yN/YwGsXse7a +bf2gTB1i65VkDFqejBLSdwZC7MOtwKqGoU1pw3vT3NMmYFlyf1SzjTHZ8R2H5bwJ +jCMlW2YUTGJBlFfeKYOG7FCnQ4FDbjt2ybM+1GuNbnvcx6VrtYBdRiUpje0rSLaM +dxooTR8LqPM6PFI8HCFtH9IcO1U9/f9UpTN6eH5BoVFHcd+Ip5GYIPmHisPFYVBV +yDJLdMNMZJCeGXJbyEo3LCpIxvUuxHsEhOKD/CHLNGWjlCdmGfkpo6GFZhnDilXH +N5h6X/JXxhHKaz4ak4rMqxM1VokBMwQQAQoAHRYhBA9clq7I5p6cjlQuXG1M0ZQp ++wPeBQJcNo4DAAoJEG1M0ZQp+wPeEikIANxxso7vpCamTX6IhEX6JIyisGrY6FEk +Ctea/tNX4GXdqW0tmQ51BOLApp6yMkJrTsbDjps9FEkg2rNiM1S8eDYyZVBl5CMU +J/nVxyrF8KeoF8fd8im+hhxcDmZixw80935YaFTJfjgOnDnsbXJ+VpKEBv3Ri2P9 +0HswQMwqON5YOAnYV9z6Gzt9AgD1n4LGlB585G+XBmVxHvYti0G9CE5riViZ5dWs +O0KLham9gjbzTp5d5ux51V8R+1pw/xeytisVkrbiGpURP+zw8Wzj2K8/eKGP69C8 +W4d8vMpTB7ivOG7sfsiVHnpbf/LsW/CFDF+iyvHt1O4B3DofYLceZsyJATMEEAEK +AB0WIQQwvKdHBfpBVFVzHXuq9bXeBb3MUwUCXDaOBgAKCRCq9bXeBb3MU4liCACc +Ib9dWDrQ/Hsoqzn0Y5b6Vcm4HZ9Kca9Ye1bZodfEEjCAT8FLLX2Y2h3EAafJL+d0 +K0A5o+0adgfXrtvlstFIgV2mPzqqJx3P/Gp+9wt/jtk5s5hY/S9Va+OqebHiJ2ga +6z3yFhLhtpIN7hL0B2MS+k8YVAeQHQ3R1eWdoabMa4g8Ik2a118smeeKZAZiI+CT +AnzkDPeIS4m6WAxvBJOyjzTEUK/wok3Zzyb0TV1EtE3fYq/V887vkm9g8dOza5Cg +3hhgoogIgqFjw32Nv0skCJuL+N5GdGWt6hh0cmNkdYxHV1Yw0HLB0DknPgYlnqNN +RQFHaqiS+fvetLGn2XpwiQEzBBABCgAdFiEESfaovoRzOUlRkW87Yd4R7OJ2OnMF +Alw2jgoACgkQYd4R7OJ2OnP9Hgf9H4Cr45X3FhCb48kJYm/mtU9ph6S5m0zOIb+l +IRTI1UP+S9MW4geNbw1Te0yy2z7Xsdot3Yydw8oWPv2OCasT7FEPFg2n2BeQqHZZ +SEuUxXtHiSXv4Mfn0HKLxsUbeO0zMNAum+rwWGAv0yosQBmvfV7BfrwhflKFucFQ +a+EowlQggC6xppLE/lajti6/GQY5j9qDjvsYEtYOcQy4dSJGRj37pCaiboXJbgo9 +/mRa7fvV1+MbJVS/WFTwvo/09R9r/OByrJiuzpWo/mLdcLQS+Tcf1pFOJFHPoCGt +5nOKkYu4E2vCi4MAQdMOsshHw7GDunzY3T2gzTTjzqfCirgMm4kBMwQQAQoAHRYh +BLh9RWmG8ZSEB+XMtD1osl1SB8rTBQJcNo4NAAoJED1osl1SB8rTLP4H/j6Ly/kP +/pOxfqUSJ8DUzg88TyMDQmRxhmoVuoyR21eL0mf2sVpOgdczNyfysgXThoeTgRMN +rFw+RCP0yyq5TdVWpL3x1ixtX/c5CUEt+oPSuUsEXh+oj41sRV9ZCzUTAi+ypUON ++LVHah3qko+vGEq0gMzlBIfmyAuboU3T7WK88JFHTD9bwL0Uv0D/xqDuEHtSM8Br +oflQJruEI8xg3RblhURKobDL+b+G0pzP+LT6OAsgFzy33jvKpWxBP8HbmYISj15g +dv/HY7yZiaumQIOyFejwT4ZqjxpWGX1IoWMzmDF59jBvxlQVa1LMHnopJ3Q+Q7tf +wL5IYbQj6ANmY2qJATMEEAEKAB0WIQTKeo85okGf/7CpqyeOWun7zu70OwUCXDaO +EAAKCRCOWun7zu70O3keB/9yVNUQrJP99jQqmKrTjMb44w+3uF+cRhDK/fXnbENC +qIbRHA7vVmkQ57tQuUXRHX2BtWCSfEGwPiJ9INn4qY4vLocZqHZc/8+2rQESzrlv +wwBVNdoshnBjaw2eVLBkDV8GhcYUEYlW0Z66+h19s4RW5LWQse0s5Ax8XPEFWzmO +0McTGgStSOBBzL/0bb0nHJA67DUNMOzaC3i4DcO3m7psRTxiA5j/mAwpl5p/jnYf +6CN+njzl272bFhU0TwxomoSG7c0X7QqTVh9hKqz6jbS3VhrkWT2CcZBWhi4QRlAL +Ji7aKkMHQzjnZoIFAAmje8voB/+f1vkUuxfNpH3TMCMIiQEzBBABCgAdFiEEWHJi +GKkTQA3mYDYBOaTHfal4hLAFAlw2jhQACgkQOaTHfal4hLBc7wgArGdtwiIPiyEL +04Mr9AicdyxWnzeMcwNQZqD6quMUek5BzX3u02JpkZnnrfftZ2NXMTHcr0sbcCpI +K+02+qz7uHf4pZqVIDMF97U2L2RRn1dKcpxO1rKzAZ1Yd3il0VeQ5dPVM+ocMb2U +Vj7bJi856fZNnOEUFAJdThTRSS7e4tBsZJagi9YIEAYLYmE0a7AC6v9b2KOsrmp3 +yFZ6gVm7wdbNz1pyhvsMoSDMEIt0bUnZpFGzr/EnTS8MTSYGSHslGfEMFPJrULPi +YohvxMYcBNZCSuJx+CM7VJ+Aroi05FOd5ax4mw2+eEZs+f4BYjLBQ1opNIfo6AjJ +4n1kXz6gcYkBMwQQAQoAHRYhBLF1lkRTA13O3XvpGWBN+/KFQQq+BQJcNo4XAAoJ +EGBN+/KFQQq+3b8H/0qTkD+TMuRGq+sApIhXIFZM6F656AooZZ3G+UFvSmk0R09b +ywB7OJ35mAPIXaZWl0snp4pAjxFuK6SRsCRUtRnGJ1KNPblCycq2zF/l4/QsLKPA +ROY9M2hTg+kOh0M8hzo384UHNrOwOFGnjwORaHmy5LkOHbAte2D2Dim2SDR8pUIv +fhqHXMAjm8dPgSjAyfNO7lizmeYZ8ojlAb192snZPZhl4icJSc5QMfmyXvuWfg26 +i51bEVLIVExyk6sFwNs4JZkaDnIonogWHKipHq6oN2ETqWA71a7KwxdLnTk9kKuo +x4GLDDnloXkm6bthFeZPwBZHgW8hCMB375PRIPGJATMEEAEKAB0WIQSwgJefTQQ+ +GdBaNpxinvjuDIuDMwUCXDaOUQAKCRBinvjuDIuDM4ZMCACssWBTzN5ZoyYvBljk +XDWnzU+E8PP0rtWCIn9ACzzDTV1WSMYN3b9VISk/mGCfPL93E7bg96H1aziy273o +U0cBAkqnneRHCzINp5dnKFDRmCraEQAwdogkNnnswACxUWkEwpInrvQTcOajtp1q +F6jBAsCcFksE4nnrEnCzPaS7uisyk/zXhok9huqehcmqHR85y5/+ClOBN/mboPUy +PgowlvA8F6NCo7PGegqSdDcMiYncbLdDMI+bsPVuB4Ieg0AweokGKD+mJcn9Wm7V +ho46NOl+8zgkTZt/UrEUjgXia3jfz2x35Zo21KSgpwi1cLHq9OgEvl94s0Q/Jdek +VGAziQEcBBABAgAGBQJcNplEAAoJEBCQryClqlvmI6wIAJLxiOGcajMQftn/rRpG +SwA/Ep5ZVYuIMFrpatU9o9kgofHFWIQ43/BovpI/3MNSRrmgrwEGmAQq+3XEHTrn +os/DIRN5mmMD4Mvh6uZ1IOLT+DTZjYMwiAz4jW8EtqO6/DU10d6LBABWeysTN1wt +23Yh2WNhMQz/1hEfJii+Z3ejVeW9hymqVN0tWsmPZT157zZ5LuBfGHalGrfloftc +VcTUN7yFx/pgdRJHNwr7HTimIinUqgOw8HfgSXOhrwmUsZXLUFBE81KU2olJyW7f +Xu+SOjKrInPsRfQ1xTZ8H2f3+aHDlGviZ8E63KS1kJdQx+hHKaUjROelLZJ6yB2c +2R+JAjMEEAEIAB0WIQSBHTq1tuMIw3uuUFMztQyapKHsYwUCXDin8AAKCRAztQya +pKHsY1fKEACUhzbRpxFEwxuU4nV89QtIqqm+3YQ1Zk8n6aSGCyy405/9VM5z7ing +v+UTrF97aQgByuwdm+EhjbHsV0IIsE4/5WfxSTjaSZK0/+Z4B/H+l2e+J+RtZl0t +jocMYZxoKOTtA3Yd77DBI7TR3u0QaQgBhjNHSDO+ZdxY2XQ5K3/PAH0oVYSEOdDL +zRCBnKWdti3EZbGSpnBtNdDjQc1/wBts8mDrzwHB3KQZYRinRQFx9iCqMb1ifRE2 +38KtZ49uXvk9Zt21TZyIS6GAPh4bIkE+pMaVck9kChQJuKJrK11IygV+HjRIBieo +IEQzfhFV7dwUuzwIFHUv0ShTKRwFqz8eZURX0kDFqWvocoLMEXtSyj97kEAV+Smk +R7sOr5vIdscWKY7D+nMAVTchGMFcX+er4DwTN1Ob2WLycy1ALOz4e/UHbMiIVT7u +86NFluGcXnKMzQH4vFZZmM12UWTpgVqlLrnIzUwtUDoLz90VR7oUzYIR/6FLMtAq +gc2Wk/S1FblvvcnqQ32yZVmPC5D5TJU/A3zE5w4K1xTkqnBAaUL08U/2UeTTrF+C +XnGQghADL2LQZIS5rlAyVzZrbb1NzkmwGcI+5+QdCtOTif13Y9SGyJkmdBk81jO7 +f7eLmQL5v2nxA6YcRJFvgJti+WnUKPo/vwDmK14Z5wNXuBXGTH8wLIkCMwQQAQoA +HRYhBBLAtuJbqa0s8btLQvAK9urCRdILBQJcOFJ7AAoJEPAK9urCRdILM1gP/1Td +ZnjErH7OGiiav4Z0aX6zMud4Uommlea/em2Bcb1gtJ9aJqYVUBW8LL2ioNVGSjDs +L///KA8jTNaopty5ux4wZhgx1e7KXSDXCeuM0VJGSjGbkUlnZW3DLbGUiDa89fU4 +Qf9g9hgE7ZADihvfpPcT4xQGA7fj5SEdGN+ApVXNsYenqPrmj89MpFQbQz0rq6bK +atdKj0bNxdqCvSVCTgb5nhkjJ6XI02Rc7QbU/GooOtHTJISBMencfW868Mrp9f1g +FAv0CixzbB6qtW6C17hIM4y+hzE6G3voPxIhVx6wP7q2Dd0WoE5ZiX1hISWHBxiR +1XVkrGHI4ym/XTLjL2doeellvkGveOmTXOjjywIu4DyF2VudCaF1/9uPoQsH28UQ +Jsi0XFYRol8ebFizLkenJECY3PT2Ndr9Zvs7/hKdpEFjIxBvk7MnSWdrkAqSbCvP +hzXSKqk+EH1ouBhWOk5zFeEwAzaQ2viOVGvehifW3oW24gGmlUBvDb1tnVrAAfkp +4JBunttjZnq/0NpdoK0DhrrVF4dW3rEEQI6NLfC+RlYAqDpxpemasLEoPQRvg0MP +BM4si3ic7D3srhJwZi1Vz9kdDyvE7vZbELvvEKj8gMC9qzKTSvznn63x3IW1ZHLz +bI/HDBHBOg5Qi8+6EMxB3PWhXQevZaqsTH8MvBbluQINBFw2ic8BEADNMdn1xiVK +lCEtvmKHzKq2lfgzgBJWjtsYEnXDc6FvDhy88vU02sjMvmbCwfsvQAlvCpZUnfZQ +gMbsa00Xh7VshOd9+DnAc5e4wcoSaafvWjwCy2ndiJo2ZkeGOH1JKrQLrXazQUlA +LC3W6AXqG3vDlYUhG6poamqIyuUn3st29CuOnIsxfmLOghWI34L936WWZnkvnpjQ +vE9WXJn8rndeEaQsGmUuBTT62nXvzIM2Y4ClVWdC6dNUm7jkIPVCF7sT4ozwyvDh +O0reV/60LQhRpfswz75Hyqm6Pd7ZvE4uV26QBz3F76m+qTynKD5lmmcwiwM5Kkng +hvJCTEUTC/ILAkHRK+dbJm9aYCi/tUPpCcv2jy7h1xykbUc2i6h1TboHhwYD0OEL +hij/3AqjkARnQ8oROtyT223omfFZbZMU6YYfygSbN3vnmpxVscXcm3/Yy+vzRNjT +pwhiZDvBd0zmi9BWXACoBUgKDlNYjXsOfVgZFcUQIpGmnpPdEFChnXSAd/Eidd1F +V6fXX58/YiTD6VCmUVbVHei+WpyC+nJimmCK/dpV27/42dybSMI287qs1Y0HdAHE +7pOsA6GBH0XndIX9x0FgREH97UjkHkmZo8b/bPzB7Hbpu+GWNIYI4GNWXwT1bQIw +fn7BDi2bsuupEMv0jTWejAwMrEJpBHZdXwARAQABiQI2BBgBCgAgFiEEUKMDCY6i +3XvL7iraCeAfoDwMUE4FAlw2ic8CGwwACgkQCeAfoDwMUE5E6Q/+KqteYu9PiYkJ +YaXuN4rE2R6OxU9nb4dLVcDyNvePyO3mJ4Guw8zJrJdNKBrhzkQokFepxR0rR0+d +Mh8iZBYrCEbpfLtpRgZOslHU3JvUiwdThKvNTtA+WI3C5rwM/h4WGXW9kVKmwwNN +BO5ET63PoiH6xnKXo6J85z/qJDDr3u7/ALFltq5s1LV6ioQ75Rsc+yofQLn24JNL *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Jul 15 18:32:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 95A6936CC80; Wed, 15 Jul 2020 18:32:11 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6QwB5cNmz4NMS; Wed, 15 Jul 2020 18:32:10 +0000 (UTC) (envelope-from gshapiro@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 2B8D81B57F; Wed, 15 Jul 2020 18:32:10 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FIW9bf008070; Wed, 15 Jul 2020 18:32:09 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FIW9kc008069; Wed, 15 Jul 2020 18:32:09 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <202007151832.06FIW9kc008069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Wed, 15 Jul 2020 18:32:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363234 - head X-SVN-Group: head X-SVN-Commit-Author: gshapiro X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 363234 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 18:32:11 -0000 Author: gshapiro Date: Wed Jul 15 18:32:09 2020 New Revision: 363234 URL: https://svnweb.freebsd.org/changeset/base/363234 Log: Note the merge of sendmail 8.16.1 from vendor "branch" Modified: head/RELNOTES Modified: head/RELNOTES ============================================================================== --- head/RELNOTES Wed Jul 15 18:28:54 2020 (r363233) +++ head/RELNOTES Wed Jul 15 18:32:09 2020 (r363234) @@ -10,6 +10,9 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +r363233: + Merge sendmail 8.16.1: See contrib/sendmail/RELEASE_NOTES for details. + r363180: The safexcel(4) crypto offload driver has been added. From owner-svn-src-head@freebsd.org Wed Jul 15 18:49:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E9A136CCDA; Wed, 15 Jul 2020 18:49:02 +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 4B6RHd3mxtz3c0S; Wed, 15 Jul 2020 18:49:01 +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 125641BA20; Wed, 15 Jul 2020 18:49:01 +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 06FIn09e016269; Wed, 15 Jul 2020 18:49:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FIn0SK016267; Wed, 15 Jul 2020 18:49:00 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202007151849.06FIn0SK016267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 15 Jul 2020 18:49:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363235 - head/crypto/openssh X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/crypto/openssh X-SVN-Commit-Revision: 363235 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 18:49:02 -0000 Author: emaste Date: Wed Jul 15 18:49:00 2020 New Revision: 363235 URL: https://svnweb.freebsd.org/changeset/base/363235 Log: openssh: refer to OpenSSL not SSLeay, part 2 This change was made upstream between 7.9p1 and 8.0p1. We've made local changes in the same places for handling the version_addendum; apply the SSLeay_version to OpenSSL_version change in advance of importing 8.0p1. This should have been part of r363225. Obtained from: OpenSSH-portable a65784c9f9c5 MFC with: r363225 Sponsored by: The FreeBSD Foundation Modified: head/crypto/openssh/sshd.c head/crypto/openssh/version.h Modified: head/crypto/openssh/sshd.c ============================================================================== --- head/crypto/openssh/sshd.c Wed Jul 15 18:32:09 2020 (r363234) +++ head/crypto/openssh/sshd.c Wed Jul 15 18:49:00 2020 (r363235) @@ -1749,7 +1749,7 @@ main(int ac, char **av) debug("sshd version %s, %s", SSH_VERSION, #ifdef WITH_OPENSSL - OpenSSL_version(SSLEAY_VERSION) + OpenSSL_version(OPENSSL_VERSION) #else "without OpenSSL" #endif Modified: head/crypto/openssh/version.h ============================================================================== --- head/crypto/openssh/version.h Wed Jul 15 18:32:09 2020 (r363234) +++ head/crypto/openssh/version.h Wed Jul 15 18:49:00 2020 (r363235) @@ -9,7 +9,7 @@ #define SSH_VERSION_FREEBSD "FreeBSD-20200214" #ifdef WITH_OPENSSL -#define OPENSSL_VERSION_STRING OpenSSL_version(SSLEAY_VERSION) +#define OPENSSL_VERSION_STRING OpenSSL_version(OPENSSL_VERSION) #else #define OPENSSL_VERSION_STRING "without OpenSSL" #endif From owner-svn-src-head@freebsd.org Wed Jul 15 19:34:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 81DF436DCD6; Wed, 15 Jul 2020 19:34:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6SHx1j9rz4sXs; Wed, 15 Jul 2020 19:34:20 +0000 (UTC) (envelope-from adrian@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 182FA1C13B; Wed, 15 Jul 2020 19:34:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FJYJ69049664; Wed, 15 Jul 2020 19:34:19 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FJYJFg049663; Wed, 15 Jul 2020 19:34:19 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <202007151934.06FJYJFg049663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 15 Jul 2020 19:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363236 - head/sys/mips/atheros X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/sys/mips/atheros X-SVN-Commit-Revision: 363236 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 19:34:22 -0000 Author: adrian Date: Wed Jul 15 19:34:19 2020 New Revision: 363236 URL: https://svnweb.freebsd.org/changeset/base/363236 Log: [ar71xx] fix watchdog to work on subsequent SoCs The AR9341 AHB runs at 225MHz, much faster than the 33MHz of the AR71xx AHB. So not only is the math going to do weird things, it will also wrap rather than being clamped. So: * clamp! don't wrap! * tidy up some debugging * add an option to throw an NMI rather than reset! Tested: * AR9341 SoC (TP-Link TL-WDR4300), patting/not patting the watchdog! Modified: head/sys/mips/atheros/ar71xx_wdog.c Modified: head/sys/mips/atheros/ar71xx_wdog.c ============================================================================== --- head/sys/mips/atheros/ar71xx_wdog.c Wed Jul 15 18:49:00 2020 (r363235) +++ head/sys/mips/atheros/ar71xx_wdog.c Wed Jul 15 19:34:19 2020 (r363236) @@ -50,6 +50,7 @@ struct ar71xx_wdog_softc { device_t dev; int armed; int reboot_from_watchdog; + int watchdog_nmi; int debug; }; @@ -58,32 +59,54 @@ ar71xx_wdog_watchdog_fn(void *private, u_int cmd, int { struct ar71xx_wdog_softc *sc = private; uint64_t timer_val; + int action; + action = RST_WDOG_ACTION_RESET; + if (sc->watchdog_nmi != 0) + action = RST_WDOG_ACTION_NMI; + cmd &= WD_INTERVAL; if (sc->debug) - device_printf(sc->dev, "ar71xx_wdog_watchdog_fn: cmd: %x\n", cmd); + device_printf(sc->dev, "%s: : cmd: %x\n", __func__, cmd); if (cmd > 0) { timer_val = (uint64_t)(1ULL << cmd) * ar71xx_ahb_freq() / 1000000000; + + /* + * Clamp the timer value in case we overflow. + */ + if (timer_val > 0xffffffff) + timer_val = 0xffffffff; if (sc->debug) - device_printf(sc->dev, "ar71xx_wdog_watchdog_fn: programming timer: %jx\n", (uintmax_t) timer_val); + device_printf(sc->dev, "%s: programming timer: %jx\n", + __func__, (uintmax_t) timer_val); /* - * Load timer with large enough value to prevent spurious - * reset + * Make sure the watchdog is set to NOACTION and give it + * time to take. */ - ATH_WRITE_REG(AR71XX_RST_WDOG_TIMER, - ar71xx_ahb_freq() * 10); - ATH_WRITE_REG(AR71XX_RST_WDOG_CONTROL, - RST_WDOG_ACTION_RESET); - ATH_WRITE_REG(AR71XX_RST_WDOG_TIMER, - (timer_val & 0xffffffff)); + ATH_WRITE_REG(AR71XX_RST_WDOG_CONTROL, RST_WDOG_ACTION_NOACTION); + wmb(); + DELAY(100); + + /* + * Update the timer value. It's already clamped at this + * point so we don't have to wrap/clamp it here. + */ + ATH_WRITE_REG(AR71XX_RST_WDOG_TIMER, timer_val); + wmb(); + DELAY(100); + + /* + * And now, arm. + */ + ATH_WRITE_REG(AR71XX_RST_WDOG_CONTROL, action); sc->armed = 1; *error = 0; } else { if (sc->debug) - device_printf(sc->dev, "ar71xx_wdog_watchdog_fn: disarming\n"); + device_printf(sc->dev, "%s: disarming\n", __func__); if (sc->armed) { - ATH_WRITE_REG(AR71XX_RST_WDOG_CONTROL, + ATH_WRITE_REG(AR71XX_RST_WDOG_CONTROL, RST_WDOG_ACTION_NOACTION); sc->armed = 0; } @@ -109,6 +132,9 @@ ar71xx_wdog_sysctl(device_t dev) SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "debug", CTLFLAG_RW, &sc->debug, 0, "enable watchdog debugging"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "nmi", CTLFLAG_RW, &sc->watchdog_nmi, 0, + "watchdog triggers NMI instead of reset"); SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "armed", CTLFLAG_RD, &sc->armed, 0, "whether the watchdog is armed"); From owner-svn-src-head@freebsd.org Thu Jul 16 10:20:35 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D9CC035D1B9; Thu, 16 Jul 2020 10:20:35 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6qyW5Tr0z4L75; Thu, 16 Jul 2020 10:20:35 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9EF9426B69; Thu, 16 Jul 2020 10:20:35 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06GAKZoK002086; Thu, 16 Jul 2020 10:20:35 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06GAKZjF002085; Thu, 16 Jul 2020 10:20:35 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202007161020.06GAKZjF002085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Thu, 16 Jul 2020 10:20:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363241 - head/usr.sbin/efibootmgr X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/usr.sbin/efibootmgr X-SVN-Commit-Revision: 363241 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 10:20:35 -0000 Author: tsoome Date: Thu Jul 16 10:20:35 2020 New Revision: 363241 URL: https://svnweb.freebsd.org/changeset/base/363241 Log: efibootmgr: typo in long option name del-timout should be del-timeout Reported by: mjg MFC after: 1 week Modified: head/usr.sbin/efibootmgr/efibootmgr.c Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Thu Jul 16 03:05:10 2020 (r363240) +++ head/usr.sbin/efibootmgr/efibootmgr.c Thu Jul 16 10:20:35 2020 (r363241) @@ -103,7 +103,7 @@ static struct option lopts[] = { {"copy", required_argument, NULL, 'C'}, /* Copy boot method */ {"create", no_argument, NULL, 'c'}, {"deactivate", no_argument, NULL, 'A'}, - {"del-timout", no_argument, NULL, 'T'}, + {"del-timeout", no_argument, NULL, 'T'}, {"delete", no_argument, NULL, 'B'}, {"delete-bootnext", no_argument, NULL, 'N'}, {"device-path", no_argument, NULL, 'd'}, From owner-svn-src-head@freebsd.org Thu Jul 16 11:28:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BCE5035EA2C; Thu, 16 Jul 2020 11:28:25 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6sSn3gcrz4PXP; Thu, 16 Jul 2020 11:28:25 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6205527A82; Thu, 16 Jul 2020 11:28:25 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06GBSP7W045346; Thu, 16 Jul 2020 11:28:25 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06GBSPSB045345; Thu, 16 Jul 2020 11:28:25 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007161128.06GBSPSB045345@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 16 Jul 2020 11:28:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363242 - head/sys/amd64/include X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/amd64/include X-SVN-Commit-Revision: 363242 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 11:28:25 -0000 Author: mjg Date: Thu Jul 16 11:28:24 2020 New Revision: 363242 URL: https://svnweb.freebsd.org/changeset/base/363242 Log: amd64: patch ffsl to use the compiler builtin This shortens fdalloc by over 60 bytes. Correctness verified by running both variants at the same time and comparing the result of each call. Note someone(tm) should make a pass at converting everything else feasible. Modified: head/sys/amd64/include/cpufunc.h Modified: head/sys/amd64/include/cpufunc.h ============================================================================== --- head/sys/amd64/include/cpufunc.h Thu Jul 16 10:20:35 2020 (r363241) +++ head/sys/amd64/include/cpufunc.h Thu Jul 16 11:28:24 2020 (r363242) @@ -167,7 +167,8 @@ enable_intr(void) static __inline __pure2 int ffsl(long mask) { - return (mask == 0 ? mask : (int)bsfq((u_long)mask) + 1); + + return (__builtin_ffsl(mask)); } #define HAVE_INLINE_FFSLL From owner-svn-src-head@freebsd.org Thu Jul 16 13:37:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2ED0E362367; Thu, 16 Jul 2020 13:37:33 +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 4B6wKn0Vs3z4X21; Thu, 16 Jul 2020 13:37:33 +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 EA22E9483; Thu, 16 Jul 2020 13:37:32 +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 06GDbWmM026384; Thu, 16 Jul 2020 13:37:32 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06GDbW9x026383; Thu, 16 Jul 2020 13:37:32 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202007161337.06GDbW9x026383@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 16 Jul 2020 13:37:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363244 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 363244 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 13:37:33 -0000 Author: kevans Date: Thu Jul 16 13:37:32 2020 New Revision: 363244 URL: https://svnweb.freebsd.org/changeset/base/363244 Log: ether_ifattach: set mtu before calling if_attach() if_attach() -> if_attach_internal() will call if_attachdomain1(ifp) any time an ethernet interface is setup *after* SI_SUB_PROTO_IFATTACHDOMAIN/SI_ORDER_FIRST. This eventually leads to nd6_ifattach() -> nd6_setmtu0() stashing off ifp->if_mtu in ndi->maxmtu *before* ifp->if_mtu has been properly set in some scenarios, e.g., USB ethernet adapter plugged in later on. For interfaces that are created in early boot, we don't have this issue as domains aren't constructed enough for them to attach and thus it gets deferred to domainifattach at SI_SUB_PROTO_IFATTACHDOMAIN/SI_ORDER_SECOND *after* the mtu has been set earlier in ether_ifattach(). PR: 248005 Submitted by: Mathew MFC after: 1 week Modified: head/sys/net/if_ethersubr.c Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Thu Jul 16 13:37:11 2020 (r363243) +++ head/sys/net/if_ethersubr.c Thu Jul 16 13:37:32 2020 (r363244) @@ -969,8 +969,8 @@ ether_ifattach(struct ifnet *ifp, const u_int8_t *lla) ifp->if_addrlen = ETHER_ADDR_LEN; ifp->if_hdrlen = ETHER_HDR_LEN; - if_attach(ifp); ifp->if_mtu = ETHERMTU; + if_attach(ifp); ifp->if_output = ether_output; ifp->if_input = ether_input; ifp->if_resolvemulti = ether_resolvemulti; From owner-svn-src-head@freebsd.org Thu Jul 16 14:04:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C0F00363005; Thu, 16 Jul 2020 14:04:29 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6wws4kb3z4Yf5; Thu, 16 Jul 2020 14:04:29 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 866F196DA; Thu, 16 Jul 2020 14:04:29 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06GE4TsD044703; Thu, 16 Jul 2020 14:04:29 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06GE4TXq044702; Thu, 16 Jul 2020 14:04:29 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202007161404.06GE4TXq044702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Thu, 16 Jul 2020 14:04:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363248 - head/sbin/devd X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/sbin/devd X-SVN-Commit-Revision: 363248 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 14:04:29 -0000 Author: 0mp (doc,ports committer) Date: Thu Jul 16 14:04:29 2020 New Revision: 363248 URL: https://svnweb.freebsd.org/changeset/base/363248 Log: Remove old devd rules for ActiveWire and Entrega Serial DB25 Those rules have been broken at least since 8-STABLE, when the port providing the ezdownload binary was removed (misc/ezload). Reviewed by: kevans, imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25686 Modified: head/sbin/devd/devd.conf Modified: head/sbin/devd/devd.conf ============================================================================== --- head/sbin/devd/devd.conf Thu Jul 16 14:04:28 2020 (r363247) +++ head/sbin/devd/devd.conf Thu Jul 16 14:04:29 2020 (r363248) @@ -155,24 +155,6 @@ notify 100 { action "service moused stop $cdev"; }; -# Firmware download into the ActiveWire board. After the firmware download is -# done, the device detaches and reappears as something new and shiny -# automatically. -attach 100 { - match "vendor" "0x0854"; - match "product" "0x0100"; - match "release" "0x0000"; - action "/usr/local/bin/ezdownload -f /usr/local/share/usb/firmware/0854.0100.0_01.hex $device-name"; -}; - -# Firmware download for Entrega Serial DB25 adapter. -attach 100 { - match "vendor" "0x1645"; - match "product" "0x8001"; - match "release" "0x0101"; - action "if ! kldstat -n usio > /dev/null 2>&1 ; then kldload usio; fi; /usr/sbin/ezdownload -v -f /usr/share/usb/firmware/1645.8001.0101 /dev/$device-name"; -}; - # This entry starts the ColdSync tool in daemon mode. Make sure you have an up # to date /usr/local/etc/palms. We override the 'listen' settings for port and # type in /usr/local/etc/coldsync.conf. From owner-svn-src-head@freebsd.org Thu Jul 16 14:04:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD3FC362C77; Thu, 16 Jul 2020 14:04:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6wws5gVJz4YbQ; Thu, 16 Jul 2020 14:04:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A272296DB; Thu, 16 Jul 2020 14:04:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06GE4TpH044706; Thu, 16 Jul 2020 14:04:29 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06GE4TF7044700; Thu, 16 Jul 2020 14:04:29 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007161404.06GE4TF7044700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 16 Jul 2020 14:04:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363247 - in head/sys: kern security/mac X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern security/mac X-SVN-Commit-Revision: 363247 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 14:04:29 -0000 Author: mjg Date: Thu Jul 16 14:04:28 2020 New Revision: 363247 URL: https://svnweb.freebsd.org/changeset/base/363247 Log: vfs: fix MAC/AUDIT mismatch in vn_poll Auditing would not be performed without MAC compiled in. Modified: head/sys/kern/vfs_vnops.c head/sys/security/mac/mac_framework.h Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Thu Jul 16 13:50:21 2020 (r363246) +++ head/sys/kern/vfs_vnops.c Thu Jul 16 14:04:28 2020 (r363247) @@ -1635,14 +1635,14 @@ vn_poll(struct file *fp, int events, struct ucred *act int error; vp = fp->f_vnode; -#ifdef MAC +#if defined(MAC) || defined(AUDIT) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); AUDIT_ARG_VNODE1(vp); error = mac_vnode_check_poll(active_cred, fp->f_cred, vp); VOP_UNLOCK(vp); - if (!error) + if (error != 0) + return (error); #endif - error = VOP_POLL(vp, events, fp->f_cred, td); return (error); } Modified: head/sys/security/mac/mac_framework.h ============================================================================== --- head/sys/security/mac/mac_framework.h Thu Jul 16 13:50:21 2020 (r363246) +++ head/sys/security/mac/mac_framework.h Thu Jul 16 14:04:28 2020 (r363247) @@ -463,8 +463,18 @@ mac_vnode_check_open(struct ucred *cred, struct vnode int mac_vnode_check_mprotect(struct ucred *cred, struct vnode *vp, int prot); +#ifdef MAC int mac_vnode_check_poll(struct ucred *active_cred, struct ucred *file_cred, struct vnode *vp); +#else +static inline int +mac_vnode_check_poll(struct ucred *active_cred, struct ucred *file_cred, + struct vnode *vp) +{ + + return (0); +} +#endif int mac_vnode_check_readdir(struct ucred *cred, struct vnode *vp); int mac_vnode_check_readlink(struct ucred *cred, struct vnode *vp); int mac_vnode_check_rename_from(struct ucred *cred, struct vnode *dvp, From owner-svn-src-head@freebsd.org Thu Jul 16 14:09:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2AB5E362E59; Thu, 16 Jul 2020 14:09:19 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6x2R0S6Rz4Z4Z; Thu, 16 Jul 2020 14:09:19 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E6E4992EF; Thu, 16 Jul 2020 14:09:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06GE9I4h045264; Thu, 16 Jul 2020 14:09:18 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06GE9Ihc045261; Thu, 16 Jul 2020 14:09:18 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007161409.06GE9Ihc045261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 16 Jul 2020 14:09:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363249 - in head/sys: kern security/mac X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern security/mac X-SVN-Commit-Revision: 363249 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 14:09:19 -0000 Author: mjg Date: Thu Jul 16 14:09:18 2020 New Revision: 363249 URL: https://svnweb.freebsd.org/changeset/base/363249 Log: vfs: fix vn_poll performance with either MAC or AUDIT The code would unconditionally lock the vnode to audit or call the mac hoook, even if neither want to do anything. Pre-check the state to avoid locking in the common case of nothing to do. Note this code should not be normally executed anyway as vnodes are always return ready. However, poll1/2 from will-it-scale use regular files for benchmarking, presumably to focus on the interface itself as the vnode handler is not supposed to do almost anything. This in particular fixes poll2 which passes 128 fds. $ ./poll2_processes -s 10 before: 134411 after: 271572 Modified: head/sys/kern/vfs_vnops.c head/sys/security/mac/mac_framework.c head/sys/security/mac/mac_framework.h Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Thu Jul 16 14:04:29 2020 (r363248) +++ head/sys/kern/vfs_vnops.c Thu Jul 16 14:09:18 2020 (r363249) @@ -1636,12 +1636,14 @@ vn_poll(struct file *fp, int events, struct ucred *act vp = fp->f_vnode; #if defined(MAC) || defined(AUDIT) - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - AUDIT_ARG_VNODE1(vp); - error = mac_vnode_check_poll(active_cred, fp->f_cred, vp); - VOP_UNLOCK(vp); - if (error != 0) - return (error); + if (AUDITING_TD(td) || mac_vnode_check_poll_enabled()) { + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + AUDIT_ARG_VNODE1(vp); + error = mac_vnode_check_poll(active_cred, fp->f_cred, vp); + VOP_UNLOCK(vp); + if (error != 0) + return (error); + } #endif error = VOP_POLL(vp, events, fp->f_cred, td); return (error); Modified: head/sys/security/mac/mac_framework.c ============================================================================== --- head/sys/security/mac/mac_framework.c Thu Jul 16 14:04:29 2020 (r363248) +++ head/sys/security/mac/mac_framework.c Thu Jul 16 14:09:18 2020 (r363249) @@ -118,11 +118,18 @@ SYSCTL_UINT(_security_mac, OID_AUTO, version, CTLFLAG_ ""); /* - * Flags for inlined checks. + * Flags for inlined checks. Note this would be best hotpatched at runtime. + * The following is a band-aid. + * + * Use FPFLAG for hooks running in commonly executed paths and FPFLAG_RARE + * for the rest. */ #define FPFLAG(f) \ bool __read_frequently mac_##f##_fp_flag +#define FPFLAG_RARE(f) \ +bool __read_mostly mac_##f##_fp_flag + FPFLAG(priv_check); FPFLAG(priv_grant); FPFLAG(vnode_check_lookup); @@ -131,8 +138,10 @@ FPFLAG(vnode_check_stat); FPFLAG(vnode_check_read); FPFLAG(vnode_check_write); FPFLAG(vnode_check_mmap); +FPFLAG_RARE(vnode_check_poll); #undef FPFLAG +#undef FPFLAG_RARE /* * Labels consist of a indexed set of "slots", which are allocated policies @@ -416,6 +425,8 @@ struct mac_policy_fastpath_elem mac_policy_fastpath_ar .flag = &mac_vnode_check_write_fp_flag }, { .offset = FPO(vnode_check_mmap), .flag = &mac_vnode_check_mmap_fp_flag }, + { .offset = FPO(vnode_check_poll), + .flag = &mac_vnode_check_poll_fp_flag }, }; static void Modified: head/sys/security/mac/mac_framework.h ============================================================================== --- head/sys/security/mac/mac_framework.h Thu Jul 16 14:04:29 2020 (r363248) +++ head/sys/security/mac/mac_framework.h Thu Jul 16 14:09:18 2020 (r363249) @@ -463,10 +463,14 @@ mac_vnode_check_open(struct ucred *cred, struct vnode int mac_vnode_check_mprotect(struct ucred *cred, struct vnode *vp, int prot); + +#define mac_vnode_check_poll_enabled() __predict_false(mac_vnode_check_poll_fp_flag) #ifdef MAC +extern bool mac_vnode_check_poll_fp_flag; int mac_vnode_check_poll(struct ucred *active_cred, struct ucred *file_cred, struct vnode *vp); #else +#define mac_vnode_check_poll_fp_flag 0 static inline int mac_vnode_check_poll(struct ucred *active_cred, struct ucred *file_cred, struct vnode *vp) From owner-svn-src-head@freebsd.org Thu Jul 16 14:12:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C44583634B5; Thu, 16 Jul 2020 14:12:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6x6Z4rWbz4Zkc; Thu, 16 Jul 2020 14:12:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 89A349C03; Thu, 16 Jul 2020 14:12:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06GECsjY050955; Thu, 16 Jul 2020 14:12:54 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06GECspt050954; Thu, 16 Jul 2020 14:12:54 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202007161412.06GECspt050954@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 16 Jul 2020 14:12:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363250 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 363250 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 14:12:54 -0000 Author: imp Date: Thu Jul 16 14:12:54 2020 New Revision: 363250 URL: https://svnweb.freebsd.org/changeset/base/363250 Log: Relax the rule against declaring variables in nested scopes and for initializations. Relax some overly perscriptive rules against declarations: they may be at the start of any blocks, even if things aren't super complicated. Allow more initializations (those that call simple functions, like accessor functions for newbus are fine). Allow the common idiom of declaring the loop variable in a for loop. This tries to codify what common exceptions are today, as well as give some guidance on when it's best to do these things. Reviewed by: tsoome, kp, markm, allanjude, jiles, cem, rpokala (earlier versions: seanc, melifaro, bapt, pjd, bz, pstef, arichards, jhibits, vangyzen, jmallet, ian, glebius, jhb, dab, adrian, sef, gnn) Differential Revision: https://reviews.freebsd.org/D25312 Modified: head/share/man/man9/style.9 Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Thu Jul 16 14:09:18 2020 (r363249) +++ head/share/man/man9/style.9 Thu Jul 16 14:12:54 2020 (r363250) @@ -25,7 +25,7 @@ .\" From: @(#)style 1.14 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd June 30, 2020 +.Dd July 16, 2020 .Dt STYLE 9 .Os .Sh NAME @@ -592,8 +592,6 @@ not Parts of a .Ic for loop may be left empty. -Do not put declarations -inside blocks unless the routine is unusually complicated. .Bd -literal for (; cnt < 15; cnt++) { stmt1; @@ -601,6 +599,15 @@ inside blocks unless the routine is unusually complica } .Ed .Pp +A +.Ic for +loop may declare and initialize its counting variable. +.Bd -literal + for (int i = 0; i < 15; i++) { + stmt1; + } +.Ed +.Pp Indentation is an 8 character tab. Second level indents are four spaces. If you have to wrap a long statement, put the operator at the end of the @@ -676,25 +683,26 @@ The opening brace of the function body should be on a line by itself. .Bd -literal static char * -function(int a1, int a2, float fl, int a4) +function(int a1, int a2, float fl, int a4, struct bar *bar) { .Ed .Pp When declaring variables in functions declare them sorted by size, then in alphabetical order; multiple ones per line are okay. If a line overflows reuse the type keyword. -.Pp -Be careful to not obfuscate the code by initializing variables in -the declarations. -Use this feature only thoughtfully. -DO NOT use function calls in initializers. +Variables may be initialized where declared especially when they +are constant for the rest of the scope. +Declarations may be placed before executable lines at the start +of any block. +Calls to complicated functions should be avoided when initializing variables. .Bd -literal struct foo one, *two; - double three; - int *four, five; - char *six, seven, eight, nine, ten, eleven, twelve; + struct baz *three = bar_get_baz(bar); + double four; + int *five, six; + char *seven, eight, nine, ten, eleven, twelve; - four = myfunction(); + four = my_complicated_function(a1, f1, a4); .Ed .Pp Do not declare functions inside other functions; ANSI C says that From owner-svn-src-head@freebsd.org Thu Jul 16 14:21:56 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B3F036343D; Thu, 16 Jul 2020 14:21:56 +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 4B6xK03BcZz4bH1; Thu, 16 Jul 2020 14:21:56 +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 51FDD9BC1; Thu, 16 Jul 2020 14:21:56 +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 06GELul7057236; Thu, 16 Jul 2020 14:21:56 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06GELuqa057235; Thu, 16 Jul 2020 14:21:56 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007161421.06GELuqa057235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 16 Jul 2020 14:21:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363251 - head/sys/dev/safexcel X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/dev/safexcel X-SVN-Commit-Revision: 363251 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 14:21:56 -0000 Author: markj Date: Thu Jul 16 14:21:55 2020 New Revision: 363251 URL: https://svnweb.freebsd.org/changeset/base/363251 Log: safexcel(4): Silence an integer truncation warning. In practice overflow is not possible, but we might as well use the right type for DMA ring sizes. CID: 1430468 MFC after: 1 week Modified: head/sys/dev/safexcel/safexcel.c Modified: head/sys/dev/safexcel/safexcel.c ============================================================================== --- head/sys/dev/safexcel/safexcel.c Thu Jul 16 14:12:54 2020 (r363250) +++ head/sys/dev/safexcel/safexcel.c Thu Jul 16 14:21:55 2020 (r363251) @@ -901,7 +901,8 @@ static int safexcel_dma_init(struct safexcel_softc *sc) { struct safexcel_ring *ring; - int error, i, size; + bus_size_t size; + int error, i; for (i = 0; i < sc->sc_config.rings; i++) { ring = &sc->sc_ring[i]; @@ -937,8 +938,9 @@ safexcel_dma_init(struct safexcel_softc *sc) (struct safexcel_cmd_descr *)ring->cdr.dma.vaddr; /* Allocate additional CDR token memory. */ - error = safexcel_dma_alloc_mem(sc, &ring->dma_atok, - sc->sc_config.atok_offset * SAFEXCEL_RING_SIZE); + size = (bus_size_t)sc->sc_config.atok_offset * + SAFEXCEL_RING_SIZE; + error = safexcel_dma_alloc_mem(sc, &ring->dma_atok, size); if (error != 0) { device_printf(sc->sc_dev, "failed to allocate atoken DMA memory, error %d\n", From owner-svn-src-head@freebsd.org Thu Jul 16 15:02:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A79663641D3; Thu, 16 Jul 2020 15:02:11 +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 4B6yCR42WRz4dMT; Thu, 16 Jul 2020 15:02:11 +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 6EF11A50D; Thu, 16 Jul 2020 15:02:11 +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 06GF2BJi077561; Thu, 16 Jul 2020 15:02:11 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06GF2BGV077544; Thu, 16 Jul 2020 15:02:11 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202007161502.06GF2BGV077544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 16 Jul 2020 15:02:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363252 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 363252 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 15:02:11 -0000 Author: kevans Date: Thu Jul 16 15:02:11 2020 New Revision: 363252 URL: https://svnweb.freebsd.org/changeset/base/363252 Log: tuntap: drop redundant if_mtu assignment in tuncreate ether_ifattach will immediately clobber if_mtu with ETHERMTU anyways, just let it happen. MFC after: 1 week Modified: head/sys/net/if_tuntap.c Modified: head/sys/net/if_tuntap.c ============================================================================== --- head/sys/net/if_tuntap.c Thu Jul 16 14:21:55 2020 (r363251) +++ head/sys/net/if_tuntap.c Thu Jul 16 15:02:11 2020 (r363252) @@ -965,7 +965,6 @@ tuncreate(struct cdev *dev) ifp->if_capenable |= IFCAP_LINKSTATE; if ((tp->tun_flags & TUN_L2) != 0) { - ifp->if_mtu = ETHERMTU; ifp->if_init = tunifinit; ifp->if_start = tunstart_l2; From owner-svn-src-head@freebsd.org Thu Jul 16 15:09:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C36A43643F1; Thu, 16 Jul 2020 15:09:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6yMR4n46z4ddt; Thu, 16 Jul 2020 15:09:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8422CA513; Thu, 16 Jul 2020 15:09:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06GF97wm081973; Thu, 16 Jul 2020 15:09:07 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06GF94ev081961; Thu, 16 Jul 2020 15:09:04 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007161509.06GF94ev081961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 16 Jul 2020 15:09:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363253 - in head/sys: amd64/conf arm/conf arm64/conf i386/conf mips/conf powerpc/conf riscv/conf X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: amd64/conf arm/conf arm64/conf i386/conf mips/conf powerpc/conf riscv/conf X-SVN-Commit-Revision: 363253 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 15:09:07 -0000 Author: markj Date: Thu Jul 16 15:09:04 2020 New Revision: 363253 URL: https://svnweb.freebsd.org/changeset/base/363253 Log: Switch from SCTP to SCTP_SUPPORT in GENERIC configs. This removes SCTP from in-tree kernel configuration files. Now, SCTP can be enabled by simply loading the module, as discussed on freebsd-net@. Reviewed by: tuexen Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25611 Modified: head/sys/amd64/conf/GENERIC head/sys/amd64/conf/MINIMAL head/sys/arm/conf/std.armv6 head/sys/arm/conf/std.armv7 head/sys/arm64/conf/GENERIC head/sys/i386/conf/GENERIC head/sys/i386/conf/MINIMAL head/sys/mips/conf/ERL head/sys/mips/conf/OCTEON1 head/sys/powerpc/conf/GENERIC head/sys/powerpc/conf/GENERIC64 head/sys/riscv/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Thu Jul 16 15:02:11 2020 (r363252) +++ head/sys/amd64/conf/GENERIC Thu Jul 16 15:09:04 2020 (r363253) @@ -35,7 +35,7 @@ options TCP_OFFLOAD # TCP offload options TCP_BLACKBOX # Enhanced TCP event logging options TCP_HHOOK # hhook(9) framework for TCP options TCP_RFC7413 # TCP Fast Open -options SCTP # Stream Control Transmission Protocol +options SCTP_SUPPORT # Allow kldload of SCTP options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists Modified: head/sys/amd64/conf/MINIMAL ============================================================================== --- head/sys/amd64/conf/MINIMAL Thu Jul 16 15:02:11 2020 (r363252) +++ head/sys/amd64/conf/MINIMAL Thu Jul 16 15:09:04 2020 (r363253) @@ -44,7 +44,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options TCP_OFFLOAD # TCP offload -options SCTP # Stream Control Transmission Protocol +options SCTP_SUPPORT # Allow kldload of SCTP options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists Modified: head/sys/arm/conf/std.armv6 ============================================================================== --- head/sys/arm/conf/std.armv6 Thu Jul 16 15:02:11 2020 (r363252) +++ head/sys/arm/conf/std.armv6 Thu Jul 16 15:09:04 2020 (r363253) @@ -12,7 +12,7 @@ options INET6 # IPv6 communications protocols options TCP_HHOOK # hhook(9) framework for TCP device crypto # core crypto support options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 -options SCTP # Stream Control Transmission Protocol +options SCTP_SUPPORT # Allow kldload of SCTP options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists Modified: head/sys/arm/conf/std.armv7 ============================================================================== --- head/sys/arm/conf/std.armv7 Thu Jul 16 15:02:11 2020 (r363252) +++ head/sys/arm/conf/std.armv7 Thu Jul 16 15:09:04 2020 (r363253) @@ -12,7 +12,7 @@ options INET6 # IPv6 communications protocols options TCP_HHOOK # hhook(9) framework for TCP device crypto # core crypto support options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 -options SCTP # Stream Control Transmission Protocol +options SCTP_SUPPORT # Allow kldload of SCTP options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Thu Jul 16 15:02:11 2020 (r363252) +++ head/sys/arm64/conf/GENERIC Thu Jul 16 15:09:04 2020 (r363253) @@ -34,7 +34,7 @@ options IPSEC_SUPPORT # Allow kldload of ipsec and t options TCP_HHOOK # hhook(9) framework for TCP options TCP_OFFLOAD # TCP offload options TCP_RFC7413 # TCP Fast Open -options SCTP # Stream Control Transmission Protocol +options SCTP_SUPPORT # Allow kldload of SCTP options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Thu Jul 16 15:02:11 2020 (r363252) +++ head/sys/i386/conf/GENERIC Thu Jul 16 15:09:04 2020 (r363253) @@ -34,7 +34,7 @@ options INET6 # IPv6 communications protocols options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options TCP_HHOOK # hhook(9) framework for TCP options TCP_OFFLOAD # TCP offload -options SCTP # Stream Control Transmission Protocol +options SCTP_SUPPORT # Allow kldload of SCTP options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists Modified: head/sys/i386/conf/MINIMAL ============================================================================== --- head/sys/i386/conf/MINIMAL Thu Jul 16 15:02:11 2020 (r363252) +++ head/sys/i386/conf/MINIMAL Thu Jul 16 15:09:04 2020 (r363253) @@ -45,7 +45,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options TCP_OFFLOAD # TCP offload -options SCTP # Stream Control Transmission Protocol +options SCTP_SUPPORT # Allow kldload of SCTP options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists Modified: head/sys/mips/conf/ERL ============================================================================== --- head/sys/mips/conf/ERL Thu Jul 16 15:02:11 2020 (r363252) +++ head/sys/mips/conf/ERL Thu Jul 16 15:09:04 2020 (r363253) @@ -55,7 +55,7 @@ options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC # IP (v4/v6) security options TCP_HHOOK # hhook(9) framework for TCP -options SCTP # Stream Control Transmission Protocol +options SCTP_SUPPORT # Allow kldload of SCTP options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists Modified: head/sys/mips/conf/OCTEON1 ============================================================================== --- head/sys/mips/conf/OCTEON1 Thu Jul 16 15:02:11 2020 (r363252) +++ head/sys/mips/conf/OCTEON1 Thu Jul 16 15:09:04 2020 (r363253) @@ -55,7 +55,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options TCP_HHOOK # hhook(9) framework for TCP -options SCTP # Stream Control Transmission Protocol +options SCTP_SUPPORT # Allow kldload of SCTP options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Thu Jul 16 15:02:11 2020 (r363252) +++ head/sys/powerpc/conf/GENERIC Thu Jul 16 15:09:04 2020 (r363253) @@ -41,7 +41,7 @@ options INET6 #IPv6 communications protocols options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options TCP_HHOOK # hhook(9) framework for TCP options TCP_RFC7413 # TCP Fast Open -options SCTP #Stream Control Transmission Protocol +options SCTP_SUPPORT # Allow kldload of SCTP options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support options UFS_ACL #Support for access control lists Modified: head/sys/powerpc/conf/GENERIC64 ============================================================================== --- head/sys/powerpc/conf/GENERIC64 Thu Jul 16 15:02:11 2020 (r363252) +++ head/sys/powerpc/conf/GENERIC64 Thu Jul 16 15:09:04 2020 (r363253) @@ -45,7 +45,7 @@ options TCP_OFFLOAD # TCP offload options TCP_BLACKBOX # Enhanced TCP event logging options TCP_HHOOK # hhook(9) framework for TCP options TCP_RFC7413 # TCP Fast Open -options SCTP #Stream Control Transmission Protocol +options SCTP_SUPPORT # Allow kldload of SCTP options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support options UFS_ACL #Support for access control lists Modified: head/sys/riscv/conf/GENERIC ============================================================================== --- head/sys/riscv/conf/GENERIC Thu Jul 16 15:02:11 2020 (r363252) +++ head/sys/riscv/conf/GENERIC Thu Jul 16 15:09:04 2020 (r363253) @@ -32,7 +32,7 @@ options INET6 # IPv6 communications protocols options TCP_HHOOK # hhook(9) framework for TCP options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options TCP_OFFLOAD # TCP offload -options SCTP # Stream Control Transmission Protocol +options SCTP_SUPPORT # Allow kldload of SCTP options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists From owner-svn-src-head@freebsd.org Thu Jul 16 15:12:53 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 456B4364998; Thu, 16 Jul 2020 15:12:53 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6yRn197Nz4f5C; Thu, 16 Jul 2020 15:12:53 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B64FA23A; Thu, 16 Jul 2020 15:12:53 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06GFCqk1087571; Thu, 16 Jul 2020 15:12:52 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06GFCqlE087570; Thu, 16 Jul 2020 15:12:52 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007161512.06GFCqlE087570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 16 Jul 2020 15:12:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363254 - head X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 363254 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 15:12:53 -0000 Author: markj Date: Thu Jul 16 15:12:52 2020 New Revision: 363254 URL: https://svnweb.freebsd.org/changeset/base/363254 Log: Add a RELNOTES entry for r363253. Sponsored by: The FreeBSD Foundation Modified: head/RELNOTES Modified: head/RELNOTES ============================================================================== --- head/RELNOTES Thu Jul 16 15:09:04 2020 (r363253) +++ head/RELNOTES Thu Jul 16 15:12:52 2020 (r363254) @@ -10,6 +10,10 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +r363253: + SCTP support has been removed from GENERIC kernel configurations. + The SCTP stack is now built as sctp.ko and can be dynamically loaded. + r363233: Merge sendmail 8.16.1: See contrib/sendmail/RELEASE_NOTES for details. From owner-svn-src-head@freebsd.org Thu Jul 16 15:30:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E726364FA8; Thu, 16 Jul 2020 15:30:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6yrL74Vrz3RPD; Thu, 16 Jul 2020 15:30:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-274.local (unknown [IPv6:2601:648:8203:2990:d1f2:d86f:a90c:9a62]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 3B30D2F2D7; Thu, 16 Jul 2020 15:30:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r363178 - head/contrib/mandoc To: Ed Maste , "Rodney W. Grimes" Cc: Gordon Bergling , src-committers , svn-src-all , svn-src-head References: <202007151810.06FIAsxN018211@gndrsh.dnsmgr.net> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <9c36aa26-4d7e-8531-d8f9-8db081c0e552@FreeBSD.org> Date: Thu, 16 Jul 2020 08:30:40 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 15:30:43 -0000 On 7/15/20 11:24 AM, Ed Maste wrote: > On Wed, 15 Jul 2020 at 14:11, Rodney W. Grimes > wrote: >> >> The only thing that was added, and herein reverted was incorrect >> information that apropos and makewhatis first appeared in FreeBSD 11, >> conflicting the much richer HISTORY already present in this manual page. > > It seems that including history as it relates to FreeBSD would be a > suitable addition to this section. Just "This version of the .Nm > utility..." instead of "The .Nm utility" would be fine? I agree that the existing history does read more like an OpenBSD manpage than a FreeBSD one. I'm not sure the original commit quite did it justice though in fixing it. For example from apropos(1): Part of the functionality of whatis was already provided by the former manwhere utility in 1BSD. The apropos and whatis utilities first appeared in 2BSD. They were rewritten from scratch for OpenBSD 5.6. This last sentence is a bit out of place to read on FreeBSD. The next paragraph is arguably worse in that regard: The -M option and the MANPATH variable first appeared in 4.3BSD; -m in 4.3BSD-Reno; -C in 4.4BSD-Lite1; and -S and -s in OpenBSD 4.5 for apropos and in OpenBSD 5.6 for whatis. The options -acfhIKklOTWw appeared in OpenBSD 5.7. (how does a FreeBSD user know what FreeBSD versions those resolve to?) I've thought about a few options; perhaps the least terrible is a separate section mapping which OpenBSD versions were imported to which FreeBSD versions, e.g. close to your suggestion of something like: The version of this utility from OpenBSD 5.7 was imported into FreeBSD 11.1. And append new major versions that have corresponding OpenBSD history in the future (is 5.7 even the right value for 11.1, if not then perhaps this will have to have separate entries for 11.1 and whenever 5.7 was imported, etc.) -- John Baldwin From owner-svn-src-head@freebsd.org Thu Jul 16 16:32:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 52BF3366B02; Thu, 16 Jul 2020 16:32:17 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B70CP1YXzz3Vs2; Thu, 16 Jul 2020 16:32:17 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19A49B0E4; Thu, 16 Jul 2020 16:32:17 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06GGWGaw034871; Thu, 16 Jul 2020 16:32:16 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06GGWGIR034870; Thu, 16 Jul 2020 16:32:16 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202007161632.06GGWGIR034870@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Thu, 16 Jul 2020 16:32:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363255 - head/sys/dev/virtio/block X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/sys/dev/virtio/block X-SVN-Commit-Revision: 363255 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 16:32:17 -0000 Author: allanjude Date: Thu Jul 16 16:32:16 2020 New Revision: 363255 URL: https://svnweb.freebsd.org/changeset/base/363255 Log: Add VIRTIO_BLK_T_DISCARD support to the virtio-blk driver If the hypervisor advertises support for the DISCARD command then the guest can perform TRIM commands, freeing space on the backing store. If VIRTIO_BLK_F_DISCARD is enabled, advertise DISKFLAG_CANDELETE Tested with FreeBSD guests on bhyve and KVM Reviewed by: jhb Tested by: freqlabs MFC after: 1 month Relnotes: yes Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D21708 Modified: head/sys/dev/virtio/block/virtio_blk.c head/sys/dev/virtio/block/virtio_blk.h Modified: head/sys/dev/virtio/block/virtio_blk.c ============================================================================== --- head/sys/dev/virtio/block/virtio_blk.c Thu Jul 16 15:12:52 2020 (r363254) +++ head/sys/dev/virtio/block/virtio_blk.c Thu Jul 16 16:32:16 2020 (r363255) @@ -81,6 +81,7 @@ struct vtblk_softc { #define VTBLK_FLAG_SUSPEND 0x0008 #define VTBLK_FLAG_BARRIER 0x0010 #define VTBLK_FLAG_WC_CONFIG 0x0020 +#define VTBLK_FLAG_DISCARD 0x0040 struct virtqueue *vtblk_vq; struct sglist *vtblk_sglist; @@ -112,6 +113,7 @@ static struct virtio_feature_desc vtblk_feature_desc[] { VIRTIO_BLK_F_WCE, "WriteCache" }, { VIRTIO_BLK_F_TOPOLOGY, "Topology" }, { VIRTIO_BLK_F_CONFIG_WCE, "ConfigWCE" }, + { VIRTIO_BLK_F_DISCARD, "Discard" }, { 0, NULL } }; @@ -210,6 +212,7 @@ TUNABLE_INT("hw.vtblk.writecache_mode", &vtblk_writeca VIRTIO_BLK_F_WCE | \ VIRTIO_BLK_F_TOPOLOGY | \ VIRTIO_BLK_F_CONFIG_WCE | \ + VIRTIO_BLK_F_DISCARD | \ VIRTIO_RING_F_INDIRECT_DESC) #define VTBLK_MTX(_sc) &(_sc)->vtblk_mtx @@ -459,7 +462,7 @@ vtblk_config_change(device_t dev) vtblk_read_config(sc, &blkcfg); /* Capacity is always in 512-byte units. */ - capacity = blkcfg.capacity * 512; + capacity = blkcfg.capacity * VTBLK_BSIZE; if (sc->vtblk_disk->d_mediasize != capacity) vtblk_resize_disk(sc, capacity); @@ -544,13 +547,14 @@ vtblk_strategy(struct bio *bp) * be a better way to report our readonly'ness to GEOM above. */ if (sc->vtblk_flags & VTBLK_FLAG_READONLY && - (bp->bio_cmd == BIO_WRITE || bp->bio_cmd == BIO_FLUSH)) { + (bp->bio_cmd == BIO_WRITE || bp->bio_cmd == BIO_FLUSH || + bp->bio_cmd == BIO_DELETE)) { vtblk_bio_done(sc, bp, EROFS); return; } if ((bp->bio_cmd != BIO_READ) && (bp->bio_cmd != BIO_WRITE) && - (bp->bio_cmd != BIO_FLUSH)) { + (bp->bio_cmd != BIO_FLUSH) && (bp->bio_cmd != BIO_DELETE)) { vtblk_bio_done(sc, bp, EOPNOTSUPP); return; } @@ -563,6 +567,13 @@ vtblk_strategy(struct bio *bp) return; } + if ((bp->bio_cmd == BIO_DELETE) && + !(sc->vtblk_flags & VTBLK_FLAG_DISCARD)) { + VTBLK_UNLOCK(sc); + vtblk_bio_done(sc, bp, EOPNOTSUPP); + return; + } + bioq_insert_tail(&sc->vtblk_bioq, bp); vtblk_startio(sc); @@ -598,6 +609,8 @@ vtblk_setup_features(struct vtblk_softc *sc) sc->vtblk_flags |= VTBLK_FLAG_BARRIER; if (virtio_with_feature(dev, VIRTIO_BLK_F_CONFIG_WCE)) sc->vtblk_flags |= VTBLK_FLAG_WC_CONFIG; + if (virtio_with_feature(dev, VIRTIO_BLK_F_DISCARD)) + sc->vtblk_flags |= VTBLK_FLAG_DISCARD; } static int @@ -687,12 +700,12 @@ vtblk_alloc_disk(struct vtblk_softc *sc, struct virtio dp->d_dump = vtblk_dump; /* Capacity is always in 512-byte units. */ - dp->d_mediasize = blkcfg->capacity * 512; + dp->d_mediasize = blkcfg->capacity * VTBLK_BSIZE; if (virtio_with_feature(dev, VIRTIO_BLK_F_BLK_SIZE)) dp->d_sectorsize = blkcfg->blk_size; else - dp->d_sectorsize = 512; + dp->d_sectorsize = VTBLK_BSIZE; /* * The VirtIO maximum I/O size is given in terms of segments. @@ -726,6 +739,11 @@ vtblk_alloc_disk(struct vtblk_softc *sc, struct virtio dp->d_stripesize; } + if (virtio_with_feature(dev, VIRTIO_BLK_F_DISCARD)) { + dp->d_flags |= DISKFLAG_CANDELETE; + dp->d_delmaxsize = blkcfg->max_discard_sectors * VTBLK_BSIZE; + } + if (vtblk_write_cache_enabled(sc, blkcfg) != 0) sc->vtblk_write_cache = VTBLK_CACHE_WRITEBACK; else @@ -876,12 +894,16 @@ vtblk_request_bio(struct vtblk_softc *sc) break; case BIO_READ: req->vbr_hdr.type = VIRTIO_BLK_T_IN; - req->vbr_hdr.sector = bp->bio_offset / 512; + req->vbr_hdr.sector = bp->bio_offset / VTBLK_BSIZE; break; case BIO_WRITE: req->vbr_hdr.type = VIRTIO_BLK_T_OUT; - req->vbr_hdr.sector = bp->bio_offset / 512; + req->vbr_hdr.sector = bp->bio_offset / VTBLK_BSIZE; break; + case BIO_DELETE: + req->vbr_hdr.type = VIRTIO_BLK_T_DISCARD; + req->vbr_hdr.sector = bp->bio_offset / VTBLK_BSIZE; + break; default: panic("%s: bio with unhandled cmd: %d", __func__, bp->bio_cmd); } @@ -935,6 +957,20 @@ vtblk_request_execute(struct vtblk_softc *sc, struct v /* BIO_READ means the host writes into our buffer. */ if (bp->bio_cmd == BIO_READ) writable = sg->sg_nseg - 1; + } else if (bp->bio_cmd == BIO_DELETE) { + struct virtio_blk_discard_write_zeroes *discard; + + discard = malloc(sizeof(*discard), M_DEVBUF, M_NOWAIT | M_ZERO); + if (discard == NULL) + return (ENOMEM); + discard->sector = bp->bio_offset / VTBLK_BSIZE; + discard->num_sectors = bp->bio_bcount / VTBLK_BSIZE; + bp->bio_driver1 = discard; + error = sglist_append(sg, discard, sizeof(*discard)); + if (error || sg->sg_nseg == sg->sg_maxseg) { + panic("%s: bio %p data buffer too big %d", + __func__, bp, error); + } } writable++; @@ -1095,6 +1131,11 @@ vtblk_bio_done(struct vtblk_softc *sc, struct bio *bp, bp->bio_flags |= BIO_ERROR; } + if (bp->bio_driver1 != NULL) { + free(bp->bio_driver1, M_DEVBUF); + bp->bio_driver1 = NULL; + } + biodone(bp); } @@ -1124,7 +1165,12 @@ vtblk_read_config(struct vtblk_softc *sc, struct virti VTBLK_GET_CONFIG(dev, VIRTIO_BLK_F_GEOMETRY, geometry, blkcfg); VTBLK_GET_CONFIG(dev, VIRTIO_BLK_F_BLK_SIZE, blk_size, blkcfg); VTBLK_GET_CONFIG(dev, VIRTIO_BLK_F_TOPOLOGY, topology, blkcfg); - VTBLK_GET_CONFIG(dev, VIRTIO_BLK_F_CONFIG_WCE, writeback, blkcfg); + VTBLK_GET_CONFIG(dev, VIRTIO_BLK_F_CONFIG_WCE, wce, blkcfg); + VTBLK_GET_CONFIG(dev, VIRTIO_BLK_F_DISCARD, max_discard_sectors, + blkcfg); + VTBLK_GET_CONFIG(dev, VIRTIO_BLK_F_DISCARD, max_discard_seg, blkcfg); + VTBLK_GET_CONFIG(dev, VIRTIO_BLK_F_DISCARD, discard_sector_alignment, + blkcfg); } #undef VTBLK_GET_CONFIG @@ -1282,7 +1328,7 @@ vtblk_dump_write(struct vtblk_softc *sc, void *virtual req->vbr_ack = -1; req->vbr_hdr.type = VIRTIO_BLK_T_OUT; req->vbr_hdr.ioprio = 1; - req->vbr_hdr.sector = offset / 512; + req->vbr_hdr.sector = offset / VTBLK_BSIZE; req->vbr_bp = &buf; g_reset_bio(&buf); @@ -1331,7 +1377,7 @@ vtblk_set_write_cache(struct vtblk_softc *sc, int wc) /* Set either writeback (1) or writethrough (0) mode. */ virtio_write_dev_config_1(sc->vtblk_dev, - offsetof(struct virtio_blk_config, writeback), wc); + offsetof(struct virtio_blk_config, wce), wc); } static int @@ -1346,7 +1392,7 @@ vtblk_write_cache_enabled(struct vtblk_softc *sc, if (wc >= 0 && wc < VTBLK_CACHE_MAX) vtblk_set_write_cache(sc, wc); else - wc = blkcfg->writeback; + wc = blkcfg->wce; } else wc = virtio_with_feature(sc->vtblk_dev, VIRTIO_BLK_F_WCE); Modified: head/sys/dev/virtio/block/virtio_blk.h ============================================================================== --- head/sys/dev/virtio/block/virtio_blk.h Thu Jul 16 15:12:52 2020 (r363254) +++ head/sys/dev/virtio/block/virtio_blk.h Thu Jul 16 16:32:16 2020 (r363255) @@ -33,20 +33,27 @@ #ifndef _VIRTIO_BLK_H #define _VIRTIO_BLK_H +#define VTBLK_BSIZE 512 + /* Feature bits */ -#define VIRTIO_BLK_F_BARRIER 0x0001 /* Does host support barriers? */ -#define VIRTIO_BLK_F_SIZE_MAX 0x0002 /* Indicates maximum segment size */ -#define VIRTIO_BLK_F_SEG_MAX 0x0004 /* Indicates maximum # of segments */ -#define VIRTIO_BLK_F_GEOMETRY 0x0010 /* Legacy geometry available */ -#define VIRTIO_BLK_F_RO 0x0020 /* Disk is read-only */ -#define VIRTIO_BLK_F_BLK_SIZE 0x0040 /* Block size of disk is available*/ -#define VIRTIO_BLK_F_SCSI 0x0080 /* Supports scsi command passthru */ -#define VIRTIO_BLK_F_WCE 0x0200 /* Writeback mode enabled after reset */ -#define VIRTIO_BLK_F_TOPOLOGY 0x0400 /* Topology information is available */ -#define VIRTIO_BLK_F_CONFIG_WCE 0x0800 /* Writeback mode available in config */ -#define VIRTIO_BLK_ID_BYTES 20 /* ID string length */ +#define VIRTIO_BLK_F_BARRIER 0x0001 /* Does host support barriers? */ +#define VIRTIO_BLK_F_SIZE_MAX 0x0002 /* Indicates maximum segment size */ +#define VIRTIO_BLK_F_SEG_MAX 0x0004 /* Indicates maximum # of segments */ +#define VIRTIO_BLK_F_GEOMETRY 0x0010 /* Legacy geometry available */ +#define VIRTIO_BLK_F_RO 0x0020 /* Disk is read-only */ +#define VIRTIO_BLK_F_BLK_SIZE 0x0040 /* Block size of disk is available*/ +#define VIRTIO_BLK_F_SCSI 0x0080 /* Supports scsi command passthru */ +#define VIRTIO_BLK_F_FLUSH 0x0200 /* Flush command supported */ +#define VIRTIO_BLK_F_WCE 0x0200 /* Legacy alias for FLUSH */ +#define VIRTIO_BLK_F_TOPOLOGY 0x0400 /* Topology information is available */ +#define VIRTIO_BLK_F_CONFIG_WCE 0x0800 /* Writeback mode available in config */ +#define VIRTIO_BLK_F_MQ 0x1000 /* Support more than one vq */ +#define VIRTIO_BLK_F_DISCARD 0x2000 /* Trim blocks */ +#define VIRTIO_BLK_F_WRITE_ZEROES 0x4000 /* Write zeros */ +#define VIRTIO_BLK_ID_BYTES 20 /* ID string length */ + struct virtio_blk_config { /* The capacity (in 512-byte sectors). */ uint64_t capacity; @@ -66,15 +73,29 @@ struct virtio_blk_config { /* Topology of the device (if VIRTIO_BLK_F_TOPOLOGY) */ struct virtio_blk_topology { + /* Exponent for physical block per logical block. */ uint8_t physical_block_exp; + /* Alignment offset in logical blocks. */ uint8_t alignment_offset; + /* Minimum I/O size without performance penalty in logical + * blocks. */ uint16_t min_io_size; + /* Optimal sustained I/O size in logical blocks. */ uint32_t opt_io_size; } topology; /* Writeback mode (if VIRTIO_BLK_F_CONFIG_WCE) */ - uint8_t writeback; - + uint8_t wce; + uint8_t unused; + /* Number of vqs, only available when VIRTIO_BLK_F_MQ is set */ + uint16_t num_queues; + uint32_t max_discard_sectors; + uint32_t max_discard_seg; + uint32_t discard_sector_alignment; + uint32_t max_write_zeroes_sectors; + uint32_t max_write_zeroes_seg; + uint8_t write_zeroes_may_unmap; + uint8_t unused1[3]; } __packed; /* @@ -89,24 +110,35 @@ struct virtio_blk_config { */ /* These two define direction. */ -#define VIRTIO_BLK_T_IN 0 -#define VIRTIO_BLK_T_OUT 1 +#define VIRTIO_BLK_T_IN 0 +#define VIRTIO_BLK_T_OUT 1 /* This bit says it's a scsi command, not an actual read or write. */ -#define VIRTIO_BLK_T_SCSI_CMD 2 +#define VIRTIO_BLK_T_SCSI_CMD 2 +#define VIRTIO_BLK_T_SCSI_CMD_OUT 3 /* Cache flush command */ -#define VIRTIO_BLK_T_FLUSH 4 +#define VIRTIO_BLK_T_FLUSH 4 +#define VIRTIO_BLK_T_FLUSH_OUT 5 /* Get device ID command */ -#define VIRTIO_BLK_T_GET_ID 8 +#define VIRTIO_BLK_T_GET_ID 8 +/* Discard command */ +#define VIRTIO_BLK_T_DISCARD 11 + +/* Write zeros command */ +#define VIRTIO_BLK_T_WRITE_ZEROES 13 + /* Barrier before this op. */ -#define VIRTIO_BLK_T_BARRIER 0x80000000 +#define VIRTIO_BLK_T_BARRIER 0x80000000 /* ID string length */ -#define VIRTIO_BLK_ID_BYTES 20 +#define VIRTIO_BLK_ID_BYTES 20 +/* Unmap this range (only valid for write zeroes command) */ +#define VIRTIO_BLK_WRITE_ZEROES_FLAG_UNMAP 0x00000001 + /* This is the first element of the read scatter-gather list. */ struct virtio_blk_outhdr { /* VIRTIO_BLK_T* */ @@ -115,6 +147,15 @@ struct virtio_blk_outhdr { uint32_t ioprio; /* Sector (ie. 512 byte offset) */ uint64_t sector; +}; + +struct virtio_blk_discard_write_zeroes { + uint64_t sector; + uint32_t num_sectors; + struct { + uint32_t unmap:1; + uint32_t reserved:31; + } flags; }; struct virtio_scsi_inhdr { From owner-svn-src-head@freebsd.org Thu Jul 16 16:45:41 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BE226366E41; Thu, 16 Jul 2020 16:45:41 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B70Vs3C2Nz3WVP; Thu, 16 Jul 2020 16:45:41 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-ot1-f52.google.com with SMTP id t18so4724109otq.5; Thu, 16 Jul 2020 09:45:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8o8y2yh9OSnF52ecXI8E2kn1p9VoByh2+ztFB/6Hu88=; b=M0E3Tx00rrdwHeVyfhZBntoxs+6cNlkANlIBf9SMg8F3741fS8EoEuHaXRE/e+znpT K795bXgvftopnSEIdOGrx2x0M5SRc8QMdZGNJpNGdj9WNpLw2xLlPgBms1Q99TtX2VZh AW1Hv1kI84xz9z/oQERcA8dVXI5/wUP3HLlr4vvaXtsEd/lndmtUrbufFoCSXfkZ5EUG oRpnC0MKb2Xz+fbBBN73fLFoMh9VubekiiCr0sShkYg56O1UW6MZ516sf8s61geyDa2x Jbjct/4ZXj2FGHn3K2wAKjW2eXderqZg5DIKcIHZtdXWhfDgUspYxosLUPaBNfhRqyWr ZaAw== X-Gm-Message-State: AOAM5335v1oVqvADz5/KWMn5AFdzdcPt8+hbNMQ67MJjB+PwmpZKUbBc x9WU2u6qKaFZMoTsrLmImjGwTUjULexodhpxnaSEGkMu X-Google-Smtp-Source: ABdhPJyzgzfALBsYcDP3iKqi2U5Y0V5/XC0FE+cjPgP/kTN5vTy8tmNXFqpR3pTju9QORxwkILL/QpKTcd+VTdRoZo0= X-Received: by 2002:a9d:429:: with SMTP id 38mr5141892otc.291.1594917939876; Thu, 16 Jul 2020 09:45:39 -0700 (PDT) MIME-Version: 1.0 References: <202007161632.06GGWGIR034870@repo.freebsd.org> In-Reply-To: <202007161632.06GGWGIR034870@repo.freebsd.org> From: Alan Somers Date: Thu, 16 Jul 2020 10:45:28 -0600 Message-ID: Subject: Re: svn commit: r363255 - head/sys/dev/virtio/block To: Allan Jude Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4B70Vs3C2Nz3WVP X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 16:45:41 -0000 On Thu, Jul 16, 2020 at 10:32 AM Allan Jude wrote: > Author: allanjude > Date: Thu Jul 16 16:32:16 2020 > New Revision: 363255 > URL: https://svnweb.freebsd.org/changeset/base/363255 > > Log: > Add VIRTIO_BLK_T_DISCARD support to the virtio-blk driver > > If the hypervisor advertises support for the DISCARD command then the > guest can perform TRIM commands, freeing space on the backing store. > > If VIRTIO_BLK_F_DISCARD is enabled, advertise DISKFLAG_CANDELETE > > Tested with FreeBSD guests on bhyve and KVM > +1 From owner-svn-src-head@freebsd.org Thu Jul 16 16:46:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A823A366F92; Thu, 16 Jul 2020 16:46:25 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B70Wj3vYYz3WXC; Thu, 16 Jul 2020 16:46:25 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6A7EEB4E8; Thu, 16 Jul 2020 16:46:25 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06GGkPd9043742; Thu, 16 Jul 2020 16:46:25 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06GGkPfH043741; Thu, 16 Jul 2020 16:46:25 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007161646.06GGkPfH043741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 16 Jul 2020 16:46:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363256 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 363256 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 16:46:25 -0000 Author: tuexen Date: Thu Jul 16 16:46:24 2020 New Revision: 363256 URL: https://svnweb.freebsd.org/changeset/base/363256 Log: (Re)-allow 0.0.0.0 to be used as an address in connect() for TCP In r361752 an error handling was introduced for using 0.0.0.0 or 255.255.255.255 as the address in connect() for TCP, since both addresses can't be used. However, the stack maps 0.0.0.0 implicitly to a local address and at least two regressions were reported. Therefore, re-allow the usage of 0.0.0.0. While there, change the error indicated when using 255.255.255.255 from EAFNOSUPPORT to EACCES as mentioned in the man-page of connect(). Reviewed by: rrs MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D25401 Modified: head/sys/netinet/tcp_usrreq.c Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Thu Jul 16 16:32:16 2020 (r363255) +++ head/sys/netinet/tcp_usrreq.c Thu Jul 16 16:46:24 2020 (r363256) @@ -553,9 +553,8 @@ tcp_usr_connect(struct socket *so, struct sockaddr *na && IN_MULTICAST(ntohl(sinp->sin_addr.s_addr))) return (EAFNOSUPPORT); if ((sinp->sin_family == AF_INET) && - ((ntohl(sinp->sin_addr.s_addr) == INADDR_BROADCAST) || - (sinp->sin_addr.s_addr == INADDR_ANY))) - return(EAFNOSUPPORT); + (ntohl(sinp->sin_addr.s_addr) == INADDR_BROADCAST)) + return (EACCES); if ((error = prison_remote_ip4(td->td_ucred, &sinp->sin_addr)) != 0) return (error); @@ -656,9 +655,8 @@ tcp6_usr_connect(struct socket *so, struct sockaddr *n error = EAFNOSUPPORT; goto out; } - if ((ntohl(sin.sin_addr.s_addr) == INADDR_BROADCAST) || - (sin.sin_addr.s_addr == INADDR_ANY)) { - error = EAFNOSUPPORT; + if (ntohl(sin.sin_addr.s_addr) == INADDR_BROADCAST) { + error = EACCES; goto out; } if ((error = prison_remote_ip4(td->td_ucred, @@ -1033,11 +1031,10 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf error = EAFNOSUPPORT; goto out; } - if ((ntohl(sinp->sin_addr.s_addr) == INADDR_BROADCAST) || - (sinp->sin_addr.s_addr == INADDR_ANY)) { + if (ntohl(sinp->sin_addr.s_addr) == INADDR_BROADCAST) { if (m) m_freem(m); - error = EAFNOSUPPORT; + error = EACCES; goto out; } if ((error = prison_remote_ip4(td->td_ucred, From owner-svn-src-head@freebsd.org Thu Jul 16 20:43:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E4FB36D37B; Thu, 16 Jul 2020 20:43:29 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B75nD75LMz44wg; Thu, 16 Jul 2020 20:43:28 +0000 (UTC) (envelope-from ken@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 D6B81E712; Thu, 16 Jul 2020 20:43:28 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06GKhS8n091824; Thu, 16 Jul 2020 20:43:28 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06GKhSrm091823; Thu, 16 Jul 2020 20:43:28 GMT (envelope-from ken@FreeBSD.org) Message-Id: <202007162043.06GKhSrm091823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Thu, 16 Jul 2020 20:43:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363260 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: ken X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 363260 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 20:43:29 -0000 Author: ken Date: Thu Jul 16 20:43:28 2020 New Revision: 363260 URL: https://svnweb.freebsd.org/changeset/base/363260 Log: Hold the mutex when releasing a callout. In xpt_release_device(), callout_stop() was being called without holding the mutex (send_mtx) that is used to protect the callout. So, move the mtx_unlock() call so that it is protected. MFC after: 1 week Sponsored by: Spectra Logic Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Jul 16 20:36:22 2020 (r363259) +++ head/sys/cam/cam_xpt.c Thu Jul 16 20:43:28 2020 (r363260) @@ -4959,15 +4959,17 @@ xpt_release_device(struct cam_ed *device) devq = bus->sim->devq; mtx_lock(&devq->send_mtx); cam_devq_resize(devq, devq->send_queue.array_size - 1); - mtx_unlock(&devq->send_mtx); KASSERT(SLIST_EMPTY(&device->periphs), ("destroying device, but periphs list is not empty")); KASSERT(device->devq_entry.index == CAM_UNQUEUED_INDEX, ("destroying device while still queued for ccbs")); + /* The send_mtx must be held when accessing the callout */ if ((device->flags & CAM_DEV_REL_TIMEOUT_PENDING) != 0) callout_stop(&device->callout); + + mtx_unlock(&devq->send_mtx); xpt_release_target(device->target); From owner-svn-src-head@freebsd.org Thu Jul 16 20:50:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F255136D741; Thu, 16 Jul 2020 20:50:00 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B75wm67Lrz452N; Thu, 16 Jul 2020 20:50:00 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from mail-yb1-f178.google.com (mail-yb1-f178.google.com [209.85.219.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id ACFDE11938; Thu, 16 Jul 2020 20:50:00 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: by mail-yb1-f178.google.com with SMTP id a15so3473648ybs.8; Thu, 16 Jul 2020 13:50:00 -0700 (PDT) X-Gm-Message-State: AOAM532D/8SCLrjESdB1DOHE9qbVrm16h+ZBi8a7ODT1EkgonbhDKtcA 80lF8Y09BEyvlCoWxt4G2U/PwDXDcZituaJdq2s= X-Google-Smtp-Source: ABdhPJyqKThAxTFNvf68jjyZwMKGwNGllnwPig273+CYZy5iZVhHW2qpLD/nXTqNpHlD6ZaJ4p9Do6Uy1artqBU8EZY= X-Received: by 2002:a25:5084:: with SMTP id e126mr9492004ybb.212.1594932600102; Thu, 16 Jul 2020 13:50:00 -0700 (PDT) MIME-Version: 1.0 References: <202007161128.06GBSPSB045345@repo.freebsd.org> In-Reply-To: <202007161128.06GBSPSB045345@repo.freebsd.org> From: Mitchell Horne Date: Thu, 16 Jul 2020 17:49:48 -0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r363242 - head/sys/amd64/include To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 20:50:01 -0000 On Thu, Jul 16, 2020 at 8:28 AM Mateusz Guzik wrote: > > Author: mjg > Date: Thu Jul 16 11:28:24 2020 > New Revision: 363242 > URL: https://svnweb.freebsd.org/changeset/base/363242 > > Log: > amd64: patch ffsl to use the compiler builtin > > This shortens fdalloc by over 60 bytes. Correctness verified by running both > variants at the same time and comparing the result of each call. > > Note someone(tm) should make a pass at converting everything else feasible. > I have a local version of such a change. I'll see about getting it up for review in the next little while. Mitchell > Modified: > head/sys/amd64/include/cpufunc.h > > Modified: head/sys/amd64/include/cpufunc.h > ============================================================================== > --- head/sys/amd64/include/cpufunc.h Thu Jul 16 10:20:35 2020 (r363241) > +++ head/sys/amd64/include/cpufunc.h Thu Jul 16 11:28:24 2020 (r363242) > @@ -167,7 +167,8 @@ enable_intr(void) > static __inline __pure2 int > ffsl(long mask) > { > - return (mask == 0 ? mask : (int)bsfq((u_long)mask) + 1); > + > + return (__builtin_ffsl(mask)); > } > > #define HAVE_INLINE_FFSLL From owner-svn-src-head@freebsd.org Thu Jul 16 20:52:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9D9D036D4F1; Thu, 16 Jul 2020 20:52:30 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B75zf1rlcz45Zv; Thu, 16 Jul 2020 20:52:29 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x344.google.com with SMTP id w3so12981653wmi.4; Thu, 16 Jul 2020 13:52:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SSPtdXq2R6yyMWgwMKGaQDJH5WZ/wkf2oh5s0z7Ta7M=; b=UTgvgzB5LhBpIb0OSMukCHWQuH6V11ImRUBbTIxtOvYuq8nkPhQ3Wp60UmeKgZQkTo e/0C7aAeFXTCAXOoZ45byK9ov9+TTl3PV4pp5x7G0aeD62ZFlVMegv/Vop/GJQVElJFq 6YXWNL7NqmLr+z2/nqUW/BiZ2KqMdvBqHxR+Zjw6sIXh+S/3U+OjnRVmm7Ua/n/OKcxH vz7mcb9yFyJtIruK5r5Gf77Buqiu45I9xly15qeEDy81AAMjD5+Dd3xiH8iNgGmD5bFx 5+Skw52rj/ZPM0yYhQpP1UnNcLEkRhUFR3brNBRBdsKKPwk4YzLKBO4dLlIvClYD2qKA RXmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SSPtdXq2R6yyMWgwMKGaQDJH5WZ/wkf2oh5s0z7Ta7M=; b=Yoi2ZkfwAkLDxKIw5xDtk8W4XG1TJTnqAVSHbE79Xs1tofe2Ib8Q+Z9P0gWf+Q/MlW T6rDWiqNu5UiOupcmeWOTFQBgIx7D5VNtttheEmVUeKipOexaLVH3J4mwIjqKKTIJF4d B9SLb7pYOJ8VomNz2kkUypHTpHhXXMWeyetzOBh5Yop0+yB/ftGwEy+sGRgBdJkjOjhg +YSdD1J2gqnKnt9yM5GoKQvWITgr0XzBpX3pbYs6x/YMzdcvuFpoKWtLoVG/DwVA9nlg no883TMq31PMq/IOoi/QwJ/q6HUotgc9Wjp654Yo7VMrmRf5baOevZwVIvkXyYIyf5Kx O2Mg== X-Gm-Message-State: AOAM5324xhaiRXy7GeQLVYiXJngvw8bDjR8mBxiI4zx9YZ76aXvMxCNk peCXxqqmsvyLFfICZjkxl5eXe/bSmqWpiyXHX9Xe/w== X-Google-Smtp-Source: ABdhPJy1//BCVgPl6EQjECT00rDLLWmYqhEYrSlRWmjVFLKo9Hi69xfao/9oRkHcR69SiZ+zrmFWzXBdK+b84JULz4I= X-Received: by 2002:a05:600c:20d3:: with SMTP id y19mr6241369wmm.10.1594932748040; Thu, 16 Jul 2020 13:52:28 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:9d84:0:0:0:0:0 with HTTP; Thu, 16 Jul 2020 13:52:27 -0700 (PDT) In-Reply-To: References: <202007161128.06GBSPSB045345@repo.freebsd.org> From: Mateusz Guzik Date: Thu, 16 Jul 2020 22:52:27 +0200 Message-ID: Subject: Re: svn commit: r363242 - head/sys/amd64/include To: Mitchell Horne Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4B75zf1rlcz45Zv X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 20:52:30 -0000 Sounds good, albeit true to my commit message, I'm strongly recommending you run both at the same time. I had ORIG_ and NEW_, with ffs calling both and comparing the result. But perhaps more importantly this may be a good time to create a MI-header for this stuff and do a pass with other archs. We are long past a point where hand-rolled primitives make sense in the common case. On 7/16/20, Mitchell Horne wrote: > On Thu, Jul 16, 2020 at 8:28 AM Mateusz Guzik wrote: >> >> Author: mjg >> Date: Thu Jul 16 11:28:24 2020 >> New Revision: 363242 >> URL: https://svnweb.freebsd.org/changeset/base/363242 >> >> Log: >> amd64: patch ffsl to use the compiler builtin >> >> This shortens fdalloc by over 60 bytes. Correctness verified by running >> both >> variants at the same time and comparing the result of each call. >> >> Note someone(tm) should make a pass at converting everything else >> feasible. >> > > I have a local version of such a change. I'll see about getting it up > for review in the next little while. > > Mitchell > >> Modified: >> head/sys/amd64/include/cpufunc.h >> >> Modified: head/sys/amd64/include/cpufunc.h >> ============================================================================== >> --- head/sys/amd64/include/cpufunc.h Thu Jul 16 10:20:35 2020 >> (r363241) >> +++ head/sys/amd64/include/cpufunc.h Thu Jul 16 11:28:24 2020 >> (r363242) >> @@ -167,7 +167,8 @@ enable_intr(void) >> static __inline __pure2 int >> ffsl(long mask) >> { >> - return (mask == 0 ? mask : (int)bsfq((u_long)mask) + 1); >> + >> + return (__builtin_ffsl(mask)); >> } >> >> #define HAVE_INLINE_FFSLL > -- Mateusz Guzik From owner-svn-src-head@freebsd.org Thu Jul 16 21:30:47 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E16736E741; Thu, 16 Jul 2020 21:30:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B76qq2M45z47Sw; Thu, 16 Jul 2020 21:30:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 30E64ED2A; Thu, 16 Jul 2020 21:30:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06GLUkOR017251; Thu, 16 Jul 2020 21:30:46 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06GLUkmA017248; Thu, 16 Jul 2020 21:30:46 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202007162130.06GLUkmA017248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 16 Jul 2020 21:30:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363262 - in head: share/man/man9 sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: share/man/man9 sys/opencrypto X-SVN-Commit-Revision: 363262 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 21:30:47 -0000 Author: jhb Date: Thu Jul 16 21:30:46 2020 New Revision: 363262 URL: https://svnweb.freebsd.org/changeset/base/363262 Log: Add crypto_initreq() and crypto_destroyreq(). These routines are similar to crypto_getreq() and crypto_freereq() but operate on caller-supplied storage instead of allocating crypto requests from a UMA zone. Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D25691 Modified: head/share/man/man9/Makefile head/share/man/man9/crypto_request.9 head/sys/opencrypto/crypto.c head/sys/opencrypto/cryptodev.h Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Thu Jul 16 20:44:04 2020 (r363261) +++ head/share/man/man9/Makefile Thu Jul 16 21:30:46 2020 (r363262) @@ -927,9 +927,11 @@ MLINKS+=crypto_driver.9 crypto_copyback.9 \ crypto_driver.9 CRYPTODEV_PROCESS.9 \ crypto_driver.9 hmac_init_ipad.9 \ crypto_driver.9 hmac_init_opad.9 -MLINKS+=crypto_request.9 crypto_dispatch.9 \ +MLINKS+=crypto_request.9 crypto_destroyreq.9 \ + crypto_request.9 crypto_dispatch.9 \ crypto_request.9 crypto_freereq.9 \ crypto_request.9 crypto_getreq.9 \ + crypto_request.9 crypto_initreq.9 \ crypto_request.9 crypto_use_buf.9 \ crypto_request.9 crypto_use_mbuf.9 \ crypto_request.9 crypto_use_output_buf.9 \ Modified: head/share/man/man9/crypto_request.9 ============================================================================== --- head/share/man/man9/crypto_request.9 Thu Jul 16 20:44:04 2020 (r363261) +++ head/share/man/man9/crypto_request.9 Thu Jul 16 21:30:46 2020 (r363262) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 22, 2020 +.Dd July 16, 2020 .Dt CRYPTO_REQUEST 9 .Os .Sh NAME @@ -41,10 +41,14 @@ .Ft int .Fn crypto_dispatch "struct cryptop *crp" .Ft void +.Fn crypto_destroyreq "struct cryptop *crp" +.Ft void .Fn crypto_freereq "struct cryptop *crp" .Ft "struct cryptop *" .Fn crypto_getreq "crypto_session_t cses" "int how" .Ft void +.Fn crypto_initreq "crypto_session_t cses" "int how" +.Ft void .Fn crypto_use_buf "struct cryptop *crp" "void *buf" "int len" .Ft void .Fn crypto_use_mbuf "struct cryptop *crp" "struct mbuf *m" @@ -62,10 +66,27 @@ an instance of .Vt struct cryptop and is associated with an active session. .Pp -New requests are allocated by -.Fn crypto_getreq . +Requests can either be allocated dynamically or use caller-supplied +storage. +Dynamically allocated requests should be allocated by +.Fn crypto_getreq +and freed by +.Fn crypto_freereq +once the request has completed. +Requests using caller-supplied storage should be initialized by +.Fn crypto_initreq +at the start of each operation and destroyed by +.Fn crypto_destroyreq +once the request has completed. +.Pp +For both +.Fn crypto_getreq +and +.Fn crypto_initreq , .Fa cses is a reference to an active session. +For +.Fn crypto_getreq , .Fa how is passed to .Xr malloc 9 @@ -73,7 +94,9 @@ and should be set to either .Dv M_NOWAIT or .Dv M_WAITOK . -The caller should then set fields in the returned structure to describe +.Pp +Once a request has been initialized, +the caller should set fields in the structure to describe request-specific parameters. Unused fields should be left as-is. .Pp @@ -92,7 +115,9 @@ Note that a request's callback function may be invoked returns. .Pp Once a request has signaled completion by invoking its callback function, -it should be feed via +it should be freed via +.Fn crypto_destroyreq +or .Fn crypto_freereq . .Pp Cryptographic operations include several fields to describe the request. Modified: head/sys/opencrypto/crypto.c ============================================================================== --- head/sys/opencrypto/crypto.c Thu Jul 16 20:44:04 2020 (r363261) +++ head/sys/opencrypto/crypto.c Thu Jul 16 21:30:46 2020 (r363262) @@ -1734,12 +1734,8 @@ crypto_invoke(struct cryptocap *cap, struct cryptop *c } void -crypto_freereq(struct cryptop *crp) +crypto_destroyreq(struct cryptop *crp) { - - if (crp == NULL) - return; - #ifdef DIAGNOSTIC { struct cryptop *crp2; @@ -1764,10 +1760,31 @@ crypto_freereq(struct cryptop *crp) } } #endif +} +void +crypto_freereq(struct cryptop *crp) +{ + if (crp == NULL) + return; + + crypto_destroyreq(crp); uma_zfree(cryptop_zone, crp); } +static void +_crypto_initreq(struct cryptop *crp, crypto_session_t cses) +{ + crp->crp_session = cses; +} + +void +crypto_initreq(struct cryptop *crp, crypto_session_t cses) +{ + memset(crp, 0, sizeof(*crp)); + _crypto_initreq(crp, cses); +} + struct cryptop * crypto_getreq(crypto_session_t cses, int how) { @@ -1775,7 +1792,8 @@ crypto_getreq(crypto_session_t cses, int how) MPASS(how == M_WAITOK || how == M_NOWAIT); crp = uma_zalloc(cryptop_zone, how | M_ZERO); - crp->crp_session = cses; + if (crp != NULL) + _crypto_initreq(crp, cses); return (crp); } Modified: head/sys/opencrypto/cryptodev.h ============================================================================== --- head/sys/opencrypto/cryptodev.h Thu Jul 16 20:44:04 2020 (r363261) +++ head/sys/opencrypto/cryptodev.h Thu Jul 16 21:30:46 2020 (r363262) @@ -622,6 +622,8 @@ extern void crypto_done(struct cryptop *crp); extern void crypto_kdone(struct cryptkop *); extern int crypto_getfeat(int *); +extern void crypto_destroyreq(struct cryptop *crp); +extern void crypto_initreq(struct cryptop *crp, crypto_session_t cses); extern void crypto_freereq(struct cryptop *crp); extern struct cryptop *crypto_getreq(crypto_session_t cses, int how); From owner-svn-src-head@freebsd.org Thu Jul 16 21:58:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99C0C36EF61; Thu, 16 Jul 2020 21:58:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B77S43Mg2z4853; Thu, 16 Jul 2020 21:58:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 53303E8FC; Thu, 16 Jul 2020 21:58:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06GLwi9u034512; Thu, 16 Jul 2020 21:58:44 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06GLwh9N034510; Thu, 16 Jul 2020 21:58:43 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202007162158.06GLwh9N034510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 16 Jul 2020 21:58:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363263 - in head/lib/csu: . common X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/lib/csu: . common X-SVN-Commit-Revision: 363263 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 21:58:44 -0000 Author: jhb Date: Thu Jul 16 21:58:43 2020 New Revision: 363263 URL: https://svnweb.freebsd.org/changeset/base/363263 Log: Include ABI note tag in shared libraries. Split the ELF feature note into a separate file that is linked into *crt1.o the same as crtbrand.S was before. crtbrand.o is now linked into crti.o on all platforms in addition to *crt1.o. Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25304 Added: head/lib/csu/common/feature_note.S - copied, changed from r363261, head/lib/csu/common/crtbrand.S Modified: head/lib/csu/Makefile.inc head/lib/csu/common/crtbrand.S Modified: head/lib/csu/Makefile.inc ============================================================================== --- head/lib/csu/Makefile.inc Thu Jul 16 21:30:46 2020 (r363262) +++ head/lib/csu/Makefile.inc Thu Jul 16 21:58:43 2020 (r363263) @@ -13,7 +13,7 @@ OBJS+= crtbegin.o crtbeginS.o crtbeginT.o OBJS+= crtend.o crtendS.o OBJS+= crti.o crtn.o -CRT1OBJS+= crtbrand.o ignore_init_note.o +CRT1OBJS+= crtbrand.o feature_note.o ignore_init_note.o ACFLAGS+= -DLOCORE @@ -33,6 +33,7 @@ FILESDIR= ${LIBDIR} .undef LIBRARIES_ONLY CLEANFILES+= ${OBJS} ${CRT1OBJS} crt1_c.o gcrt1_c.o Scrt1_c.o +CLEANFILES+= crti_s.o crt1.o: crt1_c.o ${CRT1OBJS} ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} @@ -67,6 +68,12 @@ crtbegin.o crtend.o crtbeginT.o: crtbeginS.o crtendS.o: ${CC} ${CFLAGS} -I${.CURDIR} ${CFLAGS_CRTS} -c -o ${.TARGET} \ ${.ALLSRC:N*.h:[1]} + +crti_s.o: crti.S + ${CC} ${CFLAGS} ${ACFLAGS} -c ${.ALLSRC:M*.S} -o ${.TARGET} + +crti.o: crti_s.o crtbrand.o + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} .endif Modified: head/lib/csu/common/crtbrand.S ============================================================================== --- head/lib/csu/common/crtbrand.S Thu Jul 16 21:30:46 2020 (r363262) +++ head/lib/csu/common/crtbrand.S Thu Jul 16 21:58:43 2020 (r363263) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); * for more information. */ - .section .note.tag,"a",%note + .section .note.tag,"aG",%note,.freebsd.noteG,comdat .p2align 2 .4byte 2f-1f .4byte 4f-3f @@ -46,14 +46,4 @@ __FBSDID("$FreeBSD$"); 1: .asciz NOTE_FREEBSD_VENDOR 2: .p2align 2 3: .4byte __FreeBSD_version -4: - - .section .note.tag,"a",%note - .p2align 2 - .4byte 2f-1f - .4byte 4f-3f - .4byte NT_FREEBSD_FEATURE_CTL -1: .asciz NOTE_FREEBSD_VENDOR -2: .p2align 2 -3: .4byte 0 4: Copied and modified: head/lib/csu/common/feature_note.S (from r363261, head/lib/csu/common/crtbrand.S) ============================================================================== --- head/lib/csu/common/crtbrand.S Thu Jul 16 20:44:04 2020 (r363261, copy source) +++ head/lib/csu/common/feature_note.S Thu Jul 16 21:58:43 2020 (r363263) @@ -28,25 +28,8 @@ #include __FBSDID("$FreeBSD$"); -#include #include #include "notes.h" - -/* - * Special ".note.tag" entry specifying the ABI version. See - * http://www.netbsd.org/Documentation/kernel/elf-notes.html - * for more information. - */ - - .section .note.tag,"a",%note - .p2align 2 - .4byte 2f-1f - .4byte 4f-3f - .4byte NT_FREEBSD_ABI_TAG -1: .asciz NOTE_FREEBSD_VENDOR -2: .p2align 2 -3: .4byte __FreeBSD_version -4: .section .note.tag,"a",%note .p2align 2 From owner-svn-src-head@freebsd.org Thu Jul 16 22:01:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 17EAD36ECBF; Thu, 16 Jul 2020 22:01:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B77Vj6yWLz48hL; Thu, 16 Jul 2020 22:01:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2142F37D; Thu, 16 Jul 2020 22:01:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06GM11hs037886; Thu, 16 Jul 2020 22:01:01 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06GM11Bh037883; Thu, 16 Jul 2020 22:01:01 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202007162201.06GM11Bh037883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 16 Jul 2020 22:01:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363264 - head/libexec/rtld-elf X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/libexec/rtld-elf X-SVN-Commit-Revision: 363264 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 22:01:02 -0000 Author: jhb Date: Thu Jul 16 22:01:01 2020 New Revision: 363264 URL: https://svnweb.freebsd.org/changeset/base/363264 Log: Include FreeBSD ABI tag note in the ELF runtime loader. Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25306 Modified: head/libexec/rtld-elf/Makefile head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Thu Jul 16 21:58:43 2020 (r363263) +++ head/libexec/rtld-elf/Makefile Thu Jul 16 22:01:01 2020 (r363264) @@ -17,6 +17,7 @@ PROG?= ld-elf.so.1 TAGS+= lib32 .endif SRCS= \ + crtbrand.S \ rtld_start.S \ reloc.c \ rtld.c \ @@ -29,6 +30,7 @@ SRCS= \ libmap.c MAN?= rtld.1 CSTD?= gnu99 +ACFLAGS+= -DLOCORE CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -ffreestanding CFLAGS+= -I${SRCTOP}/lib/csu/common .if exists(${RTLD_ELF_DIR}/${MACHINE_ARCH}) @@ -75,7 +77,7 @@ beforeinstall: -chflags -h noschg ${DESTDIR}/usr/libexec/${PROG} .endif -.PATH: ${RTLD_ELF_DIR}/${RTLD_ARCH} +.PATH: ${RTLD_ELF_DIR}/${RTLD_ARCH} ${SRCTOP}/lib/csu/common .if ${.CURDIR} == ${RTLD_ELF_DIR} HAS_TESTS= Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Thu Jul 16 21:58:43 2020 (r363263) +++ head/libexec/rtld-elf/rtld.c Thu Jul 16 22:01:01 2020 (r363264) @@ -470,19 +470,6 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr } direct_exec = true; - /* - * Set osrel for us, it is later reset to the binary' - * value before first instruction of code from the binary - * is executed. - */ - mib[0] = CTL_KERN; - mib[1] = KERN_PROC; - mib[2] = KERN_PROC_OSREL; - mib[3] = getpid(); - osrel = __FreeBSD_version; - sz = sizeof(old_osrel); - (void)sysctl(mib, 4, &old_osrel, &sz, &osrel, sizeof(osrel)); - dbg("opening main program in direct exec mode"); if (argc >= 2) { rtld_argc = parse_args(argv, argc, &search_in_path, &fd, &argv0); From owner-svn-src-head@freebsd.org Thu Jul 16 23:05:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CFB2036FEEF; Thu, 16 Jul 2020 23:05:19 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B78wv523pz4Cvp; Thu, 16 Jul 2020 23:05:19 +0000 (UTC) (envelope-from jmg@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 8FF96FE9D; Thu, 16 Jul 2020 23:05:19 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06GN5JXX077014; Thu, 16 Jul 2020 23:05:19 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06GN5JUS077012; Thu, 16 Jul 2020 23:05:19 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <202007162305.06GN5JUS077012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Thu, 16 Jul 2020 23:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363265 - in head/tools/tools: . man X-SVN-Group: head X-SVN-Commit-Author: jmg X-SVN-Commit-Paths: in head/tools/tools: . man X-SVN-Commit-Revision: 363265 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 23:05:19 -0000 Author: jmg Date: Thu Jul 16 23:05:18 2020 New Revision: 363265 URL: https://svnweb.freebsd.org/changeset/base/363265 Log: add script to help figure out what man pages need MLINKS updated... Added: head/tools/tools/man/ head/tools/tools/man/README (contents, props changed) head/tools/tools/man/checkmlinks.sh (contents, props changed) Modified: head/tools/tools/README Modified: head/tools/tools/README ============================================================================== --- head/tools/tools/README Thu Jul 16 22:01:01 2020 (r363264) +++ head/tools/tools/README Thu Jul 16 23:05:18 2020 (r363265) @@ -44,6 +44,7 @@ kernelcruft Shellscript to find orphaned *.c files in kerninclude Shellscript to find unused #includes in the kernel. kernxref Shellscript to cross reference symbols in the LINT kernel. kttcp An in-kernel version of the ttcp network performance tool +man Scripts useful for working on man pages. mctest A multicast test program mid Create a Message-ID database for mailing lists. mwl Tools specific to the Marvell 88W8363 support Added: head/tools/tools/man/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/man/README Thu Jul 16 23:05:18 2020 (r363265) @@ -0,0 +1,23 @@ +man scripts +=========== + +checkmlinks.sh +-------------- + +This is a simple script used to check if a man page's Nm/Fo/Fn macro +names are in the Makefile. + +To run, switch to the directory with the pages in it and run the script: +``` +cd /usr/src/share/man/man9 +sh /usr/src/tools/tools/man/checkmlinks.sh +``` + +The script will output the name that is missing, and the file that it +was sourced from. + +There are a number of exceptions, and those should be added to the +script to skip over, e.g. `SDT_PROBE`. The last one is added because +adding the numbered args is a bit redundant. + +$FreeBSD$ Added: head/tools/tools/man/checkmlinks.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/man/checkmlinks.sh Thu Jul 16 23:05:18 2020 (r363265) @@ -0,0 +1,35 @@ +#!/bin/sh - +# Copyright 2020 John-Mark Gurney. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +for i in *.[0-9]*; do + for j in $(awk '($1 == ".Nm" || $1 == ".Fo" || $1 == ".Fn") && $2 != "" && $2 != "." && $2 != "," { print $2 }' "$i" | egrep -v 'SDT_PROBE|_Static_assert|ffs_vget|atomic_'); do + if ! grep "$j" Makefile >/dev/null; then + echo missing "$j" from "$i" + fi + done | sort -u +done From owner-svn-src-head@freebsd.org Thu Jul 16 23:29:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 88CB0370A2D; Thu, 16 Jul 2020 23:29:28 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B79Sm2xnJz4F6Y; Thu, 16 Jul 2020 23:29:28 +0000 (UTC) (envelope-from cem@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 49640102A6; Thu, 16 Jul 2020 23:29:28 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06GNTS0b089415; Thu, 16 Jul 2020 23:29:28 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06GNTQs0089408; Thu, 16 Jul 2020 23:29:26 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202007162329.06GNTQs0089408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 16 Jul 2020 23:29:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363266 - in head/sys: amd64/amd64 i386/i386 mips/mips powerpc/aim powerpc/booke X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 mips/mips powerpc/aim powerpc/booke X-SVN-Commit-Revision: 363266 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 23:29:28 -0000 Author: cem Date: Thu Jul 16 23:29:26 2020 New Revision: 363266 URL: https://svnweb.freebsd.org/changeset/base/363266 Log: Revert r240317 to prevent leaking pmap entries Subsequent to r240317, kmem_free() was replaced with kva_free() (r254025). kva_free() releases the KVA allocation for the mapped region, but no longer clears the pmap (pagetable) entries. An affected pmap_unmapdev operation would leave the still-pmap'd VA space free for allocation by other KVA consumers. However, this bug easily avoided notice for ~7 years because most devices (1) never call pmap_unmapdev and (2) on amd64, mostly fit within the DMAP and do not need KVA allocations. Other affected arch are less popular: i386, MIPS, and PowerPC. Arm64, arm32, and riscv are not affected. Reported by: Don Morris Submitted by: Don Morris (amd64 part) Reviewed by: kib, markj, Don (!amd64 parts) MFC after: I don't intend to, but you might want to Sponsored by: Dell Isilon Differential Revision: https://reviews.freebsd.org/D25689 Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c head/sys/mips/mips/pmap.c head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/aim/mmu_radix.c head/sys/powerpc/booke/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Thu Jul 16 23:05:18 2020 (r363265) +++ head/sys/amd64/amd64/pmap.c Thu Jul 16 23:29:26 2020 (r363266) @@ -8279,8 +8279,10 @@ pmap_unmapdev(vm_offset_t va, vm_size_t size) return; } } - if (pmap_initialized) + if (pmap_initialized) { + pmap_qremove(va, atop(size)); kva_free(va, size); + } } /* Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Thu Jul 16 23:05:18 2020 (r363265) +++ head/sys/i386/i386/pmap.c Thu Jul 16 23:29:26 2020 (r363266) @@ -5538,8 +5538,10 @@ __CONCAT(PMTYPE, unmapdev)(vm_offset_t va, vm_size_t s return; } } - if (pmap_initialized) + if (pmap_initialized) { + pmap_qremove(va, atop(size)); kva_free(va, size); + } } /* Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Thu Jul 16 23:05:18 2020 (r363265) +++ head/sys/mips/mips/pmap.c Thu Jul 16 23:29:26 2020 (r363266) @@ -3264,6 +3264,7 @@ pmap_unmapdev(vm_offset_t va, vm_size_t size) base = trunc_page(va); offset = va & PAGE_MASK; size = roundup(size + offset, PAGE_SIZE); + pmap_qremove(base, atop(size)); kva_free(base, size); #endif } Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Thu Jul 16 23:05:18 2020 (r363265) +++ head/sys/powerpc/aim/mmu_oea.c Thu Jul 16 23:29:26 2020 (r363266) @@ -2673,6 +2673,7 @@ moea_unmapdev(vm_offset_t va, vm_size_t size) base = trunc_page(va); offset = va & PAGE_MASK; size = roundup(offset + size, PAGE_SIZE); + moea_qremove(base, atop(size)); kva_free(base, size); } } Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Thu Jul 16 23:05:18 2020 (r363265) +++ head/sys/powerpc/aim/mmu_oea64.c Thu Jul 16 23:29:26 2020 (r363266) @@ -2869,6 +2869,7 @@ moea64_unmapdev(vm_offset_t va, vm_size_t size) offset = va & PAGE_MASK; size = roundup2(offset + size, PAGE_SIZE); + moea64_qremove(base, atop(size)); kva_free(base, size); } Modified: head/sys/powerpc/aim/mmu_radix.c ============================================================================== --- head/sys/powerpc/aim/mmu_radix.c Thu Jul 16 23:05:18 2020 (r363265) +++ head/sys/powerpc/aim/mmu_radix.c Thu Jul 16 23:29:26 2020 (r363266) @@ -5846,8 +5846,10 @@ mmu_radix_unmapdev(vm_offset_t va, vm_size_t size) size = round_page(offset + size); va = trunc_page(va); - if (pmap_initialized) + if (pmap_initialized) { + mmu_radix_qremove(va, atop(size)); kva_free(va, size); + } } static __inline void Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Thu Jul 16 23:05:18 2020 (r363265) +++ head/sys/powerpc/booke/pmap.c Thu Jul 16 23:29:26 2020 (r363266) @@ -2322,6 +2322,7 @@ mmu_booke_unmapdev(vm_offset_t va, vm_size_t size) base = trunc_page(va); offset = va & PAGE_MASK; size = roundup(offset + size, PAGE_SIZE); + mmu_booke_qremove(base, atop(size)); kva_free(base, size); } #endif From owner-svn-src-head@freebsd.org Fri Jul 17 00:13:20 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 403CB372655 for ; Fri, 17 Jul 2020 00:13:20 +0000 (UTC) (envelope-from bounces+14342079-560b-svn-src-head=freebsd.org@sendgrid.net) Received: from wrqvkzxd.outbound-mail.sendgrid.net (wrqvkzxd.outbound-mail.sendgrid.net [149.72.30.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7BRM1clTz4J7F for ; Fri, 17 Jul 2020 00:13:18 +0000 (UTC) (envelope-from bounces+14342079-560b-svn-src-head=freebsd.org@sendgrid.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sendgrid.net; h=subject:from:to:mime-version:content-type; s=smtpapi; bh=Pi7lqIWUJpUgIR3KT9VwMyHW7pU3M3nnYdG4Xy3eeVY=; b=kLYYfT7DKM/i9 ZcgSHp3X7/xQhe8KVhz9yQEF+3ZXWKU5jROfxmluOekKH1GB8veh/TK1S5siKt0s vUnhbShTMaQzMJccDVI1GQ39xyi8hkFq9zOfzK+M5WGP6Rss94u+rWZaT8p6NEHK q0M69oCudgAjtP9D4R6reVjD0eEoLI= Received: by filter2134p1mdw1.sendgrid.net with SMTP id filter2134p1mdw1-19808-5F10ED1C-36 2020-07-17 00:13:16.918136171 +0000 UTC m=+283520.852521943 Received: from rfbnujyepq (unknown) by ismtpd0006p1lon1.sendgrid.net (SG) with ESMTP id 4jFEVdIDSNikL3R9B9ONeA for ; Fri, 17 Jul 2020 00:13:16.757 +0000 (UTC) Date: Fri, 17 Jul 2020 00:13:16 +0000 (UTC) Subject: Online activity on-hold ! Message-ID: From: Westpac To: svn-src-head@freebsd.org MIME-Version: 1.0 X-SG-EID: EvYvoie/qnEezyq2t4eRKjDm9X7ZKbCMt75WvXA+XNFvPkjV/NQTDeUxy++9/QKLpJycZYQZMiO9QA +BvyN67C+DHR/qlxvKd1y4hf/9qcKOca+kb3hsriMwFJ2VtiWBdHjypbDTkyTB4tQLd/HNnBpN4zku gjegePF6eKsGKcFGUQtKfOhzskuVPC1MsQQSv2PxbIFTwLbVq+8KSrtHlEIxsh/S9b4aXOeQn0s+X0 s= X-Rspamd-Queue-Id: 4B7BRM1clTz4J7F X-Spamd-Bar: ++++++++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=sendgrid.net header.s=smtpapi header.b=kLYYfT7D; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=thelott.com (policy=none); spf=pass (mx1.freebsd.org: domain of bounces@sendgrid.net designates 149.72.30.173 as permitted sender) smtp.mailfrom=bounces@sendgrid.net X-Spamd-Result: default: False [10.01 / 15.00]; R_SPF_ALLOW(0.00)[+ip4:149.72.0.0/16:c]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[sendgrid.net:+]; INVALID_MSGID(1.70)[]; SUBJECT_ENDS_EXCLAIM(0.00)[]; FORGED_SENDER(0.30)[noreply@member.thelott.com,bounces@sendgrid.net]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:11377, ipnet:149.72.24.0/21, country:US]; TAGGED_FROM(0.00)[14342079-560b-svn-src-head=freebsd.org]; FROM_NEQ_ENVFROM(0.00)[noreply@member.thelott.com,bounces@sendgrid.net]; ARC_NA(0.00)[]; R_DKIM_ALLOW(0.00)[sendgrid.net:s=smtpapi]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; URI_HIDDEN_PATH(1.00)[https://ercike.hu/.asldknalsda]; HTML_SHORT_LINK_IMG_1(2.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; URIBL_GREY(1.50)[sendgrid.net:dkim]; RCPT_COUNT_ONE(0.00)[1]; BAD_REP_POLICIES(0.10)[]; NEURAL_SPAM_MEDIUM(0.96)[0.956]; NEURAL_SPAM_SHORT(0.97)[0.966]; NEURAL_SPAM_LONG(0.99)[0.993]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_COUNT_TWO(0.00)[2]; GREYLIST(0.00)[pass,meta]; DMARC_POLICY_SOFTFAIL(0.10)[thelott.com : SPF not aligned (relaxed), DKIM not aligned (relaxed), none] X-Spam: Yes Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 00:13:20 -0000 =0D =0D https://westpac.com.au/=0D Hi svn-src-head@freebsd.org,=0D =0D Unfortunately we couldn't verify your payment datails from your account.=0D =0D =0D To avoid suspension of your online activity please update your account . ht= tps://ercike.hu/.asldknalsda=0D =0D =0D =0D =0D Westpac Team Security From owner-svn-src-head@freebsd.org Fri Jul 17 06:33:20 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B8CCF35A13F; Fri, 17 Jul 2020 06:33:20 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7Lsr4M2nz4c56; Fri, 17 Jul 2020 06:33:20 +0000 (UTC) (envelope-from pstef@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 78CD11559D; Fri, 17 Jul 2020 06:33:20 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06H6XKXn053216; Fri, 17 Jul 2020 06:33:20 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06H6XKLn053215; Fri, 17 Jul 2020 06:33:20 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <202007170633.06H6XKLn053215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Fri, 17 Jul 2020 06:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363268 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: pstef X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 363268 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 06:33:20 -0000 Author: pstef Date: Fri Jul 17 06:33:20 2020 New Revision: 363268 URL: https://svnweb.freebsd.org/changeset/base/363268 Log: Promote use of unprivileged users for building ports by documenting SU_CMD. Phrasing by Daniel O'Connor. Reviewed by: 0mp MFC after: 14 days Differential Revision: https://reviews.freebsd.org/D25433 Modified: head/share/man/man7/ports.7 Modified: head/share/man/man7/ports.7 ============================================================================== --- head/share/man/man7/ports.7 Fri Jul 17 02:53:41 2020 (r363267) +++ head/share/man/man7/ports.7 Fri Jul 17 06:33:20 2020 (r363268) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 4, 2020 +.Dd July 17, 2020 .Dt PORTS 7 .Os .Sh NAME @@ -437,6 +437,14 @@ Where to find/put distfiles, normally .Pa distfiles/ in .Va PORTSDIR . +.It Va SU_CMD +Command used to elevate privilege to configure and install a port. +The unprivileged user must have write access to +.Va WRKDIRPREFIX +and +.Va DISTDIR . +The default is +.Ql /usr/bin/su root -c .It Va PACKAGES Used only for the .Cm package From owner-svn-src-head@freebsd.org Fri Jul 17 14:39:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C0C7366A1F; Fri, 17 Jul 2020 14:39:08 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7YfN0s0kz483P; Fri, 17 Jul 2020 14:39:08 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00C501A66D; Fri, 17 Jul 2020 14:39:08 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HEd7ES050697; Fri, 17 Jul 2020 14:39:07 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HEd742050696; Fri, 17 Jul 2020 14:39:07 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202007171439.06HEd742050696@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 17 Jul 2020 14:39:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363272 - head/sys/cddl/dev/dtrace/aarch64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/cddl/dev/dtrace/aarch64 X-SVN-Commit-Revision: 363272 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 14:39:08 -0000 Author: andrew Date: Fri Jul 17 14:39:07 2020 New Revision: 363272 URL: https://svnweb.freebsd.org/changeset/base/363272 Log: Don't overflow the trap frame when accessing lr or xzr. When emulating a load pair or store pair in dtrace on arm64 we need to copy the data between the stack and trap frame. When the registers are either the link register or the zero register we will access memory past the end of the trap frame as these are encoded as registers 30 and 31 respectively while the array they access only has 30 entries. Fix this by creating 2 helper functions to perform the operation with special cases for these registers. Sponsored by: Innovate UK Modified: head/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c Modified: head/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c ============================================================================== --- head/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c Fri Jul 17 14:17:13 2020 (r363271) +++ head/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c Fri Jul 17 14:39:07 2020 (r363272) @@ -231,6 +231,31 @@ dtrace_probe_error(dtrace_state_t *state, dtrace_epid_ (uintptr_t)which, (uintptr_t)fault, (uintptr_t)fltoffs); } +static void +dtrace_load64(uint64_t *addr, struct trapframe *frame, u_int reg) +{ + + KASSERT(reg <= 31, ("dtrace_load64: Invalid register %u", reg)); + if (reg < nitems(frame->tf_x)) + frame->tf_x[reg] = *addr; + else if (reg == 30) /* lr */ + frame->tf_lr = *addr; + /* Nothing to do for load to xzr */ +} + +static void +dtrace_store64(uint64_t *addr, struct trapframe *frame, u_int reg) +{ + + KASSERT(reg <= 31, ("dtrace_store64: Invalid register %u", reg)); + if (reg < nitems(frame->tf_x)) + *addr = frame->tf_x[reg]; + else if (reg == 30) /* lr */ + *addr = frame->tf_lr; + else if (reg == 31) /* xzr */ + *addr = 0; +} + static int dtrace_invop_start(struct trapframe *frame) { @@ -258,12 +283,12 @@ dtrace_invop_start(struct trapframe *frame) sp -= (~offs & OFFSET_MASK) + 1; else sp += (offs); - *(sp + 0) = frame->tf_x[arg1]; - *(sp + 1) = frame->tf_x[arg2]; + dtrace_store64(sp + 0, frame, arg1); + dtrace_store64(sp + 1, frame, arg2); break; case LDP_64: - frame->tf_x[arg1] = *(sp + 0); - frame->tf_x[arg2] = *(sp + 1); + dtrace_load64(sp + 0, frame, arg1); + dtrace_load64(sp + 1, frame, arg2); if (offs >> (OFFSET_SIZE - 1)) sp -= (~offs & OFFSET_MASK) + 1; else From owner-svn-src-head@freebsd.org Fri Jul 17 14:45:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8C49D366FF3; Fri, 17 Jul 2020 14:45:17 +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 4B7YnT3BmXz48tC; Fri, 17 Jul 2020 14:45:17 +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 374F01AE27; Fri, 17 Jul 2020 14:45:17 +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 06HEjHNk057182; Fri, 17 Jul 2020 14:45:17 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HEjH7A057181; Fri, 17 Jul 2020 14:45:17 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007171445.06HEjH7A057181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 17 Jul 2020 14:45:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363273 - head/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/opencrypto X-SVN-Commit-Revision: 363273 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 14:45:17 -0000 Author: markj Date: Fri Jul 17 14:45:16 2020 New Revision: 363273 URL: https://svnweb.freebsd.org/changeset/base/363273 Log: Clean up crypto_init(). The function is called from a KLD load handler, so it may sleep. - Stop checking for errors from uma_zcreate(), they don't happen. - Convert M_NOWAIT allocations to M_WAITOK. - Remove error handling for existing M_WAITOK allocations. - Fix style. Reviewed by: cem, delphij, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25696 Modified: head/sys/opencrypto/crypto.c Modified: head/sys/opencrypto/crypto.c ============================================================================== --- head/sys/opencrypto/crypto.c Fri Jul 17 14:39:07 2020 (r363272) +++ head/sys/opencrypto/crypto.c Fri Jul 17 14:45:16 2020 (r363273) @@ -325,41 +325,25 @@ crypto_init(void) TAILQ_INIT(&crp_kq); mtx_init(&crypto_q_mtx, "crypto", "crypto op queues", MTX_DEF); - cryptop_zone = uma_zcreate("cryptop", sizeof (struct cryptop), - 0, 0, 0, 0, - UMA_ALIGN_PTR, UMA_ZONE_ZINIT); + cryptop_zone = uma_zcreate("cryptop", + sizeof(struct cryptop), NULL, NULL, NULL, NULL, + UMA_ALIGN_PTR, UMA_ZONE_ZINIT); cryptoses_zone = uma_zcreate("crypto_session", sizeof(struct crypto_session), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_ZINIT); - if (cryptop_zone == NULL || cryptoses_zone == NULL) { - printf("crypto_init: cannot setup crypto zones\n"); - error = ENOMEM; - goto bad; - } - crypto_drivers_size = CRYPTO_DRIVERS_INITIAL; crypto_drivers = malloc(crypto_drivers_size * - sizeof(struct cryptocap), M_CRYPTO_DATA, M_NOWAIT | M_ZERO); - if (crypto_drivers == NULL) { - printf("crypto_init: cannot setup crypto drivers\n"); - error = ENOMEM; - goto bad; - } + sizeof(struct cryptocap), M_CRYPTO_DATA, M_WAITOK | M_ZERO); if (crypto_workers_num < 1 || crypto_workers_num > mp_ncpus) crypto_workers_num = mp_ncpus; - crypto_tq = taskqueue_create("crypto", M_WAITOK|M_ZERO, - taskqueue_thread_enqueue, &crypto_tq); - if (crypto_tq == NULL) { - printf("crypto init: cannot setup crypto taskqueue\n"); - error = ENOMEM; - goto bad; - } + crypto_tq = taskqueue_create("crypto", M_WAITOK | M_ZERO, + taskqueue_thread_enqueue, &crypto_tq); taskqueue_start_threads(&crypto_tq, crypto_workers_num, PRI_MIN_KERN, - "crypto"); + "crypto"); error = kproc_create((void (*)(void *)) crypto_proc, NULL, &cryptoproc, 0, 0, "crypto"); @@ -369,14 +353,8 @@ crypto_init(void) goto bad; } - crypto_ret_workers = malloc(crypto_workers_num * sizeof(struct crypto_ret_worker), - M_CRYPTO_DATA, M_NOWAIT|M_ZERO); - if (crypto_ret_workers == NULL) { - error = ENOMEM; - printf("crypto_init: cannot allocate ret workers\n"); - goto bad; - } - + crypto_ret_workers = mallocarray(crypto_workers_num, + sizeof(struct crypto_ret_worker), M_CRYPTO_DATA, M_WAITOK | M_ZERO); FOREACH_CRYPTO_RETW(ret_worker) { TAILQ_INIT(&ret_worker->crp_ordered_ret_q); From owner-svn-src-head@freebsd.org Fri Jul 17 14:51:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 75E9F3671D2; Fri, 17 Jul 2020 14:51:52 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7Yx42Gj9z491Z; Fri, 17 Jul 2020 14:51:52 +0000 (UTC) (envelope-from br@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 326811AF49; Fri, 17 Jul 2020 14:51:52 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HEpqj3059857; Fri, 17 Jul 2020 14:51:52 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HEppHc059792; Fri, 17 Jul 2020 14:51:51 GMT (envelope-from br@FreeBSD.org) Message-Id: <202007171451.06HEppHc059792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Fri, 17 Jul 2020 14:51:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363274 - in head/sys: arm64/acpica dev/acpica X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: in head/sys: arm64/acpica dev/acpica X-SVN-Commit-Revision: 363274 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 14:51:52 -0000 Author: br Date: Fri Jul 17 14:51:51 2020 New Revision: 363274 URL: https://svnweb.freebsd.org/changeset/base/363274 Log: Add acpi_iort_map_pci_smmuv3(). This new function allows us to find the SMMU instance assigned for a particular PCI RID. Reviewed by: andrew Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D25687 Modified: head/sys/arm64/acpica/acpi_iort.c head/sys/dev/acpica/acpivar.h Modified: head/sys/arm64/acpica/acpi_iort.c ============================================================================== --- head/sys/arm64/acpica/acpi_iort.c Fri Jul 17 14:45:16 2020 (r363273) +++ head/sys/arm64/acpica/acpi_iort.c Fri Jul 17 14:51:51 2020 (r363274) @@ -160,7 +160,7 @@ iort_entry_lookup(struct iort_node *node, u_int id, u_ if (i == node->nentries) return (NULL); if ((entry->flags & ACPI_IORT_ID_SINGLE_MAPPING) == 0) - *outid = entry->outbase + (id - entry->base); + *outid = entry->outbase + (id - entry->base); else *outid = entry->outbase; return (entry->out_node); @@ -562,5 +562,24 @@ acpi_iort_map_pci_msi(u_int seg, u_int rid, u_int *xre /* return first node, we don't handle more than that now. */ *xref = node->entries.its[0].xref; + return (0); +} + +int +acpi_iort_map_pci_smmuv3(u_int seg, u_int rid, u_int *xref, u_int *sid) +{ + ACPI_IORT_SMMU_V3 *smmu; + struct iort_node *node; + + node = iort_pci_rc_map(seg, rid, ACPI_IORT_NODE_SMMU_V3, sid); + if (node == NULL) + return (ENOENT); + + /* This should be an SMMU node. */ + KASSERT(node->type == ACPI_IORT_NODE_SMMU_V3, ("bad node")); + + smmu = (ACPI_IORT_SMMU_V3 *)&node->data.smmu_v3; + *xref = smmu->BaseAddress; + return (0); } Modified: head/sys/dev/acpica/acpivar.h ============================================================================== --- head/sys/dev/acpica/acpivar.h Fri Jul 17 14:45:16 2020 (r363273) +++ head/sys/dev/acpica/acpivar.h Fri Jul 17 14:51:51 2020 (r363274) @@ -556,6 +556,7 @@ int acpi_get_domain(device_t dev, device_t child, int * ARM specific ACPI interfaces, relating to IORT table. */ int acpi_iort_map_pci_msi(u_int seg, u_int rid, u_int *xref, u_int *devid); +int acpi_iort_map_pci_smmuv3(u_int seg, u_int rid, u_int *xref, u_int *devid); int acpi_iort_its_lookup(u_int its_id, u_int *xref, int *pxm); #endif #endif /* _KERNEL */ From owner-svn-src-head@freebsd.org Fri Jul 17 15:09:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0D044367810; Fri, 17 Jul 2020 15:09:51 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7ZKp6fJKz4B3v; Fri, 17 Jul 2020 15:09:50 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C32781B515; Fri, 17 Jul 2020 15:09:50 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HF9ogR069311; Fri, 17 Jul 2020 15:09:50 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HF9njS069308; Fri, 17 Jul 2020 15:09:49 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007171509.06HF9njS069308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 17 Jul 2020 15:09:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363275 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 363275 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 15:09:51 -0000 Author: tuexen Date: Fri Jul 17 15:09:49 2020 New Revision: 363275 URL: https://svnweb.freebsd.org/changeset/base/363275 Log: Improve the locking of address lists by adding some asserts and rearranging the addition of address such that the lock is not given up during checking and adding. MFC after: 1 week Modified: head/sys/netinet/sctp_lock_bsd.h head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_lock_bsd.h ============================================================================== --- head/sys/netinet/sctp_lock_bsd.h Fri Jul 17 14:51:51 2020 (r363274) +++ head/sys/netinet/sctp_lock_bsd.h Fri Jul 17 15:09:49 2020 (r363275) @@ -177,6 +177,13 @@ __FBSDID("$FreeBSD$"); rw_wunlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \ } while (0) +#define SCTP_IPI_ADDR_LOCK_ASSERT() do { \ + rw_assert(&SCTP_BASE_INFO(ipi_addr_mtx), RA_LOCKED); \ +} while (0) + +#define SCTP_IPI_ADDR_WLOCK_ASSERT() do { \ + rw_assert(&SCTP_BASE_INFO(ipi_addr_mtx), RA_WLOCKED); \ +} while (0) #define SCTP_IPI_ITERATOR_WQ_INIT() do { \ mtx_init(&sctp_it_ctl.ipi_iterator_wq_mtx, "sctp-it-wq", \ Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Fri Jul 17 14:51:51 2020 (r363274) +++ head/sys/netinet/sctp_pcb.c Fri Jul 17 15:09:49 2020 (r363275) @@ -200,6 +200,7 @@ sctp_find_ifn(void *ifn, uint32_t ifn_index) * We assume the lock is held for the addresses if that's wrong * problems could occur :-) */ + SCTP_IPI_ADDR_LOCK_ASSERT(); hash_ifn_head = &SCTP_BASE_INFO(vrf_ifn_hash)[(ifn_index & SCTP_BASE_INFO(vrf_ifn_hashmark))]; LIST_FOREACH(sctp_ifnp, hash_ifn_head, next_bucket) { if (sctp_ifnp->ifn_index == ifn_index) { @@ -295,12 +296,16 @@ sctp_delete_ifn(struct sctp_ifn *sctp_ifnp, int hold_a /* Not in the list.. sorry */ return; } - if (hold_addr_lock == 0) + if (hold_addr_lock == 0) { SCTP_IPI_ADDR_WLOCK(); + } else { + SCTP_IPI_ADDR_WLOCK_ASSERT(); + } LIST_REMOVE(sctp_ifnp, next_bucket); LIST_REMOVE(sctp_ifnp, next_ifn); - if (hold_addr_lock == 0) + if (hold_addr_lock == 0) { SCTP_IPI_ADDR_WUNLOCK(); + } /* Take away the reference, and possibly free it */ sctp_free_ifn(sctp_ifnp); } @@ -486,8 +491,8 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 int dynamic_add) { struct sctp_vrf *vrf; - struct sctp_ifn *sctp_ifnp = NULL; - struct sctp_ifa *sctp_ifap = NULL; + struct sctp_ifn *sctp_ifnp, *new_sctp_ifnp; + struct sctp_ifa *sctp_ifap, *new_sctp_ifap; struct sctp_ifalist *hash_addr_head; struct sctp_ifnlist *hash_ifn_head; uint32_t hash_of_addr; @@ -497,6 +502,23 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 SCTPDBG(SCTP_DEBUG_PCB4, "vrf_id 0x%x: adding address: ", vrf_id); SCTPDBG_ADDR(SCTP_DEBUG_PCB4, addr); #endif + SCTP_MALLOC(new_sctp_ifnp, struct sctp_ifn *, + sizeof(struct sctp_ifn), SCTP_M_IFN); + if (new_sctp_ifnp == NULL) { +#ifdef INVARIANTS + panic("No memory for IFN"); +#endif + return (NULL); + } + SCTP_MALLOC(new_sctp_ifap, struct sctp_ifa *, sizeof(struct sctp_ifa), SCTP_M_IFA); + if (new_sctp_ifap == NULL) { +#ifdef INVARIANTS + panic("No memory for IFA"); +#endif + SCTP_FREE(new_sctp_ifnp, SCTP_M_IFN); + return (NULL); + } + SCTP_IPI_ADDR_WLOCK(); sctp_ifnp = sctp_find_ifn(ifn, ifn_index); if (sctp_ifnp) { @@ -507,6 +529,8 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 vrf = sctp_allocate_vrf(vrf_id); if (vrf == NULL) { SCTP_IPI_ADDR_WUNLOCK(); + SCTP_FREE(new_sctp_ifnp, SCTP_M_IFN); + SCTP_FREE(new_sctp_ifap, SCTP_M_IFA); return (NULL); } } @@ -516,15 +540,8 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 * build one and add it, can't hold lock until after malloc * done though. */ - SCTP_IPI_ADDR_WUNLOCK(); - SCTP_MALLOC(sctp_ifnp, struct sctp_ifn *, - sizeof(struct sctp_ifn), SCTP_M_IFN); - if (sctp_ifnp == NULL) { -#ifdef INVARIANTS - panic("No memory for IFN"); -#endif - return (NULL); - } + sctp_ifnp = new_sctp_ifnp; + new_sctp_ifnp = NULL; memset(sctp_ifnp, 0, sizeof(struct sctp_ifn)); sctp_ifnp->ifn_index = ifn_index; sctp_ifnp->ifn_p = ifn; @@ -540,7 +557,6 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 } hash_ifn_head = &SCTP_BASE_INFO(vrf_ifn_hash)[(ifn_index & SCTP_BASE_INFO(vrf_ifn_hashmark))]; LIST_INIT(&sctp_ifnp->ifalist); - SCTP_IPI_ADDR_WLOCK(); LIST_INSERT_HEAD(hash_ifn_head, sctp_ifnp, next_bucket); LIST_INSERT_HEAD(&vrf->ifnlist, sctp_ifnp, next_ifn); atomic_add_int(&SCTP_BASE_INFO(ipi_count_ifns), 1); @@ -567,6 +583,10 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 } exit_stage_left: SCTP_IPI_ADDR_WUNLOCK(); + if (new_sctp_ifnp != NULL) { + SCTP_FREE(new_sctp_ifnp, SCTP_M_IFN); + } + SCTP_FREE(new_sctp_ifap, SCTP_M_IFA); return (sctp_ifap); } else { if (sctp_ifap->ifn_p) { @@ -593,14 +613,7 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 goto exit_stage_left; } } - SCTP_IPI_ADDR_WUNLOCK(); - SCTP_MALLOC(sctp_ifap, struct sctp_ifa *, sizeof(struct sctp_ifa), SCTP_M_IFA); - if (sctp_ifap == NULL) { -#ifdef INVARIANTS - panic("No memory for IFA"); -#endif - return (NULL); - } + sctp_ifap = new_sctp_ifap; memset(sctp_ifap, 0, sizeof(struct sctp_ifa)); sctp_ifap->ifn_p = sctp_ifnp; atomic_add_int(&sctp_ifnp->refcount, 1); @@ -660,7 +673,6 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 (sctp_ifap->src_is_loop == 0)) { sctp_ifap->src_is_glob = 1; } - SCTP_IPI_ADDR_WLOCK(); hash_addr_head = &vrf->vrf_addr_hash[(hash_of_addr & vrf->vrf_addr_hashmark)]; LIST_INSERT_HEAD(hash_addr_head, sctp_ifap, next_bucket); sctp_ifap->refcount = 1; @@ -672,6 +684,10 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 sctp_ifnp->registered_af = new_ifn_af; } SCTP_IPI_ADDR_WUNLOCK(); + if (new_sctp_ifnp != NULL) { + SCTP_FREE(new_sctp_ifnp, SCTP_M_IFN); + } + if (dynamic_add) { /* * Bump up the refcount so that when the timer completes it @@ -5906,6 +5922,7 @@ retry: * free the vrf/ifn/ifa lists and hashes (be sure address monitor is * destroyed first). */ + SCTP_IPI_ADDR_WLOCK(); vrf_bucket = &SCTP_BASE_INFO(sctp_vrfhash)[(SCTP_DEFAULT_VRFID & SCTP_BASE_INFO(hashvrfmark))]; LIST_FOREACH_SAFE(vrf, vrf_bucket, next_vrf, nvrf) { LIST_FOREACH_SAFE(ifn, &vrf->ifnlist, next_ifn, nifn) { @@ -5925,6 +5942,7 @@ retry: LIST_REMOVE(vrf, next_vrf); SCTP_FREE(vrf, SCTP_M_VRF); } + SCTP_IPI_ADDR_WUNLOCK(); /* free the vrf hashes */ SCTP_HASH_FREE(SCTP_BASE_INFO(sctp_vrfhash), SCTP_BASE_INFO(hashvrfmark)); SCTP_HASH_FREE(SCTP_BASE_INFO(vrf_ifn_hash), SCTP_BASE_INFO(vrf_ifn_hashmark)); Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Fri Jul 17 14:51:51 2020 (r363274) +++ head/sys/netinet/sctp_usrreq.c Fri Jul 17 15:09:49 2020 (r363275) @@ -1004,9 +1004,6 @@ sctp_fill_user_address(struct sockaddr *dst, struct so -/* - * NOTE: assumes addr lock is held - */ static size_t sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, struct sctp_tcb *stcb, @@ -1026,6 +1023,7 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, #endif struct sctp_vrf *vrf; + SCTP_IPI_ADDR_LOCK_ASSERT(); actual = 0; if (limit == 0) return (actual); @@ -1258,9 +1256,6 @@ sctp_fill_up_addresses(struct sctp_inpcb *inp, return (size); } -/* - * NOTE: assumes addr lock is held - */ static int sctp_count_max_addresses_vrf(struct sctp_inpcb *inp, uint32_t vrf_id) { @@ -1274,6 +1269,7 @@ sctp_count_max_addresses_vrf(struct sctp_inpcb *inp, u * bound-all case a TCB may NOT include the loopback or other * addresses as well. */ + SCTP_IPI_ADDR_LOCK_ASSERT(); vrf = sctp_find_vrf(vrf_id); if (vrf == NULL) { return (0); Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Fri Jul 17 14:51:51 2020 (r363274) +++ head/sys/netinet/sctputil.c Fri Jul 17 15:09:49 2020 (r363275) @@ -5296,8 +5296,11 @@ sctp_find_ifa_by_addr(struct sockaddr *addr, uint32_t struct sctp_ifalist *hash_head; uint32_t hash_of_addr; - if (holds_lock == 0) + if (holds_lock == 0) { SCTP_IPI_ADDR_RLOCK(); + } else { + SCTP_IPI_ADDR_LOCK_ASSERT(); + } vrf = sctp_find_vrf(vrf_id); if (vrf == NULL) { @@ -6429,7 +6432,7 @@ sctp_dynamic_set_primary(struct sockaddr *sa, uint32_t struct sctp_ifa *ifa; struct sctp_laddr *wi; - ifa = sctp_find_ifa_by_addr(sa, vrf_id, 0); + ifa = sctp_find_ifa_by_addr(sa, vrf_id, SCTP_ADDR_NOT_LOCKED); if (ifa == NULL) { SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTPUTIL, EADDRNOTAVAIL); return (EADDRNOTAVAIL); From owner-svn-src-head@freebsd.org Fri Jul 17 15:50:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ACC113682C9; Fri, 17 Jul 2020 15:50:04 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7bDD48wcz4D0q; Fri, 17 Jul 2020 15:50:04 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 71FF51BBC6; Fri, 17 Jul 2020 15:50:04 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HFo4pK094176; Fri, 17 Jul 2020 15:50:04 GMT (envelope-from takawata@FreeBSD.org) Received: (from takawata@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HFo4Vl094174; Fri, 17 Jul 2020 15:50:04 GMT (envelope-from takawata@FreeBSD.org) Message-Id: <202007171550.06HFo4Vl094174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: takawata set sender to takawata@FreeBSD.org using -f From: Takanori Watanabe Date: Fri, 17 Jul 2020 15:50:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363276 - in head/sys/netgraph/bluetooth: include l2cap X-SVN-Group: head X-SVN-Commit-Author: takawata X-SVN-Commit-Paths: in head/sys/netgraph/bluetooth: include l2cap X-SVN-Commit-Revision: 363276 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 15:50:04 -0000 Author: takawata Date: Fri Jul 17 15:50:03 2020 New Revision: 363276 URL: https://svnweb.freebsd.org/changeset/base/363276 Log: Fix L2CAP ACL packet PB(Packet Boundary) flag for LE PDU. ACL packet boundary flag should be 0 instead of 2 for LE PDU. Some HCI will drop LE packet with PB flag is 2, and if sent, some target may reject the packet. PR: 248024 Reported by: Greg V Reviewed by: Greg V, emax Differential Revision: https://reviews.freebsd.org/D25704 Modified: head/sys/netgraph/bluetooth/include/ng_hci.h head/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c Modified: head/sys/netgraph/bluetooth/include/ng_hci.h ============================================================================== --- head/sys/netgraph/bluetooth/include/ng_hci.h Fri Jul 17 15:09:49 2020 (r363275) +++ head/sys/netgraph/bluetooth/include/ng_hci.h Fri Jul 17 15:50:03 2020 (r363276) @@ -393,10 +393,10 @@ (((h) & 0x0fff) | (((pb) & 3) << 12) | (((bc) & 3) << 14)) /* PB flag values */ - /* 00 - reserved for future use */ +#define NG_HCI_LE_PACKET_START 0x0 #define NG_HCI_PACKET_FRAGMENT 0x1 #define NG_HCI_PACKET_START 0x2 - /* 11 - reserved for future use */ + /* 11 for AMP packet, not supported */ /* BC flag values */ #define NG_HCI_POINT2POINT 0x0 /* only Host controller to Host */ Modified: head/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c ============================================================================== --- head/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c Fri Jul 17 15:09:49 2020 (r363275) +++ head/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c Fri Jul 17 15:50:03 2020 (r363276) @@ -547,7 +547,7 @@ ng_l2cap_lp_send(ng_l2cap_con_p con, u_int16_t dcid, s ng_l2cap_hdr_t *l2cap_hdr = NULL; ng_hci_acldata_pkt_t *acl_hdr = NULL; struct mbuf *m_last = NULL, *m = NULL; - int len, flag = NG_HCI_PACKET_START; + int len, flag = (con->linktype == NG_HCI_LINK_ACL) ? NG_HCI_PACKET_START : NG_HCI_LE_PACKET_START; KASSERT((con->tx_pkt == NULL), ("%s: %s - another packet pending?!\n", __func__, NG_NODE_NAME(l2cap->node))); @@ -713,7 +713,8 @@ ng_l2cap_lp_receive(ng_l2cap_p l2cap, struct mbuf *m) } /* Process packet */ - if (pb == NG_HCI_PACKET_START) { + if ((pb == NG_HCI_PACKET_START) || (pb == NG_HCI_LE_PACKET_START)) + { if (con->rx_pkt != NULL) { NG_L2CAP_ERR( "%s: %s - dropping incomplete L2CAP packet, got %d bytes, want %d bytes\n", From owner-svn-src-head@freebsd.org Fri Jul 17 19:07:35 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4517F36C063; Fri, 17 Jul 2020 19:07:35 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7gc714CGz4PjX; Fri, 17 Jul 2020 19:07:35 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 091611E10E; Fri, 17 Jul 2020 19:07:35 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HJ7YXX015715; Fri, 17 Jul 2020 19:07:34 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HJ7YjO015714; Fri, 17 Jul 2020 19:07:34 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202007171907.06HJ7YjO015714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 17 Jul 2020 19:07:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363277 - head/contrib/ipfilter/tools X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/ipfilter/tools X-SVN-Commit-Revision: 363277 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 19:07:35 -0000 Author: cy Date: Fri Jul 17 19:07:34 2020 New Revision: 363277 URL: https://svnweb.freebsd.org/changeset/base/363277 Log: Only use the use_inet6 variable when INET6 is a build option. This is a prerequisite to upcoming argument processing cleanups which will resolve consistency as was done with ippool previously. PR: 247952 MFC after: 1 week Modified: head/contrib/ipfilter/tools/ipfstat.c Modified: head/contrib/ipfilter/tools/ipfstat.c ============================================================================== --- head/contrib/ipfilter/tools/ipfstat.c Fri Jul 17 15:50:03 2020 (r363276) +++ head/contrib/ipfilter/tools/ipfstat.c Fri Jul 17 19:07:34 2020 (r363277) @@ -57,7 +57,9 @@ static wordtab_t *state_fields = NULL; int nohdrfields = 0; int opts = 0; +#ifdef USE_INET6 int use_inet6 = 0; +#endif int live_kernel = 1; int state_fd = -1; int ipf_fd = -1; @@ -410,8 +412,13 @@ int main(argc,argv) #ifdef STATETOP else if (opts & OPT_STATETOP) topipstates(saddr, daddr, sport, dport, protocol, - use_inet6 ? 6 : 4, refreshtime, topclosed, filter); +#ifdef USE_INET6 + use_inet6 ? 6 : 4, +#else + 4, #endif +#endif + refreshtime, topclosed, filter); else if (opts & OPT_AUTHSTATS) showauthstates(frauthstp); else if (opts & OPT_GROUPS) @@ -904,10 +911,13 @@ static void printdeadlist(fiop, out, set, fp, group, c return; } fp = &fb; +#ifdef USE_INET6 if (use_inet6 != 0) { if (fp->fr_family != 0 && fp->fr_family != 6) continue; - } else { + } else +#endif + { if (fp->fr_family != 0 && fp->fr_family != 4) continue; } From owner-svn-src-head@freebsd.org Fri Jul 17 19:07:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6687836C605; Fri, 17 Jul 2020 19:07:38 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7gcB2B9xz4Pdc; Fri, 17 Jul 2020 19:07:38 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2EC551E04F; Fri, 17 Jul 2020 19:07:38 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HJ7blh015773; Fri, 17 Jul 2020 19:07:37 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HJ7bSP015772; Fri, 17 Jul 2020 19:07:37 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202007171907.06HJ7bSP015772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 17 Jul 2020 19:07:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363278 - head/contrib/ipfilter/tools X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/ipfilter/tools X-SVN-Commit-Revision: 363278 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 19:07:38 -0000 Author: cy Date: Fri Jul 17 19:07:37 2020 New Revision: 363278 URL: https://svnweb.freebsd.org/changeset/base/363278 Log: fr_family (the protocol family) must be AF_INET or AF_INET6, as in the kernel, not an arbitrary 4 or 6. This only affected printing ipfilter stats and rules from a kernel dump. (This is currently undocumented.) PR: 247952 MFC after: 1 week Modified: head/contrib/ipfilter/tools/ipfstat.c Modified: head/contrib/ipfilter/tools/ipfstat.c ============================================================================== --- head/contrib/ipfilter/tools/ipfstat.c Fri Jul 17 19:07:34 2020 (r363277) +++ head/contrib/ipfilter/tools/ipfstat.c Fri Jul 17 19:07:37 2020 (r363278) @@ -913,12 +913,12 @@ static void printdeadlist(fiop, out, set, fp, group, c fp = &fb; #ifdef USE_INET6 if (use_inet6 != 0) { - if (fp->fr_family != 0 && fp->fr_family != 6) + if (fp->fr_family != 0 && fp->fr_family != AF_INET6) continue; } else #endif { - if (fp->fr_family != 0 && fp->fr_family != 4) + if (fp->fr_family != 0 && fp->fr_family != AF_INET) continue; } From owner-svn-src-head@freebsd.org Fri Jul 17 19:07:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 767A436C61E; Fri, 17 Jul 2020 19:07:43 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7gcH1PtXz4Pk0; Fri, 17 Jul 2020 19:07:42 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6851F1DEC8; Fri, 17 Jul 2020 19:07:41 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HJ7fbs015833; Fri, 17 Jul 2020 19:07:41 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HJ7fsB015831; Fri, 17 Jul 2020 19:07:41 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202007171907.06HJ7fsB015831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 17 Jul 2020 19:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363279 - in head/contrib/ipfilter: man tools X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head/contrib/ipfilter: man tools X-SVN-Commit-Revision: 363279 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 19:07:43 -0000 Author: cy Date: Fri Jul 17 19:07:40 2020 New Revision: 363279 URL: https://svnweb.freebsd.org/changeset/base/363279 Log: Historically ipfstat listings and stats only listed IPv4 or IPv6 output. ipfstat would list IPv4 outputs by default while -6 would produce IPv6 outputs. This commit combines the ipfstat -i and -o outputs into one listing of IPv4 and IPv6 rules. The -4 option lists only IPv4 rules (as the default before) while -6 continues to list only rules that affect IPv6. PR: 247952 Reported by: joeb1@a1poweruser.com MFC after: 1 week Modified: head/contrib/ipfilter/man/ipfstat.8 head/contrib/ipfilter/tools/ipfstat.c Modified: head/contrib/ipfilter/man/ipfstat.8 ============================================================================== --- head/contrib/ipfilter/man/ipfstat.8 Fri Jul 17 19:07:37 2020 (r363278) +++ head/contrib/ipfilter/man/ipfstat.8 Fri Jul 17 19:07:40 2020 (r363279) @@ -5,7 +5,7 @@ ipfstat \- reports on packet filter statistics and fil .SH SYNOPSIS .B ipfstat [ -.B \-6aAdfghIilnoRsv +.B \-46aAdfghIilnoRsv ] .br .B ipfstat -t @@ -35,6 +35,11 @@ is to retrieve and display the accumulated statistics accumulated over time as the kernel has put packets through the filter. .SH OPTIONS .TP +.B \-4 +Display filter lists and states for IPv4, if available. This is the default +when displaying states. \fB-4\fP and \fB-6\fP is the default when +displaying lists. +.TP .B \-6 Display filter lists and states for IPv6, if available. .TP @@ -190,4 +195,4 @@ more entries is to resize the screen. .SH SEE ALSO ipf(8) .SH BUGS -none known. +\fB-4\fP and \fB-6\fP should also be the default when displaying states. Modified: head/contrib/ipfilter/tools/ipfstat.c ============================================================================== --- head/contrib/ipfilter/tools/ipfstat.c Fri Jul 17 19:07:37 2020 (r363278) +++ head/contrib/ipfilter/tools/ipfstat.c Fri Jul 17 19:07:40 2020 (r363279) @@ -58,6 +58,7 @@ static wordtab_t *state_fields = NULL; int nohdrfields = 0; int opts = 0; #ifdef USE_INET6 +int use_inet4 = 0; int use_inet6 = 0; #endif int live_kernel = 1; @@ -165,15 +166,15 @@ static void usage(name) char *name; { #ifdef USE_INET6 - fprintf(stderr, "Usage: %s [-6aAdfghIilnoRsv]\n", name); + fprintf(stderr, "Usage: %s [-46aAdfghIilnoRsv]\n", name); #else - fprintf(stderr, "Usage: %s [-aAdfghIilnoRsv]\n", name); + fprintf(stderr, "Usage: %s [-4aAdfghIilnoRsv]\n", name); #endif fprintf(stderr, " %s [-M corefile] [-N symbol-list]\n", name); #ifdef USE_INET6 - fprintf(stderr, " %s -t [-6C] ", name); + fprintf(stderr, " %s -t [-46C] ", name); #else - fprintf(stderr, " %s -t [-C] ", name); + fprintf(stderr, " %s -t [-4C] ", name); #endif fprintf(stderr, "[-D destination address] [-P protocol] [-S source address] [-T refresh time]\n"); exit(1); @@ -208,9 +209,9 @@ int main(argc,argv) u_32_t frf; #ifdef USE_INET6 - options = "6aACdfghIilnostvD:m:M:N:O:P:RS:T:"; + options = "46aACdfghIilnostvD:m:M:N:O:P:RS:T:"; #else - options = "aACdfghIilnostvD:m:M:N:O:P:RS:T:"; + options = "4aACdfghIilnostvD:m:M:N:O:P:RS:T:"; #endif saddr.in4.s_addr = INADDR_ANY; /* default any v4 source addr */ @@ -285,6 +286,9 @@ int main(argc,argv) switch (c) { #ifdef USE_INET6 + case '4' : + use_inet4 = 1; + break; case '6' : use_inet6 = 1; break; @@ -387,6 +391,10 @@ int main(argc,argv) break; } } +#ifdef USE_INET6 + if (use_inet4 == 0 && use_inet6 == 0) + use_inet4 = use_inet6 = 1; +#endif if (live_kernel == 1) { bzero((char *)&fio, sizeof(fio)); @@ -413,7 +421,7 @@ int main(argc,argv) else if (opts & OPT_STATETOP) topipstates(saddr, daddr, sport, dport, protocol, #ifdef USE_INET6 - use_inet6 ? 6 : 4, + use_inet6 && !use_inet4 ? 6 : 4, #else 4, #endif @@ -812,15 +820,21 @@ printlivelist(fiop, out, set, fp, group, comment) if (rule.iri_rule == NULL) break; #ifdef USE_INET6 - if (use_inet6 != 0) { + if (use_inet6 != 0 && use_inet4 == 0) { if (fp->fr_family != 0 && fp->fr_family != AF_INET6) continue; - } else + } else if (use_inet4 != 0 && use_inet6 == 0) { #endif - { if (fp->fr_family != 0 && fp->fr_family != AF_INET) continue; +#ifdef USE_INET6 + } else { + if (fp->fr_family != 0 && + fp->fr_family != AF_INET && fp->fr_family != AF_INET6) + continue; } +#endif + if (fp->fr_data != NULL) fp->fr_data = (char *)fp + fp->fr_size; @@ -912,15 +926,20 @@ static void printdeadlist(fiop, out, set, fp, group, c } fp = &fb; #ifdef USE_INET6 - if (use_inet6 != 0) { + if (use_inet6 != 0 && use_inet4 == 0) { if (fp->fr_family != 0 && fp->fr_family != AF_INET6) continue; - } else + } else if (use_inet4 != 0 && use_inet6 == 0) { #endif - { if (fp->fr_family != 0 && fp->fr_family != AF_INET) continue; +#ifdef USE_INET6 + } else { + if (fp->fr_family != 0 && + fp->fr_family != AF_INET && fp->fr_family != AF_INET6) + continue; } +#endif data = NULL; type = fb.fr_type & ~FR_T_BUILTIN; @@ -1916,7 +1935,7 @@ static void parse_ipportstr(argument, ip, port) ok = 1; #ifdef USE_INET6 ip->in6 = in6addr_any; - } else if (use_inet6 && inet_pton(AF_INET6, s, &ip->in6)) { + } else if (use_inet6 && !use_inet4 && inet_pton(AF_INET6, s, &ip->in6)) { ok = 1; #endif } else if (inet_aton(s, &ip->in4)) @@ -2057,7 +2076,7 @@ static int sort_srcip(a, b) register const statetop_t *bp = b; #ifdef USE_INET6 - if (use_inet6) { + if (use_inet6 && !use_inet4) { if (IP6_EQ(&ap->st_src, &bp->st_src)) return 0; else if (IP6_GT(&ap->st_src, &bp->st_src)) @@ -2097,7 +2116,7 @@ static int sort_dstip(a, b) register const statetop_t *bp = b; #ifdef USE_INET6 - if (use_inet6) { + if (use_inet6 && !use_inet4) { if (IP6_EQ(&ap->st_dst, &bp->st_dst)) return 0; else if (IP6_GT(&ap->st_dst, &bp->st_dst)) From owner-svn-src-head@freebsd.org Fri Jul 17 19:07:47 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 097FB36C364; Fri, 17 Jul 2020 19:07:47 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7gcL3NKQz4PhH; Fri, 17 Jul 2020 19:07:46 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BA10A1E0A0; Fri, 17 Jul 2020 19:07:44 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HJ7ibv015894; Fri, 17 Jul 2020 19:07:44 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HJ7imv015893; Fri, 17 Jul 2020 19:07:44 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202007171907.06HJ7imv015893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 17 Jul 2020 19:07:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363280 - in head/contrib/ipfilter: man tools X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head/contrib/ipfilter: man tools X-SVN-Commit-Revision: 363280 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 19:07:47 -0000 Author: cy Date: Fri Jul 17 19:07:44 2020 New Revision: 363280 URL: https://svnweb.freebsd.org/changeset/base/363280 Log: ipfstat -t defaults to IPv4 output. Make consistent with ipfstat -i and ipfstat -o where without an argument IPv4 and IPv6 states are shown. Use -4 and -6 to limit the display to IPv4 or IPv6 respectively. PR: 247952 MFC after: 1 week Modified: head/contrib/ipfilter/man/ipfstat.8 head/contrib/ipfilter/tools/ipfstat.c Modified: head/contrib/ipfilter/man/ipfstat.8 ============================================================================== --- head/contrib/ipfilter/man/ipfstat.8 Fri Jul 17 19:07:40 2020 (r363279) +++ head/contrib/ipfilter/man/ipfstat.8 Fri Jul 17 19:07:44 2020 (r363280) @@ -195,4 +195,5 @@ more entries is to resize the screen. .SH SEE ALSO ipf(8) .SH BUGS -\fB-4\fP and \fB-6\fP should also be the default when displaying states. +\fB-4\fP and \fB-6\fP are only valid with \fB-i\fP, \fB-o\fP, and \fB-t\fP. +An error should result when used with other arguments. Modified: head/contrib/ipfilter/tools/ipfstat.c ============================================================================== --- head/contrib/ipfilter/tools/ipfstat.c Fri Jul 17 19:07:40 2020 (r363279) +++ head/contrib/ipfilter/tools/ipfstat.c Fri Jul 17 19:07:44 2020 (r363280) @@ -421,9 +421,9 @@ int main(argc,argv) else if (opts & OPT_STATETOP) topipstates(saddr, daddr, sport, dport, protocol, #ifdef USE_INET6 - use_inet6 && !use_inet4 ? 6 : 4, + use_inet6 && use_inet4 ? 0 : use_inet6 && !use_inet4 ? 6 : 4, #else - 4, + 4, #endif #endif refreshtime, topclosed, filter); @@ -1367,7 +1367,7 @@ static void topipstates(saddr, daddr, sport, dport, pr if (ipsstp->iss_list == NULL) break; - if (ips.is_v != ver) + if (ver != 0 && ips.is_v != ver) continue; if ((filter != NULL) && From owner-svn-src-head@freebsd.org Fri Jul 17 19:07:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B4A136C695; Fri, 17 Jul 2020 19:07:51 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7gcQ2C6fz4Psd; Fri, 17 Jul 2020 19:07:49 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BFC3C1E051; Fri, 17 Jul 2020 19:07:47 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HJ7lZ8015954; Fri, 17 Jul 2020 19:07:47 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HJ7lPV015953; Fri, 17 Jul 2020 19:07:47 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202007171907.06HJ7lPV015953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 17 Jul 2020 19:07:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363281 - head/contrib/ipfilter/tools X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/ipfilter/tools X-SVN-Commit-Revision: 363281 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 19:07:51 -0000 Author: cy Date: Fri Jul 17 19:07:47 2020 New Revision: 363281 URL: https://svnweb.freebsd.org/changeset/base/363281 Log: Make ipfstat -t header generic when IPv4 and IPv6 output are displayed in the same display. PR: 247952 MFC after: 1 week Modified: head/contrib/ipfilter/tools/ipfstat.c Modified: head/contrib/ipfilter/tools/ipfstat.c ============================================================================== --- head/contrib/ipfilter/tools/ipfstat.c Fri Jul 17 19:07:44 2020 (r363280) +++ head/contrib/ipfilter/tools/ipfstat.c Fri Jul 17 19:07:47 2020 (r363281) @@ -1973,6 +1973,9 @@ static char *getip(v, addr) static char hostbuf[MAXHOSTNAMELEN+1]; #endif + if (v == 0) + return ("any"); + if (v == 4) return inet_ntoa(addr->in4); From owner-svn-src-head@freebsd.org Fri Jul 17 19:07:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 244C436C2FC; Fri, 17 Jul 2020 19:07:54 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7gcT120Jz4Pr5; Fri, 17 Jul 2020 19:07:52 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C35081DFE2; Fri, 17 Jul 2020 19:07:50 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HJ7oHA016013; Fri, 17 Jul 2020 19:07:50 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HJ7oET016012; Fri, 17 Jul 2020 19:07:50 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202007171907.06HJ7oET016012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 17 Jul 2020 19:07:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363282 - head/contrib/ipfilter/tools X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/ipfilter/tools X-SVN-Commit-Revision: 363282 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 19:07:54 -0000 Author: cy Date: Fri Jul 17 19:07:50 2020 New Revision: 363282 URL: https://svnweb.freebsd.org/changeset/base/363282 Log: The output from usage() need not contain usage for -t when STATETOP is not compiled in. PR: 247952 MFC after: 1 week Modified: head/contrib/ipfilter/tools/ipfstat.c Modified: head/contrib/ipfilter/tools/ipfstat.c ============================================================================== --- head/contrib/ipfilter/tools/ipfstat.c Fri Jul 17 19:07:47 2020 (r363281) +++ head/contrib/ipfilter/tools/ipfstat.c Fri Jul 17 19:07:50 2020 (r363282) @@ -171,10 +171,12 @@ static void usage(name) fprintf(stderr, "Usage: %s [-4aAdfghIilnoRsv]\n", name); #endif fprintf(stderr, " %s [-M corefile] [-N symbol-list]\n", name); +#ifdef STATETOP #ifdef USE_INET6 fprintf(stderr, " %s -t [-46C] ", name); #else fprintf(stderr, " %s -t [-4C] ", name); +#endif #endif fprintf(stderr, "[-D destination address] [-P protocol] [-S source address] [-T refresh time]\n"); exit(1); From owner-svn-src-head@freebsd.org Fri Jul 17 19:07:56 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C786436C62E; Fri, 17 Jul 2020 19:07:56 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7gcW5rmSz4PrL; Fri, 17 Jul 2020 19:07:55 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C528A1E0A1; Fri, 17 Jul 2020 19:07:53 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HJ7rYq016074; Fri, 17 Jul 2020 19:07:53 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HJ7rMD016073; Fri, 17 Jul 2020 19:07:53 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202007171907.06HJ7rMD016073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 17 Jul 2020 19:07:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363283 - head/contrib/ipfilter/tools X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/ipfilter/tools X-SVN-Commit-Revision: 363283 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 19:07:56 -0000 Author: cy Date: Fri Jul 17 19:07:53 2020 New Revision: 363283 URL: https://svnweb.freebsd.org/changeset/base/363283 Log: -4 and -6 only make sense with -i, -o, and -t. PR: 247952 MFC after: 1 week Modified: head/contrib/ipfilter/tools/ipfstat.c Modified: head/contrib/ipfilter/tools/ipfstat.c ============================================================================== --- head/contrib/ipfilter/tools/ipfstat.c Fri Jul 17 19:07:50 2020 (r363282) +++ head/contrib/ipfilter/tools/ipfstat.c Fri Jul 17 19:07:53 2020 (r363283) @@ -394,6 +394,15 @@ int main(argc,argv) } } #ifdef USE_INET6 + if ((use_inet4 || use_inet6) && + !(opts & (OPT_INQUE | OPT_OUTQUE | OPT_STATETOP))) { +#ifdef STATETOP + FPRINTF(stderr, "No -i, -o, or -t given with -4 or -6\n"); +#else + FPRINTF(stderr, "No -i or -o given with -4 or -6\n"); +#endif + exit(-2); + } if (use_inet4 == 0 && use_inet6 == 0) use_inet4 = use_inet6 = 1; #endif From owner-svn-src-head@freebsd.org Fri Jul 17 19:07:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6DB3B36C5B3; Fri, 17 Jul 2020 19:07:58 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7gcZ1ts3z4PlW; Fri, 17 Jul 2020 19:07:58 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DE6071DFE3; Fri, 17 Jul 2020 19:07:56 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HJ7uYg016132; Fri, 17 Jul 2020 19:07:56 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HJ7und016131; Fri, 17 Jul 2020 19:07:56 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202007171907.06HJ7und016131@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 17 Jul 2020 19:07:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363284 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 363284 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 19:07:58 -0000 Author: cy Date: Fri Jul 17 19:07:56 2020 New Revision: 363284 URL: https://svnweb.freebsd.org/changeset/base/363284 Log: pfil_run_hooks() can be called recursively, so we have to define FASTROUTE_RECURSION in fil.c Submitted by: christos@NetBSD.org Reported by: christos@NetBSD.org Obtained from: NetBSD r1.31 MFC after: 2 weeks Modified: head/sys/contrib/ipfilter/netinet/fil.c Modified: head/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/fil.c Fri Jul 17 19:07:53 2020 (r363283) +++ head/sys/contrib/ipfilter/netinet/fil.c Fri Jul 17 19:07:56 2020 (r363284) @@ -115,6 +115,8 @@ extern int opts; extern int blockreason; #endif /* _KERNEL */ +#define FASTROUTE_RECURSION + #define LBUMP(x) softc->x++ #define LBUMPD(x, y) do { softc->x.y++; DT(y); } while (0) From owner-svn-src-head@freebsd.org Fri Jul 17 19:08:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B12BD36C6AB; Fri, 17 Jul 2020 19:08:02 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7gcd1ZcXz4Pry; Fri, 17 Jul 2020 19:08:01 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D9051DFE4; Fri, 17 Jul 2020 19:08:00 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HJ80jX016185; Fri, 17 Jul 2020 19:08:00 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HJ7xTM016179; Fri, 17 Jul 2020 19:07:59 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202007171907.06HJ7xTM016179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 17 Jul 2020 19:07:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363285 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 363285 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 19:08:02 -0000 Author: cy Date: Fri Jul 17 19:07:59 2020 New Revision: 363285 URL: https://svnweb.freebsd.org/changeset/base/363285 Log: Fix incorrect byte order in ipfstat -f output. - make sure frag is initialized to 0 - initialize ipfr_p field NetBSD PR: 55137 Submitted by: christos@NetBSD.org Reported by: christos@NetBSD.org Obtained from: NetBSD fil.c r1.32, ip_frag.c r1.8 MFC after: 2 weeks Modified: head/sys/contrib/ipfilter/netinet/fil.c head/sys/contrib/ipfilter/netinet/ip_frag.c Modified: head/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/fil.c Fri Jul 17 19:07:56 2020 (r363284) +++ head/sys/contrib/ipfilter/netinet/fil.c Fri Jul 17 19:07:59 2020 (r363285) @@ -1698,7 +1698,7 @@ ipf_pr_ipv4hdr(fin) fi->fi_p = p; fin->fin_crc = p; fi->fi_tos = ip->ip_tos; - fin->fin_id = ip->ip_id; + fin->fin_id = ntohs(ip->ip_id); off = ntohs(ip->ip_off); /* Get both TTL and protocol */ Modified: head/sys/contrib/ipfilter/netinet/ip_frag.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_frag.c Fri Jul 17 19:07:56 2020 (r363284) +++ head/sys/contrib/ipfilter/netinet/ip_frag.c Fri Jul 17 19:07:59 2020 (r363285) @@ -404,6 +404,7 @@ ipfr_frag_new(softc, softf, fin, pass, table } } + memset(&frag, 0, sizeof(frag)); frag.ipfr_v = fin->fin_v; idx = fin->fin_v; frag.ipfr_p = fin->fin_p; @@ -452,6 +453,7 @@ ipfr_frag_new(softc, softf, fin, pass, table FBUMPD(ifs_nomem); return NULL; } + memset(fran, 0, sizeof(*fran)); WRITE_ENTER(lock); @@ -489,6 +491,7 @@ ipfr_frag_new(softc, softf, fin, pass, table table[idx] = fra; bcopy((char *)&frag.ipfr_ifp, (char *)&fra->ipfr_ifp, IPFR_CMPSZ); fra->ipfr_v = fin->fin_v; + fra->ipfr_p = fin->fin_p; fra->ipfr_ttl = softc->ipf_ticks + softf->ipfr_ttl; fra->ipfr_firstend = frag.ipfr_firstend; @@ -677,6 +680,7 @@ ipf_frag_lookup(softc, softf, fin, table * * build up a hash value to index the table with. */ + memset(&frag, 0, sizeof(frag)); frag.ipfr_v = fin->fin_v; idx = fin->fin_v; frag.ipfr_p = fin->fin_p; From owner-svn-src-head@freebsd.org Fri Jul 17 20:43:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2355736E5B1; Fri, 17 Jul 2020 20:43:01 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7jkF09B3z4Wcg; Fri, 17 Jul 2020 20:43:01 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD1041F146; Fri, 17 Jul 2020 20:43:00 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HKh0xr076300; Fri, 17 Jul 2020 20:43:00 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HKh0CS076299; Fri, 17 Jul 2020 20:43:00 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202007172043.06HKh0CS076299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Fri, 17 Jul 2020 20:43:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363286 - head/usr.bin/at X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/usr.bin/at X-SVN-Commit-Revision: 363286 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 20:43:01 -0000 Author: allanjude Date: Fri Jul 17 20:43:00 2020 New Revision: 363286 URL: https://svnweb.freebsd.org/changeset/base/363286 Log: at(1): Fix location of at(1) crontab With r318443, atrun was moved from /etc/crontab to /etc/cron.d/at, but the man-page was unfortunately not updated to reflect this. PR: 248048 Submitted by: debdrup Reported by: yoitsmeremember+fbsd at gmail.com Reviewed by: Pau Amma Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D25709 Modified: head/usr.bin/at/at.man Modified: head/usr.bin/at/at.man ============================================================================== --- head/usr.bin/at/at.man Fri Jul 17 19:07:59 2020 (r363285) +++ head/usr.bin/at/at.man Fri Jul 17 20:43:00 2020 (r363286) @@ -213,9 +213,10 @@ every five minutes. This implies that the granularity of .Nm might not be optimal for every deployment. -If a finer granularity is needed, the system crontab at -.Pa /etc/crontab -needs to be changed. +If a finer granularity is desired, the +.Pa /etc/cron.d/at +file can be edited and will be read by the system crontab, from which +the SHELL and PATH environment variables are inherited. .Sh OPTIONS .Bl -tag -width indent .It Fl q Ar queue From owner-svn-src-head@freebsd.org Fri Jul 17 21:47:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0F98436F9FB; Fri, 17 Jul 2020 21:47:07 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7l8B5dvFz4Z7P; Fri, 17 Jul 2020 21:47:06 +0000 (UTC) (envelope-from gbe@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 9A43E2000B; Fri, 17 Jul 2020 21:47:06 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HLl6jF013562; Fri, 17 Jul 2020 21:47:06 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HLl6e9013561; Fri, 17 Jul 2020 21:47:06 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202007172147.06HLl6e9013561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Fri, 17 Jul 2020 21:47:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363287 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 363287 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 21:47:07 -0000 Author: gbe (doc committer) Date: Fri Jul 17 21:47:06 2020 New Revision: 363287 URL: https://svnweb.freebsd.org/changeset/base/363287 Log: iwm(4): Document limitations of the driver Document that iwm(4) currently doesn't support 802.11n and 802.11ac. PR: 247874 Submitted by: Charles Ross Reviewed by: brueffer, markj Approved by: brueffer MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25666 Modified: head/share/man/man4/iwm.4 Modified: head/share/man/man4/iwm.4 ============================================================================== --- head/share/man/man4/iwm.4 Fri Jul 17 20:43:00 2020 (r363286) +++ head/share/man/man4/iwm.4 Fri Jul 17 21:47:06 2020 (r363287) @@ -106,6 +106,12 @@ For more information on configuring this device, see This driver requires the firmware built with the .Nm iwmfw module to work. +.Pp +Currently, +.Nm +only supports 802.11b and 802.11g modes. +It will not associate to access points that are configured to operate only +in 802.11n or 802.11ac modes. .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): .Bd -literal -offset indent From owner-svn-src-head@freebsd.org Fri Jul 17 21:55:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BF5BC36FF4C; Fri, 17 Jul 2020 21:55:25 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7lKn4RWSz4b4g; Fri, 17 Jul 2020 21:55:25 +0000 (UTC) (envelope-from gbe@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 6C4841FFFC; Fri, 17 Jul 2020 21:55:25 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HLtP5x019594; Fri, 17 Jul 2020 21:55:25 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HLtPmf019593; Fri, 17 Jul 2020 21:55:25 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202007172155.06HLtPmf019593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Fri, 17 Jul 2020 21:55:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363288 - head/sbin/mount_nfs X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/sbin/mount_nfs X-SVN-Commit-Revision: 363288 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 21:55:25 -0000 Author: gbe (doc committer) Date: Fri Jul 17 21:55:24 2020 New Revision: 363288 URL: https://svnweb.freebsd.org/changeset/base/363288 Log: mount_nfs(8): document alternate form of the gssname option PR: 238506 Submitted by: Greg Veldman Reviewed by: 0mp, bcr (mentor) Approved by: bcr (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25667 Modified: head/sbin/mount_nfs/mount_nfs.8 Modified: head/sbin/mount_nfs/mount_nfs.8 ============================================================================== --- head/sbin/mount_nfs/mount_nfs.8 Fri Jul 17 21:47:06 2020 (r363287) +++ head/sbin/mount_nfs/mount_nfs.8 Fri Jul 17 21:55:24 2020 (r363288) @@ -159,7 +159,16 @@ should be specified without instance or domain and is .Dq "host" , .Dq "nfs" or -.Dq "root" . +.Dq "root" , +although the form +.Sm off +.Aq Ar service +@ +.Aq Ar fqdn +.Sm on +can also be used if the local system's +.Xr gethostname 3 +value does not match the host-based principal in the keytab. .It Cm hard Same as not specifying .Cm soft . From owner-svn-src-head@freebsd.org Fri Jul 17 22:15:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B72F5370560; Fri, 17 Jul 2020 22:15:03 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7lmR2MVMz4cT4; Fri, 17 Jul 2020 22:15:03 +0000 (UTC) (envelope-from gbe@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 24F9D202B0; Fri, 17 Jul 2020 22:15:03 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HMF3I6032344; Fri, 17 Jul 2020 22:15:03 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HMF2q9032341; Fri, 17 Jul 2020 22:15:02 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202007172215.06HMF2q9032341@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Fri, 17 Jul 2020 22:15:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363291 - in head: . share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: in head: . share/man/man9 X-SVN-Commit-Revision: 363291 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 22:15:03 -0000 Author: gbe (doc committer) Date: Fri Jul 17 22:15:02 2020 New Revision: 363291 URL: https://svnweb.freebsd.org/changeset/base/363291 Log: devstat(9): Update the man page to reflect the current implementation - Rename devstat_add_entry to devstat_new_entry - Update the description of devstat_trans_flags - Add manpage aliases for devstat_start_transaction_bio and devstat_end_transaction_bio PR: 157316 Submitted by: novel Reviewed by: cem, bcr (mentor) Approved by: bcr (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25677 Modified: head/ObsoleteFiles.inc head/share/man/man9/Makefile head/share/man/man9/devstat.9 Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Jul 17 22:07:19 2020 (r363290) +++ head/ObsoleteFiles.inc Fri Jul 17 22:15:02 2020 (r363291) @@ -36,6 +36,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20200715: rework of devstat(9) man page +OLD_FILES+=usr/share/man/man9/devstat_add_entry.9.gz + # 20200714: update byacc to 20200330 OLD_FILES+=usr/tests/usr.bin/yacc/btyacc_calc1.y OLD_FILES+=usr/tests/usr.bin/yacc/btyacc_demo.y Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Fri Jul 17 22:07:19 2020 (r363290) +++ head/share/man/man9/Makefile Fri Jul 17 22:15:02 2020 (r363291) @@ -968,10 +968,12 @@ MLINKS+=device_set_desc.9 device_get_desc.9 \ device_set_desc.9 device_set_desc_copy.9 MLINKS+=device_set_flags.9 device_get_flags.9 MLINKS+=devstat.9 devicestat.9 \ - devstat.9 devstat_add_entry.9 \ + devstat.9 devstat_new_entry.9 \ devstat.9 devstat_end_transaction.9 \ + devstat.9 devstat_end_transaction_bio.9 \ devstat.9 devstat_remove_entry.9 \ - devstat.9 devstat_start_transaction.9 + devstat.9 devstat_start_transaction.9 \ + devstat.9 devstat_start_transaction_bio.9 MLINKS+=disk.9 disk_add_alias.9 \ disk.9 disk_alloc.9 \ disk.9 disk_create.9 \ Modified: head/share/man/man9/devstat.9 ============================================================================== --- head/share/man/man9/devstat.9 Fri Jul 17 22:07:19 2020 (r363290) +++ head/share/man/man9/devstat.9 Fri Jul 17 22:15:02 2020 (r363291) @@ -27,25 +27,24 @@ .\" .\" $FreeBSD$ .\" -.Dd August 22, 2018 +.Dd July 15, 2020 .Dt DEVSTAT 9 .Os .Sh NAME .Nm devstat , -.Nm devstat_add_entry , .Nm devstat_end_transaction , .Nm devstat_end_transaction_bio , .Nm devstat_end_transaction_bio_bt , +.Nm devstat_new_entry , .Nm devstat_remove_entry , .Nm devstat_start_transaction , .Nm devstat_start_transaction_bio .Nd kernel interface for keeping device statistics .Sh SYNOPSIS .In sys/devicestat.h -.Ft void -.Fo devstat_add_entry -.Fa "struct devstat *ds" -.Fa "const char *dev_name" +.Ft struct devstat * +.Fo devstat_new_entry +.Fa "const void *dev_name" .Fa "int unit_number" .Fa "uint32_t block_size" .Fa "devstat_support_flags flags" @@ -78,7 +77,6 @@ .Fa "struct devstat *ds" .Fa "const struct bio *bp" .Fc -.Fc .Ft void .Fo devstat_end_transaction_bio_bt .Fa "struct devstat *ds" @@ -103,19 +101,13 @@ for most disk-like drivers in the 2000s and beyond. New consumers of the interface should almost certainly use only the "bio" variants of the start and end transacation routines. .Pp -.Fn devstat_add_entry -registers a device with the -.Nm -subsystem. -The caller is expected to have already allocated \fBand zeroed\fR -the devstat structure before calling this function. -.Fn devstat_add_entry +.Fn devstat_new_entry +allocates and initializes +.Va devstat +structure and returns a pointer to it. +.Fn devstat_new_entry takes several arguments: .Bl -tag -width device_type -.It ds -The -.Va devstat -structure, allocated and zeroed by the client. .It dev_name The device name, e.g., da, cd, sa. .It unit_number @@ -386,6 +378,8 @@ to insert a device in the list. The second parameter is attach order. See below for a list of available priorities. +.It id +Identification for GEOM nodes. .El .Pp Each device is given a device type. @@ -478,7 +472,18 @@ typedef enum { DEVSTAT_WRITE = 0x02, DEVSTAT_FREE = 0x03 } devstat_trans_flags; +#define DEVSTAT_N_TRANS_FLAGS 4 .Ed +.Pp +DEVSTAT_NO_DATA is a type of transactions to the device which are neither +reads or writes. +For instance, +.Tn SCSI +drivers often send a test unit ready command to +.Tn SCSI +devices. +The test unit ready command does not read or write any data. +It merely causes the device to return its status. .Pp There are four possible values for the .Va tag_type From owner-svn-src-head@freebsd.org Fri Jul 17 23:08:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E16F43716FC; Fri, 17 Jul 2020 23:08:01 +0000 (UTC) (envelope-from chs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7mxY5Jxgz4h0V; Fri, 17 Jul 2020 23:08:01 +0000 (UTC) (envelope-from chs@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 96F1120F12; Fri, 17 Jul 2020 23:08:01 +0000 (UTC) (envelope-from chs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HN81nX063732; Fri, 17 Jul 2020 23:08:01 GMT (envelope-from chs@FreeBSD.org) Received: (from chs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HN81TI063731; Fri, 17 Jul 2020 23:08:01 GMT (envelope-from chs@FreeBSD.org) Message-Id: <202007172308.06HN81TI063731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chs set sender to chs@FreeBSD.org using -f From: Chuck Silvers Date: Fri, 17 Jul 2020 23:08:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363294 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: chs X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 363294 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 23:08:02 -0000 Author: chs Date: Fri Jul 17 23:08:01 2020 New Revision: 363294 URL: https://svnweb.freebsd.org/changeset/base/363294 Log: Revert my change from r361855 in favor of a better fix. Reviewed by: markj, kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D25430 Modified: head/sys/vm/vnode_pager.c Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Fri Jul 17 22:54:39 2020 (r363293) +++ head/sys/vm/vnode_pager.c Fri Jul 17 23:08:01 2020 (r363294) @@ -1150,30 +1150,28 @@ vnode_pager_generic_getpages_done(struct buf *bp) if (mt == bogus_page) continue; - if (error == 0) { - if (nextoff <= object->un_pager.vnp.vnp_size) { - /* - * Read filled up entire page. - */ - vm_page_valid(mt); - KASSERT(mt->dirty == 0, - ("%s: page %p is dirty", __func__, mt)); - KASSERT(!pmap_page_is_mapped(mt), - ("%s: page %p is mapped", __func__, mt)); - } else { - /* - * Read did not fill up entire page. - * - * Currently we do not set the entire page - * valid, we just try to clear the piece that - * we couldn't read. - */ - vm_page_set_valid_range(mt, 0, - object->un_pager.vnp.vnp_size - tfoff); - KASSERT((mt->dirty & vm_page_bits(0, - object->un_pager.vnp.vnp_size - tfoff)) == - 0, ("%s: page %p is dirty", __func__, mt)); - } + if (nextoff <= object->un_pager.vnp.vnp_size) { + /* + * Read filled up entire page. + */ + vm_page_valid(mt); + KASSERT(mt->dirty == 0, + ("%s: page %p is dirty", __func__, mt)); + KASSERT(!pmap_page_is_mapped(mt), + ("%s: page %p is mapped", __func__, mt)); + } else { + /* + * Read did not fill up entire page. + * + * Currently we do not set the entire page valid, + * we just try to clear the piece that we couldn't + * read. + */ + vm_page_set_valid_range(mt, 0, + object->un_pager.vnp.vnp_size - tfoff); + KASSERT((mt->dirty & vm_page_bits(0, + object->un_pager.vnp.vnp_size - tfoff)) == 0, + ("%s: page %p is dirty", __func__, mt)); } if (i < bp->b_pgbefore || i >= bp->b_npages - bp->b_pgafter) From owner-svn-src-head@freebsd.org Fri Jul 17 23:09:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F1F1A371C55; Fri, 17 Jul 2020 23:09:37 +0000 (UTC) (envelope-from chs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7mzP4wGFz4gsl; Fri, 17 Jul 2020 23:09:37 +0000 (UTC) (envelope-from chs@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 7D3F8205FB; Fri, 17 Jul 2020 23:09:37 +0000 (UTC) (envelope-from chs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HN9bKj063846; Fri, 17 Jul 2020 23:09:37 GMT (envelope-from chs@FreeBSD.org) Received: (from chs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HN9bfI063845; Fri, 17 Jul 2020 23:09:37 GMT (envelope-from chs@FreeBSD.org) Message-Id: <202007172309.06HN9bfI063845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chs set sender to chs@FreeBSD.org using -f From: Chuck Silvers Date: Fri, 17 Jul 2020 23:09:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363295 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: chs X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 363295 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 23:09:38 -0000 Author: chs Date: Fri Jul 17 23:09:36 2020 New Revision: 363295 URL: https://svnweb.freebsd.org/changeset/base/363295 Log: Add a new function vm_page_free_invalid() for freeing invalid pages that might be wired. If the page is wired then it cannot be freed now, but the thread that eventually unwires it will free it at that point. Reviewed by: markj, kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D25430 Modified: head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Fri Jul 17 23:08:01 2020 (r363294) +++ head/sys/vm/vm_page.c Fri Jul 17 23:09:36 2020 (r363295) @@ -1362,6 +1362,31 @@ vm_page_readahead_finish(vm_page_t m) } /* + * Destroy the identity of an invalid page and free it if possible. + * This is intended to be used when reading a page from backing store fails. + */ +void +vm_page_free_invalid(vm_page_t m) +{ + + KASSERT(vm_page_none_valid(m), ("page %p is valid", m)); + KASSERT(!pmap_page_is_mapped(m), ("page %p is mapped", m)); + vm_page_assert_xbusied(m); + KASSERT(m->object != NULL, ("page %p has no object", m)); + VM_OBJECT_ASSERT_WLOCKED(m->object); + + /* + * If someone has wired this page while the object lock + * was not held, then the thread that unwires is responsible + * for freeing the page. Otherwise just free the page now. + * The wire count of this unmapped page cannot change while + * we have the page xbusy and the page's object wlocked. + */ + if (vm_page_remove(m)) + vm_page_free(m); +} + +/* * vm_page_sleep_if_busy: * * Sleep and release the object lock if the page is busied. Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Fri Jul 17 23:08:01 2020 (r363294) +++ head/sys/vm/vm_page.h Fri Jul 17 23:09:36 2020 (r363295) @@ -629,6 +629,7 @@ void vm_page_deactivate_noreuse(vm_page_t); void vm_page_dequeue(vm_page_t m); void vm_page_dequeue_deferred(vm_page_t m); vm_page_t vm_page_find_least(vm_object_t, vm_pindex_t); +void vm_page_free_invalid(vm_page_t); vm_page_t vm_page_getfake(vm_paddr_t paddr, vm_memattr_t memattr); void vm_page_initfake(vm_page_t m, vm_paddr_t paddr, vm_memattr_t memattr); int vm_page_insert (vm_page_t, vm_object_t, vm_pindex_t); From owner-svn-src-head@freebsd.org Fri Jul 17 23:10:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 68905371BED; Fri, 17 Jul 2020 23:10:36 +0000 (UTC) (envelope-from chs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7n0X1vyBz4h55; Fri, 17 Jul 2020 23:10:36 +0000 (UTC) (envelope-from chs@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 21910208DF; Fri, 17 Jul 2020 23:10:36 +0000 (UTC) (envelope-from chs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HNAaI6063965; Fri, 17 Jul 2020 23:10:36 GMT (envelope-from chs@FreeBSD.org) Received: (from chs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HNAalX063964; Fri, 17 Jul 2020 23:10:36 GMT (envelope-from chs@FreeBSD.org) Message-Id: <202007172310.06HNAalX063964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chs set sender to chs@FreeBSD.org using -f From: Chuck Silvers Date: Fri, 17 Jul 2020 23:10:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363296 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: chs X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 363296 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 23:10:36 -0000 Author: chs Date: Fri Jul 17 23:10:35 2020 New Revision: 363296 URL: https://svnweb.freebsd.org/changeset/base/363296 Log: Fix vnode_pager handling of read ahead/behind pages when a disk read fails. Rather than marking the read ahead/behind pages valid even though they were not initialized, free them using the new function vm_page_free_invalid(). Reviewed by: markj, kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D25430 Modified: head/sys/vm/vnode_pager.c Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Fri Jul 17 23:09:36 2020 (r363295) +++ head/sys/vm/vnode_pager.c Fri Jul 17 23:10:35 2020 (r363296) @@ -1139,6 +1139,21 @@ vnode_pager_generic_getpages_done(struct buf *bp) bp->b_data = unmapped_buf; } + /* + * If the read failed, we must free any read ahead/behind pages here. + * The requested pages are freed by the caller (for sync requests) + * or by the bp->b_pgiodone callback (for async requests). + */ + if (error != 0) { + VM_OBJECT_WLOCK(object); + for (i = 0; i < bp->b_pgbefore; i++) + vm_page_free_invalid(bp->b_pages[i]); + for (i = bp->b_npages - bp->b_pgafter; i < bp->b_npages; i++) + vm_page_free_invalid(bp->b_pages[i]); + VM_OBJECT_WUNLOCK(object); + return (error); + } + /* Read lock to protect size. */ VM_OBJECT_RLOCK(object); for (i = 0, tfoff = IDX_TO_OFF(bp->b_pages[0]->pindex); From owner-svn-src-head@freebsd.org Sat Jul 18 00:14:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3E3D4372E58; Sat, 18 Jul 2020 00:14:44 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7pQX0Xn4z4kW4; Sat, 18 Jul 2020 00:14:44 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EB82221C18; Sat, 18 Jul 2020 00:14:43 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06I0Eh9H005896; Sat, 18 Jul 2020 00:14:43 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06I0EhrL005895; Sat, 18 Jul 2020 00:14:43 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007180014.06I0EhrL005895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 18 Jul 2020 00:14:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363297 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 363297 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2020 00:14:44 -0000 Author: mjg Date: Sat Jul 18 00:14:43 2020 New Revision: 363297 URL: https://svnweb.freebsd.org/changeset/base/363297 Log: Short-circuit tdfind when looking for the calling thread. Common occurence with cpuset and other places. Modified: head/sys/kern/kern_thread.c Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Fri Jul 17 23:10:35 2020 (r363296) +++ head/sys/kern/kern_thread.c Sat Jul 18 00:14:43 2020 (r363297) @@ -1299,6 +1299,14 @@ tdfind(lwpid_t tid, pid_t pid) struct thread *td; int run = 0; + td = curthread; + if (td->td_tid == tid) { + if (pid != -1 && td->td_proc->p_pid != pid) + return (NULL); + PROC_LOCK(td->td_proc); + return (td); + } + rw_rlock(&tidhash_lock); LIST_FOREACH(td, TIDHASH(tid), td_hash) { if (td->td_tid == tid) { From owner-svn-src-head@freebsd.org Sat Jul 18 07:35:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 47F1036004F; Sat, 18 Jul 2020 07:35:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B80CF1C5pz3gr4; Sat, 18 Jul 2020 07:35:37 +0000 (UTC) (envelope-from jkim@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 0CA3F26C43; Sat, 18 Jul 2020 07:35:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06I7ZaoC077534; Sat, 18 Jul 2020 07:35:36 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06I7ZY71077522; Sat, 18 Jul 2020 07:35:34 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202007180735.06I7ZY71077522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 18 Jul 2020 07:35:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363300 - in head/sys/contrib/dev/acpica: . compiler components/executer components/utilities include X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head/sys/contrib/dev/acpica: . compiler components/executer components/utilities include X-SVN-Commit-Revision: 363300 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2020 07:35:37 -0000 Author: jkim Date: Sat Jul 18 07:35:34 2020 New Revision: 363300 URL: https://svnweb.freebsd.org/changeset/base/363300 Log: MFV: r363292 Merge ACPICA 20200717. Modified: head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/compiler/aslerror.c head/sys/contrib/dev/acpica/compiler/aslexternal.c head/sys/contrib/dev/acpica/compiler/aslload.c head/sys/contrib/dev/acpica/compiler/aslmethod.c head/sys/contrib/dev/acpica/compiler/aslxref.c head/sys/contrib/dev/acpica/components/executer/exprep.c head/sys/contrib/dev/acpica/components/utilities/utdelete.c head/sys/contrib/dev/acpica/components/utilities/utids.c head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/actypes.h Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/changes.txt Sat Jul 18 07:35:34 2020 (r363300) @@ -1,6 +1,53 @@ ---------------------------------------- +17 July 2020. Summary of changes for version 20200717: + +This release is available at https://acpica.org/downloads + + +1) ACPICA kernel-resident subsystem: + +Do not increment OperationRegion reference counts for field units. Recent +server firmware has revealed that this reference count can overflow on +large servers that declare many field units (thousands) under the same +OperationRegion. This occurs because each field unit declaration will add +a reference count to the source OperationRegion. This release solves the +reference count overflow for OperationRegion objects by preventing +fieldUnits from incrementing their parent OperationRegion's reference +count. + +Replaced one-element arrays with flexible-arrays, which were introduced +in C99. + +Restored the readme file containing the directions for generation of +ACPICA from source on MSVC 2017. Updated the file for MSVC 2017. File is +located at: generate/msvc2017/readme.txt + +2) iASL Compiler/Disassembler and ACPICA tools: + +iASL: Fixed a regression found in version 20200214. Prevent iASL from +emitting an extra byte of garbage data when control methods declared a +single parameter type without using braces. This extra byte is known to +cause a blue screen on the Windows AML interpreter. + +iASL: Made a change to allow external declarations to specify the type of +a named object even when some name segments are not defined. +This change allows the following ASL code to compile (When DEV0 is not +defined or not defined yet): + + External (\_SB.DEV0.OBJ1, IntObj) + External (\_SB.DEV0, DeviceObj) + +iASL: Fixed a problem where method names in "Alias ()" statement could be +misinterpreted. They are now interpreted correctly as method invocations. + +iASL: capture a method parameter count (Within the Method info segment, +as well as the argument node) when using parameter type lists. + +---------------------------------------- + + 28 May 2020. Summary of changes for version 20200528: Modified: head/sys/contrib/dev/acpica/compiler/aslerror.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslerror.c Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/compiler/aslerror.c Sat Jul 18 07:35:34 2020 (r363300) @@ -1056,7 +1056,7 @@ GetModifiedLevel ( UINT8 Level, UINT16 MessageId) { - UINT16 i; + UINT32 i; UINT16 ExceptionCode; Modified: head/sys/contrib/dev/acpica/compiler/aslexternal.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslexternal.c Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/compiler/aslexternal.c Sat Jul 18 07:35:34 2020 (r363300) @@ -200,6 +200,14 @@ ExDoExternal ( ExternType = AnMapObjTypeToBtype (ExternTypeOp); + if (ExternType != ACPI_BTYPE_METHOD) + { + /* + * If this is not a method, it has zero parameters this local variable + * is used only for methods + */ + ParamCount = 0; + } /* * The parser allows optional parameter return types regardless of the Modified: head/sys/contrib/dev/acpica/compiler/aslload.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslload.c Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/compiler/aslload.c Sat Jul 18 07:35:34 2020 (r363300) @@ -1177,13 +1177,13 @@ LdAnalyzeExternals ( * previously declared External */ Node->Flags &= ~ANOBJ_IS_EXTERNAL; - Node->Type = (UINT8) ExternalOpType; + Node->Type = (UINT8) ActualOpType; /* Just retyped a node, probably will need to open a scope */ - if (AcpiNsOpensScope (ExternalOpType)) + if (AcpiNsOpensScope (ActualOpType)) { - Status = AcpiDsScopeStackPush (Node, ExternalOpType, WalkState); + Status = AcpiDsScopeStackPush (Node, ActualOpType, WalkState); if (ACPI_FAILURE (Status)) { return (Status); @@ -1204,11 +1204,11 @@ LdAnalyzeExternals ( } else if ((Node->Flags & ANOBJ_IS_EXTERNAL) && (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) && - (ExternalOpType == ACPI_TYPE_ANY)) + (ActualOpType == ACPI_TYPE_ANY)) { /* Allow update of externals of unknown type. */ - Node->Type = (UINT8) ExternalOpType; + Node->Type = (UINT8) ActualExternalOpType; Status = AE_OK; } Modified: head/sys/contrib/dev/acpica/compiler/aslmethod.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmethod.c Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/compiler/aslmethod.c Sat Jul 18 07:35:34 2020 (r363300) @@ -306,6 +306,8 @@ MtMethodAnalysisWalkBegin ( { ActualArgs = MtProcessParameterTypeList (NextType, MethodInfo->ValidArgTypes); + MethodInfo->NumArguments = ActualArgs; + ArgNode->Asl.Value.Integer |= ActualArgs; } if ((MethodInfo->NumArguments) && @@ -670,6 +672,16 @@ MtProcessParameterTypeList ( { UINT8 ParameterCount = 0; + + if (ParamTypeOp && ParamTypeOp->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG) + { + /* Special case for a single parameter without braces */ + + TypeList[ParameterCount] = + MtProcessTypeOp (ParamTypeOp); + + return (1); + } while (ParamTypeOp) { Modified: head/sys/contrib/dev/acpica/compiler/aslxref.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslxref.c Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/compiler/aslxref.c Sat Jul 18 07:35:34 2020 (r363300) @@ -994,12 +994,14 @@ XfNamespaceLocateBegin ( * invocation of the method, it is simply a reference to the method. * * September 2016: Removed DeRefOf from this list + * July 2020: Added Alias to this list */ if ((Op->Asl.Parent) && ((Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_REFOF) || (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_PACKAGE) || (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_VAR_PACKAGE)|| - (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_OBJECTTYPE))) + (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_OBJECTTYPE) || + (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_ALIAS))) { return_ACPI_STATUS (AE_OK); } Modified: head/sys/contrib/dev/acpica/components/executer/exprep.c ============================================================================== --- head/sys/contrib/dev/acpica/components/executer/exprep.c Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/components/executer/exprep.c Sat Jul 18 07:35:34 2020 (r363300) @@ -651,10 +651,6 @@ AcpiExPrepFieldValue ( } } - /* An additional reference for the container */ - - AcpiUtAddReference (ObjDesc->Field.RegionObj); - ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "RegionField: BitOff %X, Off %X, Gran %X, Region %p\n", ObjDesc->Field.StartFieldBitOffset, Modified: head/sys/contrib/dev/acpica/components/utilities/utdelete.c ============================================================================== --- head/sys/contrib/dev/acpica/components/utilities/utdelete.c Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/components/utilities/utdelete.c Sat Jul 18 07:35:34 2020 (r363300) @@ -749,11 +749,6 @@ AcpiUtUpdateObjectReference ( NextObject = Object->BufferField.BufferObj; break; - case ACPI_TYPE_LOCAL_REGION_FIELD: - - NextObject = Object->Field.RegionObj; - break; - case ACPI_TYPE_LOCAL_BANK_FIELD: NextObject = Object->BankField.BankObj; @@ -789,6 +784,7 @@ AcpiUtUpdateObjectReference ( } break; + case ACPI_TYPE_LOCAL_REGION_FIELD: case ACPI_TYPE_REGION: default: Modified: head/sys/contrib/dev/acpica/components/utilities/utids.c ============================================================================== --- head/sys/contrib/dev/acpica/components/utilities/utids.c Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/components/utilities/utids.c Sat Jul 18 07:35:34 2020 (r363300) @@ -435,7 +435,7 @@ AcpiUtExecute_CID ( * 3) Size of the actual CID strings */ CidListSize = sizeof (ACPI_PNP_DEVICE_ID_LIST) + - ((Count - 1) * sizeof (ACPI_PNP_DEVICE_ID)) + + (Count * sizeof (ACPI_PNP_DEVICE_ID)) + StringAreaSize; CidList = ACPI_ALLOCATE_ZEROED (CidListSize); Modified: head/sys/contrib/dev/acpica/include/acpixf.h ============================================================================== --- head/sys/contrib/dev/acpica/include/acpixf.h Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/include/acpixf.h Sat Jul 18 07:35:34 2020 (r363300) @@ -154,7 +154,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20200528 +#define ACPI_CA_VERSION 0x20200717 #include #include Modified: head/sys/contrib/dev/acpica/include/actypes.h ============================================================================== --- head/sys/contrib/dev/acpica/include/actypes.h Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/include/actypes.h Sat Jul 18 07:35:34 2020 (r363300) @@ -1379,7 +1379,7 @@ typedef struct acpi_pnp_device_id_list { UINT32 Count; /* Number of IDs in Ids array */ UINT32 ListSize; /* Size of list, including ID strings */ - ACPI_PNP_DEVICE_ID Ids[1]; /* ID array */ + ACPI_PNP_DEVICE_ID Ids[]; /* ID array */ } ACPI_PNP_DEVICE_ID_LIST; From owner-svn-src-head@freebsd.org Sat Jul 18 10:30:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B881363E1A; Sat, 18 Jul 2020 10:30:28 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B844y6nKtz45lC; Sat, 18 Jul 2020 10:30:26 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-lj1-f182.google.com with SMTP id r19so15351127ljn.12; Sat, 18 Jul 2020 03:30:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=ouCyEqGdaFXS+Oh+1aLIi8fpZx5uaoMqajSXw0Sxx5Y=; b=gRthcs5Th8r1Sxxc9f2jFjKJ2gbBledn1nK64VXZerHYMGN0N/ipPIYjb2yOMyIVZR bpKscO6f6S9W9pmpQdOBGAxvEavbIeTkmAAazu9M8Y2gZBuAkHM/SqHIfdZsyrijuGGl 79dM1OFO4UfD7Up88wR4CI9it/2JDq4V4glkqNtpYQOrrAsBLRoZkegGfyha959YZ8aT olkLv2+P/g+/3fRJGU0BJ2N0glODkUWoOLj6U0I5g9eGZNbEOOX/Saek85f4OBroajNt Qu3N88uoUfb7hAedm5F8+nM4ScUvCBwgEFJ7Q8ycSnwfqQKXXmTi3UvA0jSOoHVGt150 aYgw== X-Gm-Message-State: AOAM532R472WY6Q84IyF31xVhoT5jxe8S7XMwvxzITfyGKb53cTUEBGD AKxp8b90qqO4o2/r/HWLUs3kV8+a X-Google-Smtp-Source: ABdhPJwLyiVv16zG3hxRLShKqmoAxWFfl7mr7qBb/b/9e3zFwv5R8PI+NMjJdq0FtCuH8jxtmoDHYQ== X-Received: by 2002:a2e:b8c2:: with SMTP id s2mr6828486ljp.368.1595068224725; Sat, 18 Jul 2020 03:30:24 -0700 (PDT) Received: from [192.168.0.128] (89-77-97-14.dynamic.chello.pl. [89.77.97.14]) by smtp.gmail.com with ESMTPSA id m10sm2496575lji.72.2020.07.18.03.30.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 18 Jul 2020 03:30:23 -0700 (PDT) Subject: Re: svn commit: r363286 - head/usr.bin/at To: Allan Jude , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202007172043.06HKh0CS076299@repo.freebsd.org> From: Mateusz Piotrowski <0mp@FreeBSD.org> Message-ID: <2fbe8c4c-d87e-b1d6-cb60-d0fe62c1a653@FreeBSD.org> Date: Sat, 18 Jul 2020 12:30:29 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <202007172043.06HKh0CS076299@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 4B844y6nKtz45lC X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mpp302@gmail.com designates 209.85.208.182 as permitted sender) smtp.mailfrom=mpp302@gmail.com X-Spamd-Result: default: False [-1.14 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; ARC_NA(0.00)[]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-0.61)[-0.606]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-0.51)[-0.509]; NEURAL_HAM_SHORT(-0.02)[-0.024]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.182:from]; FORGED_SENDER(0.30)[0mp@FreeBSD.org,mpp302@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.182:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCVD_TLS_ALL(0.00)[]; FROM_NEQ_ENVFROM(0.00)[0mp@FreeBSD.org,mpp302@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[89.77.97.14:received] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2020 10:30:28 -0000 Hi, On 7/17/20 10:43 PM, Allan Jude wrote: > Author: allanjude > Date: Fri Jul 17 20:43:00 2020 > New Revision: 363286 > URL: https://svnweb.freebsd.org/changeset/base/363286 > > Log: > at(1): Fix location of at(1) crontab ... > Modified: head/usr.bin/at/at.man > ============================================================================== > --- head/usr.bin/at/at.man Fri Jul 17 19:07:59 2020 (r363285) > +++ head/usr.bin/at/at.man Fri Jul 17 20:43:00 2020 (r363286) > @@ -213,9 +213,10 @@ every five minutes. > This implies that the granularity of > .Nm > might not be optimal for every deployment. > -If a finer granularity is needed, the system crontab at > -.Pa /etc/crontab > -needs to be changed. > +If a finer granularity is desired, the > +.Pa /etc/cron.d/at > +file can be edited and will be read by the system crontab, from which > +the SHELL and PATH environment variables are inherited. SHELL and PATH should use the Ev macro: the .Ev SHELL and .Ev PATH Cheers! Mateusz From owner-svn-src-head@freebsd.org Sat Jul 18 10:49:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 661393644E0; Sat, 18 Jul 2020 10:49:18 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B84Vk25qQz46nj; Sat, 18 Jul 2020 10:49:18 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B5609366; Sat, 18 Jul 2020 10:49:18 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06IAnIax097484; Sat, 18 Jul 2020 10:49:18 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06IAnIjT097483; Sat, 18 Jul 2020 10:49:18 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202007181049.06IAnIjT097483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 18 Jul 2020 10:49:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363301 - head/sys/compat/linprocfs X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linprocfs X-SVN-Commit-Revision: 363301 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2020 10:49:18 -0000 Author: trasz Date: Sat Jul 18 10:49:17 2020 New Revision: 363301 URL: https://svnweb.freebsd.org/changeset/base/363301 Log: Fix two typos in flag names in /proc/cpuinfo. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25695 Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Sat Jul 18 07:35:34 2020 (r363300) +++ head/sys/compat/linprocfs/linprocfs.c Sat Jul 18 10:49:17 2020 (r363301) @@ -235,10 +235,10 @@ linprocfs_docpuinfo(PFS_FILL_ARGS) }; static char *cpu_feature2_names[] = { - /* 0 */ "pni", "pclmulqdq", "dtes3", "monitor", + /* 0 */ "pni", "pclmulqdq", "dtes64", "monitor", /* 4 */ "ds_cpl", "vmx", "smx", "est", /* 8 */ "tm2", "ssse3", "cid", "sdbg", - /* 12 */ "fma", "cx16", "xptr", "pdcm", + /* 12 */ "fma", "cx16", "xtpr", "pdcm", /* 16 */ "", "pcid", "dca", "sse4_1", /* 20 */ "sse4_2", "x2apic", "movbe", "popcnt", /* 24 */ "tsc_deadline_timer", "aes", "xsave", "", From owner-svn-src-head@freebsd.org Sat Jul 18 10:53:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C0BA33646E4; Sat, 18 Jul 2020 10:53:57 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B84c54kyCz4773; Sat, 18 Jul 2020 10:53:57 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 85E7298A1; Sat, 18 Jul 2020 10:53:57 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06IArv2h003712; Sat, 18 Jul 2020 10:53:57 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06IArvNc003710; Sat, 18 Jul 2020 10:53:57 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202007181053.06IArvNc003710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 18 Jul 2020 10:53:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363302 - head/sys/compat/linprocfs X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linprocfs X-SVN-Commit-Revision: 363302 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2020 10:53:57 -0000 Author: trasz Date: Sat Jul 18 10:53:56 2020 New Revision: 363302 URL: https://svnweb.freebsd.org/changeset/base/363302 Log: Fix bogomips calculation. Previously it was off by half. This was verified under VMWare Fusion, comparing to what's reported under CentOS, and by comparing numbers reported by linuxulator on T420 with a googled up Linux cpuinfo (https://lkml.org/lkml/2011/11/29/116). MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20693 Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Sat Jul 18 10:49:17 2020 (r363301) +++ head/sys/compat/linprocfs/linprocfs.c Sat Jul 18 10:53:56 2020 (r363302) @@ -364,7 +364,7 @@ linprocfs_docpuinfo(PFS_FILL_ARGS) #else "", #endif - fqmhz, fqkhz, + fqmhz * 2, fqkhz, cpu_clflush_line_size, cpu_clflush_line_size, cpu_maxphyaddr, (cpu_maxphyaddr > 32) ? 48 : 0); From owner-svn-src-head@freebsd.org Sat Jul 18 10:56:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DE32B364934; Sat, 18 Jul 2020 10:56:04 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B84fX5c9tz47SH; Sat, 18 Jul 2020 10:56:04 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A0B4594C1; Sat, 18 Jul 2020 10:56:04 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06IAu4wN003914; Sat, 18 Jul 2020 10:56:04 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06IAu4qH003913; Sat, 18 Jul 2020 10:56:04 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202007181056.06IAu4qH003913@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 18 Jul 2020 10:56:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363303 - head/sys/compat/linprocfs X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linprocfs X-SVN-Commit-Revision: 363303 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2020 10:56:04 -0000 Author: trasz Date: Sat Jul 18 10:56:04 2020 New Revision: 363303 URL: https://svnweb.freebsd.org/changeset/base/363303 Log: Add missing SysV IPC stats to linprocfs(4). Fixes 'ipcs -l', and also helps Oracle. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25669 Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Sat Jul 18 10:53:56 2020 (r363302) +++ head/sys/compat/linprocfs/linprocfs.c Sat Jul 18 10:56:04 2020 (r363303) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1405,6 +1406,17 @@ linprocfs_doosbuild(PFS_FILL_ARGS) } /* + * Filler function for proc/sys/kernel/msgmax + */ +static int +linprocfs_domsgmax(PFS_FILL_ARGS) +{ + + sbuf_printf(sb, "%d\n", msginfo.msgmax); + return (0); +} + +/* * Filler function for proc/sys/kernel/msgmni */ static int @@ -1416,6 +1428,17 @@ linprocfs_domsgmni(PFS_FILL_ARGS) } /* + * Filler function for proc/sys/kernel/msgmnb + */ +static int +linprocfs_domsgmnb(PFS_FILL_ARGS) +{ + + sbuf_printf(sb, "%d\n", msginfo.msgmnb); + return (0); +} + +/* * Filler function for proc/sys/kernel/pid_max */ static int @@ -1439,6 +1462,39 @@ linprocfs_dosem(PFS_FILL_ARGS) } /* + * Filler function for proc/sys/kernel/shmall + */ +static int +linprocfs_doshmall(PFS_FILL_ARGS) +{ + + sbuf_printf(sb, "%lu\n", shminfo.shmall); + return (0); +} + +/* + * Filler function for proc/sys/kernel/shmmax + */ +static int +linprocfs_doshmmax(PFS_FILL_ARGS) +{ + + sbuf_printf(sb, "%lu\n", shminfo.shmmax); + return (0); +} + +/* + * Filler function for proc/sys/kernel/shmmni + */ +static int +linprocfs_doshmmni(PFS_FILL_ARGS) +{ + + sbuf_printf(sb, "%lu\n", shminfo.shmmni); + return (0); +} + +/* * Filler function for proc/sys/kernel/tainted */ static int @@ -1837,6 +1893,7 @@ linprocfs_init(PFS_INIT_ARGS) /* /proc/sys/... */ sys = pfs_create_dir(root, "sys", NULL, NULL, NULL, 0); + /* /proc/sys/kernel/... */ dir = pfs_create_dir(sys, "kernel", NULL, NULL, NULL, 0); pfs_create_file(dir, "osrelease", &linprocfs_doosrelease, @@ -1845,12 +1902,22 @@ linprocfs_init(PFS_INIT_ARGS) NULL, NULL, NULL, PFS_RD); pfs_create_file(dir, "version", &linprocfs_doosbuild, NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "msgmax", &linprocfs_domsgmax, + NULL, NULL, NULL, PFS_RD); pfs_create_file(dir, "msgmni", &linprocfs_domsgmni, NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "msgmnb", &linprocfs_domsgmnb, + NULL, NULL, NULL, PFS_RD); pfs_create_file(dir, "pid_max", &linprocfs_dopid_max, NULL, NULL, NULL, PFS_RD); pfs_create_file(dir, "sem", &linprocfs_dosem, NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "shmall", &linprocfs_doshmall, + NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "shmmax", &linprocfs_doshmmax, + NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "shmmni", &linprocfs_doshmmni, + NULL, NULL, NULL, PFS_RD); pfs_create_file(dir, "tainted", &linprocfs_dotainted, NULL, NULL, NULL, PFS_RD); @@ -1887,3 +1954,4 @@ MODULE_DEPEND(linprocfs, linux, 1, 1, 1); MODULE_DEPEND(linprocfs, procfs, 1, 1, 1); MODULE_DEPEND(linprocfs, sysvmsg, 1, 1, 1); MODULE_DEPEND(linprocfs, sysvsem, 1, 1, 1); +MODULE_DEPEND(linprocfs, sysvshm, 1, 1, 1); From owner-svn-src-head@freebsd.org Sat Jul 18 11:28:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C5542365F1A; Sat, 18 Jul 2020 11:28:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B85NB3qYfz4994; Sat, 18 Jul 2020 11:28:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E9009E6A; Sat, 18 Jul 2020 11:28:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06IBSgXK022513; Sat, 18 Jul 2020 11:28:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06IBSegr022504; Sat, 18 Jul 2020 11:28:40 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202007181128.06IBSegr022504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 18 Jul 2020 11:28:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363304 - in head/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux X-SVN-Commit-Revision: 363304 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2020 11:28:42 -0000 Author: trasz Date: Sat Jul 18 11:28:40 2020 New Revision: 363304 URL: https://svnweb.freebsd.org/changeset/base/363304 Log: Add a trivial linux(4) splice(2) implementation, which simply returns EINVAL. Fixes grep (grep-3.1-2build1). PR: kern/218699 Reported by: avos Reviewed by: emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25636 Modified: head/sys/amd64/linux/linux_dummy.c head/sys/amd64/linux/syscalls.master head/sys/amd64/linux32/linux32_dummy.c head/sys/amd64/linux32/syscalls.master head/sys/arm64/linux/linux_dummy.c head/sys/arm64/linux/syscalls.master head/sys/compat/linux/linux_file.c head/sys/i386/linux/linux_dummy.c head/sys/i386/linux/syscalls.master Modified: head/sys/amd64/linux/linux_dummy.c ============================================================================== --- head/sys/amd64/linux/linux_dummy.c Sat Jul 18 10:56:04 2020 (r363303) +++ head/sys/amd64/linux/linux_dummy.c Sat Jul 18 11:28:40 2020 (r363304) @@ -105,7 +105,6 @@ DUMMY(inotify_rm_watch); DUMMY(migrate_pages); DUMMY(unshare); /* Linux 2.6.17: */ -DUMMY(splice); DUMMY(tee); DUMMY(vmsplice); /* Linux 2.6.18: */ Modified: head/sys/amd64/linux/syscalls.master ============================================================================== --- head/sys/amd64/linux/syscalls.master Sat Jul 18 10:56:04 2020 (r363303) +++ head/sys/amd64/linux/syscalls.master Sat Jul 18 11:28:40 2020 (r363304) @@ -1612,7 +1612,14 @@ ); } 275 AUE_NULL STD { - int linux_splice(void); + int linux_splice( + int fd_in, + l_loff_t *off_in, + int fd_out, + l_loff_t *off_out, + l_size_t len, + l_uint flags + ); } 276 AUE_NULL STD { int linux_tee(void); Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Sat Jul 18 10:56:04 2020 (r363303) +++ head/sys/amd64/linux32/linux32_dummy.c Sat Jul 18 11:28:40 2020 (r363304) @@ -102,7 +102,6 @@ DUMMY(inotify_rm_watch); DUMMY(migrate_pages); DUMMY(unshare); /* Linux 2.6.17: */ -DUMMY(splice); DUMMY(tee); DUMMY(vmsplice); /* Linux 2.6.18: */ Modified: head/sys/amd64/linux32/syscalls.master ============================================================================== --- head/sys/amd64/linux32/syscalls.master Sat Jul 18 10:56:04 2020 (r363303) +++ head/sys/amd64/linux32/syscalls.master Sat Jul 18 11:28:40 2020 (r363304) @@ -1731,7 +1731,14 @@ ); } 313 AUE_NULL STD { - int linux_splice(void); + int linux_splice( + int fd_in, + l_loff_t *off_in, + int fd_out, + l_loff_t *off_out, + l_size_t len, + l_uint flags + ); } 314 AUE_NULL STD { int linux_sync_file_range( Modified: head/sys/arm64/linux/linux_dummy.c ============================================================================== --- head/sys/arm64/linux/linux_dummy.c Sat Jul 18 10:56:04 2020 (r363303) +++ head/sys/arm64/linux/linux_dummy.c Sat Jul 18 11:28:40 2020 (r363304) @@ -98,7 +98,6 @@ DUMMY(inotify_rm_watch); DUMMY(migrate_pages); DUMMY(unshare); /* Linux 2.6.17: */ -DUMMY(splice); DUMMY(tee); DUMMY(vmsplice); /* Linux 2.6.18: */ Modified: head/sys/arm64/linux/syscalls.master ============================================================================== --- head/sys/arm64/linux/syscalls.master Sat Jul 18 10:56:04 2020 (r363303) +++ head/sys/arm64/linux/syscalls.master Sat Jul 18 11:28:40 2020 (r363304) @@ -467,7 +467,14 @@ int linux_vmsplice(void); } 76 AUE_NULL STD { - int linux_splice(void); + int linux_splice( + int fd_in, + l_loff_t *off_in, + int fd_out, + l_loff_t *off_out, + l_size_t len, + l_uint flags + ); } 77 AUE_NULL STD { int linux_tee(void); Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Sat Jul 18 10:56:04 2020 (r363303) +++ head/sys/compat/linux/linux_file.c Sat Jul 18 11:28:40 2020 (r363304) @@ -1766,3 +1766,17 @@ linux_memfd_create(struct thread *td, struct linux_mem return (kern_shm_open2(td, SHM_ANON, oflags, 0, shmflags, NULL, memfd_name)); } + +int +linux_splice(struct thread *td, struct linux_splice_args *args) +{ + + linux_msg(td, "syscall splice not really implemented"); + + /* + * splice(2) is documented to return EINVAL in various circumstances; + * returning it instead of ENOSYS should hint the caller to use fallback + * instead. + */ + return (EINVAL); +} Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Sat Jul 18 10:56:04 2020 (r363303) +++ head/sys/i386/linux/linux_dummy.c Sat Jul 18 11:28:40 2020 (r363304) @@ -98,7 +98,6 @@ DUMMY(inotify_rm_watch); DUMMY(migrate_pages); DUMMY(unshare); /* Linux 2.6.17: */ -DUMMY(splice); DUMMY(tee); DUMMY(vmsplice); /* Linux 2.6.18: */ Modified: head/sys/i386/linux/syscalls.master ============================================================================== --- head/sys/i386/linux/syscalls.master Sat Jul 18 10:56:04 2020 (r363303) +++ head/sys/i386/linux/syscalls.master Sat Jul 18 11:28:40 2020 (r363304) @@ -1753,7 +1753,14 @@ ); } 313 AUE_NULL STD { - int linux_splice(void); + int linux_splice( + int fd_in, + l_loff_t *off_in, + int fd_out, + l_loff_t *off_out, + l_size_t len, + l_uint flags + ); } 314 AUE_NULL STD { int linux_sync_file_range( From owner-svn-src-head@freebsd.org Sat Jul 18 11:31:34 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6D88C365D5D; Sat, 18 Jul 2020 11:31:34 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B85RV1DS8z49hv; Sat, 18 Jul 2020 11:31:34 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E70C9F18; Sat, 18 Jul 2020 11:31:34 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06IBVYC4028923; Sat, 18 Jul 2020 11:31:34 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06IBVVcH028908; Sat, 18 Jul 2020 11:31:31 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202007181131.06IBVVcH028908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 18 Jul 2020 11:31:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363305 - in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Commit-Revision: 363305 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2020 11:31:34 -0000 Author: trasz Date: Sat Jul 18 11:31:31 2020 New Revision: 363305 URL: https://svnweb.freebsd.org/changeset/base/363305 Log: Regen after r363304. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/linux/linux_proto.h head/sys/amd64/linux/linux_sysent.c head/sys/amd64/linux/linux_systrace_args.c head/sys/amd64/linux32/linux32_proto.h head/sys/amd64/linux32/linux32_sysent.c head/sys/amd64/linux32/linux32_systrace_args.c head/sys/arm64/linux/linux_proto.h head/sys/arm64/linux/linux_sysent.c head/sys/arm64/linux/linux_systrace_args.c head/sys/i386/linux/linux_proto.h head/sys/i386/linux/linux_sysent.c head/sys/i386/linux/linux_systrace_args.c Modified: head/sys/amd64/linux/linux_proto.h ============================================================================== --- head/sys/amd64/linux/linux_proto.h Sat Jul 18 11:28:40 2020 (r363304) +++ head/sys/amd64/linux/linux_proto.h Sat Jul 18 11:31:31 2020 (r363305) @@ -1010,7 +1010,12 @@ struct linux_get_robust_list_args { char len_l_[PADL_(l_size_t *)]; l_size_t * len; char len_r_[PADR_(l_size_t *)]; }; struct linux_splice_args { - register_t dummy; + char fd_in_l_[PADL_(int)]; int fd_in; char fd_in_r_[PADR_(int)]; + char off_in_l_[PADL_(l_loff_t *)]; l_loff_t * off_in; char off_in_r_[PADR_(l_loff_t *)]; + char fd_out_l_[PADL_(int)]; int fd_out; char fd_out_r_[PADR_(int)]; + char off_out_l_[PADL_(l_loff_t *)]; l_loff_t * off_out; char off_out_r_[PADR_(l_loff_t *)]; + char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_tee_args { register_t dummy; Modified: head/sys/amd64/linux/linux_sysent.c ============================================================================== --- head/sys/amd64/linux/linux_sysent.c Sat Jul 18 11:28:40 2020 (r363304) +++ head/sys/amd64/linux/linux_sysent.c Sat Jul 18 11:31:31 2020 (r363305) @@ -292,7 +292,7 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)linux_unshare, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 272 = linux_unshare */ { AS(linux_set_robust_list_args), (sy_call_t *)linux_set_robust_list, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 273 = linux_set_robust_list */ { AS(linux_get_robust_list_args), (sy_call_t *)linux_get_robust_list, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 274 = linux_get_robust_list */ - { 0, (sy_call_t *)linux_splice, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 275 = linux_splice */ + { AS(linux_splice_args), (sy_call_t *)linux_splice, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 275 = linux_splice */ { 0, (sy_call_t *)linux_tee, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 276 = linux_tee */ { AS(linux_sync_file_range_args), (sy_call_t *)linux_sync_file_range, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 277 = linux_sync_file_range */ { 0, (sy_call_t *)linux_vmsplice, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 278 = linux_vmsplice */ Modified: head/sys/amd64/linux/linux_systrace_args.c ============================================================================== --- head/sys/amd64/linux/linux_systrace_args.c Sat Jul 18 11:28:40 2020 (r363304) +++ head/sys/amd64/linux/linux_systrace_args.c Sat Jul 18 11:31:31 2020 (r363305) @@ -2092,7 +2092,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg } /* linux_splice */ case 275: { - *n_args = 0; + struct linux_splice_args *p = params; + iarg[0] = p->fd_in; /* int */ + uarg[1] = (intptr_t) p->off_in; /* l_loff_t * */ + iarg[2] = p->fd_out; /* int */ + uarg[3] = (intptr_t) p->off_out; /* l_loff_t * */ + iarg[4] = p->len; /* l_size_t */ + iarg[5] = p->flags; /* l_uint */ + *n_args = 6; break; } /* linux_tee */ @@ -5962,6 +5969,28 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; /* linux_splice */ case 275: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "userland l_loff_t *"; + break; + case 2: + p = "int"; + break; + case 3: + p = "userland l_loff_t *"; + break; + case 4: + p = "l_size_t"; + break; + case 5: + p = "l_uint"; + break; + default: + break; + }; break; /* linux_tee */ case 276: @@ -8008,6 +8037,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char * break; /* linux_splice */ case 275: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_tee */ case 276: /* linux_sync_file_range */ Modified: head/sys/amd64/linux32/linux32_proto.h ============================================================================== --- head/sys/amd64/linux32/linux32_proto.h Sat Jul 18 11:28:40 2020 (r363304) +++ head/sys/amd64/linux32/linux32_proto.h Sat Jul 18 11:31:31 2020 (r363305) @@ -1082,7 +1082,12 @@ struct linux_get_robust_list_args { char len_l_[PADL_(l_size_t *)]; l_size_t * len; char len_r_[PADR_(l_size_t *)]; }; struct linux_splice_args { - register_t dummy; + char fd_in_l_[PADL_(int)]; int fd_in; char fd_in_r_[PADR_(int)]; + char off_in_l_[PADL_(l_loff_t *)]; l_loff_t * off_in; char off_in_r_[PADR_(l_loff_t *)]; + char fd_out_l_[PADL_(int)]; int fd_out; char fd_out_r_[PADR_(int)]; + char off_out_l_[PADL_(l_loff_t *)]; l_loff_t * off_out; char off_out_r_[PADR_(l_loff_t *)]; + char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_sync_file_range_args { char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)]; Modified: head/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysent.c Sat Jul 18 11:28:40 2020 (r363304) +++ head/sys/amd64/linux32/linux32_sysent.c Sat Jul 18 11:31:31 2020 (r363305) @@ -330,7 +330,7 @@ struct sysent linux32_sysent[] = { { 0, (sy_call_t *)linux_unshare, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 310 = linux_unshare */ { AS(linux_set_robust_list_args), (sy_call_t *)linux_set_robust_list, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 311 = linux_set_robust_list */ { AS(linux_get_robust_list_args), (sy_call_t *)linux_get_robust_list, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 312 = linux_get_robust_list */ - { 0, (sy_call_t *)linux_splice, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 313 = linux_splice */ + { AS(linux_splice_args), (sy_call_t *)linux_splice, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 313 = linux_splice */ { AS(linux_sync_file_range_args), (sy_call_t *)linux_sync_file_range, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 314 = linux_sync_file_range */ { 0, (sy_call_t *)linux_tee, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 315 = linux_tee */ { 0, (sy_call_t *)linux_vmsplice, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 316 = linux_vmsplice */ Modified: head/sys/amd64/linux32/linux32_systrace_args.c ============================================================================== --- head/sys/amd64/linux32/linux32_systrace_args.c Sat Jul 18 11:28:40 2020 (r363304) +++ head/sys/amd64/linux32/linux32_systrace_args.c Sat Jul 18 11:31:31 2020 (r363305) @@ -2215,7 +2215,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg } /* linux_splice */ case 313: { - *n_args = 0; + struct linux_splice_args *p = params; + iarg[0] = p->fd_in; /* int */ + uarg[1] = (intptr_t) p->off_in; /* l_loff_t * */ + iarg[2] = p->fd_out; /* int */ + uarg[3] = (intptr_t) p->off_out; /* l_loff_t * */ + iarg[4] = p->len; /* l_size_t */ + iarg[5] = p->flags; /* l_uint */ + *n_args = 6; break; } /* linux_sync_file_range */ @@ -6590,6 +6597,28 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; /* linux_splice */ case 313: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "userland l_loff_t *"; + break; + case 2: + p = "int"; + break; + case 3: + p = "userland l_loff_t *"; + break; + case 4: + p = "l_size_t"; + break; + case 5: + p = "l_uint"; + break; + default: + break; + }; break; /* linux_sync_file_range */ case 314: @@ -9184,6 +9213,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char * break; /* linux_splice */ case 313: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_sync_file_range */ case 314: if (ndx == 0 || ndx == 1) Modified: head/sys/arm64/linux/linux_proto.h ============================================================================== --- head/sys/arm64/linux/linux_proto.h Sat Jul 18 11:28:40 2020 (r363304) +++ head/sys/arm64/linux/linux_proto.h Sat Jul 18 11:31:31 2020 (r363305) @@ -322,7 +322,12 @@ struct linux_vmsplice_args { register_t dummy; }; struct linux_splice_args { - register_t dummy; + char fd_in_l_[PADL_(int)]; int fd_in; char fd_in_r_[PADR_(int)]; + char off_in_l_[PADL_(l_loff_t *)]; l_loff_t * off_in; char off_in_r_[PADR_(l_loff_t *)]; + char fd_out_l_[PADL_(int)]; int fd_out; char fd_out_r_[PADR_(int)]; + char off_out_l_[PADL_(l_loff_t *)]; l_loff_t * off_out; char off_out_r_[PADR_(l_loff_t *)]; + char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_tee_args { register_t dummy; Modified: head/sys/arm64/linux/linux_sysent.c ============================================================================== --- head/sys/arm64/linux/linux_sysent.c Sat Jul 18 11:28:40 2020 (r363304) +++ head/sys/arm64/linux/linux_sysent.c Sat Jul 18 11:31:31 2020 (r363305) @@ -93,7 +93,7 @@ struct sysent linux_sysent[] = { { AS(linux_ppoll_args), (sy_call_t *)linux_ppoll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 73 = linux_ppoll */ { 0, (sy_call_t *)linux_signalfd4, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 74 = linux_signalfd4 */ { 0, (sy_call_t *)linux_vmsplice, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 75 = linux_vmsplice */ - { 0, (sy_call_t *)linux_splice, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 76 = linux_splice */ + { AS(linux_splice_args), (sy_call_t *)linux_splice, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 76 = linux_splice */ { 0, (sy_call_t *)linux_tee, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 77 = linux_tee */ { AS(linux_readlinkat_args), (sy_call_t *)linux_readlinkat, AUE_READLINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 78 = linux_readlinkat */ { AS(linux_newfstatat_args), (sy_call_t *)linux_newfstatat, AUE_FSTATAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 79 = linux_newfstatat */ Modified: head/sys/arm64/linux/linux_systrace_args.c ============================================================================== --- head/sys/arm64/linux/linux_systrace_args.c Sat Jul 18 11:28:40 2020 (r363304) +++ head/sys/arm64/linux/linux_systrace_args.c Sat Jul 18 11:31:31 2020 (r363305) @@ -599,7 +599,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg } /* linux_splice */ case 76: { - *n_args = 0; + struct linux_splice_args *p = params; + iarg[0] = p->fd_in; /* int */ + uarg[1] = (intptr_t) p->off_in; /* l_loff_t * */ + iarg[2] = p->fd_out; /* int */ + uarg[3] = (intptr_t) p->off_out; /* l_loff_t * */ + iarg[4] = p->len; /* l_size_t */ + iarg[5] = p->flags; /* l_uint */ + *n_args = 6; break; } /* linux_tee */ @@ -3207,6 +3214,28 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; /* linux_splice */ case 76: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "userland l_loff_t *"; + break; + case 2: + p = "int"; + break; + case 3: + p = "userland l_loff_t *"; + break; + case 4: + p = "l_size_t"; + break; + case 5: + p = "l_uint"; + break; + default: + break; + }; break; /* linux_tee */ case 77: @@ -6139,6 +6168,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char * case 75: /* linux_splice */ case 76: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_tee */ case 77: /* linux_readlinkat */ Modified: head/sys/i386/linux/linux_proto.h ============================================================================== --- head/sys/i386/linux/linux_proto.h Sat Jul 18 11:28:40 2020 (r363304) +++ head/sys/i386/linux/linux_proto.h Sat Jul 18 11:31:31 2020 (r363305) @@ -1079,7 +1079,12 @@ struct linux_get_robust_list_args { char len_l_[PADL_(l_size_t *)]; l_size_t * len; char len_r_[PADR_(l_size_t *)]; }; struct linux_splice_args { - register_t dummy; + char fd_in_l_[PADL_(int)]; int fd_in; char fd_in_r_[PADR_(int)]; + char off_in_l_[PADL_(l_loff_t *)]; l_loff_t * off_in; char off_in_r_[PADR_(l_loff_t *)]; + char fd_out_l_[PADL_(int)]; int fd_out; char fd_out_r_[PADR_(int)]; + char off_out_l_[PADL_(l_loff_t *)]; l_loff_t * off_out; char off_out_r_[PADR_(l_loff_t *)]; + char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_sync_file_range_args { char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)]; Modified: head/sys/i386/linux/linux_sysent.c ============================================================================== --- head/sys/i386/linux/linux_sysent.c Sat Jul 18 11:28:40 2020 (r363304) +++ head/sys/i386/linux/linux_sysent.c Sat Jul 18 11:31:31 2020 (r363305) @@ -330,7 +330,7 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)linux_unshare, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 310 = linux_unshare */ { AS(linux_set_robust_list_args), (sy_call_t *)linux_set_robust_list, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 311 = linux_set_robust_list */ { AS(linux_get_robust_list_args), (sy_call_t *)linux_get_robust_list, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 312 = linux_get_robust_list */ - { 0, (sy_call_t *)linux_splice, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 313 = linux_splice */ + { AS(linux_splice_args), (sy_call_t *)linux_splice, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 313 = linux_splice */ { AS(linux_sync_file_range_args), (sy_call_t *)linux_sync_file_range, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 314 = linux_sync_file_range */ { 0, (sy_call_t *)linux_tee, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 315 = linux_tee */ { 0, (sy_call_t *)linux_vmsplice, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 316 = linux_vmsplice */ Modified: head/sys/i386/linux/linux_systrace_args.c ============================================================================== --- head/sys/i386/linux/linux_systrace_args.c Sat Jul 18 11:28:40 2020 (r363304) +++ head/sys/i386/linux/linux_systrace_args.c Sat Jul 18 11:31:31 2020 (r363305) @@ -2258,7 +2258,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg } /* linux_splice */ case 313: { - *n_args = 0; + struct linux_splice_args *p = params; + iarg[0] = p->fd_in; /* int */ + uarg[1] = (intptr_t) p->off_in; /* l_loff_t * */ + iarg[2] = p->fd_out; /* int */ + uarg[3] = (intptr_t) p->off_out; /* l_loff_t * */ + iarg[4] = p->len; /* l_size_t */ + iarg[5] = p->flags; /* l_uint */ + *n_args = 6; break; } /* linux_sync_file_range */ @@ -6679,6 +6686,28 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; /* linux_splice */ case 313: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "userland l_loff_t *"; + break; + case 2: + p = "int"; + break; + case 3: + p = "userland l_loff_t *"; + break; + case 4: + p = "l_size_t"; + break; + case 5: + p = "l_uint"; + break; + default: + break; + }; break; /* linux_sync_file_range */ case 314: @@ -9290,6 +9319,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char * break; /* linux_splice */ case 313: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_sync_file_range */ case 314: if (ndx == 0 || ndx == 1) From owner-svn-src-head@freebsd.org Sat Jul 18 11:37:31 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7E423366242; Sat, 18 Jul 2020 11:37:31 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B85ZM2lbrz4BPN; Sat, 18 Jul 2020 11:37:31 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4242B9DB0; Sat, 18 Jul 2020 11:37:31 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06IBbVom029624; Sat, 18 Jul 2020 11:37:31 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06IBbVlw029623; Sat, 18 Jul 2020 11:37:31 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202007181137.06IBbVlw029623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 18 Jul 2020 11:37:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363306 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 363306 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2020 11:37:31 -0000 Author: trasz Date: Sat Jul 18 11:37:30 2020 New Revision: 363306 URL: https://svnweb.freebsd.org/changeset/base/363306 Log: Bump the default linux version from 3.2.0 to 3.10.0, which corresponds to RHEL 7. Required for DB2. Reviewed by: emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25656 Modified: head/sys/compat/linux/linux_mib.h Modified: head/sys/compat/linux/linux_mib.h ============================================================================== --- head/sys/compat/linux/linux_mib.h Sat Jul 18 11:31:31 2020 (r363305) +++ head/sys/compat/linux/linux_mib.h Sat Jul 18 11:37:30 2020 (r363306) @@ -47,7 +47,7 @@ int linux_get_oss_version(struct thread *td); int linux_kernver(struct thread *td); #define LINUX_KVERSION 3 -#define LINUX_KPATCHLEVEL 2 +#define LINUX_KPATCHLEVEL 10 #define LINUX_KSUBLEVEL 0 #define LINUX_KERNVER(a,b,c) (((a) << 16) + ((b) << 8) + (c)) From owner-svn-src-head@freebsd.org Sat Jul 18 12:21:09 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0653F367ED8; Sat, 18 Jul 2020 12:21:09 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B86Xh6SS5z4DPs; Sat, 18 Jul 2020 12:21:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C2836A96C; Sat, 18 Jul 2020 12:21:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06ICL8Op057709; Sat, 18 Jul 2020 12:21:08 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06ICL8BU057708; Sat, 18 Jul 2020 12:21:08 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202007181221.06ICL8BU057708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 18 Jul 2020 12:21:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363307 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 363307 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2020 12:21:09 -0000 Author: trasz Date: Sat Jul 18 12:21:08 2020 New Revision: 363307 URL: https://svnweb.freebsd.org/changeset/base/363307 Log: Make linux fallocate(2) return EOPNOTSUPP, not ENOSYS, on unsupported mode, as documented in the man page. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/linux/linux_file.c Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Sat Jul 18 11:37:30 2020 (r363306) +++ head/sys/compat/linux/linux_file.c Sat Jul 18 12:21:08 2020 (r363307) @@ -1670,7 +1670,7 @@ linux_fallocate(struct thread *td, struct linux_falloc * mode should be 0. */ if (args->mode != 0) - return (ENOSYS); + return (EOPNOTSUPP); #if defined(__amd64__) && defined(COMPAT_LINUX32) len = PAIR32TO64(off_t, args->len); From owner-svn-src-head@freebsd.org Sat Jul 18 12:43:12 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 35CBB368A76; Sat, 18 Jul 2020 12:43:12 +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 4B87280gGkz4Gb7; Sat, 18 Jul 2020 12:43:12 +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 EEB88AA6B; Sat, 18 Jul 2020 12:43:11 +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 06IChBNm073127; Sat, 18 Jul 2020 12:43:11 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06IChBTR073126; Sat, 18 Jul 2020 12:43:11 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202007181243.06IChBTR073126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sat, 18 Jul 2020 12:43:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363308 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 363308 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2020 12:43:12 -0000 Author: kp Date: Sat Jul 18 12:43:11 2020 New Revision: 363308 URL: https://svnweb.freebsd.org/changeset/base/363308 Log: bridge: Don't sleep during epoch While it doesn't trigger INVARIANTS or WITNESS on head it does in stable/12. There's also no reason for it, as we can easily report the out of memory error to the caller (i.e. userspace). All of these can already fail. PR: 248046 MFC after: 3 days Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Sat Jul 18 12:21:08 2020 (r363307) +++ head/sys/net/if_bridge.c Sat Jul 18 12:43:11 2020 (r363308) @@ -1393,9 +1393,9 @@ bridge_ioctl_gifs(struct bridge_softc *sc, void *arg) bifc->ifbic_len = buflen; return (0); } - BRIDGE_UNLOCK(sc); - outbuf = malloc(buflen, M_TEMP, M_WAITOK | M_ZERO); - BRIDGE_LOCK(sc); + outbuf = malloc(buflen, M_TEMP, M_NOWAIT | M_ZERO); + if (outbuf == NULL) + return (ENOMEM); count = 0; buf = outbuf; @@ -1455,9 +1455,9 @@ bridge_ioctl_rts(struct bridge_softc *sc, void *arg) count++; buflen = sizeof(bareq) * count; - BRIDGE_UNLOCK(sc); - outbuf = malloc(buflen, M_TEMP, M_WAITOK | M_ZERO); - BRIDGE_LOCK(sc); + outbuf = malloc(buflen, M_TEMP, M_NOWAIT | M_ZERO); + if (outbuf == NULL) + return (ENOMEM); count = 0; buf = outbuf; @@ -1783,9 +1783,9 @@ bridge_ioctl_gifsstp(struct bridge_softc *sc, void *ar return (0); } - BRIDGE_UNLOCK(sc); - outbuf = malloc(buflen, M_TEMP, M_WAITOK | M_ZERO); - BRIDGE_LOCK(sc); + outbuf = malloc(buflen, M_TEMP, M_NOWAIT | M_ZERO); + if (outbuf == NULL) + return (ENOMEM); count = 0; buf = outbuf; From owner-svn-src-head@freebsd.org Sat Jul 18 13:10:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F3123369262; Sat, 18 Jul 2020 13:10:02 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B87d669qTz4Ht3; Sat, 18 Jul 2020 13:10:02 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8A00B1A1; Sat, 18 Jul 2020 13:10:02 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06IDA2kK085926; Sat, 18 Jul 2020 13:10:02 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06IDA2pa085925; Sat, 18 Jul 2020 13:10:02 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007181310.06IDA2pa085925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 18 Jul 2020 13:10:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363309 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 363309 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2020 13:10:03 -0000 Author: tuexen Date: Sat Jul 18 13:10:02 2020 New Revision: 363309 URL: https://svnweb.freebsd.org/changeset/base/363309 Log: Remove code which is not needed. MFC after: 1 week Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sat Jul 18 12:43:11 2020 (r363308) +++ head/sys/netinet/sctp_pcb.c Sat Jul 18 13:10:02 2020 (r363309) @@ -3593,9 +3593,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, */ if (from != SCTP_CALLED_FROM_INPKILL_TIMER) { (void)SCTP_OS_TIMER_STOP_DRAIN(&inp->sctp_ep.signature_change.timer); - } else { - /* Probably un-needed */ - (void)SCTP_OS_TIMER_STOP(&inp->sctp_ep.signature_change.timer); } #ifdef SCTP_LOG_CLOSING From owner-svn-src-head@freebsd.org Sat Jul 18 13:10:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 93C81369269; Sat, 18 Jul 2020 13:10:33 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B87dj2T3fz4J1L; Sat, 18 Jul 2020 13:10:33 +0000 (UTC) (envelope-from br@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 397B6B035; Sat, 18 Jul 2020 13:10:33 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06IDAXeQ085996; Sat, 18 Jul 2020 13:10:33 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06IDAWNm085990; Sat, 18 Jul 2020 13:10:32 GMT (envelope-from br@FreeBSD.org) Message-Id: <202007181310.06IDAWNm085990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Sat, 18 Jul 2020 13:10:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363310 - in head/sys: sys x86/iommu X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: in head/sys: sys x86/iommu X-SVN-Commit-Revision: 363310 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2020 13:10:33 -0000 Author: br Date: Sat Jul 18 13:10:31 2020 New Revision: 363310 URL: https://svnweb.freebsd.org/changeset/base/363310 Log: o Move iommu_test_boundary() to sys/iommu.h o Rename DMAR -> IOMMU in comments o Add IOMMU_PAGE_SIZE / IOMMU_PAGE_MASK macroses o x86 only: dmar_quirks_pre_use() / dmar_instantiate_rmrr_ctxs() Reviewed by: kib Sponsored by: DARPA/AFRL Differential Revision: https://reviews.freebsd.org/D25665 Modified: head/sys/sys/iommu.h head/sys/x86/iommu/busdma_dmar.c head/sys/x86/iommu/intel_dmar.h head/sys/x86/iommu/intel_drv.c head/sys/x86/iommu/intel_gas.c head/sys/x86/iommu/intel_reg.h Modified: head/sys/sys/iommu.h ============================================================================== --- head/sys/sys/iommu.h Sat Jul 18 13:10:02 2020 (r363309) +++ head/sys/sys/iommu.h Sat Jul 18 13:10:31 2020 (r363310) @@ -35,6 +35,7 @@ #define _SYS_IOMMU_H_ #include +#include #include #include @@ -43,6 +44,7 @@ typedef uint64_t iommu_haddr_t; /* Guest or bus address, before translation. */ typedef uint64_t iommu_gaddr_t; +struct bus_dma_tag_common; struct iommu_map_entry; TAILQ_HEAD(iommu_map_entries_tailq, iommu_map_entry); @@ -102,6 +104,7 @@ struct iommu_domain { struct iommu_unit *iommu; /* (c) */ struct mtx lock; /* (c) */ struct task unload_task; /* (c) */ + u_int entries_cnt; /* (d) */ struct iommu_map_entries_tailq unload_entries; /* (d) Entries to unload */ }; @@ -128,6 +131,16 @@ struct iommu_ctx { #define IOMMU_DOMAIN_LOCK(dom) mtx_lock(&(dom)->lock) #define IOMMU_DOMAIN_UNLOCK(dom) mtx_unlock(&(dom)->lock) #define IOMMU_DOMAIN_ASSERT_LOCKED(dom) mtx_assert(&(dom)->lock, MA_OWNED) + +static inline bool +iommu_test_boundary(iommu_gaddr_t start, iommu_gaddr_t size, + iommu_gaddr_t boundary) +{ + + if (boundary == 0) + return (true); + return (start + size <= ((start + boundary) & ~(boundary - 1))); +} void iommu_free_ctx(struct iommu_ctx *ctx); void iommu_free_ctx_locked(struct iommu_unit *iommu, struct iommu_ctx *ctx); Modified: head/sys/x86/iommu/busdma_dmar.c ============================================================================== --- head/sys/x86/iommu/busdma_dmar.c Sat Jul 18 13:10:02 2020 (r363309) +++ head/sys/x86/iommu/busdma_dmar.c Sat Jul 18 13:10:31 2020 (r363310) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -62,11 +63,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if defined(__amd64__) || defined(__i386__) #include #include #include #include #include +#endif /* * busdma_dmar.c, the implementation of the busdma(9) interface using @@ -112,11 +115,11 @@ iommu_bus_dma_is_dev_disabled(int domain, int bus, int /* * Given original device, find the requester ID that will be seen by - * the DMAR unit and used for page table lookup. PCI bridges may take + * the IOMMU unit and used for page table lookup. PCI bridges may take * ownership of transactions from downstream devices, so it may not be * the same as the BSF of the target device. In those cases, all * devices downstream of the bridge must share a single mapping - * domain, and must collectively be assigned to use either DMAR or + * domain, and must collectively be assigned to use either IOMMU or * bounce mapping. */ device_t @@ -135,7 +138,7 @@ iommu_get_requester(device_t dev, uint16_t *rid) /* * Walk the bridge hierarchy from the target device to the - * host port to find the translating bridge nearest the DMAR + * host port to find the translating bridge nearest the IOMMU * unit. */ for (;;) { @@ -173,7 +176,7 @@ iommu_get_requester(device_t dev, uint16_t *rid) } else { /* * Device is not PCIe, it cannot be seen as a - * requester by DMAR unit. Check whether the + * requester by IOMMU unit. Check whether the * bridge is PCIe. */ bridge_is_pcie = pci_find_cap(pcib, PCIY_EXPRESS, @@ -243,8 +246,8 @@ iommu_instantiate_ctx(struct iommu_unit *unit, device_ /* * If the user requested the IOMMU disabled for the device, we - * cannot disable the DMAR, due to possibility of other - * devices on the same DMAR still requiring translation. + * cannot disable the IOMMU unit, due to possibility of other + * devices on the same IOMMU unit still requiring translation. * Instead provide the identity mapping for the device * context. */ @@ -279,13 +282,16 @@ acpi_iommu_get_dma_tag(device_t dev, device_t child) bus_dma_tag_t res; unit = iommu_find(child, bootverbose); - /* Not in scope of any DMAR ? */ + /* Not in scope of any IOMMU ? */ if (unit == NULL) return (NULL); if (!unit->dma_enabled) return (NULL); + +#if defined(__amd64__) || defined(__i386__) dmar_quirks_pre_use(unit); dmar_instantiate_rmrr_ctxs(unit); +#endif ctx = iommu_instantiate_ctx(unit, child, false); res = ctx == NULL ? NULL : (bus_dma_tag_t)ctx->tag; @@ -536,7 +542,7 @@ iommu_bus_dmamap_load_something1(struct bus_dma_tag_io bus_size_t buflen1; int error, idx, gas_flags, seg; - KASSERT(offset < DMAR_PAGE_SIZE, ("offset %d", offset)); + KASSERT(offset < IOMMU_PAGE_SIZE, ("offset %d", offset)); if (segs == NULL) segs = tag->segments; ctx = tag->ctx; @@ -621,7 +627,7 @@ iommu_bus_dmamap_load_something1(struct bus_dma_tag_io idx += OFF_TO_IDX(trunc_page(offset + buflen1)); offset += buflen1; - offset &= DMAR_PAGE_MASK; + offset &= IOMMU_PAGE_MASK; buflen -= buflen1; } if (error == 0) @@ -841,7 +847,7 @@ iommu_bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmam } /* - * The limitations of busdma KPI forces the dmar to perform the actual + * The limitations of busdma KPI forces the iommu to perform the actual * unload, consisting of the unmapping of the map entries page tables, * from the delayed context on i386, since page table page mapping * might require a sleep to be successfull. The unfortunate Modified: head/sys/x86/iommu/intel_dmar.h ============================================================================== --- head/sys/x86/iommu/intel_dmar.h Sat Jul 18 13:10:02 2020 (r363309) +++ head/sys/x86/iommu/intel_dmar.h Sat Jul 18 13:10:31 2020 (r363310) @@ -77,7 +77,6 @@ struct dmar_domain { LIST_HEAD(, dmar_ctx) contexts; /* (u) */ vm_object_t pgtbl_obj; /* (c) Page table pages */ u_int flags; /* (u) */ - u_int entries_cnt; /* (d) */ struct dmar_gas_entries_tree rb_root; /* (d) */ struct iommu_map_entry *first_place, *last_place; /* (d) */ u_int batch_no; @@ -458,16 +457,6 @@ dmar_pte_clear(volatile uint64_t *dst) #else *dst = 0; #endif -} - -static inline bool -iommu_test_boundary(iommu_gaddr_t start, iommu_gaddr_t size, - iommu_gaddr_t boundary) -{ - - if (boundary == 0) - return (true); - return (start + size <= ((start + boundary) & ~(boundary - 1))); } extern struct timespec dmar_hw_timeout; Modified: head/sys/x86/iommu/intel_drv.c ============================================================================== --- head/sys/x86/iommu/intel_drv.c Sat Jul 18 13:10:02 2020 (r363309) +++ head/sys/x86/iommu/intel_drv.c Sat Jul 18 13:10:31 2020 (r363310) @@ -1160,7 +1160,7 @@ dmar_print_domain(struct dmar_domain *domain, bool sho " ctx_cnt %d flags %x pgobj %p map_ents %u\n", domain, domain->domain, domain->mgaw, domain->agaw, domain->pglvl, (uintmax_t)domain->end, domain->refs, domain->ctx_cnt, - domain->flags, domain->pgtbl_obj, domain->entries_cnt); + domain->flags, domain->pgtbl_obj, domain->iodom.entries_cnt); if (!LIST_EMPTY(&domain->contexts)) { db_printf(" Contexts:\n"); LIST_FOREACH(ctx, &domain->contexts, link) Modified: head/sys/x86/iommu/intel_gas.c ============================================================================== --- head/sys/x86/iommu/intel_gas.c Sat Jul 18 13:10:02 2020 (r363309) +++ head/sys/x86/iommu/intel_gas.c Sat Jul 18 13:10:31 2020 (r363310) @@ -98,7 +98,7 @@ dmar_gas_alloc_entry(struct dmar_domain *domain, u_int 0 ? M_WAITOK : M_NOWAIT) | M_ZERO); if (res != NULL) { res->domain = (struct iommu_domain *)domain; - atomic_add_int(&domain->entries_cnt, 1); + atomic_add_int(&domain->iodom.entries_cnt, 1); } return (res); } @@ -110,7 +110,7 @@ dmar_gas_free_entry(struct dmar_domain *domain, struct KASSERT(domain == (struct dmar_domain *)entry->domain, ("mismatched free domain %p entry %p entry->domain %p", domain, entry, entry->domain)); - atomic_subtract_int(&domain->entries_cnt, 1); + atomic_subtract_int(&domain->iodom.entries_cnt, 1); uma_zfree(iommu_map_entry_zone, entry); } @@ -214,7 +214,7 @@ dmar_gas_init_domain(struct dmar_domain *domain) end = dmar_gas_alloc_entry(domain, DMAR_PGF_WAITOK); DMAR_DOMAIN_LOCK(domain); - KASSERT(domain->entries_cnt == 2, ("dirty domain %p", domain)); + KASSERT(domain->iodom.entries_cnt == 2, ("dirty domain %p", domain)); KASSERT(RB_EMPTY(&domain->rb_root), ("non-empty entries %p", domain)); begin->start = 0; @@ -239,7 +239,8 @@ dmar_gas_fini_domain(struct dmar_domain *domain) struct iommu_map_entry *entry, *entry1; DMAR_DOMAIN_ASSERT_LOCKED(domain); - KASSERT(domain->entries_cnt == 2, ("domain still in use %p", domain)); + KASSERT(domain->iodom.entries_cnt == 2, + ("domain still in use %p", domain)); entry = RB_MIN(dmar_gas_entries_tree, &domain->rb_root); KASSERT(entry->start == 0, ("start entry start %p", domain)); Modified: head/sys/x86/iommu/intel_reg.h ============================================================================== --- head/sys/x86/iommu/intel_reg.h Sat Jul 18 13:10:02 2020 (r363309) +++ head/sys/x86/iommu/intel_reg.h Sat Jul 18 13:10:31 2020 (r363310) @@ -41,6 +41,9 @@ #define DMAR_NPTEPGSHIFT 9 #define DMAR_PTEMASK (DMAR_NPTEPG - 1) +#define IOMMU_PAGE_SIZE DMAR_PAGE_SIZE +#define IOMMU_PAGE_MASK DMAR_PAGE_MASK + typedef struct dmar_root_entry { uint64_t r1; uint64_t r2; From owner-svn-src-head@freebsd.org Sat Jul 18 18:19:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 37FDD3708B6; Sat, 18 Jul 2020 18:19:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B8GVl18rsz4ZN7; Sat, 18 Jul 2020 18:19:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0A27AEC8D; Sat, 18 Jul 2020 18:19:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06IIJx7A076867; Sat, 18 Jul 2020 18:19:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06IIJvHi076860; Sat, 18 Jul 2020 18:19:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202007181819.06IIJvHi076860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 18 Jul 2020 18:19:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363311 - in head/sys/amd64: amd64 include X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys/amd64: amd64 include X-SVN-Commit-Revision: 363311 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2020 18:19:59 -0000 Author: kib Date: Sat Jul 18 18:19:57 2020 New Revision: 363311 URL: https://svnweb.freebsd.org/changeset/base/363311 Log: amd64 pmap: microoptimize local shootdowns for PCID PTI configurations When pmap operates in PTI mode, we must reload %cr3 on return to userspace. In non-PCID mode the reload always flushes all non-global TLB entries and we take advantage of it by only invalidating the KPT TLB entries (there is no cached UPT entries at all). In PCID mode, we flush both KPT and UPT TLB explicitly, but we can take advantage of the fact that PCID mode command to reload %cr3 includes a flag to flush/not flush target TLB. In particular, we can avoid the flush for UPT, instead record that load of pc_ucr3 into %cr3 on return to usermode should be flushing. This is done by providing either all-1s or ~CR3_PCID_MASK in pc_ucr3_load_mask. The mask is automatically reset to all-1s on return to usermode. Similarly, we can avoid flushing UPT TLB on context switch, replacing it by setting pc_ucr3_load_mask. This unifies INVPCID and non-INVPCID PTI ifunc, leaving only 4 cases instead of 6. This trick is also applicable both to the TLB shootdown IPI handlers, since handlers interrupt the target thread. But then we need to check pc_curpmap in handlers, and this would reopen the same race for INVPCID machines as was fixed in r306350 for non-INVPCID. To not introduce the same bug, unconditionally do spinlock_enter() in pmap_activate(). Reviewed by: alc, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Differential revision: https://reviews.freebsd.org/D25483 Modified: head/sys/amd64/amd64/exception.S head/sys/amd64/amd64/genassym.c head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/amd64/pmap.c head/sys/amd64/include/pcpu.h head/sys/amd64/include/pmap.h Modified: head/sys/amd64/amd64/exception.S ============================================================================== --- head/sys/amd64/amd64/exception.S Sat Jul 18 13:10:31 2020 (r363310) +++ head/sys/amd64/amd64/exception.S Sat Jul 18 18:19:57 2020 (r363311) @@ -47,6 +47,7 @@ #include #include #include +#include #ifdef KDTRACE_HOOKS .bss @@ -607,8 +608,10 @@ fast_syscall_common: cmpq $~0,PCPU(UCR3) je 2f movq PCPU(UCR3),%r9 + andq PCPU(UCR3_LOAD_MASK),%r9 movq %r9,%cr3 2: xorl %r9d,%r9d + movq $PMAP_UCR3_NOMASK,PCPU(UCR3_LOAD_MASK) swapgs sysretq @@ -1262,6 +1265,8 @@ ld_regs: movq TF_SS(%rsp),%rax movq %rax,PTI_SS(%rdx) movq PCPU(UCR3),%rax + andq PCPU(UCR3_LOAD_MASK),%rax + movq $PMAP_UCR3_NOMASK,PCPU(UCR3_LOAD_MASK) swapgs movq %rdx,%rsp movq %rax,%cr3 Modified: head/sys/amd64/amd64/genassym.c ============================================================================== --- head/sys/amd64/amd64/genassym.c Sat Jul 18 13:10:31 2020 (r363310) +++ head/sys/amd64/amd64/genassym.c Sat Jul 18 18:19:57 2020 (r363311) @@ -230,6 +230,7 @@ ASSYM(PC_TSS, offsetof(struct pcpu, pc_tss)); ASSYM(PC_PM_SAVE_CNT, offsetof(struct pcpu, pc_pm_save_cnt)); ASSYM(PC_KCR3, offsetof(struct pcpu, pc_kcr3)); ASSYM(PC_UCR3, offsetof(struct pcpu, pc_ucr3)); +ASSYM(PC_UCR3_LOAD_MASK, offsetof(struct pcpu, pc_ucr3_load_mask)); ASSYM(PC_SAVED_UCR3, offsetof(struct pcpu, pc_saved_ucr3)); ASSYM(PC_PTI_STACK, offsetof(struct pcpu, pc_pti_stack)); ASSYM(PC_PTI_STACK_SZ, PC_PTI_STACK_SZ); Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sat Jul 18 13:10:31 2020 (r363310) +++ head/sys/amd64/amd64/machdep.c Sat Jul 18 18:19:57 2020 (r363311) @@ -1562,6 +1562,7 @@ amd64_bsp_pcpu_init1(struct pcpu *pc) PCPU_SET(ldt, (struct system_segment_descriptor *)&gdt[GUSERLDT_SEL]); PCPU_SET(fs32p, &gdt[GUFS32_SEL]); PCPU_SET(gs32p, &gdt[GUGS32_SEL]); + PCPU_SET(ucr3_load_mask, PMAP_UCR3_NOMASK); PCPU_SET(smp_tlb_gen, 1); } Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Sat Jul 18 13:10:31 2020 (r363310) +++ head/sys/amd64/amd64/mp_machdep.c Sat Jul 18 18:19:57 2020 (r363311) @@ -283,6 +283,7 @@ init_secondary(void) pc->pc_fs32p = &gdt[GUFS32_SEL]; pc->pc_gs32p = &gdt[GUGS32_SEL]; pc->pc_ldt = (struct system_segment_descriptor *)&gdt[GUSERLDT_SEL]; + pc->pc_ucr3_load_mask = PMAP_UCR3_NOMASK; /* See comment in pmap_bootstrap(). */ pc->pc_pcid_next = PMAP_PCID_KERN + 2; pc->pc_pcid_gen = 1; @@ -821,15 +822,14 @@ invltlb_invpcid_pti_handler(pmap_t smp_tlb_pmap) invpcid(&d, INVPCID_CTXGLOB); } else { invpcid(&d, INVPCID_CTX); - d.pcid |= PMAP_PCID_USER_PT; - invpcid(&d, INVPCID_CTX); + if (smp_tlb_pmap == PCPU_GET(curpmap)) + PCPU_SET(ucr3_load_mask, ~CR3_PCID_SAVE); } } static void invltlb_pcid_handler(pmap_t smp_tlb_pmap) { - uint64_t kcr3, ucr3; uint32_t pcid; #ifdef COUNT_XINVLTLB_HITS @@ -849,15 +849,11 @@ invltlb_pcid_handler(pmap_t smp_tlb_pmap) * invalidation when switching to the pmap on this * CPU. */ - if (PCPU_GET(curpmap) == smp_tlb_pmap) { + if (smp_tlb_pmap == PCPU_GET(curpmap)) { pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; - kcr3 = smp_tlb_pmap->pm_cr3 | pcid; - ucr3 = smp_tlb_pmap->pm_ucr3; - if (ucr3 != PMAP_NO_CR3) { - ucr3 |= PMAP_PCID_USER_PT | pcid; - pmap_pti_pcid_invalidate(ucr3, kcr3); - } else - load_cr3(kcr3); + load_cr3(smp_tlb_pmap->pm_cr3 | pcid); + if (smp_tlb_pmap->pm_ucr3 != PMAP_NO_CR3) + PCPU_SET(ucr3_load_mask, ~CR3_PCID_SAVE); } } } @@ -888,7 +884,9 @@ invlpg_invpcid_handler(pmap_t smp_tlb_pmap, vm_offset_ #endif /* COUNT_IPIS */ invlpg(smp_tlb_addr1); - if (smp_tlb_pmap->pm_ucr3 != PMAP_NO_CR3) { + if (smp_tlb_pmap == PCPU_GET(curpmap) && + smp_tlb_pmap->pm_ucr3 != PMAP_NO_CR3 && + PCPU_GET(ucr3_load_mask) == PMAP_UCR3_NOMASK) { d.pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid | PMAP_PCID_USER_PT; d.pad = 0; @@ -912,7 +910,8 @@ invlpg_pcid_handler(pmap_t smp_tlb_pmap, vm_offset_t s invlpg(smp_tlb_addr1); if (smp_tlb_pmap == PCPU_GET(curpmap) && - (ucr3 = smp_tlb_pmap->pm_ucr3) != PMAP_NO_CR3) { + (ucr3 = smp_tlb_pmap->pm_ucr3) != PMAP_NO_CR3 && + PCPU_GET(ucr3_load_mask) == PMAP_UCR3_NOMASK) { pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; kcr3 = smp_tlb_pmap->pm_cr3 | pcid | CR3_PCID_SAVE; ucr3 |= pcid | PMAP_PCID_USER_PT | CR3_PCID_SAVE; @@ -960,7 +959,9 @@ invlrng_invpcid_handler(pmap_t smp_tlb_pmap, vm_offset invlpg(addr); addr += PAGE_SIZE; } while (addr < addr2); - if (smp_tlb_pmap->pm_ucr3 != PMAP_NO_CR3) { + if (smp_tlb_pmap == PCPU_GET(curpmap) && + smp_tlb_pmap->pm_ucr3 != PMAP_NO_CR3 && + PCPU_GET(ucr3_load_mask) == PMAP_UCR3_NOMASK) { d.pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid | PMAP_PCID_USER_PT; d.pad = 0; @@ -994,7 +995,8 @@ invlrng_pcid_handler(pmap_t smp_tlb_pmap, vm_offset_t addr += PAGE_SIZE; } while (addr < addr2); if (smp_tlb_pmap == PCPU_GET(curpmap) && - (ucr3 = smp_tlb_pmap->pm_ucr3) != PMAP_NO_CR3) { + (ucr3 = smp_tlb_pmap->pm_ucr3) != PMAP_NO_CR3 && + PCPU_GET(ucr3_load_mask) == PMAP_UCR3_NOMASK) { pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; kcr3 = smp_tlb_pmap->pm_cr3 | pcid | CR3_PCID_SAVE; ucr3 |= pcid | PMAP_PCID_USER_PT | CR3_PCID_SAVE; Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat Jul 18 13:10:31 2020 (r363310) +++ head/sys/amd64/amd64/pmap.c Sat Jul 18 18:19:57 2020 (r363311) @@ -2520,7 +2520,16 @@ pmap_invalidate_page_pcid(pmap_t pmap, vm_offset_t va, cpuid = PCPU_GET(cpuid); if (pmap == PCPU_GET(curpmap)) { - if (pmap->pm_ucr3 != PMAP_NO_CR3) { + if (pmap->pm_ucr3 != PMAP_NO_CR3 && + /* + * If we context-switched right after + * PCPU_GET(ucr3_load_mask), we could read the + * ~CR3_PCID_SAVE mask, which causes us to skip + * the code below to invalidate user pages. This + * is handled in pmap_activate_sw_pcid_pti() by + * clearing pm_gen if ucr3_load_mask is ~CR3_PCID_SAVE. + */ + PCPU_GET(ucr3_load_mask) == PMAP_UCR3_NOMASK) { /* * Because pm_pcid is recalculated on a * context switch, we must disable switching. @@ -2635,7 +2644,8 @@ pmap_invalidate_range_pcid(pmap_t pmap, vm_offset_t sv cpuid = PCPU_GET(cpuid); if (pmap == PCPU_GET(curpmap)) { - if (pmap->pm_ucr3 != PMAP_NO_CR3) { + if (pmap->pm_ucr3 != PMAP_NO_CR3 && + PCPU_GET(ucr3_load_mask) == PMAP_UCR3_NOMASK) { critical_enter(); pcid = pmap->pm_pcids[cpuid].pm_pcid; if (invpcid_works1) { @@ -2736,7 +2746,7 @@ static inline void pmap_invalidate_all_pcid(pmap_t pmap, bool invpcid_works1) { struct invpcid_descr d; - uint64_t kcr3, ucr3; + uint64_t kcr3; uint32_t pcid; u_int cpuid, i; @@ -2757,20 +2767,12 @@ pmap_invalidate_all_pcid(pmap_t pmap, bool invpcid_wor d.pad = 0; d.addr = 0; invpcid(&d, INVPCID_CTX); - if (pmap->pm_ucr3 != PMAP_NO_CR3) { - d.pcid |= PMAP_PCID_USER_PT; - invpcid(&d, INVPCID_CTX); - } } else { kcr3 = pmap->pm_cr3 | pcid; - ucr3 = pmap->pm_ucr3; - if (ucr3 != PMAP_NO_CR3) { - ucr3 |= pcid | PMAP_PCID_USER_PT; - pmap_pti_pcid_invalidate(ucr3, kcr3); - } else { - load_cr3(kcr3); - } + load_cr3(kcr3); } + if (pmap->pm_ucr3 != PMAP_NO_CR3) + PCPU_SET(ucr3_load_mask, ~CR3_PCID_SAVE); critical_exit(); } else pmap->pm_pcids[cpuid].pm_gen = 0; @@ -8816,12 +8818,23 @@ pmap_activate_sw_pti_post(struct thread *td, pmap_t pm PCPU_GET(pti_rsp0) : (uintptr_t)td->td_md.md_stack_base; } -static void inline -pmap_activate_sw_pcid_pti(pmap_t pmap, u_int cpuid, const bool invpcid_works1) +static void +pmap_activate_sw_pcid_pti(struct thread *td, pmap_t pmap, u_int cpuid) { - struct invpcid_descr d; + pmap_t old_pmap; uint64_t cached, cr3, kcr3, ucr3; + KASSERT((read_rflags() & PSL_I) == 0, + ("PCID needs interrupts disabled in pmap_activate_sw()")); + + /* See the comment in pmap_invalidate_page_pcid(). */ + if (PCPU_GET(ucr3_load_mask) != PMAP_UCR3_NOMASK) { + PCPU_SET(ucr3_load_mask, PMAP_UCR3_NOMASK); + old_pmap = PCPU_GET(curpmap); + MPASS(old_pmap->pm_ucr3 != PMAP_NO_CR3); + old_pmap->pm_pcids[cpuid].pm_gen = 0; + } + cached = pmap_pcid_alloc_checked(pmap, cpuid); cr3 = rcr3(); if ((cr3 & ~CR3_PCID_MASK) != pmap->pm_cr3) @@ -8831,77 +8844,26 @@ pmap_activate_sw_pcid_pti(pmap_t pmap, u_int cpuid, co ucr3 = pmap->pm_ucr3 | pmap->pm_pcids[cpuid].pm_pcid | PMAP_PCID_USER_PT; - if (!cached && pmap->pm_ucr3 != PMAP_NO_CR3) { - /* - * Explicitly invalidate translations cached from the - * user page table. They are not automatically - * flushed by reload of cr3 with the kernel page table - * pointer above. - * - * Note that the if() condition is resolved statically - * by using the function argument instead of - * runtime-evaluated invpcid_works value. - */ - if (invpcid_works1) { - d.pcid = PMAP_PCID_USER_PT | - pmap->pm_pcids[cpuid].pm_pcid; - d.pad = 0; - d.addr = 0; - invpcid(&d, INVPCID_CTX); - } else { - pmap_pti_pcid_invalidate(ucr3, kcr3); - } - } + if (!cached && pmap->pm_ucr3 != PMAP_NO_CR3) + PCPU_SET(ucr3_load_mask, ~CR3_PCID_SAVE); PCPU_SET(kcr3, kcr3 | CR3_PCID_SAVE); PCPU_SET(ucr3, ucr3 | CR3_PCID_SAVE); if (cached) PCPU_INC(pm_save_cnt); -} -static void -pmap_activate_sw_pcid_invpcid_pti(struct thread *td, pmap_t pmap, u_int cpuid) -{ - - pmap_activate_sw_pcid_pti(pmap, cpuid, true); pmap_activate_sw_pti_post(td, pmap); } static void -pmap_activate_sw_pcid_noinvpcid_pti(struct thread *td, pmap_t pmap, - u_int cpuid) -{ - register_t rflags; - - /* - * If the INVPCID instruction is not available, - * invltlb_pcid_handler() is used to handle an invalidate_all - * IPI, which checks for curpmap == smp_tlb_pmap. The below - * sequence of operations has a window where %CR3 is loaded - * with the new pmap's PML4 address, but the curpmap value has - * not yet been updated. This causes the invltlb IPI handler, - * which is called between the updates, to execute as a NOP, - * which leaves stale TLB entries. - * - * Note that the most typical use of pmap_activate_sw(), from - * the context switch, is immune to this race, because - * interrupts are disabled (while the thread lock is owned), - * and the IPI happens after curpmap is updated. Protect - * other callers in a similar way, by disabling interrupts - * around the %cr3 register reload and curpmap assignment. - */ - rflags = intr_disable(); - pmap_activate_sw_pcid_pti(pmap, cpuid, false); - intr_restore(rflags); - pmap_activate_sw_pti_post(td, pmap); -} - -static void pmap_activate_sw_pcid_nopti(struct thread *td __unused, pmap_t pmap, u_int cpuid) { uint64_t cached, cr3; + KASSERT((read_rflags() & PSL_I) == 0, + ("PCID needs interrupts disabled in pmap_activate_sw()")); + cached = pmap_pcid_alloc_checked(pmap, cpuid); cr3 = rcr3(); if (!cached || (cr3 & ~CR3_PCID_MASK) != pmap->pm_cr3) @@ -8913,17 +8875,6 @@ pmap_activate_sw_pcid_nopti(struct thread *td __unused } static void -pmap_activate_sw_pcid_noinvpcid_nopti(struct thread *td __unused, pmap_t pmap, - u_int cpuid) -{ - register_t rflags; - - rflags = intr_disable(); - pmap_activate_sw_pcid_nopti(td, pmap, cpuid); - intr_restore(rflags); -} - -static void pmap_activate_sw_nopcid_nopti(struct thread *td __unused, pmap_t pmap, u_int cpuid __unused) { @@ -8947,14 +8898,10 @@ DEFINE_IFUNC(static, void, pmap_activate_sw_mode, (str u_int)) { - if (pmap_pcid_enabled && pti && invpcid_works) - return (pmap_activate_sw_pcid_invpcid_pti); - else if (pmap_pcid_enabled && pti && !invpcid_works) - return (pmap_activate_sw_pcid_noinvpcid_pti); - else if (pmap_pcid_enabled && !pti && invpcid_works) + if (pmap_pcid_enabled && pti) + return (pmap_activate_sw_pcid_pti); + else if (pmap_pcid_enabled && !pti) return (pmap_activate_sw_pcid_nopti); - else if (pmap_pcid_enabled && !pti && !invpcid_works) - return (pmap_activate_sw_pcid_noinvpcid_nopti); else if (!pmap_pcid_enabled && pti) return (pmap_activate_sw_nopcid_pti); else /* if (!pmap_pcid_enabled && !pti) */ @@ -8991,10 +8938,26 @@ pmap_activate_sw(struct thread *td) void pmap_activate(struct thread *td) { - - critical_enter(); + /* + * invltlb_{invpcid,}_pcid_handler() is used to handle an + * invalidate_all IPI, which checks for curpmap == + * smp_tlb_pmap. The below sequence of operations has a + * window where %CR3 is loaded with the new pmap's PML4 + * address, but the curpmap value has not yet been updated. + * This causes the invltlb IPI handler, which is called + * between the updates, to execute as a NOP, which leaves + * stale TLB entries. + * + * Note that the most common use of pmap_activate_sw(), from + * a context switch, is immune to this race, because + * interrupts are disabled (while the thread lock is owned), + * so the IPI is delayed until after curpmap is updated. Protect + * other callers in a similar way, by disabling interrupts + * around the %cr3 register reload and curpmap assignment. + */ + spinlock_enter(); pmap_activate_sw(td); - critical_exit(); + spinlock_exit(); } void Modified: head/sys/amd64/include/pcpu.h ============================================================================== --- head/sys/amd64/include/pcpu.h Sat Jul 18 13:10:31 2020 (r363310) +++ head/sys/amd64/include/pcpu.h Sat Jul 18 18:19:57 2020 (r363311) @@ -99,7 +99,8 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x c uint64_t pc_smp_tlb_addr2; \ uint32_t pc_smp_tlb_gen; \ u_int pc_smp_tlb_op; \ - char __pad[2924] /* pad to UMA_PCPU_ALLOC_SIZE */ + uint64_t pc_ucr3_load_mask; \ + char __pad[2916] /* pad to UMA_PCPU_ALLOC_SIZE */ #define PC_DBREG_CMD_NONE 0 #define PC_DBREG_CMD_LOAD 1 Modified: head/sys/amd64/include/pmap.h ============================================================================== --- head/sys/amd64/include/pmap.h Sat Jul 18 13:10:31 2020 (r363310) +++ head/sys/amd64/include/pmap.h Sat Jul 18 18:19:57 2020 (r363311) @@ -241,6 +241,7 @@ #define PMAP_PCID_USER_PT 0x800 #define PMAP_NO_CR3 (~0UL) +#define PMAP_UCR3_NOMASK (~0UL) #ifndef LOCORE From owner-svn-src-head@freebsd.org Sat Jul 18 18:47:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 420DB370F30; Sat, 18 Jul 2020 18:47:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B8H724QKTz4bn3; Sat, 18 Jul 2020 18:47:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id 06IIloBc062055 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 18 Jul 2020 21:47:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 06IIloBc062055 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 06IIloGQ062054; Sat, 18 Jul 2020 21:47:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 18 Jul 2020 21:47:50 +0300 From: Konstantin Belousov To: Kristof Provost Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r363308 - head/sys/net Message-ID: <20200718184750.GY44314@kib.kiev.ua> References: <202007181243.06IChBTR073126@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202007181243.06IChBTR073126@repo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4B8H724QKTz4bn3 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2020 18:47:59 -0000 On Sat, Jul 18, 2020 at 12:43:11PM +0000, Kristof Provost wrote: > Author: kp > Date: Sat Jul 18 12:43:11 2020 > New Revision: 363308 > URL: https://svnweb.freebsd.org/changeset/base/363308 > > Log: > bridge: Don't sleep during epoch > > While it doesn't trigger INVARIANTS or WITNESS on head it does in stable/12. > There's also no reason for it, as we can easily report the out of memory error > to the caller (i.e. userspace). All of these can already fail. This makes syscalls (ioctl) fail randomly. Can you pre-allocate the buffers before entering epoch, instead ? > > PR: 248046 > MFC after: 3 days > > Modified: > head/sys/net/if_bridge.c > > Modified: head/sys/net/if_bridge.c > ============================================================================== > --- head/sys/net/if_bridge.c Sat Jul 18 12:21:08 2020 (r363307) > +++ head/sys/net/if_bridge.c Sat Jul 18 12:43:11 2020 (r363308) > @@ -1393,9 +1393,9 @@ bridge_ioctl_gifs(struct bridge_softc *sc, void *arg) > bifc->ifbic_len = buflen; > return (0); > } > - BRIDGE_UNLOCK(sc); > - outbuf = malloc(buflen, M_TEMP, M_WAITOK | M_ZERO); > - BRIDGE_LOCK(sc); > + outbuf = malloc(buflen, M_TEMP, M_NOWAIT | M_ZERO); > + if (outbuf == NULL) > + return (ENOMEM); > > count = 0; > buf = outbuf; > @@ -1455,9 +1455,9 @@ bridge_ioctl_rts(struct bridge_softc *sc, void *arg) > count++; > buflen = sizeof(bareq) * count; > > - BRIDGE_UNLOCK(sc); > - outbuf = malloc(buflen, M_TEMP, M_WAITOK | M_ZERO); > - BRIDGE_LOCK(sc); > + outbuf = malloc(buflen, M_TEMP, M_NOWAIT | M_ZERO); > + if (outbuf == NULL) > + return (ENOMEM); > > count = 0; > buf = outbuf; > @@ -1783,9 +1783,9 @@ bridge_ioctl_gifsstp(struct bridge_softc *sc, void *ar > return (0); > } > > - BRIDGE_UNLOCK(sc); > - outbuf = malloc(buflen, M_TEMP, M_WAITOK | M_ZERO); > - BRIDGE_LOCK(sc); > + outbuf = malloc(buflen, M_TEMP, M_NOWAIT | M_ZERO); > + if (outbuf == NULL) > + return (ENOMEM); > > count = 0; > buf = outbuf; From owner-svn-src-head@freebsd.org Sat Jul 18 20:20:16 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B1AC1372D6F; Sat, 18 Jul 2020 20:20:16 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B8K9X4FdWz3S9c; Sat, 18 Jul 2020 20:20:16 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 5BBAB2674D; Sat, 18 Jul 2020 20:20:16 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 324B629D0D; Sat, 18 Jul 2020 22:20:14 +0200 (CEST) From: "Kristof Provost" To: "Konstantin Belousov" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r363308 - head/sys/net Date: Sat, 18 Jul 2020 22:20:10 +0200 X-Mailer: MailMate (1.13.1r5671) Message-ID: <1E8C2818-9388-4722-A3A1-1F6B54A597A8@FreeBSD.org> In-Reply-To: <20200718184750.GY44314@kib.kiev.ua> References: <202007181243.06IChBTR073126@repo.freebsd.org> <20200718184750.GY44314@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2020 20:20:16 -0000 On 18 Jul 2020, at 20:47, Konstantin Belousov wrote: > On Sat, Jul 18, 2020 at 12:43:11PM +0000, Kristof Provost wrote: >> Author: kp >> Date: Sat Jul 18 12:43:11 2020 >> New Revision: 363308 >> URL: https://svnweb.freebsd.org/changeset/base/363308 >> >> Log: >> bridge: Don't sleep during epoch >> >> While it doesn't trigger INVARIANTS or WITNESS on head it does in >> stable/12. >> There's also no reason for it, as we can easily report the out of >> memory error >> to the caller (i.e. userspace). All of these can already fail. > This makes syscalls (ioctl) fail randomly. Can you pre-allocate the > buffers > before entering epoch, instead ? > Not easily, no. The bridge ioctl handling is all done via bridge_ioctl(), which enters epoch and dispatches to the bridge_control_table. We’d have to modify every single ioctl function. These are also not the only ioctl functions that can return ENOMEM (or EINVAL). bridge_ioctl_add() already did, for example. Best regards, Kristof